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
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
MyCard
windbot
Commits
faa07ff1
Commit
faa07ff1
authored
Sep 15, 2021
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
“1”
parent
64f7f2bd
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
906 additions
and
184 deletions
+906
-184
BotWrapper/bot.conf
BotWrapper/bot.conf
+13
-183
Decks/AI_BusterBlader.ydk
Decks/AI_BusterBlader.ydk
+44
-0
Decks/AI_DinocarriageDynarmix.ydk
Decks/AI_DinocarriageDynarmix.ydk
+44
-0
Decks/AI_RushDragonDragears.ydk
Decks/AI_RushDragonDragears.ydk
+45
-0
Game/AI/Decks/BusterBladerExecutor.cs
Game/AI/Decks/BusterBladerExecutor.cs
+211
-0
Game/AI/Decks/DinocarriageDynarmixExecutor.cs
Game/AI/Decks/DinocarriageDynarmixExecutor.cs
+333
-0
Game/AI/Decks/RushDragonDragearsExecutor.cs
Game/AI/Decks/RushDragonDragearsExecutor.cs
+215
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+1
-1
No files found.
BotWrapper/bot.conf
View file @
faa07ff1
#bots list
#bots list
# !name
# !name
# command
# command
# description
# description
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020
, SELECT_DECKFILE
)
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020)
!随机-非常简单
!齿车戒龙
Random
=
AI_LV1
Name
=齿车戒龙
Deck
=
RushDragonDragears
Dialog
=
zh
-
CN
主要是一些沙包。
龙法卡组。
SUPPORT_MASTER_RULE_2020
!随机-简单
Random
=
AI_LV2
一些比较弱的卡组。
SUPPORT_MASTER_RULE_2020
!随机-普通
Random
=
AI_LV3
一些环境里可以看到的卡组。
SUPPORT_MASTER_RULE_2020
!随机-报社
Random
=
AI_ANTI_META
一些报复社会(针对主流卡组的弱点)的卡组。
SUPPORT_MASTER_RULE_2020
!
P2
-自选卡组
Name
=
P2
Deck
=
Lucky
Dialog
=
gugugu
.
zh
-
CN
人机卡组由你选择。随缘出牌。可将你的卡组文件(.
ydk
)复制到
WindBot
的对应文件夹。
SELECT_DECKFILE
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!悠悠
Name
=悠悠
Deck
=
MokeyMokey
Dialog
=
mokey
.
zh
-
CN
沙包。
AI_LV1
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!悠悠王
Name
=悠悠王
Deck
=
MokeyMokeyKing
Dialog
=
mokey
.
zh
-
CN
大沙包。
AI_LV1
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!谜之剑士
LV4
-龙骑星爆
Name
=谜之剑士
LV4
Deck
=
Dragunity
Dialog
=
swordsman
.
zh
-
CN
龙骑轴星尘龙爆裂体卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!谜之剑士
LV4
-
L8
Name
=谜之剑士
LV4
Deck
=
'Level VIII'
Dialog
=
swordsman
.
zh
-
CN
8
星同调卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!谜之剑士
LV4
-
R5
Name
=谜之剑士
LV4
Deck
=
'Rank V'
Dialog
=
swordsman
.
zh
-
CN
5
阶超量卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!谜之剑士
LV4
-异热同心武器
Name
=谜之剑士
LV4
Deck
=
'Zexal Weapons'
Dialog
=
swordsman
.
zh
-
CN
神装电光皇卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!琪露诺-彩虹
Name
=琪露诺
Deck
=
Rainbow
Dialog
=
cirno
.
zh
-
CN
全属性凡骨卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!琪露诺-饼蛙
Name
=琪露诺
Deck
=
'Toadally Awesome'
Dialog
=
cirno
.
zh
-
CN
大师规则三的全盛饼蛙卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!复制植物-青眼
Name
=复制植物
Deck
=
Blue
-
Eyes
Dialog
=
copy
.
zh
-
CN
青眼卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!复制植物-十二兽
Name
=复制植物
Deck
=
Zoodiac
Dialog
=
copy
.
zh
-
CN
大师规则三的十四兽卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_MASTER_RULE_2020
!尼亚-妖仙兽
Name
=尼亚
Deck
=
Yosenju
Dialog
=
near
.
zh
-
CN
妖仙兽卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!尼亚-机壳
Name
=尼亚
Deck
=
Qliphort
Dialog
=
near
.
zh
-
CN
机壳卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!尼亚-淘气仙星
Name
=尼亚
Deck
=
Trickstar
Dialog
=
near
.
zh
-
CN
旧式淘气仙星卡组。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!尼亚-幻变骚灵
Name
=尼亚
Deck
=
Altergeist
Dialog
=
near
.
zh
-
CN
幻变骚灵卡组。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!复制梁龙-闪刀姬
Name
=复制梁龙
Deck
=
SkyStriker
Dialog
=
anothercopy
.
zh
-
CN
旧式闪刀姬卡组。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!复制梁龙-自奏圣乐
Name
=复制梁龙
Deck
=
Orcust
Dialog
=
anothercopy
.
zh
-
CN
旧式自奏圣乐卡组。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!复制梁龙-转生炎兽
Name
=复制梁龙
Deck
=
Salamangreat
Dialog
=
anothercopy
.
zh
-
CN
转生炎兽卡组。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!
VI
-
1911
-凭依装着
Name
=
VI
-
1911
Deck
=
FamiliarPossessed
Dialog
=
VI
-
1911
.
zh
-
CN
凭依装着卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!
VI
-
1911
-时劫者
Name
=
VI
-
1911
Deck
=
TimeThief
Dialog
=
VI
-
1911
.
zh
-
CN
时间潜行者卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!永远之魂-削血
Name
=永远之魂
Deck
=
Burn
Dialog
=
soul
.
zh
-
CN
老式削血卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!永远之魂-青蛙
!破坏剑士
Name
=永远之魂
Deck
=
Frog
Dialog
=
soul
.
zh
-
CN
Name
=破坏剑士
Deck
=
BusterBlader
Dialog
=
zh
-
CN
老式青蛙卡组。
加强版龙法卡组。需勾选不检查卡组才能对战。
AI_LV1
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!永远之魂-荷鲁斯
Name
=永远之魂
Deck
=
Horus
Dialog
=
soul
.
zh
-
CN
老式龙族卡组。
AI_LV1
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!比特机灵-微风
Name
=比特机灵
Deck
=
PureWinds
Dialog
=
zh
-
CN
风属性卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!试作型机器人
1732
Name
=试作型机器人
1732
Deck
=
ST1732
Dialog
=
zh
-
CN
由三盒
ST17
和三盒
SD32
组成的卡组。
AI_LV2
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!奇異果
Name
=奇異果
Deck
=
LightswornShaddoldinosour
Dialog
=
kiwi
.
zh
-
TW
光道影依恐龙卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!奇魔果
Name
=奇魔果
Deck
=
DarkMagician
Dialog
=
kiwi
.
zh
-
TW
黑魔术师卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!
MAX
龍果
Name
=
MAX
龍果
Deck
=
BlueEyesMaxDragon
Dialog
=
kiwi
.
zh
-
TW
青眼混沌极龙卡组。
AI_LV2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!幻煌果
Name
=幻煌果
Deck
=
Phantasm
Dialog
=
kiwi
.
zh
-
TW
幻煌龙卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!燃血鬥士
Name
=燃血鬥士
Deck
=
ChainBurn
Dialog
=
kiwi
.
zh
-
TW
连锁烧卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!報社鬥士
Name
=報社鬥士
Deck
=
GrenMajuThunderBoarder
Dialog
=
kiwi
.
zh
-
TW
红莲雷王滑板卡组。
AI_ANTI_META
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!我太帅了
Name
=我太帅了
Deck
=
Dragun
Dialog
=
smart
.
zh
-
CN
超魔导真红眼龙骑士卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!
玻璃女巫
!
大恐龙驾
Name
=
玻璃女巫
Deck
=
Witchcraft
Dialog
=
verre
.
zh
-
CN
Name
=
大恐龙驾
Deck
=
DinocarriageDynarmix
Dialog
=
zh
-
CN
魔女术
卡组。
恐龙
卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
Decks/AI_BusterBlader.ydk
0 → 100644
View file @
faa07ff1
#created by ...
#main
120170000
120170000
120170000
120110001
120110001
120110001
120145000
120145000
120105005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120151023
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120150019
120150019
120150019
#extra
!side
Decks/AI_DinocarriageDynarmix.ydk
0 → 100644
View file @
faa07ff1
#created by ...
#main
120151006
120151006
120151006
120151007
120151007
120151007
120151005
120151005
120151005
120130029
120130029
120130029
120130005
120130005
120151012
120151012
120151012
120151013
120151013
120151013
120151011
120151011
120151009
120151009
120151009
120151010
120151010
120151010
120151018
120151018
120151018
120151015
120151015
120151017
120151017
120151017
120151016
120151020
120151020
120151019
#extra
!side
Decks/AI_RushDragonDragears.ydk
0 → 100644
View file @
faa07ff1
#created by ...
#main
120151023
120170000
120110001
120110001
120110001
120105001
120105001
120105001
120110005
120110005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120110009
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120170065
120150019
#extra
!side
Game/AI/Decks/BusterBladerExecutor.cs
0 → 100644
View file @
faa07ff1
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
(
"BusterBlader"
,
"AI_BusterBlader"
)]
public
class
BusterBladerExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
青眼白龙
=
120120000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
黑魔术师
=
120130000
;
public
const
int
真红眼黑龙
=
120125001
;
public
const
int
恶魔召唤
=
120145000
;
public
const
int
人造人
=
120155000
;
public
const
int
连击龙
=
120110001
;
public
const
int
七星道魔术师
=
120105001
;
public
const
int
雅灭鲁拉
=
120120029
;
public
const
int
耳语妖精
=
120120018
;
public
const
int
神秘庄家
=
120105006
;
public
const
int
火星心少女
=
120145014
;
public
const
int
斗牛士
=
120170035
;
public
const
int
凤凰龙
=
120110009
;
public
const
int
七星道法师
=
120130016
;
public
const
int
sionmax
=
120150007
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
落穴
=
120150019
;
public
const
int
暗黑释放
=
120105013
;
}
public
BusterBladerExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
雅灭鲁拉
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
黑魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
真红眼黑龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
耳语妖精
,
耳语妖精
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
火星心少女
,
火星心少女
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道魔术师
);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
}
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
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
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
(
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
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
bool
monsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
七星道魔术师
,
CardId
.
连击龙
,
CardId
.
青眼白龙
,
CardId
.
人造人
,
CardId
.
恶魔召唤
,
CardId
.
雅灭鲁拉
,
CardId
.
破坏之剑士
,
CardId
.
真红眼黑龙
,
CardId
.
黑魔术师
}))
return
false
;
return
true
;
}
private
bool
耳语妖精
Effect
()
{
IList
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
Enemy
.
GetGraveyardMonsters
())
{
if
(
card
.
Level
<=
4
)
targets
.
Add
(
card
);
}
return
true
;
}
private
bool
七星道法师
Effect
()
{
AI
.
SelectCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
{
if
(
n
.
Attack
>=
1900
)
return
true
;
}
return
false
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
true
))
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
return
false
;
}
private
bool
火星心少女
Effect
()
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectYesNo
(
true
);
return
true
;
}
}
}
\ No newline at end of file
Game/AI/Decks/DinocarriageDynarmixExecutor.cs
0 → 100644
View file @
faa07ff1
This diff is collapsed.
Click to expand it.
Game/AI/Decks/RushDragonDragearsExecutor.cs
0 → 100644
View file @
faa07ff1
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
(
"RushDragonDragears"
,
"AI_RushDragonDragears"
)]
public
class
RushDragonDragearsExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
青眼白龙
=
120120000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
黑魔术师
=
120130000
;
public
const
int
真红眼黑龙
=
120125001
;
public
const
int
恶魔召唤
=
120145000
;
public
const
int
人造人
=
120155000
;
public
const
int
连击龙
=
120110001
;
public
const
int
七星道魔术师
=
120105001
;
public
const
int
雅灭鲁拉
=
120120029
;
public
const
int
耳语妖精
=
120120018
;
public
const
int
神秘庄家
=
120105006
;
public
const
int
火星心少女
=
120145014
;
public
const
int
斗牛士
=
120170035
;
public
const
int
凤凰龙
=
120110009
;
public
const
int
七星道法师
=
120130016
;
public
const
int
sionmax
=
120150007
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
落穴
=
120150019
;
public
const
int
暗黑释放
=
120105013
;
}
public
RushDragonDragearsExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
雅灭鲁拉
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
黑魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
真红眼黑龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
耳语妖精
,
耳语妖精
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
火星心少女
,
火星心少女
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道魔术师
);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
}
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
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
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
(
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
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
bool
monsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
七星道魔术师
,
CardId
.
连击龙
,
CardId
.
青眼白龙
,
CardId
.
人造人
,
CardId
.
恶魔召唤
,
CardId
.
雅灭鲁拉
,
CardId
.
破坏之剑士
,
CardId
.
真红眼黑龙
,
CardId
.
黑魔术师
}))
return
false
;
return
true
;
}
private
bool
耳语妖精
Effect
()
{
IList
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
Enemy
.
GetGraveyardMonsters
())
{
if
(
card
.
Level
<=
4
)
targets
.
Add
(
card
);
}
return
true
;
}
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
{
if
(
n
.
Attack
>=
1900
)
return
true
;
}
return
false
;
}
private
bool
火星心少女
Effect
()
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectYesNo
(
true
);
return
true
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
false
))
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
if
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
()
==
null
)
{
AI
.
SelectNextCard
(
Enemy
.
MonsterZone
.
GetHighestDefenseMonster
());
}
AI
.
SelectNextCard
(
Enemy
.
MonsterZone
.
GetHighestAttackMonster
());
return
true
;
}
return
false
;
}
private
bool
七星道法师
Effect
()
{
AI
.
SelectCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
}
}
Game/AI/DefaultExecutor.cs
View file @
faa07ff1
...
@@ -704,7 +704,7 @@ namespace WindBot.Game.AI
...
@@ -704,7 +704,7 @@ namespace WindBot.Game.AI
{
{
ClientCard
tributeCard
=
Bot
.
MonsterZone
[
j
];
ClientCard
tributeCard
=
Bot
.
MonsterZone
[
j
];
if
(
tributeCard
==
null
)
continue
;
if
(
tributeCard
==
null
)
continue
;
if
(
tributeCard
.
GetDefensePower
()
<
Card
.
Attack
)
if
(
tributeCard
.
GetDefensePower
()
<
Card
.
Attack
-
400
)
tributecount
--;
tributecount
--;
}
}
return
tributecount
<=
0
;
return
tributecount
<=
0
;
...
...
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