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
c110109d
Commit
c110109d
authored
Jan 30, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new deck
parent
01524bc5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
608 additions
and
6 deletions
+608
-6
Decks/AI_Zoodiac.ydk
Decks/AI_Zoodiac.ydk
+59
-0
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+498
-0
Game/AI/Enums/Floodgate.cs
Game/AI/Enums/Floodgate.cs
+2
-1
Game/GameAI.cs
Game/GameAI.cs
+41
-3
WindBot.csproj
WindBot.csproj
+1
-0
bots.json
bots.json
+7
-2
No files found.
Decks/AI_Zoodiac.ydk
0 → 100644
View file @
c110109d
#created by ...
#main
63941210
36956512
55063751
28674152
29726552
65367484
65367484
65367484
77150143
77150143
77150143
31755044
31755044
31755044
86120751
86120751
86120751
78872731
78872731
78872731
18144506
53129443
73628505
73628505
73628505
74063034
74063034
74063034
83764718
99330325
99330325
99330325
46060017
46060017
46060017
57103969
47679935
47679935
47679935
73881652
#extra
75286621
75286621
48791583
56832966
84013237
581014
581014
11510448
11510448
41375811
41375811
48905153
48905153
85115440
85115440
!side
Game/AI/Decks/ZoodiacExecutor.cs
0 → 100644
View file @
c110109d
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
namespace
MycardBot.Game.AI.Decks
{
[
Deck
(
"Zoodiac"
,
"AI_Zoodiac"
)]
class
ZoodiacExecutor
:
DefaultExecutor
{
public
enum
CardId
{
坏星坏兽席兹奇埃鲁
=
63941210
,
怪粉坏兽加达拉
=
36956512
,
海龟坏兽加美西耶勒
=
55063751
,
多次元坏兽拉迪安
=
28674152
,
黏丝坏兽库莫古斯
=
29726552
,
光子斩击者
=
65367484
,
十二兽马剑
=
77150143
,
十二兽蛇笞
=
31755044
,
召唤师阿莱斯特
=
86120751
,
十二兽鼠骑
=
78872731
,
鹰身女妖的羽毛扫
=
18144506
,
黑洞
=
53129443
,
星球改造
=
73628505
,
召唤魔术
=
74063034
,
死者苏生
=
83764718
,
遭受妨碍的坏兽安眠
=
99330325
,
十二兽的会局
=
46060017
,
炎舞天玑
=
57103969
,
暴走魔法阵
=
47679935
,
十二兽的方合
=
73881652
,
召唤兽梅尔卡巴
=
75286621
,
召唤兽墨瓦腊泥加
=
48791583
,
闪光
No39
希望皇霍普电光皇
=
56832966
,
No39
希望皇霍普
=
84013237
,
大薰风骑士翠玉
=
581014
,
十二兽虎炮
=
11510448
,
十二兽狗环
=
41375811
,
十二兽龙枪
=
48905153
,
十二兽牛犄
=
85115440
}
bool
已特殊召唤虎炮
=
false
;
bool
已特殊召唤狗环
=
false
;
bool
已特殊召唤牛犄
=
false
;
public
ZoodiacExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
// Quick spells
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鹰身女妖的羽毛扫
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
遭受妨碍的坏兽安眠
,
遭受妨碍的坏兽安眠效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
黑洞
,
DefaultDarkHole
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
海龟坏兽加美西耶勒
,
坏兽特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
黏丝坏兽库莫古斯
,
坏兽特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
怪粉坏兽加达拉
,
坏兽特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
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
.
SpSummon
,
(
int
)
CardId
.
光子斩击者
,
光子斩击者特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
No39
希望皇霍普
,
电光皇特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
召唤兽梅尔卡巴
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
十二兽鼠骑素材效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
十二兽龙枪
,
十二兽龙枪效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
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
.
Summon
,
(
int
)
CardId
.
十二兽鼠骑
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
十二兽鼠骑
,
十二兽鼠骑效果
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
十二兽马剑
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
十二兽马剑
,
十二兽鼠骑效果
);
AddExecutor
(
ExecutorType
.
Summon
,
(
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
.
Activate
,
(
int
)
CardId
.
十二兽蛇笞
,
十二兽蛇笞效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
十二兽的方合
,
十二兽的方合效果
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
十二兽的方合
);
}
public
override
bool
OnSelectHand
()
{
// 抢先攻
return
true
;
}
public
override
void
OnNewTurn
()
{
// 回合开始时重置状况
已特殊召唤虎炮
=
false
;
已特殊召唤狗环
=
false
;
已特殊召唤牛犄
=
false
;
}
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
.
HasType
(
CardType
.
Fusion
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
召唤师阿莱斯特
))
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
if
(
attacker
.
Id
==
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
(
int
)
CardId
.
No39
希望皇霍普
))
attacker
.
RealPower
=
5000
;
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
();
}
private
bool
遭受妨碍的坏兽安眠效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
海龟坏兽加美西耶勒
,
(
int
)
CardId
.
黏丝坏兽库莫古斯
,
(
int
)
CardId
.
多次元坏兽拉迪安
,
(
int
)
CardId
.
怪粉坏兽加达拉
});
return
true
;
}
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
坏星坏兽席兹奇埃鲁
,
(
int
)
CardId
.
怪粉坏兽加达拉
,
(
int
)
CardId
.
多次元坏兽拉迪安
,
(
int
)
CardId
.
黏丝坏兽库莫古斯
});
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
海龟坏兽加美西耶勒
,
(
int
)
CardId
.
黏丝坏兽库莫古斯
,
(
int
)
CardId
.
多次元坏兽拉迪安
,
(
int
)
CardId
.
怪粉坏兽加达拉
});
return
DefaultDarkHole
();
}
private
bool
坏兽特殊召唤
()
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetFloodgate
();
if
(
card
!=
null
)
{
AI
.
SelectCard
(
card
);
return
true
;
}
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetDangerousMonster
();
if
(
card
!=
null
)
{
AI
.
SelectCard
(
card
);
return
true
;
}
card
=
AI
.
Utils
.
GetOneEnnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
{
AI
.
SelectCard
(
card
);
return
true
;
}
return
false
;
}
private
bool
电光皇特殊召唤
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
false
);
return
selfBestAttack
<
oppoBestAttack
;
}
private
bool
光子斩击者特殊召唤
()
{
return
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
召唤师阿莱斯特
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
十二兽鼠骑
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
十二兽马剑
);
}
private
bool
召唤师阿莱斯特效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
return
!
AI
.
Utils
.
IsTurn1OrMain2
();
}
return
true
;
}
private
bool
召唤魔术效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
return
true
;
IList
<
ClientCard
>
materials0
=
Duel
.
Fields
[
0
].
Graveyard
;
IList
<
ClientCard
>
materials1
=
Duel
.
Fields
[
1
].
Graveyard
;
ClientCard
mat
=
null
;
foreach
(
ClientCard
card
in
materials0
)
{
if
(
card
.
HasAttribute
(
CardAttribute
.
Light
))
{
mat
=
card
;
break
;
}
}
foreach
(
ClientCard
card
in
materials1
)
{
if
(
card
.
HasAttribute
(
CardAttribute
.
Light
))
{
mat
=
card
;
break
;
}
}
if
(
mat
!=
null
)
{
AI
.
SelectCard
((
int
)
CardId
.
召唤兽梅尔卡巴
);
选择墓地里的召唤师
();
AI
.
SelectThirdCard
(
mat
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpAttack
);
return
true
;
}
foreach
(
ClientCard
card
in
materials0
)
{
if
(
card
.
HasAttribute
(
CardAttribute
.
Earth
))
{
mat
=
card
;
break
;
}
}
foreach
(
ClientCard
card
in
materials1
)
{
if
(
card
.
HasAttribute
(
CardAttribute
.
Earth
))
{
mat
=
card
;
break
;
}
}
if
(
mat
!=
null
)
{
AI
.
SelectCard
((
int
)
CardId
.
召唤兽墨瓦腊泥加
);
选择墓地里的召唤师
();
AI
.
SelectThirdCard
(
mat
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpAttack
);
return
true
;
}
return
false
;
}
private
void
选择墓地里的召唤师
()
{
IList
<
ClientCard
>
materials0
=
Duel
.
Fields
[
0
].
Graveyard
;
IList
<
ClientCard
>
materials1
=
Duel
.
Fields
[
1
].
Graveyard
;
foreach
(
ClientCard
card
in
materials1
)
{
if
(
card
.
Id
==
(
int
)
CardId
.
召唤师阿莱斯特
)
{
AI
.
SelectNextCard
(
card
);
return
;
}
}
foreach
(
ClientCard
card
in
materials0
)
{
if
(
card
.
Id
==
(
int
)
CardId
.
召唤师阿莱斯特
)
{
AI
.
SelectNextCard
(
card
);
return
;
}
}
}
private
bool
十二兽狗环特殊召唤
()
{
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
十二兽鼠骑
)
&&
!
已特殊召唤狗环
)
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽鼠骑
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
已特殊召唤狗环
=
true
;
return
true
;
}
return
false
;
}
private
bool
十二兽虎炮特殊召唤
()
{
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
十二兽狗环
)
&&
!
已特殊召唤虎炮
)
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽狗环
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
已特殊召唤虎炮
=
true
;
return
true
;
}
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
十二兽马剑
)
&&
!
已特殊召唤虎炮
&&
Duel
.
Fields
[
0
].
HasInGraveyard
(
new
List
<
int
>
{
(
int
)
CardId
.
十二兽蛇笞
,
(
int
)
CardId
.
十二兽鼠骑
}))
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽马剑
);
AI
.
SelectYesNo
(
true
);
已特殊召唤虎炮
=
true
;
return
true
;
}
return
false
;
}
private
bool
十二兽虎炮效果
()
{
//if (Card.HasXyzMaterial((int)CardId.十二兽鼠骑) || !Duel.Fields[0].HasInGraveyard((int)CardId.十二兽鼠骑))
// return false;
AI
.
SelectCard
((
int
)
CardId
.
十二兽狗环
);
AI
.
SelectNextCard
((
int
)
CardId
.
十二兽虎炮
);
AI
.
SelectThirdCard
(
new
[]
{
(
int
)
CardId
.
十二兽鼠骑
,
(
int
)
CardId
.
十二兽蛇笞
,
(
int
)
CardId
.
十二兽马剑
});
return
true
;
}
private
bool
十二兽牛犄特殊召唤
()
{
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
十二兽虎炮
)
&&
!
已特殊召唤牛犄
)
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽虎炮
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
已特殊召唤牛犄
=
true
;
return
true
;
}
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
十二兽马剑
)
&&
!
已特殊召唤牛犄
)
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽马剑
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
已特殊召唤牛犄
=
true
;
return
true
;
}
return
false
;
}
private
bool
十二兽牛犄效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽虎炮
,
(
int
)
CardId
.
十二兽狗环
,
(
int
)
CardId
.
十二兽龙枪
,
(
int
)
CardId
.
召唤师阿莱斯特
,
(
int
)
CardId
.
光子斩击者
});
AI
.
SelectNextCard
((
int
)
CardId
.
十二兽蛇笞
);
return
true
;
}
private
bool
十二兽龙枪特殊召唤
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽牛犄
,
(
int
)
CardId
.
十二兽虎炮
,
(
int
)
CardId
.
十二兽狗环
,
(
int
)
CardId
.
十二兽马剑
});
return
true
;
}
private
bool
十二兽鼠骑素材效果
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
十二兽鼠骑
,
1
))
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
return
false
;
}
private
bool
十二兽蛇笞效果
()
{
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
||
Duel
.
Phase
==
DuelPhase
.
Main2
)
return
false
;
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽龙枪
});
return
true
;
}
private
bool
十二兽鼠骑效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽的方合
,
(
int
)
CardId
.
十二兽马剑
,
(
int
)
CardId
.
十二兽的会局
});
return
true
;
}
private
bool
十二兽龙枪效果
()
{
ClientCard
target
=
AI
.
Utils
.
GetProblematicCard
();
if
(
target
==
null
)
return
false
;
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽牛犄
,
(
int
)
CardId
.
十二兽虎炮
,
(
int
)
CardId
.
十二兽狗环
,
(
int
)
CardId
.
十二兽马剑
,
(
int
)
CardId
.
十二兽鼠骑
,
(
int
)
CardId
.
十二兽蛇笞
});
AI
.
SelectNextCard
(
target
);
return
true
;
}
private
bool
炎舞天玑效果
()
{
if
(
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
十二兽的会局
)
||
Duel
.
Fields
[
0
].
HasInSpellZone
((
int
)
CardId
.
十二兽的会局
)
||
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
十二兽鼠骑
))
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽蛇笞
);
}
else
{
AI
.
SelectCard
((
int
)
CardId
.
十二兽鼠骑
);
}
AI
.
SelectYesNo
(
true
);
return
true
;
}
private
bool
十二兽的会局效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
炎舞天玑
,
(
int
)
CardId
.
暴走魔法阵
,
(
int
)
CardId
.
十二兽的会局
});
AI
.
SelectNextCard
(
new
[]
{
(
int
)
CardId
.
十二兽鼠骑
,
(
int
)
CardId
.
十二兽蛇笞
,
(
int
)
CardId
.
十二兽马剑
});
return
true
;
}
private
bool
十二兽的方合效果
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
十二兽鼠骑
,
(
int
)
CardId
.
十二兽龙枪
});
return
true
;
}
private
bool
MonsterRepos
()
{
if
(
Card
.
Id
==
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
)
return
false
;
return
base
.
DefaultMonsterRepos
();
}
}
}
Game/AI/Enums/Floodgate.cs
View file @
c110109d
...
...
@@ -59,6 +59,7 @@
NaturiaBarkion
=
2956282
,
EvilswarmOphion
=
91279700
,
MermailAbyssgaios
=
74371660
,
AbyssDweller
=
21044178
AbyssDweller
=
21044178
,
ZoodiacDrident
=
48905153
}
}
Game/GameAI.cs
View file @
c110109d
...
...
@@ -70,6 +70,7 @@ namespace WindBot.Game
m_selector
=
null
;
m_nextSelector
=
null
;
m_option
=
-
1
;
m_yesno
=
-
1
;
m_position
=
CardPosition
.
FaceUpAttack
;
Duel
.
LastSummonPlayer
=
-
1
;
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Draw
)
...
...
@@ -446,6 +447,8 @@ namespace WindBot.Game
/// <returns>True for yes, false for no.</returns>
public
bool
OnSelectYesNo
(
int
desc
)
{
if
(
m_yesno
!=
-
1
)
return
m_yesno
>
0
;
return
Executor
.
OnSelectYesNo
(
desc
);
}
...
...
@@ -465,10 +468,12 @@ namespace WindBot.Game
private
CardSelector
m_selector
;
private
CardSelector
m_nextSelector
;
private
CardSelector
m_thirdSelector
;
private
CardPosition
m_position
=
CardPosition
.
FaceUpAttack
;
private
int
m_option
;
private
int
m_number
;
private
int
m_announce
;
private
int
m_yesno
;
private
IList
<
CardAttribute
>
m_attributes
=
new
List
<
CardAttribute
>();
private
IList
<
CardRace
>
m_races
=
new
List
<
CardRace
>();
...
...
@@ -522,17 +527,45 @@ namespace WindBot.Game
m_nextSelector
=
new
CardSelector
(
loc
);
}
public
void
SelectThirdCard
(
ClientCard
card
)
{
m_thirdSelector
=
new
CardSelector
(
card
);
}
public
void
SelectThirdCard
(
IList
<
ClientCard
>
cards
)
{
m_thirdSelector
=
new
CardSelector
(
cards
);
}
public
void
SelectThirdCard
(
int
cardId
)
{
m_thirdSelector
=
new
CardSelector
(
cardId
);
}
public
void
SelectThirdCard
(
IList
<
int
>
ids
)
{
m_thirdSelector
=
new
CardSelector
(
ids
);
}
public
void
SelectThirdCard
(
CardLocation
loc
)
{
m_thirdSelector
=
new
CardSelector
(
loc
);
}
public
CardSelector
GetSelectedCards
()
{
CardSelector
selected
=
m_selector
;
m_selector
=
null
;
if
(
m_nextSelector
!=
null
)
{
m_selector
=
m_nextSelector
;
m_nextSelector
=
null
;
if
(
m_thirdSelector
!=
null
)
{
m_nextSelector
=
m_thirdSelector
;
m_thirdSelector
=
null
;
}
}
else
m_selector
=
null
;
return
selected
;
}
...
...
@@ -582,6 +615,11 @@ namespace WindBot.Game
m_announce
=
id
;
}
public
void
SelectYesNo
(
bool
opt
)
{
m_yesno
=
opt
?
1
:
0
;
}
/// <summary>
/// Called when the AI has to declare a number.
/// </summary>
...
...
WindBot.csproj
View file @
c110109d
...
...
@@ -77,6 +77,7 @@
<Compile
Include=
"Game\AI\Decks\DoEveryThingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\OldSchoolExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\Rank5Executor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ZoodiacExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ZexalWeaponsExecutor.cs"
/>
<Compile
Include=
"Game\AI\DefaultExecutor.cs"
/>
<Compile
Include=
"Game\AI\Dialogs.cs"
/>
...
...
bots.json
View file @
c110109d
...
...
@@ -32,12 +32,17 @@
},
{
"name"
:
"复制植物"
,
"deck"
:
"
Blue-Eyes
"
,
"deck"
:
"
Zoodiac
"
,
"dialog"
:
"copy.zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Blue-Eyes"
,
"deck"
:
"Zoodiac"
,
"dialog"
:
"copy.zh-CN"
},
{
"name"
:
"复制植物"
,
"deck"
:
"Zoodiac"
,
"dialog"
:
"copy.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