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
xiaoye
windbot
Commits
c51a0e37
Commit
c51a0e37
authored
Oct 23, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Toadally Awesome deck
parent
728ebbdc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
694 additions
and
55 deletions
+694
-55
Decks/AI_ToadallyAwesome.ydk
Decks/AI_ToadallyAwesome.ydk
+59
-0
Dialogs/cirno.zh-CN.json
Dialogs/cirno.zh-CN.json
+14
-11
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+1
-42
Game/AI/Decks/ToadallyAwesomeExecutor.cs
Game/AI/Decks/ToadallyAwesomeExecutor.cs
+566
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+41
-0
Game/ClientField.cs
Game/ClientField.cs
+10
-0
WindBot.csproj
WindBot.csproj
+1
-0
bots.json
bots.json
+2
-2
No files found.
Decks/AI_ToadallyAwesome.ydk
0 → 100644
View file @
c51a0e37
#created by ...
#main
23950192
23950192
90311614
90311614
90311614
9126351
9126351
9126351
50088247
50088247
50088247
1357146
1357146
1357146
46239604
46239604
46239604
80250319
80250319
80250319
5133471
5133471
5133471
18144506
33057951
33057951
33057951
53129443
72892473
81439173
83764718
84206435
84206435
84206435
96947648
96947648
96947648
29047353
29047353
29047353
#extra
79606837
79606837
79606837
90809975
90809975
90809975
36776089
36776089
36776089
2766877
2766877
2766877
84224627
84224627
84224627
!side
Dialogs/cirno.zh-CN.json
View file @
c51a0e37
...
@@ -2,29 +2,33 @@
...
@@ -2,29 +2,33 @@
"welcome"
:
[
"welcome"
:
[
"本小姐是最强的!"
,
"本小姐是最强的!"
,
"AI功能正在测试中,遇到问题请及时反馈。"
,
"AI功能正在测试中,遇到问题请及时反馈。"
,
"
人家终于想起来怎么用坑了~
"
"
饼蛙是什么,好吃吗?
"
],
],
"duelstart"
:
[
"duelstart"
:
[
"让我把你冻结!"
"让我把你冻结!"
,
"不就是打倒人类嘛,我一个人足够了!"
],
],
"newturn"
:
[
"newturn"
:
[
"
我不会算数,解不了构向胜利的方程式……
"
,
"
虽然有点突然,被我打倒吧!
"
,
"我的回合,抽卡!"
"我的回合,抽卡!"
],
],
"endturn"
:
[
"endturn"
:
[
"饶你一命!"
"饶你一命!"
,
"冻死在我的认真之下吧!"
],
],
"directattack"
:
[
"directattack"
:
[
"{0},直接攻击!"
,
"{0},直接攻击!"
,
"不堪一击!"
,
"弱小就要挨打!"
,
"弱小就要挨打!"
,
"懒得算数了,打了再说!"
,
"懒得算数了,打了再说!"
,
"超⑨武神霸斩!"
"超⑨武神霸斩!"
,
"雪符「Diamond Blizzard」"
],
],
"attack"
:
[
"attack"
:
[
"{0},攻击这只{1}!"
,
"{0},攻击这只{1}!"
,
"{0},消灭这只{1}!"
,
"{0},消灭这只{1}!"
,
"{0},打倒{1}!"
,
"{0},打倒{1}!"
,
"
{0},冲向那只{1}!
"
"
冰符「Icicle Fall」
"
],
],
"ondirectattack"
:
[
"ondirectattack"
:
[
"别开玩笑了~。你这种人,就让我把你和英吉利牛肉一起冷冻保存好了!!"
,
"别开玩笑了~。你这种人,就让我把你和英吉利牛肉一起冷冻保存好了!!"
,
...
@@ -35,24 +39,23 @@
...
@@ -35,24 +39,23 @@
"activate"
:
[
"activate"
:
[
"我发动{0}。"
,
"我发动{0}。"
,
"我使用{0}的效果。"
,
"我使用{0}的效果。"
,
"我
使用{0}的力量
。"
"我
的{0}是最强的!
。"
],
],
"summon"
:
[
"summon"
:
[
"我召唤{0}。"
,
"我召唤{0}。"
,
"出来吧,{0}!"
,
"出来吧,{0}!"
,
"出现吧,{0}!"
,
"出现吧,{0}!"
,
"我召唤了强大的{0}!"
,
"我呼唤出{0}。"
"我呼唤出{0}。"
],
],
"setmonster"
:
[
"setmonster"
:
[
"我放置了一只怪兽。"
,
"我放置了一只怪兽。"
,
"不给你看,哼~"
,
"不怕死就打过来吧!"
"我放置了一只迷之怪兽~"
],
],
"chaining"
:
[
"chaining"
:
[
"看这里!我发动{0}!"
,
"看这里!我发动{0}!"
,
"我使用{0}的力量。"
,
"我使用{0}的力量。"
,
"畏惧我的{0}吧!"
,
"畏惧我的{0}吧!"
,
"看样子你忘了我的{0}!"
,
"冻符「Perfect Freeze」"
"你考虑过我有{0}吗?"
]
]
}
}
Game/AI/Decks/BlueEyesExecutor.cs
View file @
c51a0e37
...
@@ -52,7 +52,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -52,7 +52,7 @@ namespace MycardBot.Game.AI.Decks
:
base
(
ai
,
duel
)
:
base
(
ai
,
duel
)
{
{
// 有坑先清
// 有坑先清
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
银河旋风
,
银河旋风效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
银河旋风
,
DefaultGalaxyCyclone
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鹰身女妖的羽毛扫
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鹰身女妖的羽毛扫
);
// 灵庙
// 灵庙
...
@@ -298,47 +298,6 @@ namespace MycardBot.Game.AI.Decks
...
@@ -298,47 +298,6 @@ namespace MycardBot.Game.AI.Decks
return
attacker
.
Attack
>
0
;
return
attacker
.
Attack
>
0
;
}
}
private
bool
银河旋风效果
()
{
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
if
(
spells
.
Count
==
0
)
return
false
;
ClientCard
selected
=
null
;
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
selected
=
Duel
.
Fields
[
1
].
SpellZone
.
GetFloodgate
();
if
(
selected
==
null
)
{
foreach
(
ClientCard
card
in
spells
)
{
if
(!
card
.
IsFacedown
())
{
selected
=
card
;
break
;
}
}
}
}
else
{
foreach
(
ClientCard
card
in
spells
)
{
if
(
card
.
IsFacedown
())
{
selected
=
card
;
break
;
}
}
}
if
(
selected
==
null
)
return
false
;
AI
.
SelectCard
(
selected
);
return
true
;
}
private
bool
龙之灵庙效果
()
private
bool
龙之灵庙效果
()
{
{
Logger
.
DebugWriteLine
(
"龙之灵庙."
);
Logger
.
DebugWriteLine
(
"龙之灵庙."
);
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
0 → 100644
View file @
c51a0e37
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"ToadallyAwesome"
,
"AI_ToadallyAwesome"
)]
public
class
ToadallyAwesomeExecutor
:
DefaultExecutor
{
public
enum
CardId
{
冰结界的术者
=
23950192
,
冰结界的水影
=
90311614
,
鬼青蛙
=
9126351
,
冰结界的传道师
=
50088247
,
粹蛙
=
1357146
,
魔知青蛙
=
46239604
,
小灰篮史莱姆
=
80250319
,
银河旋风
=
5133471
,
鹰身女妖的羽毛扫
=
18144506
,
浮上
=
33057951
,
黑洞
=
53129443
,
手札抹杀
=
72892473
,
愚蠢的埋葬
=
81439173
,
死者苏生
=
83764718
,
冰结界的纹章
=
84206435
,
海上打捞
=
96947648
,
水舞台
=
29047353
,
虹光之宣告者
=
79606837
,
饼蛙
=
90809975
,
神骑矢车菊圣人马
=
36776089
,
大薰风凤凰
=
2766877
,
猫鲨
=
84224627
,
旋风
=
5318639
,
月之书
=
14087893
,
活死人的呼声
=
97077563
,
激流葬
=
53582587
,
闪光
No39
希望皇霍普电光皇
=
56832966
}
public
ToadallyAwesomeExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
银河旋风
,
DefaultGalaxyCyclone
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鹰身女妖的羽毛扫
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
黑洞
,
DefaultDarkHole
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
水舞台
,
死者苏生效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
冰结界的纹章
,
冰结界的纹章效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
愚蠢的埋葬
,
愚蠢的埋葬效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
冰结界的传道师
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
小灰篮史莱姆
,
小灰篮史莱姆优先通常召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
鬼青蛙
,
鬼青蛙特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鬼青蛙
,
鬼青蛙效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
小灰篮史莱姆
,
小灰篮史莱姆效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
粹蛙
,
低攻怪兽通常召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
冰结界的传道师
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
魔知青蛙
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
浮上
,
死者苏生效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
死者苏生
,
死者苏生效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
海上打捞
,
海上打捞效果
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
鬼青蛙
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
冰结界的水影
,
冰结界下级通常召唤
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
冰结界的术者
,
冰结界下级通常召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
手札抹杀
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
小灰篮史莱姆
,
低攻怪兽通常召唤
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
冰结界的传道师
,
低攻怪兽通常召唤
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
粹蛙
,
低攻怪兽通常召唤
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
魔知青蛙
,
低攻怪兽通常召唤
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
冰结界的传道师
,
冰结界的传道师通常召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
猫鲨
,
猫鲨特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
猫鲨
,
猫鲨效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
神骑矢车菊圣人马
,
神骑矢车菊圣人马特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
神骑矢车菊圣人马
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
大薰风凤凰
,
大薰风凤凰特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
大薰风凤凰
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
饼蛙
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
饼蛙
,
饼蛙效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
虹光之宣告者
,
虹光之宣告者特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
虹光之宣告者
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
(
int
)
CardId
.
小灰篮史莱姆
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
(
int
)
CardId
.
魔知青蛙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
(
int
)
CardId
.
粹蛙
);
AddExecutor
(
ExecutorType
.
Repos
,
改变攻守表示
);
// 饼蛙抢来的卡的发动
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
旋风
,
DefaultMysticalSpaceTyphoon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
月之书
,
DefaultBookOfMoon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
活死人的呼声
,
死者苏生效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
激流葬
,
DefaultTorrentialTribute
);
AddExecutor
(
ExecutorType
.
Activate
,
其他魔法发动
);
AddExecutor
(
ExecutorType
.
Activate
,
其他陷阱发动
);
AddExecutor
(
ExecutorType
.
Activate
,
其他怪兽发动
);
}
public
override
bool
OnSelectHand
()
{
return
true
;
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
))
{
if
(
attacker
.
Id
==
(
int
)
CardId
.
神骑矢车菊圣人马
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
())
attacker
.
RealPower
=
Duel
.
LifePoints
[
0
]
+
attacker
.
Attack
;
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
();
}
private
bool
冰结界的纹章效果
()
{
if
(
Duel
.
Fields
[
0
].
HasInHand
(
new
List
<
int
>
{
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
})
||
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
{
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
}))
{
AI
.
SelectCard
((
int
)
CardId
.
冰结界的传道师
);
}
else
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
});
}
return
true
;
}
private
bool
死者苏生效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
饼蛙
,
(
int
)
CardId
.
虹光之宣告者
,
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
小灰篮史莱姆
});
return
true
;
}
private
bool
愚蠢的埋葬效果
()
{
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
小灰篮史莱姆
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
小灰篮史莱姆
))
AI
.
SelectCard
((
int
)
CardId
.
小灰篮史莱姆
);
else
if
(
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
))
AI
.
SelectCard
((
int
)
CardId
.
魔知青蛙
);
else
if
(
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
))
AI
.
SelectCard
((
int
)
CardId
.
粹蛙
);
else
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
鬼青蛙
});
return
true
;
}
private
bool
海上打捞效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
小灰篮史莱姆
});
return
true
;
}
private
bool
鬼青蛙特殊召唤
()
{
if
(
Duel
.
Fields
[
0
].
GetCountCardInZone
(
Duel
.
Fields
[
0
].
Hand
,
(
int
)
CardId
.
小灰篮史莱姆
)>=
2
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
小灰篮史莱姆
))
AI
.
SelectCard
((
int
)
CardId
.
小灰篮史莱姆
);
else
if
(
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
))
AI
.
SelectCard
((
int
)
CardId
.
魔知青蛙
);
else
if
(
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
))
AI
.
SelectCard
((
int
)
CardId
.
粹蛙
);
else
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
鬼青蛙
});
return
true
;
}
private
bool
鬼青蛙效果
()
{
if
(
ActivateDescription
==
-
1
)
{
return
愚蠢的埋葬效果
();
}
else
{
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
魔知青蛙
))
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
鬼青蛙
});
return
true
;
}
}
return
false
;
}
private
bool
小灰篮史莱姆优先通常召唤
()
{
return
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
小灰篮史莱姆
);
}
private
bool
小灰篮史莱姆效果
()
{
AI
.
SelectCard
((
int
)
CardId
.
小灰篮史莱姆
);
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
小灰篮史莱姆
});
return
true
;
}
private
bool
低攻怪兽通常召唤
()
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Level
==
2
)
{
return
true
;
}
}
return
false
;
}
private
bool
冰结界下级通常召唤
()
{
return
Duel
.
Fields
[
0
].
GetCountCardInZone
(
Duel
.
Fields
[
0
].
Hand
,
(
int
)
CardId
.
冰结界的传道师
)
>
0
;
}
private
bool
冰结界的传道师通常召唤
()
{
return
Duel
.
Fields
[
0
].
GetCountCardInZone
(
Duel
.
Fields
[
0
].
Hand
,
(
int
)
CardId
.
冰结界的传道师
)
>=
2
;
}
private
bool
饼蛙效果
()
{
if
(
CurrentChain
.
Count
>
0
)
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
List
<
int
>
合适的
COST
=
new
List
<
int
>
{
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
};
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
合适的
COST
.
Contains
(
monster
.
Id
))
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
bool
有水舞台
=
Duel
.
Fields
[
0
].
HasInSpellZone
((
int
)
CardId
.
水舞台
,
true
);
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
魔知青蛙
&&
!
有水舞台
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
monsters
=
(
List
<
ClientCard
>)
Duel
.
Fields
[
0
].
Hand
;
bool
手里有
2
个史莱姆
=
Duel
.
Fields
[
0
].
GetCountCardInZone
(
Duel
.
Fields
[
0
].
Hand
,
(
int
)
CardId
.
小灰篮史莱姆
)
>=
2
;
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
小灰篮史莱姆
&&
手里有
2
个史莱姆
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
bool
需要丢魔知
=
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
鬼青蛙
);
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
魔知青蛙
&&
需要丢魔知
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
粹蛙
||
monster
.
Id
==
(
int
)
CardId
.
魔知青蛙
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
foreach
(
ClientCard
monster
in
monsters
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
return
true
;
}
else
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
if
(!
Duel
.
Fields
[
0
].
HasInExtra
((
int
)
CardId
.
饼蛙
))
{
AI
.
SelectCard
((
int
)
CardId
.
饼蛙
);
}
else
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
小灰篮史莱姆
});
}
return
true
;
}
else
if
(
Duel
.
Phase
==
DuelPhase
.
Standby
)
{
选择取除超量素材
(
Card
.
Overlays
);
if
(
Duel
.
Player
==
0
)
{
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
小灰篮史莱姆
});
}
else
{
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
鬼青蛙
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
});
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
}
return
true
;
}
return
true
;
}
private
bool
猫鲨特殊召唤
()
{
bool
should
=
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
饼蛙
)
&&
((
AI
.
Utils
.
IsEnnemyBetter
(
true
,
false
)
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
{
(
int
)
CardId
.
猫鲨
,
(
int
)
CardId
.
神骑矢车菊圣人马
},
true
,
true
))
||
!
Duel
.
Fields
[
0
].
HasInExtra
((
int
)
CardId
.
饼蛙
));
if
(
should
)
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
return
false
;
}
private
bool
猫鲨效果
()
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
饼蛙
)
{
选择取除超量素材
(
Card
.
Overlays
);
AI
.
SelectNextCard
(
monster
);
return
true
;
}
}
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
神骑矢车菊圣人马
)
{
选择取除超量素材
(
Card
.
Overlays
);
AI
.
SelectNextCard
(
monster
);
return
true
;
}
}
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
大薰风凤凰
)
{
选择取除超量素材
(
Card
.
Overlays
);
AI
.
SelectNextCard
(
monster
);
return
true
;
}
}
return
false
;
}
private
bool
神骑矢车菊圣人马特殊召唤
()
{
int
num
=
0
;
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Level
==
2
)
{
num
++;
}
}
return
AI
.
Utils
.
IsEnnemyBetter
(
true
,
false
)
&&
num
<
4
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
{
(
int
)
CardId
.
神骑矢车菊圣人马
},
true
,
true
);
}
private
bool
大薰风凤凰特殊召唤
()
{
if
(
Duel
.
Turn
!=
1
)
{
int
attack
=
0
;
int
defence
=
0
;
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(!
monster
.
IsDefense
())
{
attack
+=
monster
.
Attack
;
}
}
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
defence
+=
monster
.
GetDefensePower
();
}
if
(
attack
-
2000
-
defence
>
Duel
.
LifePoints
[
1
]
&&
!
AI
.
Utils
.
IsEnnemyBetter
(
true
,
false
))
return
true
;
}
return
false
;
}
private
bool
虹光之宣告者特殊召唤
()
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
private
bool
改变攻守表示
()
{
bool
ennemyBetter
=
AI
.
Utils
.
IsEnnemyBetter
(
true
,
true
);
if
(
Card
.
IsFacedown
())
return
true
;
if
(
Card
.
IsDefense
()
&&
!
ennemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
false
;
}
private
bool
其他魔法发动
()
{
foreach
(
CardExecutor
exec
in
Executors
)
{
if
(
exec
.
Type
==
Type
&&
exec
.
CardId
==
Card
.
Id
)
return
false
;
}
return
Card
.
IsSpell
();
}
private
bool
其他陷阱发动
()
{
foreach
(
CardExecutor
exec
in
Executors
)
{
if
(
exec
.
Type
==
Type
&&
exec
.
CardId
==
Card
.
Id
)
return
false
;
}
return
Card
.
IsTrap
()
&&
DefaultTrap
();
}
private
bool
其他怪兽发动
()
{
foreach
(
CardExecutor
exec
in
Executors
)
{
if
(
exec
.
Type
==
Type
&&
exec
.
CardId
==
Card
.
Id
)
return
false
;
}
return
Card
.
IsMonster
();
}
private
void
选择取除超量素材
(
List
<
int
>
Overlays
)
{
if
(
Overlays
.
Contains
((
int
)
CardId
.
小灰篮史莱姆
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
小灰篮史莱姆
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
小灰篮史莱姆
))
AI
.
SelectCard
((
int
)
CardId
.
小灰篮史莱姆
);
else
if
(
Overlays
.
Contains
((
int
)
CardId
.
魔知青蛙
)
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
))
AI
.
SelectCard
((
int
)
CardId
.
魔知青蛙
);
else
if
(
Overlays
.
Contains
((
int
)
CardId
.
粹蛙
)
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
魔知青蛙
)
&&
!
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
粹蛙
))
AI
.
SelectCard
((
int
)
CardId
.
粹蛙
);
else
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
小灰篮史莱姆
,
(
int
)
CardId
.
粹蛙
,
(
int
)
CardId
.
魔知青蛙
,
(
int
)
CardId
.
冰结界的术者
,
(
int
)
CardId
.
冰结界的水影
,
(
int
)
CardId
.
冰结界的传道师
,
(
int
)
CardId
.
鬼青蛙
});
}
}
}
Game/AI/DefaultExecutor.cs
View file @
c51a0e37
...
@@ -53,6 +53,47 @@ namespace WindBot.Game.AI
...
@@ -53,6 +53,47 @@ namespace WindBot.Game.AI
return
true
;
return
true
;
}
}
protected
bool
DefaultGalaxyCyclone
()
{
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
if
(
spells
.
Count
==
0
)
return
false
;
ClientCard
selected
=
null
;
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
selected
=
Duel
.
Fields
[
1
].
SpellZone
.
GetFloodgate
();
if
(
selected
==
null
)
{
foreach
(
ClientCard
card
in
spells
)
{
if
(!
card
.
IsFacedown
())
{
selected
=
card
;
break
;
}
}
}
}
else
{
foreach
(
ClientCard
card
in
spells
)
{
if
(
card
.
IsFacedown
())
{
selected
=
card
;
break
;
}
}
}
if
(
selected
==
null
)
return
false
;
AI
.
SelectCard
(
selected
);
return
true
;
}
protected
bool
DefaultBookOfMoon
()
protected
bool
DefaultBookOfMoon
()
{
{
if
(
AI
.
Utils
.
IsEnnemyBetter
(
true
,
true
))
if
(
AI
.
Utils
.
IsEnnemyBetter
(
true
,
true
))
...
...
Game/ClientField.cs
View file @
c51a0e37
...
@@ -118,6 +118,16 @@ namespace WindBot.Game
...
@@ -118,6 +118,16 @@ namespace WindBot.Game
return
HasInCards
(
Banished
,
cardId
);
return
HasInCards
(
Banished
,
cardId
);
}
}
public
bool
HasInExtra
(
int
cardId
)
{
return
HasInCards
(
ExtraDeck
,
cardId
);
}
public
bool
HasInExtra
(
List
<
int
>
cardId
)
{
return
HasInCards
(
ExtraDeck
,
cardId
);
}
public
bool
HasAttackingMonster
()
public
bool
HasAttackingMonster
()
{
{
IList
<
ClientCard
>
monsters
=
GetMonsters
();
IList
<
ClientCard
>
monsters
=
GetMonsters
();
...
...
WindBot.csproj
View file @
c51a0e37
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
<Compile
Include=
"Game\AI\DecksManager.cs"
/>
<Compile
Include=
"Game\AI\DecksManager.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ToadallyAwesomeExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\NekrozExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\NekrozExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\GravekeeperExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\GravekeeperExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\RainbowExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\RainbowExecutor.cs"
/>
...
...
bots.json
View file @
c51a0e37
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
"windbots"
:
[
"windbots"
:
[
{
{
"name"
:
"琪露诺"
,
"name"
:
"琪露诺"
,
"deck"
:
"
Burn
"
,
"deck"
:
"
ToadallyAwesome
"
,
"dialog"
:
"cirno.zh-CN"
"dialog"
:
"cirno.zh-CN"
},
},
{
{
"name"
:
"琪露诺"
,
"name"
:
"琪露诺"
,
"deck"
:
"
Frog
"
,
"deck"
:
"
Rainbow
"
,
"dialog"
:
"cirno.zh-CN"
"dialog"
:
"cirno.zh-CN"
},
},
{
{
...
...
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