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
nanahira
windbot
Commits
b764fea6
Commit
b764fea6
authored
Jun 24, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test new deck
parent
8adbd20b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
831 additions
and
1 deletion
+831
-1
Decks/AI_BlueEyes.ydk
Decks/AI_BlueEyes.ydk
+59
-0
Dialogs/copy.zh-CN.json
Dialogs/copy.zh-CN.json
+75
-0
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+672
-0
WindBot.csproj
WindBot.csproj
+5
-1
bots.json
bots.json
+20
-0
No files found.
Decks/AI_BlueEyes.ydk
0 → 100644
View file @
b764fea6
#created by ...
#main
89631139
89631139
89631139
38517737
38517737
38517737
45467446
45467446
71039903
71039903
71039903
79814787
79814787
8240199
8240199
8240199
5133471
5133471
6853254
6853254
6853254
18144506
35261759
35261759
38120068
38120068
38120068
39701395
39701395
39701395
41620959
41620959
48800175
48800175
48800175
54447022
83764718
87025064
87025064
87025064
#extra
63422098
40908371
40908371
40908371
59822133
59822133
59822133
33698022
58820923
39030163
31801517
18963306
63767246
63767246
33909817
!side
Dialogs/copy.zh-CN.json
0 → 100644
View file @
b764fea6
{
"welcome"
:
[
"大家好我是新人。"
,
"AI功能正在测试中,遇到问题请及时反馈。"
,
"密码输入 AI#复制植物 就可以和我打牌了~"
],
"duelstart"
:
[
"青眼卡组测试中,渣操是正常情况。"
,
"超主流是游戏王的一环,不爽不要玩。"
,
"抄来的卡组不会用,怎么办?"
],
"newturn"
:
[
"到我的回合了,抽卡!"
,
"我的回合,抽卡!"
,
"我抽了一张卡。"
],
"endturn"
:
[
"回合结束。"
,
"我的回合结束了。"
,
"这样算是成功的展开吗……"
,
"轮到你了。"
],
"directattack"
:
[
"{0},直接攻击!"
,
"{0},直接攻击对手!"
,
"{0},没有防守的地方,攻击!"
,
"{0},攻击对手的生命值!"
,
"{0},直接攻击对手的生命值!"
,
"{0},通过直接攻击打倒对手!"
,
"{0},使用直接攻击打倒对手!"
,
"{0},直接攻击释放你的力量吧!"
,
"我的{0}将会粉碎你的生命值!"
,
"向对手展示你的力量吧,{0}!"
,
"你已经无法阻止我了。{0},攻击!"
],
"attack"
:
[
"{0},攻击这只{1}!"
,
"{0},消灭这只{1}!"
,
"{0},打倒{1}!"
,
"{0},冲向那只{1}!"
,
"{0},把你的力量释放到{1}上吧!"
],
"ondirectattack"
:
[
"可恶……"
,
"不过是{0}而已!"
,
"果然我还是太弱了……"
],
"facedownmonstername"
:
"怪兽"
,
"activate"
:
[
"我发动{0}。"
,
"我使用{0}的效果。"
,
"我使用{0}的力量。"
],
"summon"
:
[
"我召唤{0}。"
,
"出来吧,{0}!"
,
"出现吧,{0}!"
,
"我召唤了强大的{0}!"
,
"我呼唤{0}参加战斗!"
,
"我呼唤出{0}。"
,
"让我召唤{0}。"
],
"setmonster"
:
[
"我放置了一只怪兽。"
,
"我里侧表示放置了一只怪兽。"
],
"chaining"
:
[
"看这里!我发动{0}!"
,
"我使用{0}的力量。"
,
"准备!我使用{0}!"
,
"我不认同。{0},发动!"
,
"看样子你忘了我的{0}!"
,
"你考虑过我有{0}吗?"
]
}
Game/AI/Decks/BlueEyesExecutor.cs
0 → 100644
View file @
b764fea6
using
OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
namespace
MycardBot.Game.AI.Decks
{
[
Deck
(
"Blue-Eyes"
,
"AI_BlueEyes"
)]
class
BlueEyesExecutor
:
DefaultExecutor
{
public
enum
CardId
{
青眼白龙
=
89631139
,
青眼亚白龙
=
38517737
,
白色灵龙
=
45467446
,
增殖的
G
=
23434538
,
太古的白石
=
71039903
,
传说的白石
=
79814787
,
青色眼睛的贤士
=
8240199
,
效果遮蒙者
=
97268402
,
银河旋风
=
5133471
,
鹰身女妖的羽毛扫
=
18144506
,
复活之福音
=
6853254
,
强欲而贪欲之壶
=
35261759
,
抵价购物
=
38120068
,
调和的宝札
=
39701395
,
龙之灵庙
=
41620959
,
龙觉醒旋律
=
48800175
,
灵魂补充
=
54447022
,
死者苏生
=
83764718
,
银龙的轰咆
=
87025064
,
鬼岩城
=
63422098
,
苍眼银龙
=
40908371
,
青眼精灵龙
=
59822133
,
月华龙黑蔷薇
=
33698022
,
银河眼暗物质龙
=
58820923
,
银河眼重铠光子龙
=
39030163
,
银河眼光子龙皇
=
31801517
,
银河眼光波龙
=
18963306
,
希望魁龙银河巨神
=
63767246
,
森罗的姬牙宫
=
33909817
}
private
List
<
ClientCard
>
使用过的青眼亚白龙
=
new
List
<
ClientCard
>();
public
BlueEyesExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
// 有坑先清
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
银河旋风
,
DefaultMysticalSpaceTyphoon
);
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
.
SpSummon
,
(
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
.
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
.
SpSummon
,
(
int
)
CardId
.
青眼精灵龙
,
青眼精灵龙同调召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
希望魁龙银河巨神
,
希望魁龙银河巨神超量召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
森罗的姬牙宫
);
// 改变攻守表示
AddExecutor
(
ExecutorType
.
Repos
,
改变攻守表示
);
// Set traps
AddExecutor
(
ExecutorType
.
SpellSet
,
DefaultSpellSet
);
}
public
override
bool
OnSelectHand
()
{
// 先攻
return
false
;
}
public
override
void
OnNewTurn
()
{
// 回合开始时重置亚白龙状况
使用过的青眼亚白龙
.
Clear
();
}
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
bool
cancelable
)
{
//Logger.WriteLine("OnSelectCard.");
if
(
max
==
2
)
{
//Logger.WriteLine("龙觉醒检索.");
IList
<
ClientCard
>
result
=
new
List
<
ClientCard
>();
if
(!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
))
{
//Logger.WriteLine("手里没有本体,拿一张.");
foreach
(
ClientCard
card
in
cards
)
{
if
(
card
.
Id
==
(
int
)
CardId
.
青眼白龙
)
{
result
.
Add
(
card
);
//Logger.WriteLine("拿到了.");
break
;
}
}
}
foreach
(
ClientCard
card
in
cards
)
{
//Logger.WriteLine("拿亚白龙.");
if
(
card
.
Id
==
(
int
)
CardId
.
青眼亚白龙
)
{
result
.
Add
(
card
);
}
}
if
(
result
.
Count
<
min
)
{
foreach
(
ClientCard
card
in
cards
)
{
//Logger.WriteLine("亚白龙不够了.");
if
(!
result
.
Contains
(
card
))
result
.
Add
(
card
);
if
(
result
.
Count
>=
min
)
break
;
}
}
while
(
result
.
Count
>
max
)
{
//Logger.WriteLine("拿多了.");
result
.
RemoveAt
(
result
.
Count
-
1
);
}
return
result
;
}
//Logger.WriteLine("Use default.");
return
null
;
}
public
override
IList
<
ClientCard
>
OnSelectSum
(
IList
<
ClientCard
>
cards
,
int
sum
,
int
min
,
int
max
)
{
Logger
.
WriteLine
(
cards
.
Count
+
" sync "
+
sum
);
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
int
trysum
=
0
;
if
(
使用过的青眼亚白龙
.
Count
>
0
&&
cards
.
IndexOf
(
使用过的青眼亚白龙
[
0
])>
0
)
{
Logger
.
WriteLine
(
"优先用使用过的亚白龙同调."
);
ClientCard
card
=
使用过的青眼亚白龙
[
0
];
使用过的青眼亚白龙
.
Remove
(
card
);
cards
.
Remove
(
card
);
selected
.
Add
(
card
);
trysum
=
card
.
Level
;
if
(
trysum
==
sum
)
{
Logger
.
WriteLine
(
trysum
+
" dselected "
+
sum
);
return
selected
;
}
}
foreach
(
ClientCard
card
in
cards
)
{
// try level equal
if
(
card
.
Level
==
sum
)
{
return
new
[]
{
card
};
}
// try level add
if
(
trysum
+
card
.
Level
>
sum
)
{
continue
;
}
selected
.
Add
(
card
);
trysum
+=
card
.
Level
;
Logger
.
WriteLine
(
card
.
Id
+
""
);
Logger
.
WriteLine
(
trysum
+
" selected "
+
sum
);
if
(
trysum
==
sum
)
{
return
selected
;
}
}
IList
<
ClientCard
>
selected2
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
selected
)
{
// clone
selected2
.
Add
(
card
);
}
foreach
(
ClientCard
card
in
selected
)
{
// try level sub
selected2
.
Remove
(
card
);
trysum
-=
card
.
Level
;
//Logger.WriteLine(card.Id + "");
Logger
.
WriteLine
(
trysum
+
" selected2 "
+
sum
);
if
(
trysum
==
sum
)
{
return
selected2
;
}
}
// try all
return
cards
;
}
private
bool
龙之灵庙效果
()
{
Logger
.
WriteLine
(
"龙之灵庙."
);
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
白色灵龙
,
(
int
)
CardId
.
青眼白龙
,
(
int
)
CardId
.
太古的白石
,
(
int
)
CardId
.
传说的白石
});
if
(!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
))
{
Logger
.
WriteLine
(
"手里没有本体,堆白石."
);
AI
.
SelectNextCard
((
int
)
CardId
.
传说的白石
);
}
else
{
Logger
.
WriteLine
(
"堆太古或灵龙或白石."
);
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
太古的白石
,
(
int
)
CardId
.
白色灵龙
,
(
int
)
CardId
.
传说的白石
});
}
return
true
;
}
private
bool
龙觉醒旋律效果
()
{
Logger
.
WriteLine
(
"龙觉醒选要丢的卡."
);
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
太古的白石
,
(
int
)
CardId
.
白色灵龙
,
(
int
)
CardId
.
传说的白石
,
(
int
)
CardId
.
银河旋风
,
(
int
)
CardId
.
效果遮蒙者
,
(
int
)
CardId
.
抵价购物
,
(
int
)
CardId
.
青色眼睛的贤士
});
return
true
;
}
private
bool
调和的宝札效果
()
{
Logger
.
WriteLine
(
"调和选要丢的卡."
);
if
(!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
))
{
Logger
.
WriteLine
(
"手里没有本体,丢白石."
);
AI
.
SelectCard
((
int
)
CardId
.
传说的白石
);
}
else
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
抵价购物
))
{
Logger
.
WriteLine
(
"手里有本体,再拿一个喂八抽."
);
AI
.
SelectCard
((
int
)
CardId
.
传说的白石
);
}
else
{
Logger
.
WriteLine
(
"手里有本体,优先丢太古."
);
AI
.
SelectCard
((
int
)
CardId
.
太古的白石
);
}
return
true
;
}
private
bool
抵价购物效果
()
{
Logger
.
WriteLine
(
"抵价购物发动."
);
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
白色灵龙
))
{
Logger
.
WriteLine
(
"手里有白灵龙,优先丢掉."
);
AI
.
SelectCard
((
int
)
CardId
.
白色灵龙
);
return
true
;
}
else
if
(
手里有
2
个
((
int
)
CardId
.
青眼白龙
))
{
Logger
.
WriteLine
(
"手里有2个青眼白龙,丢1个."
);
AI
.
SelectCard
((
int
)
CardId
.
青眼白龙
);
return
true
;
}
else
if
(
手里有
2
个
((
int
)
CardId
.
青眼亚白龙
))
{
Logger
.
WriteLine
(
"手里有2个青眼亚白龙,丢1个."
);
AI
.
SelectCard
((
int
)
CardId
.
青眼亚白龙
);
return
true
;
}
else
if
(!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
)
||
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼亚白龙
))
{
Logger
.
WriteLine
(
"手里没有成对的青眼和亚白,丢1个."
);
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
青眼白龙
,
(
int
)
CardId
.
青眼亚白龙
});
return
true
;
}
else
{
Logger
.
WriteLine
(
"手里只有一对,不能乱丢."
);
return
false
;
}
}
private
bool
青眼亚白龙效果
()
{
Logger
.
WriteLine
(
"亚白龙效果."
);
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetInvincibleMonster
();
if
(
card
!=
null
)
{
Logger
.
WriteLine
(
"炸打不死的怪."
);
AI
.
SelectCard
(
card
);
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
}
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetDangerousMonster
();
if
(
card
!=
null
)
{
Logger
.
WriteLine
(
"炸厉害的怪."
);
AI
.
SelectCard
(
card
);
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
}
card
=
AI
.
Utils
.
GetOneEnnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
{
Logger
.
WriteLine
(
"炸比自己强的怪."
);
AI
.
SelectCard
(
card
);
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
}
if
(
能处理青眼亚白龙
())
{
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
}
Logger
.
WriteLine
(
"不炸."
);
return
false
;
}
private
bool
死者苏生效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
&&
CurrentChain
.
Count
>
0
)
{
Logger
.
WriteLine
(
"轰咆避免卡时点."
);
return
false
;
}
List
<
int
>
targets
=
new
List
<
int
>
{
(
int
)
CardId
.
希望魁龙银河巨神
,
(
int
)
CardId
.
银河眼暗物质龙
,
(
int
)
CardId
.
青眼亚白龙
,
(
int
)
CardId
.
苍眼银龙
,
(
int
)
CardId
.
青眼精灵龙
,
(
int
)
CardId
.
青眼白龙
,
(
int
)
CardId
.
白色灵龙
};
if
(!
Duel
.
Fields
[
0
].
HasInGraveyard
(
targets
))
{
return
false
;
}
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
ClientCard
selected
=
null
;
foreach
(
ClientCard
card
in
spells
)
{
if
(
card
.
IsSpellNegateAttack
())
{
selected
=
card
;
break
;
}
}
if
(
selected
!=
null
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
白色灵龙
))
{
AI
.
SelectCard
((
int
)
CardId
.
白色灵龙
);
}
else
{
AI
.
SelectCard
(
targets
);
}
return
true
;
}
private
bool
苍眼银龙效果
()
{
Logger
.
WriteLine
(
"苍眼银龙效果."
);
if
(
Duel
.
Fields
[
1
].
GetSpellCount
()>
0
)
{
AI
.
SelectCard
((
int
)
CardId
.
白色灵龙
);
}
else
{
AI
.
SelectCard
((
int
)
CardId
.
青眼白龙
);
}
return
true
;
}
private
bool
青色眼睛的贤士效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
Logger
.
WriteLine
(
"贤士手卡效果."
);
return
false
;
}
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
太古的白石
,
(
int
)
CardId
.
效果遮蒙者
,
(
int
)
CardId
.
传说的白石
});
return
true
;
}
private
bool
白色灵龙效果
()
{
//Logger.WriteLine("白色灵龙"+ActivateDescription);
if
(
ActivateDescription
==
-
1
)
// AI.Utils.GetStringId((int)CardId.白色灵龙, 0))
{
Logger
.
WriteLine
(
"白色灵龙拆后场."
);
return
true
;
}
/*else if(Duel.Phase==DuelPhase.BattleStart)
{
Logger.WriteLine("白色灵龙战阶变身.");
return true;
}*/
else
{
//Logger.WriteLine("白色灵龙特招手卡. 对象数量"+Duel.ChainTargets.Count);
foreach
(
ClientCard
card
in
Duel
.
ChainTargets
)
{
// Logger.WriteLine("对象" + card.Id);
if
(
Card
.
Equals
(
card
))
{
Logger
.
WriteLine
(
"白色灵龙被取对象,是否变身."
);
return
手里有
2
个
((
int
)
CardId
.
青眼白龙
)
||
(
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
青眼白龙
)
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
太古的白石
)
);
}
}
return
false
;
}
}
private
bool
青眼精灵龙效果
()
{
//Logger.WriteLine("青眼精灵龙" + ActivateDescription);
if
(
ActivateDescription
==
-
1
)
// AI.Utils.GetStringId((int)CardId.白色灵龙, 0))
{
Logger
.
WriteLine
(
"青眼精灵龙无效墓地."
);
return
LastChainPlayer
==
1
;
}
else
if
(
Duel
.
Player
==
1
&&
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
||
Duel
.
Phase
==
DuelPhase
.
End
))
{
Logger
.
WriteLine
(
"青眼精灵龙主动变身."
);
AI
.
SelectCard
((
int
)
CardId
.
苍眼银龙
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
else
{
//Logger.WriteLine("青眼精灵龙变身. 对象数量" + Duel.ChainTargets.Count);
foreach
(
ClientCard
card
in
Duel
.
ChainTargets
)
{
// Logger.WriteLine("对象" + card.Id);
if
(
Card
.
Equals
(
card
))
{
Logger
.
WriteLine
(
"青眼精灵龙被取对象,变身."
);
AI
.
SelectCard
((
int
)
CardId
.
苍眼银龙
);
return
true
;
}
}
return
false
;
}
}
private
bool
希望魁龙银河巨神效果
()
{
Logger
.
WriteLine
(
"希望魁龙银河巨神"
+
ActivateDescription
);
if
(
ActivateDescription
==
-
1
)
// AI.Utils.GetStringId((int)CardId.白色灵龙, 0))
{
Logger
.
WriteLine
(
"希望魁龙银河巨神无效魔法."
);
return
LastChainPlayer
==
1
;
}
return
LastChainPlayer
==
1
;
}
private
bool
太古的白石效果
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
太古的白石
,
0
))
{
Logger
.
WriteLine
(
"太古白石回收效果."
);
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼亚白龙
)
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
青眼亚白龙
))
{
Logger
.
WriteLine
(
"缺亚白龙,回收."
);
AI
.
SelectCard
((
int
)
CardId
.
青眼亚白龙
);
return
true
;
}
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼亚白龙
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
)
&&
Duel
.
Fields
[
0
].
HasInGraveyard
((
int
)
CardId
.
青眼白龙
))
{
Logger
.
WriteLine
(
"有亚白龙缺本体,回收."
);
AI
.
SelectCard
((
int
)
CardId
.
青眼白龙
);
return
true
;
}
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
抵价购物
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼白龙
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
青眼亚白龙
))
{
Logger
.
WriteLine
(
"回收喂八抽."
);
AI
.
SelectCard
((
int
)
CardId
.
青眼白龙
);
return
true
;
}
Logger
.
WriteLine
(
"并没有应该回收的."
);
return
false
;
}
else
{
Logger
.
WriteLine
(
"太古白石特招效果."
);
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
if
(
spells
.
Count
==
0
)
{
Logger
.
WriteLine
(
"对面没坑,跳个本体."
);
//AI.SelectCard((int)CardId.青眼白龙);
AI
.
SelectCard
((
int
)
CardId
.
白色灵龙
);
}
else
{
Logger
.
WriteLine
(
"对面有坑,拆."
);
AI
.
SelectCard
((
int
)
CardId
.
白色灵龙
);
}
return
true
;
}
}
private
bool
青眼精灵龙同调召唤
()
{
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
)
{
Logger
.
WriteLine
(
"主阶段1同调精灵龙."
);
if
(
使用过的青眼亚白龙
.
Count
>
0
)
{
Logger
.
WriteLine
(
"有用过的亚白需要同调."
);
return
true
;
}
if
(
Duel
.
Turn
==
1
)
{
Logger
.
WriteLine
(
"先攻同调."
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main2
)
{
Logger
.
WriteLine
(
"主阶段2同调精灵龙."
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
return
false
;
}
private
bool
希望魁龙银河巨神超量召唤
()
{
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
)
{
Logger
.
WriteLine
(
"主阶段1超量银河巨神."
);
if
(
使用过的青眼亚白龙
.
Count
>
0
)
{
Logger
.
WriteLine
(
"有用过的亚白可以叠."
);
return
true
;
}
if
(
Duel
.
Turn
==
1
)
{
Logger
.
WriteLine
(
"先攻超量银河巨神."
);
return
true
;
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main2
)
{
Logger
.
WriteLine
(
"主阶段2超量银河巨神."
);
return
true
;
}
return
false
;
}
private
bool
BreakthroughSkill
()
{
return
(
CurrentChain
.
Count
>
0
&&
DefaultTrap
());
}
private
bool
改变攻守表示
()
{
bool
ennemyBetter
=
AI
.
Utils
.
IsEnnemyBetter
(
true
,
true
);
if
(
Card
.
IsAttack
()
&&
ennemyBetter
)
return
true
;
if
(
Card
.
IsDefense
()
&&
!
ennemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
if
(
Card
.
IsDefense
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
青眼精灵龙
||
Card
.
Id
==
(
int
)
CardId
.
苍眼银龙
))
return
true
;
if
(
Card
.
IsAttack
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
青色眼睛的贤士
||
Card
.
Id
==
(
int
)
CardId
.
太古的白石
||
Card
.
Id
==
(
int
)
CardId
.
传说的白石
))
return
true
;
return
false
;
}
private
bool
盖卡
()
{
return
(
Card
.
IsTrap
()
||
(
Card
.
Id
==(
int
)
CardId
.
银龙的轰咆
))
&&
Duel
.
Fields
[
0
].
GetSpellCountWithoutField
()
<
4
;
}
private
bool
手里有
2
个
(
int
id
)
{
int
num
=
0
;
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
Hand
)
{
if
(
card
!=
null
&&
card
.
Id
==
id
)
num
++;
}
return
num
>=
2
;
}
private
bool
能处理青眼亚白龙
()
{
return
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
{
(
int
)
CardId
.
青色眼睛的贤士
,
(
int
)
CardId
.
太古的白石
,
(
int
)
CardId
.
传说的白石
,
(
int
)
CardId
.
青眼白龙
,
(
int
)
CardId
.
白色灵龙
})
||
Duel
.
Fields
[
0
].
GetCountCardInZone
(
Duel
.
Fields
[
0
].
MonsterZone
,
(
int
)
CardId
.
青眼亚白龙
)>=
2
;
}
}
}
WindBot.csproj
View file @
b764fea6
...
...
@@ -51,6 +51,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Game\AI\Decks\BlueEyesExecutor.cs"
/>
<Compile
Include=
"Game\AI\AIFunctions.cs"
/>
<Compile
Include=
"Game\AI\CardContainer.cs"
/>
<Compile
Include=
"Game\AI\CardExecutor.cs"
/>
...
...
@@ -95,6 +96,9 @@
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
<None
Include=
"Decks\AI_BlueEyes.ydk"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"sqlite3.dll"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
...
...
@@ -118,4 +122,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
\ No newline at end of file
bots.json
View file @
b764fea6
...
...
@@ -34,6 +34,26 @@
"name"
:
"谜之剑士LV4"
,
"deck"
:
"Zexal Weapons"
,
"dialog"
:
"zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Blue-Eyes"
,
"dialog"
:
"copy.zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Blue-Eyes"
,
"dialog"
:
"copy.zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Blue-Eyes"
,
"dialog"
:
"copy.zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Blue-Eyes"
,
"dialog"
:
"copy.zh-CN"
}
]
}
\ No newline at end of file
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