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
c55ce9f7
Commit
c55ce9f7
authored
Jan 31, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new Qliphort deck
parent
9b18ffdc
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
720 additions
and
6 deletions
+720
-6
Decks/AI_Qliphort.ydk
Decks/AI_Qliphort.ydk
+59
-0
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+21
-0
Game/AI/CardExtension.cs
Game/AI/CardExtension.cs
+10
-0
Game/AI/Decks/QliphortExecutor.cs
Game/AI/Decks/QliphortExecutor.cs
+429
-0
Game/AI/Decks/Rank5Executor.cs
Game/AI/Decks/Rank5Executor.cs
+7
-1
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+112
-0
Game/AI/Enums/FusionSpell.cs
Game/AI/Enums/FusionSpell.cs
+49
-0
Game/AI/Enums/OneForXyz.cs
Game/AI/Enums/OneForXyz.cs
+23
-0
Game/ClientCard.cs
Game/ClientCard.cs
+4
-2
Game/GameAI.cs
Game/GameAI.cs
+1
-1
WindBot.csproj
WindBot.csproj
+3
-0
bots.json
bots.json
+2
-2
No files found.
Decks/AI_Qliphort.ydk
0 → 100644
View file @
c55ce9f7
#created by ...
#main
65518099
65518099
65518099
13073850
13073850
90885155
37991342
37991342
91907707
91907707
53129443
59750328
59750328
59750328
79816536
79816536
79816536
98645731
98645731
17639150
44095762
44095762
44095762
53582587
53582587
53582587
83326048
83326048
83326048
94192409
94192409
5851097
82732705
82732705
82732705
40605147
40605147
40605147
99188141
99188141
#extra
13331639
13331639
13331639
79229522
79229522
79229522
26268488
26268488
26268488
35952884
35952884
35952884
23187256
23187256
23187256
!side
Game/AI/AIFunctions.cs
View file @
c55ce9f7
...
...
@@ -131,6 +131,27 @@ namespace WindBot.Game.AI
return
GetOneEnnemyBetterThanValue
(
attack
,
true
);
}
public
ClientCard
GetProblematicMonsterCard
(
int
attack
=
0
)
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetInvincibleMonster
();
if
(
card
!=
null
)
return
card
;
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetFloodgate
();
if
(
card
!=
null
)
return
card
;
if
(
attack
==
0
)
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
return
GetOneEnnemyBetterThanValue
(
attack
,
true
);
}
public
ClientCard
GetProblematicSpellCard
()
{
ClientCard
card
=
Duel
.
Fields
[
1
].
SpellZone
.
GetNegateAttackSpell
();
if
(
card
!=
null
)
return
card
;
card
=
Duel
.
Fields
[
1
].
SpellZone
.
GetFloodgate
();
return
card
;
}
public
int
GetStringId
(
int
id
,
int
option
)
{
...
...
Game/AI/CardExtension.cs
View file @
c55ce9f7
...
...
@@ -24,5 +24,15 @@ namespace WindBot.Game.AI
{
return
Enum
.
IsDefined
(
typeof
(
Floodgate
),
card
.
Id
);
}
public
static
bool
IsOneForXyz
(
this
ClientCard
card
)
{
return
Enum
.
IsDefined
(
typeof
(
OneForXyz
),
card
.
Id
);
}
public
static
bool
IsFusionSpell
(
this
ClientCard
card
)
{
return
Enum
.
IsDefined
(
typeof
(
FusionSpell
),
card
.
Id
);
}
}
}
\ No newline at end of file
Game/AI/Decks/QliphortExecutor.cs
0 → 100644
View file @
c55ce9f7
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"Qliphort"
,
"AI_Qliphort"
)]
public
class
QliphortExecutor
:
DefaultExecutor
{
public
enum
CardId
{
机壳工具丑恶
=
65518099
,
机壳别名愚钝
=
13073850
,
机壳壳层拒绝
=
90885155
,
机壳基因组贪欲
=
37991342
,
机壳档案色欲
=
91907707
,
黑洞
=
53129443
,
削命的宝札
=
59750328
,
召唤师的技艺
=
79816536
,
强欲而谦虚之壶
=
98645731
,
机壳的牲祭
=
17639150
,
神圣防护罩反射镜力
=
44095762
,
激流葬
=
53582587
,
次元障壁
=
83326048
,
强制脱出装置
=
94192409
,
虚无空间
=
5851097
,
技能抽取
=
82732705
,
神之通告
=
40605147
,
反大革命
=
99188141
}
bool
已发动削命
=
false
;
List
<
int
>
低刻度
=
new
List
<
int
>
{
(
int
)
CardId
.
机壳别名愚钝
,
(
int
)
CardId
.
机壳档案色欲
};
List
<
int
>
高刻度
=
new
List
<
int
>
{
(
int
)
CardId
.
机壳工具丑恶
,
(
int
)
CardId
.
机壳壳层拒绝
,
(
int
)
CardId
.
机壳基因组贪欲
};
public
QliphortExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
黑洞
,
DefaultDarkHole
);
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
,
通常召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
机壳的牲祭
,
机壳的牲祭
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
机壳别名愚钝
,
机壳别名愚钝效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
机壳基因组贪欲
,
机壳基因组贪欲效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
机壳档案色欲
,
机壳档案色欲效果
);
// 盖坑
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
技能抽取
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
虚无空间
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
次元障壁
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
激流葬
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神之通告
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神圣防护罩反射镜力
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
强制脱出装置
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
反大革命
,
优先盖不重复的坑
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
机壳的牲祭
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
技能抽取
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
虚无空间
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
次元障壁
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
激流葬
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神之通告
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神圣防护罩反射镜力
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
强制脱出装置
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
反大革命
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
黑洞
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
召唤师的技艺
,
魔陷区有空余格子
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
强欲而谦虚之壶
,
魔陷区有空余格子
);
// 开完削命继续盖坑
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
强欲而谦虚之壶
,
强欲而谦虚之壶
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
削命的宝札
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
削命的宝札
,
削命的宝札
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
机壳的牲祭
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
技能抽取
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
虚无空间
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
次元障壁
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
激流葬
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神之通告
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
神圣防护罩反射镜力
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
强制脱出装置
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
反大革命
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
黑洞
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
召唤师的技艺
,
已发动过削命
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
强欲而谦虚之壶
,
已发动过削命
);
// 坑人
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
反大革命
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
神之通告
,
神之通告
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
技能抽取
,
技能抽取
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
虚无空间
,
DefaultUniqueTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
强制脱出装置
,
DefaultCompulsoryEvacuationDevice
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
次元障壁
,
DefaultDimensionalBarrier
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
神圣防护罩反射镜力
,
DefaultUniqueTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
激流葬
,
DefaultTorrentialTribute
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
}
public
override
bool
OnSelectHand
()
{
// 抢先攻
return
true
;
}
public
override
void
OnNewTurn
()
{
// 回合开始时重置状况
已发动削命
=
false
;
}
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
bool
cancelable
)
{
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
// select the last cards
for
(
int
i
=
1
;
i
<=
max
;
++
i
)
selected
.
Add
(
cards
[
cards
.
Count
-
i
]);
return
selected
;
}
private
bool
通常召唤
()
{
if
(
Card
.
Id
==
(
int
)
CardId
.
机壳工具丑恶
)
return
false
;
if
(
Card
.
Level
<
8
)
AI
.
SelectOption
(
1
);
return
true
;
}
private
bool
神之通告
()
{
return
(
Duel
.
LifePoints
[
0
]
>
1500
)
&&
!(
Duel
.
Player
==
0
&&
LastChainPlayer
==
-
1
)
&&
DefaultTrap
();
}
private
bool
技能抽取
()
{
return
(
Duel
.
LifePoints
[
0
]
>
1000
)
&&
DefaultUniqueTrap
();
}
private
bool
强欲而谦虚之壶
()
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
机壳工具丑恶
,
(
int
)
CardId
.
技能抽取
,
(
int
)
CardId
.
虚无空间
,
(
int
)
CardId
.
次元障壁
,
(
int
)
CardId
.
机壳别名愚钝
,
(
int
)
CardId
.
机壳壳层拒绝
,
(
int
)
CardId
.
机壳基因组贪欲
,
(
int
)
CardId
.
机壳档案色欲
,
(
int
)
CardId
.
神之通告
,
(
int
)
CardId
.
削命的宝札
});
return
!
应进行灵摆召唤
();
}
private
bool
削命的宝札
()
{
if
(
AI
.
Utils
.
IsTurn1OrMain2
()
&&
!
应进行灵摆召唤
())
{
已发动削命
=
true
;
return
true
;
}
return
false
;
}
private
bool
优先盖不重复的坑
()
{
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
SpellZone
)
{
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
)
return
false
;
}
return
魔陷区有空余格子
();
}
private
bool
魔陷区有空余格子
()
{
return
Duel
.
Fields
[
0
].
GetSpellCountWithoutField
()
<
4
;
}
private
bool
已发动过削命
()
{
return
已发动削命
;
}
private
bool
机壳的牲祭
()
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
];
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
];
if
(
l
==
null
&&
r
==
null
)
AI
.
SelectCard
((
int
)
CardId
.
机壳工具丑恶
);
}
return
true
;
}
private
bool
机壳工具丑恶发动
()
{
if
(
Card
.
Location
!=
CardLocation
.
Hand
)
return
false
;
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
];
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
];
if
(
l
==
null
&&
r
==
null
)
return
true
;
if
(
l
==
null
&&
r
.
RScale
!=
Card
.
LScale
)
return
true
;
if
(
r
==
null
&&
l
.
LScale
!=
Card
.
RScale
)
return
true
;
return
false
;
}
private
bool
设置刻度
()
{
if
(!
Card
.
HasType
(
CardType
.
Pendulum
)
||
Card
.
Location
!=
CardLocation
.
Hand
)
return
false
;
int
count
=
0
;
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
Hand
.
GetMonsters
())
{
if
(!
Card
.
Equals
(
card
))
count
++;
}
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
ExtraDeck
.
GetMonsters
())
{
if
(
card
.
HasType
(
CardType
.
Pendulum
)
&&
card
.
IsFaceup
())
count
++;
}
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
];
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
];
if
(
l
==
null
&&
r
==
null
)
{
if
(
已发动削命
)
return
true
;
bool
pair
=
false
;
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
Hand
.
GetMonsters
())
{
if
(
card
.
RScale
!=
Card
.
LScale
)
{
pair
=
true
;
count
--;
break
;
}
}
return
pair
&&
count
>
1
;
}
if
(
l
==
null
&&
r
.
RScale
!=
Card
.
LScale
)
return
count
>
1
||
已发动削命
;
if
(
r
==
null
&&
l
.
LScale
!=
Card
.
RScale
)
return
count
>
1
||
已发动削命
;
return
false
;
}
private
bool
机壳工具丑恶效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
return
false
;
int
count
=
0
;
int
handcount
=
0
;
int
fieldcount
=
0
;
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
Hand
.
GetMonsters
())
{
count
++;
handcount
++;
}
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
MonsterZone
.
GetMonsters
())
{
fieldcount
++;
}
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
ExtraDeck
.
GetMonsters
())
{
if
(
card
.
HasType
(
CardType
.
Pendulum
)
&&
card
.
IsFaceup
())
count
++;
}
if
(
count
>
0
&&
!
Duel
.
Fields
[
0
].
HasInHand
(
低刻度
))
{
AI
.
SelectCard
(
低刻度
);
}
else
if
(
handcount
>
0
||
fieldcount
>
0
)
{
AI
.
SelectCard
(
new
[]
{
(
int
)
CardId
.
机壳的牲祭
,
(
int
)
CardId
.
机壳壳层拒绝
,
(
int
)
CardId
.
机壳基因组贪欲
});
}
else
{
AI
.
SelectCard
(
高刻度
);
}
return
Duel
.
LifePoints
[
0
]
>
800
;
}
private
bool
机壳别名愚钝效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetProblematicCard
();
if
(
target
!=
null
)
{
AI
.
SelectCard
(
target
);
return
true
;
}
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
foreach
(
ClientCard
spell
in
spells
)
{
if
(
spell
.
IsFacedown
())
{
AI
.
SelectCard
(
spell
);
return
true
;
}
}
foreach
(
ClientCard
spell
in
spells
)
{
AI
.
SelectCard
(
spell
);
return
true
;
}
return
false
;
}
private
bool
机壳档案色欲效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetProblematicMonsterCard
();
if
(
target
!=
null
)
{
AI
.
SelectCard
(
target
);
return
true
;
}
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
return
false
;
}
private
bool
机壳基因组贪欲效果
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetProblematicSpellCard
();
if
(
target
!=
null
)
{
AI
.
SelectCard
(
target
);
return
true
;
}
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
foreach
(
ClientCard
spell
in
spells
)
{
if
(
spell
.
IsFacedown
())
{
AI
.
SelectCard
(
spell
);
return
true
;
}
}
foreach
(
ClientCard
spell
in
spells
)
{
AI
.
SelectCard
(
spell
);
return
true
;
}
return
false
;
}
private
bool
应进行灵摆召唤
()
{
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
];
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
];
if
(
l
!=
null
&&
r
!=
null
&&
l
.
LScale
!=
r
.
RScale
)
{
int
count
=
0
;
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
Hand
.
GetMonsters
())
{
count
++;
}
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
ExtraDeck
.
GetMonsters
())
{
if
(
card
.
HasType
(
CardType
.
Pendulum
)
&&
card
.
IsFaceup
())
count
++;
}
return
count
>
1
;
}
return
false
;
}
private
bool
DontChainMyself
()
{
return
LastChainPlayer
!=
0
;
}
}
}
\ No newline at end of file
Game/AI/Decks/Rank5Executor.cs
View file @
c55ce9f7
...
...
@@ -85,7 +85,7 @@ namespace DevBot.Game.AI.Decks
// Useful spells
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
二重召唤
,
二重召唤效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
超量组件
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
超量组件
,
超量组件效果
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
超量苏生
,
超量苏生效果
);
...
...
@@ -347,6 +347,12 @@ namespace DevBot.Game.AI.Decks
return
true
;
}
private
bool
超量组件效果
()
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
return
monsters
.
Exists
(
p
=>
p
.
HasType
(
CardType
.
Xyz
));
}
private
bool
重装机甲装甲车龙效果
()
{
ClientCard
target
=
AI
.
Utils
.
GetProblematicCard
();
...
...
Game/AI/DefaultExecutor.cs
View file @
c55ce9f7
...
...
@@ -108,6 +108,29 @@ namespace WindBot.Game.AI
return
false
;
}
protected
bool
DefaultCompulsoryEvacuationDevice
()
{
ClientCard
target
=
AI
.
Utils
.
GetProblematicMonsterCard
();
if
(
target
!=
null
)
{
AI
.
SelectCard
(
target
);
return
true
;
}
foreach
(
ClientCard
card
in
Duel
.
ChainTargets
)
{
if
(
Card
.
Equals
(
card
))
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
}
return
false
;
}
protected
bool
DefaultCallOfTheHaunted
()
{
if
(!
AI
.
Utils
.
IsEnnemyBetter
(
true
,
true
))
...
...
@@ -158,6 +181,13 @@ namespace WindBot.Game.AI
protected
bool
DefaultTributeSummon
()
{
foreach
(
ClientCard
card
in
Duel
.
Fields
[
0
].
SpellZone
)
{
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
&&
card
.
HasPosition
(
CardPosition
.
FaceUp
))
return
false
;
}
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
for
(
int
j
=
0
;
j
<
5
;
++
j
)
{
...
...
@@ -222,5 +252,87 @@ namespace WindBot.Game.AI
return
true
;
return
false
;
}
protected
bool
DefaultDimensionalBarrier
()
{
if
(
Duel
.
Player
!=
0
)
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
int
[]
levels
=
new
int
[
13
];
bool
tuner
=
false
;
bool
nontuner
=
false
;
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
HasType
(
CardType
.
Tuner
))
tuner
=
true
;
else
if
(!
monster
.
HasType
(
CardType
.
Xyz
))
nontuner
=
true
;
if
(
monster
.
IsOneForXyz
())
{
AI
.
SelectOption
(
3
);
return
true
;
}
levels
[
monster
.
Level
]
=
levels
[
monster
.
Level
]
+
1
;
}
if
(
tuner
&&
nontuner
)
{
AI
.
SelectOption
(
2
);
return
true
;
}
for
(
int
i
=
1
;
i
<=
12
;
i
++)
{
if
(
levels
[
i
]>
1
)
{
AI
.
SelectOption
(
3
);
return
true
;
}
}
ClientCard
l
=
Duel
.
Fields
[
1
].
SpellZone
[
6
];
ClientCard
r
=
Duel
.
Fields
[
1
].
SpellZone
[
7
];
if
(
l
!=
null
&&
r
!=
null
&&
l
.
LScale
!=
r
.
RScale
)
{
AI
.
SelectOption
(
4
);
return
true
;
}
}
ClientCard
lastchaincard
=
GetLastChainCard
();
if
(
LastChainPlayer
==
1
&&
lastchaincard
!=
null
&&
!
lastchaincard
.
IsDisabled
())
{
if
(
lastchaincard
.
HasType
(
CardType
.
Ritual
))
{
AI
.
SelectOption
(
0
);
return
true
;
}
if
(
lastchaincard
.
HasType
(
CardType
.
Fusion
))
{
AI
.
SelectOption
(
1
);
return
true
;
}
if
(
lastchaincard
.
HasType
(
CardType
.
Synchro
))
{
AI
.
SelectOption
(
2
);
return
true
;
}
if
(
lastchaincard
.
HasType
(
CardType
.
Xyz
))
{
AI
.
SelectOption
(
3
);
return
true
;
}
if
(
lastchaincard
.
IsFusionSpell
())
{
AI
.
SelectOption
(
1
);
return
true
;
}
}
foreach
(
ClientCard
card
in
Duel
.
ChainTargets
)
{
if
(
Card
.
Equals
(
card
))
{
AI
.
SelectOption
(
3
);
return
true
;
}
}
return
false
;
}
}
}
Game/AI/Enums/FusionSpell.cs
0 → 100644
View file @
c55ce9f7
namespace
WindBot.Game.AI.Enums
{
public
enum
FusionSpell
{
GemKnightFusion
=
1264319
,
TheEyeofTimaeus
=
1784686
,
InstantFusion
=
1845204
,
OverloadFusion
=
3659803
,
FrightfurFusion
=
6077601
,
RedEyesFusion
=
6172122
,
Ostinato
=
9113513
,
DarkCalling
=
12071500
,
VehicroidConnectionZone
=
23299957
,
Polymerization
=
24094653
,
MiracleSynchroFusion
=
36484016
,
PowerBond
=
37630732
,
ParticleFusion
=
39261576
,
NeutronBlast
=
43845801
,
ShaddollFusion
=
44394295
,
TheTerminusoftheBurningAbyss
=
44771289
,
MiracleFusion
=
45906428
,
OddEyesFusion
=
48144509
,
ParallelWorldFusion
=
54283059
,
PendulumFusion
=
65646587
,
AbsorbFusion
=
71422989
,
DragonsMirror
=
71490127
,
MetalfoesFusion
=
73594093
,
EidolonSummoningMagic
=
74063034
,
FusionSubstitute
=
74335036
,
TranscendentalPolymerization
=
76647978
,
CyberdarkImpact
=
80033124
,
DarkFusion
=
94820406
,
TheBookoftheLaw
=
458748
,
ElShaddollFusion
=
6417578
,
FlashFusion
=
17236839
,
FullmetalfoesFusion
=
39564736
,
DestructionSwordsmanFusion
=
41940225
,
SuperPolymerization
=
48130397
,
CyberneticFusionSupport
=
58199906
,
BrilliantFusion
=
7394770
,
ForbiddenDarkContractwiththeSwampKing
=
10833828
,
Fortissimo
=
11493868
,
VoidImagination
=
31444249
,
FrightfurFactory
=
43698897
,
DarkContractwiththeSwampKing
=
73360025
,
NepheShaddollFusion
=
60226558
,
FusionGate
=
33550694
}
}
Game/AI/Enums/OneForXyz.cs
0 → 100644
View file @
c55ce9f7
namespace
WindBot.Game.AI.Enums
{
public
enum
OneForXyz
{
ZoodiacThoroughblade
=
77150143
,
ZoodiacViper
=
31755044
,
ZoodiacCluckle
=
20155904
,
ZoodiacRabbina
=
4367330
,
ZoodiacRam
=
4145852
,
ZoodiacMarmorat
=
78872731
,
ZoodiacTigress
=
11510448
,
ZoodiacHammerkong
=
14970113
,
ZoodiacLyca
=
41375811
,
ZoodiacDrancia
=
48905153
,
ZoodiacBoarbow
=
74393852
,
ZoodiacBroadbull
=
85115440
,
Number62
=
31801517
,
GalaxyEyesCipherDragon
=
18963306
,
Number107
=
88177324
,
CyberDragonNova
=
58069384
,
Number39
=
84013237
}
}
Game/ClientCard.cs
View file @
c55ce9f7
...
...
@@ -22,6 +22,8 @@ namespace WindBot.Game
public
int
Race
{
get
;
private
set
;
}
public
int
Attack
{
get
;
private
set
;
}
public
int
Defense
{
get
;
private
set
;
}
public
int
LScale
{
get
;
private
set
;
}
public
int
RScale
{
get
;
private
set
;
}
public
int
BaseAttack
{
get
;
private
set
;
}
public
int
BaseDefense
{
get
;
private
set
;
}
public
int
RealPower
{
get
;
set
;
}
...
...
@@ -125,9 +127,9 @@ namespace WindBot.Game
if
((
flag
&
(
int
)
Query
.
IsPublic
)
!=
0
)
packet
.
ReadInt32
();
if
((
flag
&
(
int
)
Query
.
LScale
)
!=
0
)
packet
.
ReadInt32
();
LScale
=
packet
.
ReadInt32
();
if
((
flag
&
(
int
)
Query
.
RScale
)
!=
0
)
packet
.
ReadInt32
();
RScale
=
packet
.
ReadInt32
();
}
public
bool
HasType
(
CardType
type
)
...
...
Game/GameAI.cs
View file @
c55ce9f7
...
...
@@ -325,7 +325,7 @@ namespace WindBot.Game
/// <returns>Index of the selected option.</returns>
public
int
OnSelectOption
(
IList
<
int
>
options
)
{
if
(
m_option
!=
-
1
)
if
(
m_option
!=
-
1
&&
m_option
<
options
.
Count
)
return
m_option
;
int
result
=
Executor
.
OnSelectOption
(
options
);
...
...
WindBot.csproj
View file @
c55ce9f7
...
...
@@ -70,6 +70,7 @@
<Compile
Include=
"Game\AI\Decks\EvilswarmExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\GraydleExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LightswornExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\QliphortExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\YosenjuExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DragunityExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\FrogExecutor.cs"
/>
...
...
@@ -82,6 +83,8 @@
<Compile
Include=
"Game\AI\DefaultExecutor.cs"
/>
<Compile
Include=
"Game\AI\Dialogs.cs"
/>
<Compile
Include=
"Game\AI\Enums\DangerousMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\FusionSpell.cs"
/>
<Compile
Include=
"Game\AI\Enums\OneForXyz.cs"
/>
<Compile
Include=
"Game\AI\Enums\InvincibleMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\Floodgate.cs"
/>
<Compile
Include=
"Game\AI\Enums\NegateAttackSpell.cs"
/>
...
...
bots.json
View file @
c55ce9f7
...
...
@@ -57,12 +57,12 @@
},
{
"name"
:
"尼亚"
,
"deck"
:
"
Yosenju
"
,
"deck"
:
"
Qliphort
"
,
"dialog"
:
"near.zh-CN"
},
{
"name"
:
"尼亚"
,
"deck"
:
"
Yosenju
"
,
"deck"
:
"
Qliphort
"
,
"dialog"
:
"near.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