Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
神之吹息
windbot
Commits
d9578872
Commit
d9578872
authored
Mar 27, 2024
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
72bf1203
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
832 additions
and
33 deletions
+832
-33
BotWrapper/bot.conf
BotWrapper/bot.conf
+5
-0
Decks/AI_ObsidianMagical.ydk
Decks/AI_ObsidianMagical.ydk
+45
-0
Dialogs/rd-b.json
Dialogs/rd-b.json
+68
-0
Game/AI/AIUtil.cs
Game/AI/AIUtil.cs
+1
-1
Game/AI/Decks/ExcutieExecutor.cs
Game/AI/Decks/ExcutieExecutor.cs
+1
-31
Game/AI/Decks/ObsidianMagicalExecutor.cs
Game/AI/Decks/ObsidianMagicalExecutor.cs
+639
-0
WindBot.csproj
WindBot.csproj
+68
-1
bots.json
bots.json
+5
-0
No files found.
BotWrapper/bot.conf
View file @
d9578872
...
...
@@ -29,6 +29,11 @@ Name=光天女 Deck=Excutie Dialog=Excutie.zh-CN
强力的超可爱执行者卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!黑曜魔导
Name
=黑曜魔导
Deck
=
ObsidianMagical
Dialog
=
rd
-
b
.
zh
-
CN
滤抽暗魔术师卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!传说子
Name
=传说子
Deck
=
TheLegend
Dialog
=
rd
大量传说卡堆成的卡组。需勾选不检查卡组才能对战。
...
...
Decks/AI_ObsidianMagical.ydk
0 → 100644
View file @
d9578872
#created by ...
#main
120130000
120254035
120254035
120254035
120246080
120246081
120246081
120246081
120181002
120181002
120130041
120130041
120199052
120199052
120199052
120203027
120203027
120208053
120208053
120208053
120203029
120203029
120217018
120217018
120231069
120246018
120246083
120246083
120246083
120246084
120246084
120246084
120246085
120246085
120246085
120249055
120249055
120249055
120244055
120232005
#extra
!side
120105012
Dialogs/rd-b.json
0 → 100644
View file @
d9578872
{
"welcome"
:
[
"杂鱼~杂鱼~"
,
"哼,你就是我的对手吗?看起来不怎么样嘛。"
,
],
"deckerror"
:
[
"哈,你的卡组出了点小问题?看来你还不够格和我对决。"
],
"duelstart"
:
[
"你以为我会对你客气吗?"
,
"我可不会手下留情哟!"
],
"newturn"
:
[
"轮到我了,抽卡!我手中的力量又增强了。"
,
"我抽到了什么?不管怎样,胜利的天平已经倾斜向我这边!"
],
"endturn"
:
[
"回合结束,你就好好体会一下等待失败的煎熬吧。"
,
"我的回合结束,现在轮到你颤抖了。"
,
"轮到你了,希望你不要让我失望。"
,
"大叔生气了吗,嘻嘻~"
],
"directattack"
:
[
"{0},直接攻击!你的生命值就是我的了!"
,
"{0},给我用力揍他!"
,
"{0},直接攻击对手!你的防御在我面前一无是处!"
,
"{0},攻击对手的生命值!让他们见识一下真正的力量!"
,
"{0},让杂鱼大叔见识一下你的力量。!"
],
"attack"
:
[
"{0},攻击这只{1}!你的命运已经注定了!"
,
"你这杂鱼,捉弄起来真无趣。"
,
"{0},冲向那只杂鱼!"
,
"{1}只是个杂鱼罢了,连我的一根汗毛都不如。"
],
"ondirectattack"
:
[
"哎呀呀,杂鱼生气了吗?"
,
"哼,就这点本事吗?"
,
"真是差劲透顶!"
,
"啊!好痛!!!"
,
"刚才的冒犯真的很对不起!请饶了我吧!我没想到会这样。"
,
"呜呜,我错了,我不该小看你的。{0}的攻击好痛。"
,
"请、请停下来!我、我再也不敢了!"
],
"facedownmonstername"
:
"隐匿的怪兽"
,
"activate"
:
[
"我发动{0}。你最好小心了,这将是你噩梦的开始。"
,
"我使用{0}的效果。看来你还没意识到局势的严重性。"
,
"我使用{0}的力量。在我的策略面前,你的抵抗毫无意义。"
],
"summon"
:
[
"我召唤{0}。颤抖吧,因为你面对的是无敌的力量!"
,
"出来吧,{0}!这可不是你的杂鱼怪兽能比的!"
,
"出现吧,{0}!你的到来将宣告对手的末日!"
,
"出来吧{0}!你将见证真正的强者是如何战斗的!"
,
"召唤{0}。在我的怪兽面前,你的防御不过是纸糊的!"
],
"setmonster"
:
[
"我放置了一只怪兽。这只是我胜利之路上的一小步。"
,
"我里侧表示放置了一只怪兽。你最好祈祷能抽到对付它的牌。"
],
"chaining"
:
[
"看这里!我发动{0}!你已经落入我的陷阱!"
,
"你的每一个动作都在我的计算之中。"
,
"发动{0}!你无法逃脱我的掌控。"
,
"这是我为你准备的惊喜。"
]
}
Game/AI/AIUtil.cs
View file @
d9578872
...
...
@@ -74,7 +74,7 @@ namespace WindBot.Game.AI
int
bestBotPower
=
GetBestPower
(
Bot
,
onlyATK
);
return
IsOneEnemyBetterThanValue
(
bestBotPower
,
onlyATK
);
}
/// <summary>
/// Do all enemy monsters have better power than the best power of the bot's?
/// </summary>
...
...
Game/AI/Decks/ExcutieExecutor.cs
View file @
d9578872
...
...
@@ -493,37 +493,7 @@ namespace WindBot.Game.AI.Decks
list
[
n
]
=
temp
;
}
}
public
ClientCard
GetBestEnemyCard_random
()
{
// monsters
ClientCard
card
=
Util
.
GetProblematicEnemyMonster
(
0
,
true
);
if
(
card
!=
null
)
return
card
;
if
(
Util
.
GetOneEnemyBetterThanMyBest
()
!=
null
)
{
card
=
Enemy
.
MonsterZone
.
GetHighestAttackMonster
(
true
);
if
(
card
!=
null
)
return
card
;
}
// spells
List
<
ClientCard
>
enemy_spells
=
Enemy
.
GetSpells
();
RandomSort
(
enemy_spells
);
foreach
(
ClientCard
sp
in
enemy_spells
)
{
if
(
sp
.
IsFaceup
()
&&
!
sp
.
IsDisabled
())
return
sp
;
}
if
(
enemy_spells
.
Count
>
0
)
return
enemy_spells
[
0
];
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
if
(
monsters
.
Count
>
0
)
{
RandomSort
(
monsters
);
return
monsters
[
0
];
}
return
null
;
}
private
bool
ImFeelingLazy
()
{
if
(
Executors
.
Any
(
exec
=>
(
exec
.
Type
==
ExecutorType
.
SummonOrSet
||
exec
.
Type
==
ExecutorType
.
Summon
||
exec
.
Type
==
ExecutorType
.
MonsterSet
)
&&
exec
.
CardId
==
Card
.
Id
))
...
...
Game/AI/Decks/ObsidianMagicalExecutor.cs
0 → 100644
View file @
d9578872
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"ObsidianMagical"
,
"AI_ObsidianMagical"
)]
public
class
ObsidianMagicalExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
遂行者
=
120254035
;
public
const
int
剑黎
=
120246080
;
public
const
int
黑曜
=
120246081
;
public
const
int
DMG
=
120181002
;
public
const
int
DMA
=
120130041
;
public
const
int
DMB
=
120203027
;
public
const
int
采掘
=
120203029
;
public
const
int
魔术的幕帘
=
120217018
;
public
const
int
二重加速
=
120246018
;
public
const
int
宝石
=
120246083
;
public
const
int
魔导书弃却
=
120246084
;
public
const
int
魔力抽出
=
120246085
;
public
const
int
七宝船
=
120199052
;
public
const
int
三猫
=
120249055
;
public
const
int
天惠枪
=
120244055
;
public
const
int
水流
=
120105012
;
public
const
int
幽灵旋风
=
120208053
;
}
public
ObsidianMagicalExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
魔法筒
,
魔法筒
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DMA
,
DMAEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
幽灵旋风
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
水流
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
三猫
,
三猫
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
黑洞
,
黑洞
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
魔导书弃却
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七宝船
,
七宝船
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
遂行者
,
遂行者
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
采掘
,
采掘
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔导书弃却
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
三猫
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔力抽出
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
幽灵旋风
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
水流
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
天惠枪
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
DMB
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔导书弃却
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔术的幕帘
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
宝石
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
采掘
,
抽出
set
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
DMA
,
抽出
set
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
魔力抽出
,
魔力抽出
Effect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
剑黎
,
抽出
sp
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
宝石
,
宝石
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
采掘
,
采掘
Effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七宝船
,
七宝船
Effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
魔术的幕帘
,
幕帘
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
七宝船
,
抽出
set
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
二重加速
,
二重加速
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DMB
,
DMBEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
天惠枪
,
天惠枪
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔力抽出
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔术的幕帘
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
七宝船
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
采掘
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
幽灵旋风
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
DMB
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
二重加速
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
水流
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
宝石
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
天惠枪
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
三猫
,
speset
);
AddExecutor
(
ExecutorType
.
SpellSet
,
_CardId
.
魔法筒
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
魔术的幕帘
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
DMA
);
AddExecutor
(
ExecutorType
.
SpellSet
,
_CardId
.
黑洞
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
DMG
,
DMGsummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
宝石
,
宝石
Effect2
);
//AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor
(
ExecutorType
.
Repos
,
_CardId
.
黑魔术师
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
遂行者
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
DMG
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
//AddExecutor(ExecutorType.SummonOrSet, ImFeelingLazy);
}
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForDeck
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
Remove
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
};
private
List
<
int
>
HintMsgForExtra
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
Remove
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
};
private
List
<
int
>
HintMsgForSelf
=
new
List
<
int
>
{
HintMsg
.
Equip
};
private
List
<
int
>
HintMsgForMaterial
=
new
List
<
int
>
{
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Release
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
,
HintMsg
.
Destroy
,
HintMsg
.
Equip
,
HintMsg
.
Confirm
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForDeck
.
Contains
(
hint
))
{
IList
<
ClientCard
>
deckCards
=
cards
.
Where
(
card
=>
card
.
Location
==
CardLocation
.
Deck
).
ToList
();
// select deck's card first
while
(
deckCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
deckCards
[
Program
.
Rand
.
Next
(
deckCards
.
Count
)];
selected
.
Add
(
card
);
deckCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForExtra
.
Contains
(
hint
))
{
IList
<
ClientCard
>
ExtraCards
=
cards
.
Where
(
card
=>
card
.
Location
==
CardLocation
.
Extra
).
ToList
();
// select extra's card first
while
(
ExtraCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
ExtraCards
[
Program
.
Rand
.
Next
(
ExtraCards
.
Count
)];
selected
.
Add
(
card
);
ExtraCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForSelf
.
Contains
(
hint
))
{
IList
<
ClientCard
>
botCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
0
).
ToList
();
// select bot's card first
while
(
botCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
botCards
[
Program
.
Rand
.
Next
(
botCards
.
Count
)];
selected
.
Add
(
card
);
botCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForMaterial
.
Contains
(
hint
))
{
IList
<
ClientCard
>
materials
=
cards
.
OrderBy
(
card
=>
card
.
Attack
).
ToList
();
// select low attack first
while
(
materials
.
Count
>
0
&&
selected
.
Count
<
min
)
{
ClientCard
card
=
materials
[
0
];
selected
.
Add
(
card
);
materials
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
// select random cards
while
(
selected
.
Count
<
min
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
// select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
selected
;
}
public
override
int
OnSelectOption
(
IList
<
int
>
options
)
{
return
Program
.
Rand
.
Next
(
options
.
Count
);
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
YGOSharp
.
OCGWrapper
.
NamedCard
cardData
=
YGOSharp
.
OCGWrapper
.
NamedCard
.
Get
(
cardId
);
if
(
cardData
!=
null
)
{
if
(
cardData
.
Attack
<
0
)
return
CardPosition
.
FaceUpAttack
;
if
(
cardData
.
Attack
<=
1000
)
return
CardPosition
.
FaceUpDefence
;
}
return
0
;
}
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
void
RandomSort
(
List
<
ClientCard
>
list
)
{
int
n
=
list
.
Count
;
while
(
n
--
>
1
)
{
int
index
=
Program
.
Rand
.
Next
(
n
+
1
);
ClientCard
temp
=
list
[
index
];
list
[
index
]
=
list
[
n
];
list
[
n
]
=
temp
;
}
}
public
ClientCard
GetBelowLv8
()
{
List
<
ClientCard
>
enemyMonsters
=
Enemy
.
GetMonsters
();
ClientCard
highestLevelMonster
=
null
;
foreach
(
ClientCard
monster
in
enemyMonsters
)
{
if
(
monster
.
Level
<
8
)
{
if
(
highestLevelMonster
==
null
||
monster
.
Level
>
highestLevelMonster
.
Level
)
{
highestLevelMonster
=
monster
;
}
}
}
return
highestLevelMonster
;
}
public
override
BattlePhaseAction
OnSelectAttackTarget
(
ClientCard
attacker
,
IList
<
ClientCard
>
defenders
)
{
int
minAttack
=
1450
;
foreach
(
ClientCard
defender
in
defenders
)
{
if
(
defender
.
IsAttack
()
&&
defender
.
Attack
<
minAttack
)
minAttack
=
defender
.
Attack
;
}
foreach
(
ClientCard
defenderCard
in
defenders
)
if
(
defenderCard
.
IsAttack
()
&&
defenderCard
.
Attack
==
minAttack
)
{
return
AI
.
Attack
(
attacker
,
defenderCard
);
}
return
base
.
OnSelectAttackTarget
(
attacker
,
defenders
);
}
private
IList
<
int
>
over3
=
new
[]
{
_CardId
.
黑洞
,
CardId
.
DMA
,
CardId
.
宝石
,
CardId
.
二重加速
,
CardId
.
DMB
,
CardId
.
魔力抽出
,
CardId
.
幽灵旋风
,
CardId
.
水流
,
CardId
.
魔导书弃却
,
CardId
.
天惠枪
,
CardId
.
魔术的幕帘
,
CardId
.
七宝船
,
CardId
.
采掘
,
CardId
.
三猫
};
private
IList
<
int
>
target
=
new
[]
{
CardId
.
三猫
,
CardId
.
宝石
,
_CardId
.
黑洞
,
CardId
.
DMB
,
CardId
.
魔导书弃却
,
CardId
.
幽灵旋风
,
CardId
.
魔术的幕帘
,
CardId
.
水流
,
CardId
.
天惠枪
,
CardId
.
二重加速
,
CardId
.
七宝船
,
CardId
.
魔力抽出
,
CardId
.
DMA
,
CardId
.
采掘
};
private
IList
<
int
>
cost2
=
new
[]
{
CardId
.
三猫
,
CardId
.
幽灵旋风
,
CardId
.
水流
,
CardId
.
DMB
,
CardId
.
二重加速
,
CardId
.
采掘
,
CardId
.
魔术的幕帘
,
CardId
.
七宝船
,
CardId
.
魔导书弃却
,
CardId
.
天惠枪
,
CardId
.
魔力抽出
,
CardId
.
宝石
,
CardId
.
DMA
,
_CardId
.
黑洞
};
private
IList
<
int
>
mon
=
new
[]
{
_CardId
.
黑魔术师
,
CardId
.
遂行者
,
CardId
.
黑曜
,
CardId
.
剑黎
};
private
IList
<
int
>
mon2
=
new
[]
{
CardId
.
黑曜
,
CardId
.
遂行者
,
CardId
.
剑黎
,
_CardId
.
黑魔术师
};
private
IList
<
int
>
mon3
=
new
[]
{
CardId
.
黑曜
,
CardId
.
遂行者
,
CardId
.
剑黎
,
_CardId
.
黑魔术师
,
CardId
.
DMG
};
private
bool
speset
()
{
if
(
Bot
.
GetSpellCountWithoutField
()
<=
1
)
return
true
;
return
false
;
}
private
bool
抽出
set
()
{
if
(
Bot
.
HasInSpellZone
(
CardId
.
魔力抽出
)
&&
Bot
.
GetSpellCountWithoutField
()
<
3
)
return
true
;
if
(
Bot
.
HasInHand
(
CardId
.
魔力抽出
)
&&
Bot
.
GetSpellCountWithoutField
()
<
2
)
return
true
;
return
false
;
}
private
bool
抽出
sp
()
{
if
(
Bot
.
HasInHand
(
CardId
.
魔力抽出
)
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
6
)
==
1
)
return
false
;
return
true
;
}
private
bool
DMGsummon
()
{
int
tributecount
=
1
;
IList
<
int
>
ssmon
=
new
[]
{
CardId
.
DMG
,
_CardId
.
黑魔术师
,
CardId
.
剑黎
,
CardId
.
遂行者
};
if
((
Bot
.
GetHandCount
()
<=
4
)
&&
(
Bot
.
HasInMonstersZone
(
ssmon
))
&&
(
Bot
.
HasInMonstersZoneOrInGraveyard
(
_CardId
.
黑魔术师
)))
for
(
int
j
=
0
;
j
<
7
;
++
j
)
{
ClientCard
tributeCard
=
Bot
.
MonsterZone
[
j
];
if
(
tributeCard
==
null
)
continue
;
if
(
tributeCard
.
IsCode
(
ssmon
))
tributecount
--;
}
return
tributecount
<=
0
;
}
private
bool
遂行者
Effect
()
{
int
hya
;
if
(
Bot
.
GetGraveyardSpells
().
Count
>=
15
)
hya
=
1000
;
else
hya
=
1500
;
ClientCard
highest8
=
GetBelowLv8
();
if
(!
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
)
&&
Bot
.
GetGraveyardSpells
().
Count
>=
10
)
{
AI
.
SelectYesNo
(
true
);
if
(
Bot
.
GetGraveyardMonsters
().
Count
>
3
)
{
AI
.
SelectCard
(
over3
);
if
(
highest8
!=
null
)
AI
.
SelectNextCard
(
highest8
);
}
if
(
Bot
.
GetGraveyardMonsters
().
Count
<=
3
)
{
AI
.
SelectCard
(
target
);
if
(
highest8
!=
null
)
AI
.
SelectNextCard
(
highest8
);
}
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
)
&&
Bot
.
GetGraveyardSpells
().
Count
>=
10
&&
Util
.
GetBestAttack
(
Bot
)
-
Util
.
GetBestAttack
(
Enemy
)
>=
hya
)
{
AI
.
SelectYesNo
(
true
);
if
(
Bot
.
GetGraveyardMonsters
().
Count
>
3
)
AI
.
SelectCard
(
over3
);
AI
.
SelectNextCard
(
Enemy
.
MonsterZone
.
GetHighestAttackMonster
());
if
(
Bot
.
GetGraveyardMonsters
().
Count
<=
3
)
AI
.
SelectCard
(
target
);
AI
.
SelectNextCard
(
Enemy
.
MonsterZone
.
GetHighestAttackMonster
());
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
)
&&
Bot
.
GetGraveyardSpells
().
Count
>=
10
&&
Util
.
GetBestAttack
(
Bot
)
-
Util
.
GetBestAttack
(
Enemy
)
<
hya
)
{
AI
.
SelectYesNo
(
false
);
}
if
(
Bot
.
GetGraveyardSpells
().
Count
<
10
)
return
true
;
return
false
;
}
private
bool
DMAEffect
()
{
if
(
Enemy
.
GetSpellCount
()
>=
2
&&
(
Bot
.
HasInMonstersZone
(
_CardId
.
黑魔术师
)
||
Bot
.
HasInMonstersZone
(
CardId
.
遂行者
)))
return
true
;
if
(
Enemy
.
GetSpellCount
()
==
1
&&
(
Bot
.
HasInMonstersZone
(
_CardId
.
黑魔术师
)
||
Bot
.
HasInMonstersZone
(
CardId
.
遂行者
))
&&
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsAttack
()
&&
card
.
Attack
>=
Enemy
.
LifePoints
)
>=
2
)
return
true
;
return
false
;
}
private
bool
七宝船
Effect
()
{
if
(!
Bot
.
HasInHand
(
CardId
.
魔力抽出
)
&&
Bot
.
HasInHand
(
mon
))
{
AI
.
SelectCard
(
mon
);
AI
.
SelectYesNo
(
true
);
return
true
;
}
return
false
;
}
private
bool
七宝船
Effect2
()
{
if
(
Bot
.
HasInHand
(
mon
))
{
AI
.
SelectCard
(
mon
);
AI
.
SelectYesNo
(
true
);
return
true
;
}
return
false
;
}
private
bool
魔力抽出
Effect
()
{
if
(
Bot
.
HasInSpellZone
(
target
))
{
AI
.
SelectCard
(
target
);
if
(
Bot
.
HasInHand
(
mon
))
{
AI
.
SelectYesNo
(
true
);
AI
.
SelectNextCard
(
mon
);
}
}
return
true
;
;
}
private
bool
幕帘
Effect
()
{
if
(
Bot
.
HasInHandOrInSpellZone
(
CardId
.
DMA
)
&&
(
Bot
.
HasInHand
(
CardId
.
遂行者
)
||
Bot
.
HasInHand
(
_CardId
.
黑魔术师
))&&
Enemy
.
GetSpellCount
()
>=
2
)
{
AI
.
SelectCard
(
CardId
.
遂行者
,
_CardId
.
黑魔术师
);
return
true
;
}
if
(
Bot
.
HasInHand
(
CardId
.
黑曜
)
&&
Bot
.
GetGraveyardSpells
().
Count
>=
5
)
{
AI
.
SelectCard
(
CardId
.
黑曜
);
return
true
;
}
if
(
Bot
.
HasInHand
(
CardId
.
遂行者
))
{
AI
.
SelectCard
(
CardId
.
遂行者
);
return
true
;
}
if
(
Bot
.
HasInHand
(
mon3
))
AI
.
SelectCard
(
mon3
);
return
true
;
}
private
bool
天惠枪
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
))
{
AI
.
SelectCard
(
CardId
.
黑曜
);
return
true
;
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
遂行者
))
{
AI
.
SelectCard
(
CardId
.
遂行者
);
return
true
;
}
if
(
Bot
.
HasInMonstersZone
(
_CardId
.
黑魔术师
))
{
AI
.
SelectCard
(
_CardId
.
黑魔术师
);
return
true
;
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
剑黎
))
{
AI
.
SelectCard
(
CardId
.
剑黎
);
return
true
;
}
return
true
;
}
private
bool
二重加速
Effect
()
{
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(!
Enemy
.
HasAttackingMonster
()
&&
Enemy
.
HasDefendingMonster
()
&&
Enemy
.
GetMonsterCount
()
>=
Bot
.
GetMonsterCount
())
return
false
;
else
AI
.
SelectCard
();
AI
.
SelectNextCard
(
mon3
);
return
true
;
}
private
bool
DMBEffect
()
{
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(!
Enemy
.
HasAttackingMonster
()
&&
Enemy
.
HasDefendingMonster
()
&&
Enemy
.
GetMonsterCount
()
>=
Bot
.
GetMonsterCount
())
return
false
;
else
AI
.
SelectCard
(
mon3
);
return
true
;
}
private
bool
三猫
Effect
()
{
if
(
Bot
.
GetGraveyardMonsters
().
Count
<=
3
)
{
AI
.
SelectYesNo
(
true
);
if
(
Bot
.
GetGraveyardMonsters
().
Count
>=
2
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
6
)
>=
3
&&
Bot
.
HasInGraveyard
(
CardId
.
七宝船
))
{
AI
.
SelectCard
(
CardId
.
七宝船
);
return
true
;
}
if
(
Bot
.
GetGraveyardMonsters
().
Count
>=
2
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
6
)
==
0
&&
Bot
.
HasInGraveyard
(
CardId
.
宝石
))
{
AI
.
SelectCard
(
CardId
.
宝石
);
return
true
;
}
if
(
Bot
.
GetGraveyardMonsters
().
Count
>=
2
&&
Enemy
.
GetSpellCount
()
>
2
&&
(
Bot
.
HasInMonstersZone
(
_CardId
.
黑魔术师
)
||
Bot
.
HasInMonstersZone
(
CardId
.
遂行者
))
&&
Bot
.
HasInGraveyard
(
CardId
.
DMA
))
{
AI
.
SelectCard
(
CardId
.
DMA
);
return
true
;
}
if
(
Bot
.
GetGraveyardMonsters
().
Count
>=
2
&&
Bot
.
HasInGraveyard
(
CardId
.
天惠枪
)
&&
!
Enemy
.
HasAttackingMonster
()
&&
(
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
)
||
Bot
.
HasInHandOrInSpellZone
(
CardId
.
宝石
)))
{
AI
.
SelectCard
(
CardId
.
天惠枪
);
return
true
;
}
if
(
Bot
.
GetGraveyardMonsters
().
Count
>=
2
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
6
)
==
0
&&
Bot
.
HasInGraveyard
(
CardId
.
剑黎
))
{
AI
.
SelectCard
(
CardId
.
剑黎
);
return
true
;
}
else
AI
.
SelectCard
(
target
);
return
true
;
}
else
if
(!
Bot
.
HasInHand
(
CardId
.
魔导书弃却
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
))
{
return
true
;
}
return
false
;
}
private
bool
采掘
Effect
()
{
if
(
Util
.
IsOneEnemyBetter
()
&&
Util
.
GetTotalAttackingMonsterAttack
(
1
)
>=
3500
&&
!
Enemy
.
HasInMonstersZone
(
_CardId
.
终焰魔神
)
&&
Bot
.
HasInGraveyard
(
_CardId
.
黑洞
))
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
_CardId
.
黑洞
);
return
true
;
}
if
(
Enemy
.
GetMonsterCount
()
>
0
&&
Bot
.
GetGraveyardMonsters
().
Count
<
3
&&
Bot
.
HasInGraveyard
(
CardId
.
三猫
)
)
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
三猫
);
return
true
;
}
if
(
Bot
.
GetMonsterCount
()
<=
1
&&
Bot
.
HasInGraveyard
(
CardId
.
宝石
)
&&
(
Bot
.
HasInHandOrInGraveyard
(
CardId
.
DMG
)
&&
Bot
.
HasInHandOrInGraveyard
(
mon2
)))
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
宝石
);
return
true
;
}
if
(
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
6
)
>=
3
&&
Bot
.
HasInGraveyard
(
CardId
.
七宝船
))
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
七宝船
);
return
true
;
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
黑曜
)
&&
Bot
.
HasInGraveyard
(
CardId
.
天惠枪
)
&&
!
Enemy
.
HasAttackingMonster
()
&&
Enemy
.
HasDefendingMonster
())
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
天惠枪
);
return
true
;
}
return
false
;
}
private
bool
采掘
Effect2
()
{
if
(
Enemy
.
GetSpellCount
()
>=
2
&&
(
Bot
.
HasInMonstersZone
(
_CardId
.
黑魔术师
)
||
Bot
.
HasInMonstersZone
(
CardId
.
遂行者
))
&&
Bot
.
HasInGraveyard
(
CardId
.
DMA
))
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
DMA
);
return
true
;
}
if
(
Bot
.
Deck
.
Count
>=
10
&&
Bot
.
HasInGraveyard
(
CardId
.
魔导书弃却
))
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
魔导书弃却
);
return
true
;
}
if
(
Duel
.
Turn
!=
1
&&
Bot
.
HasInGraveyard
(
CardId
.
二重加速
)
&&
Bot
.
HasAttackingMonster
()
&&
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>
5
)
>=
2
)
{
AI
.
SelectCard
(
cost2
);
AI
.
SelectNextCard
(
CardId
.
二重加速
);
return
true
;
}
return
false
;
}
private
bool
宝石
Effect
()
{
if
(
Bot
.
GetMonsterCount
()
<=
1
)
{
if
(
Bot
.
HasInHandOrInGraveyard
(
CardId
.
DMG
)
&&
Bot
.
HasInHandOrInGraveyard
(
mon2
))
AI
.
SelectCard
(
mon2
);
return
true
;
}
return
false
;
}
private
bool
宝石
Effect2
()
{
if
(
Bot
.
GetMonsterCount
()
==
2
)
{
if
(
Bot
.
HasInGraveyard
(
mon2
)
&&
Enemy
.
GetSpellCountWithoutField
()
<=
1
)
AI
.
SelectCard
(
mon2
);
return
true
;
}
return
false
;
}
}
}
WindBot.csproj
View file @
d9578872
...
...
@@ -83,6 +83,7 @@
<Compile
Include=
"Game\AI\Decks\LuckyExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MathMechExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MituziExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ObsidianMagicalExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\PureWindsExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DragunExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\Level8Executor.cs"
/>
...
...
@@ -178,7 +179,73 @@
<None
Include=
"Decks\*.ydk"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\*.json"
>
<None
Include=
"Dialogs\anothercopy.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\BA.zh-TW.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\cirno.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\copy.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\default.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\Excutie.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\gugugu.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\kiwi.zh-TW.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\Mituzi.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\mokey.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\near.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\rd-b.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\rd-a.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\rd-c.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\rd-d.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\rd.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\smart.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\soul.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\swordsman.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\verre.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\VI-1911.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\Zefra.zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
...
...
bots.json
View file @
d9578872
...
...
@@ -30,6 +30,11 @@
"name"
:
"光天女"
,
"deck"
:
"Excutie"
,
"dialog"
:
"Excutie.zh-CN"
},
{
"name"
:
"黑曜魔导"
,
"deck"
:
"ObsidianMagical"
,
"dialog"
:
"ObsidianMagical.zh-CN"
},
{
"name"
:
"幻宇子"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment