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
4bd3a76f
Commit
4bd3a76f
authored
Nov 04, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change CardId enum to class
parent
1129131c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
246 additions
and
246 deletions
+246
-246
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+207
-207
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+39
-39
No files found.
Game/AI/Decks/BlueEyesExecutor.cs
View file @
4bd3a76f
...
@@ -9,37 +9,37 @@ namespace WindBot.Game.AI.Decks
...
@@ -9,37 +9,37 @@ namespace WindBot.Game.AI.Decks
[
Deck
(
"Blue-Eyes"
,
"AI_BlueEyes"
)]
[
Deck
(
"Blue-Eyes"
,
"AI_BlueEyes"
)]
class
BlueEyesExecutor
:
DefaultExecutor
class
BlueEyesExecutor
:
DefaultExecutor
{
{
public
enum
CardId
public
class
CardId
{
{
WhiteDragon
=
89631139
,
public
static
int
WhiteDragon
=
89631139
;
AlternativeWhiteDragon
=
38517737
,
public
static
int
AlternativeWhiteDragon
=
38517737
;
DragonSpiritOfWhite
=
45467446
,
public
static
int
DragonSpiritOfWhite
=
45467446
;
WhiteStoneOfAncients
=
71039903
,
public
static
int
WhiteStoneOfAncients
=
71039903
;
WhiteStoneOfLegend
=
79814787
,
public
static
int
WhiteStoneOfLegend
=
79814787
;
SageWithEyesOfBlue
=
8240199
,
public
static
int
SageWithEyesOfBlue
=
8240199
;
EffectVeiler
=
97268402
,
public
static
int
EffectVeiler
=
97268402
;
GalaxyCyclone
=
5133471
,
public
static
int
GalaxyCyclone
=
5133471
;
HarpiesFeatherDuster
=
18144506
,
public
static
int
HarpiesFeatherDuster
=
18144506
;
ReturnOfTheDragonLords
=
6853254
,
public
static
int
ReturnOfTheDragonLords
=
6853254
;
PotOfDesires
=
35261759
,
public
static
int
PotOfDesires
=
35261759
;
TradeIn
=
38120068
,
public
static
int
TradeIn
=
38120068
;
CardsOfConsonance
=
39701395
,
public
static
int
CardsOfConsonance
=
39701395
;
DragonShrine
=
41620959
,
public
static
int
DragonShrine
=
41620959
;
MelodyOfAwakeningDragon
=
48800175
,
public
static
int
MelodyOfAwakeningDragon
=
48800175
;
SoulCharge
=
54447022
,
public
static
int
SoulCharge
=
54447022
;
MonsterReborn
=
83764718
,
public
static
int
MonsterReborn
=
83764718
;
SilversCry
=
87025064
,
public
static
int
SilversCry
=
87025064
;
Giganticastle
=
63422098
,
public
static
int
Giganticastle
=
63422098
;
AzureEyesSilverDragon
=
40908371
,
public
static
int
AzureEyesSilverDragon
=
40908371
;
BlueEyesSpiritDragon
=
59822133
,
public
static
int
BlueEyesSpiritDragon
=
59822133
;
GalaxyEyesDarkMatterDragon
=
58820923
,
public
static
int
GalaxyEyesDarkMatterDragon
=
58820923
;
GalaxyEyesCipherBladeDragon
=
2530830
,
public
static
int
GalaxyEyesCipherBladeDragon
=
2530830
;
GalaxyEyesFullArmorPhotonDragon
=
39030163
,
public
static
int
GalaxyEyesFullArmorPhotonDragon
=
39030163
;
GalaxyEyesPrimePhotonDragon
=
31801517
,
public
static
int
GalaxyEyesPrimePhotonDragon
=
31801517
;
GalaxyEyesCipherDragon
=
18963306
,
public
static
int
GalaxyEyesCipherDragon
=
18963306
;
HopeHarbingerDragonTitanicGalaxy
=
63767246
,
public
static
int
HopeHarbingerDragonTitanicGalaxy
=
63767246
;
SylvanPrincessprite
=
33909817
public
static
int
SylvanPrincessprite
=
33909817
;
}
}
private
List
<
ClientCard
>
UsedAlternativeWhiteDragon
=
new
List
<
ClientCard
>();
private
List
<
ClientCard
>
UsedAlternativeWhiteDragon
=
new
List
<
ClientCard
>();
...
@@ -51,74 +51,74 @@ namespace WindBot.Game.AI.Decks
...
@@ -51,74 +51,74 @@ namespace WindBot.Game.AI.Decks
:
base
(
ai
,
duel
)
:
base
(
ai
,
duel
)
{
{
// destroy traps
// destroy traps
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
HarpiesFeatherDuster
,
DefaultHarpiesFeatherDusterFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpiesFeatherDuster
,
DefaultHarpiesFeatherDusterFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyCyclone
,
DefaultGalaxyCyclone
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyCyclone
,
DefaultGalaxyCyclone
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
HarpiesFeatherDuster
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpiesFeatherDuster
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragonShrine
,
DragonShrineEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DragonShrine
,
DragonShrineEffect
);
// Sage search
// Sage search
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueSummon
);
// search Alternative White Dragon
// search Alternative White Dragon
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MelodyOfAwakeningDragon
,
MelodyOfAwakeningDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MelodyOfAwakeningDragon
,
MelodyOfAwakeningDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CardsOfConsonance
,
CardsOfConsonanceEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CardsOfConsonance
,
CardsOfConsonanceEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
TradeIn
,
TradeInEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TradeIn
,
TradeInEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
PotOfDesires
,
DefaultPotOfDesires
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
DefaultPotOfDesires
);
// spsummon Alternative White Dragon if possible
// spsummon Alternative White Dragon if possible
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
AlternativeWhiteDragon
,
AlternativeWhiteDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
AlternativeWhiteDragon
,
AlternativeWhiteDragonSummon
);
// reborn
// reborn
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ReturnOfTheDragonLords
,
RebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ReturnOfTheDragonLords
,
RebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SilversCry
,
RebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SilversCry
,
RebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MonsterReborn
,
RebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MonsterReborn
,
RebornEffect
);
// monster effects
// monster effects
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
AlternativeWhiteDragon
,
AlternativeWhiteDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AlternativeWhiteDragon
,
AlternativeWhiteDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
WhiteStoneOfAncientsEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
WhiteStoneOfAncients
,
WhiteStoneOfAncientsEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
DragonSpiritOfWhiteEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DragonSpiritOfWhite
,
DragonSpiritOfWhiteEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
BlueEyesSpiritDragon
,
BlueEyesSpiritDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BlueEyesSpiritDragon
,
BlueEyesSpiritDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
HopeHarbingerDragonTitanicGalaxyEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
HopeHarbingerDragonTitanicGalaxyEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyEyesCipherDragon
,
GalaxyEyesCipherDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyEyesCipherDragon
,
GalaxyEyesCipherDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyEyesPrimePhotonDragon
,
GalaxyEyesPrimePhotonDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyEyesPrimePhotonDragon
,
GalaxyEyesPrimePhotonDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
,
GalaxyEyesFullArmorPhotonDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyEyesFullArmorPhotonDragon
,
GalaxyEyesFullArmorPhotonDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyEyesCipherBladeDragon
,
GalaxyEyesCipherBladeDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyEyesCipherBladeDragon
,
GalaxyEyesCipherBladeDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GalaxyEyesDarkMatterDragon
,
GalaxyEyesDarkMatterDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GalaxyEyesDarkMatterDragon
,
GalaxyEyesDarkMatterDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
AzureEyesSilverDragon
,
AzureEyesSilverDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AzureEyesSilverDragon
,
AzureEyesSilverDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SylvanPrincessprite
,
SylvanPrincesspriteEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SylvanPrincessprite
,
SylvanPrincesspriteEffect
);
// normal summon
// normal summon
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
SageWithEyesOfBlue
,
WhiteStoneSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
SageWithEyesOfBlue
,
WhiteStoneSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
WhiteStoneSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteStoneOfAncients
,
WhiteStoneSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
WhiteStoneSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteStoneOfLegend
,
WhiteStoneSummon
);
// special summon from extra
// special summon from extra
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GalaxyEyesCipherDragon
,
GalaxyEyesCipherDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GalaxyEyesCipherDragon
,
GalaxyEyesCipherDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GalaxyEyesPrimePhotonDragon
,
GalaxyEyesPrimePhotonDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GalaxyEyesPrimePhotonDragon
,
GalaxyEyesPrimePhotonDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
,
GalaxyEyesFullArmorPhotonDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GalaxyEyesFullArmorPhotonDragon
,
GalaxyEyesFullArmorPhotonDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GalaxyEyesCipherBladeDragon
,
GalaxyEyesCipherBladeDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GalaxyEyesCipherBladeDragon
,
GalaxyEyesCipherBladeDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GalaxyEyesDarkMatterDragon
,
GalaxyEyesDarkMatterDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GalaxyEyesDarkMatterDragon
,
GalaxyEyesDarkMatterDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Giganticastle
,
GiganticastleSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
Giganticastle
,
GiganticastleSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
BlueEyesSpiritDragon
,
BlueEyesSpiritDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
BlueEyesSpiritDragon
,
BlueEyesSpiritDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
HopeHarbingerDragonTitanicGalaxySummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
HopeHarbingerDragonTitanicGalaxySummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
SylvanPrincessprite
,
SylvanPrincesspriteSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SylvanPrincessprite
,
SylvanPrincesspriteSummon
);
// if we don't have other things to do...
// if we don't have other things to do...
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SoulCharge
,
SoulChargeEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SoulCharge
,
SoulChargeEffect
);
AddExecutor
(
ExecutorType
.
Repos
,
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
Repos
);
// summon White Stone to use the hand effect of Sage
// summon White Stone to use the hand effect of Sage
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteStoneOfLegend
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteStoneOfAncients
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
SageWithEyesOfBlue
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
SageWithEyesOfBlue
,
WhiteStoneSummonForSage
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueEffectInHand
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SageWithEyesOfBlue
,
SageWithEyesOfBlueEffectInHand
);
// set White Stone of Legend frist
// set White Stone of Legend frist
AddExecutor
(
ExecutorType
.
MonsterSet
,
(
int
)
CardId
.
WhiteStoneOfLegend
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
WhiteStoneOfLegend
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
(
int
)
CardId
.
WhiteStoneOfAncients
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
WhiteStoneOfAncients
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
}
}
...
@@ -144,11 +144,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -144,11 +144,11 @@ namespace WindBot.Game.AI.Decks
{
{
Logger
.
DebugWriteLine
(
"OnSelectCard MelodyOfAwakeningDragon"
);
Logger
.
DebugWriteLine
(
"OnSelectCard MelodyOfAwakeningDragon"
);
IList
<
ClientCard
>
result
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
result
=
new
List
<
ClientCard
>();
if
(!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
))
if
(!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
))
{
{
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
if
(
card
.
Id
==
(
int
)
CardId
.
WhiteDragon
)
if
(
card
.
Id
==
CardId
.
WhiteDragon
)
{
{
result
.
Add
(
card
);
result
.
Add
(
card
);
break
;
break
;
...
@@ -157,7 +157,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -157,7 +157,7 @@ namespace WindBot.Game.AI.Decks
}
}
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
if
(
card
.
Id
==
(
int
)
CardId
.
AlternativeWhiteDragon
&&
result
.
Count
<
max
)
if
(
card
.
Id
==
CardId
.
AlternativeWhiteDragon
&&
result
.
Count
<
max
)
{
{
result
.
Add
(
card
);
result
.
Add
(
card
);
}
}
...
@@ -245,22 +245,22 @@ namespace WindBot.Game.AI.Decks
...
@@ -245,22 +245,22 @@ namespace WindBot.Game.AI.Decks
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
});
});
if
(!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
))
if
(!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
))
{
{
AI
.
SelectNextCard
(
(
int
)
CardId
.
WhiteStoneOfLegend
);
AI
.
SelectNextCard
(
CardId
.
WhiteStoneOfLegend
);
}
}
else
else
{
{
AI
.
SelectNextCard
(
new
[]
AI
.
SelectNextCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
});
});
}
}
return
true
;
return
true
;
...
@@ -270,57 +270,57 @@ namespace WindBot.Game.AI.Decks
...
@@ -270,57 +270,57 @@ namespace WindBot.Game.AI.Decks
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
GalaxyCyclone
,
CardId
.
GalaxyCyclone
,
(
int
)
CardId
.
EffectVeiler
,
CardId
.
EffectVeiler
,
(
int
)
CardId
.
TradeIn
,
CardId
.
TradeIn
,
(
int
)
CardId
.
SageWithEyesOfBlue
CardId
.
SageWithEyesOfBlue
});
});
return
true
;
return
true
;
}
}
private
bool
CardsOfConsonanceEffect
()
private
bool
CardsOfConsonanceEffect
()
{
{
if
(!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
))
if
(!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteStoneOfLegend
);
AI
.
SelectCard
(
CardId
.
WhiteStoneOfLegend
);
}
}
else
if
(
Bot
.
HasInHand
(
(
int
)
CardId
.
TradeIn
))
else
if
(
Bot
.
HasInHand
(
CardId
.
TradeIn
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteStoneOfLegend
);
AI
.
SelectCard
(
CardId
.
WhiteStoneOfLegend
);
}
}
else
else
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteStoneOfAncients
);
AI
.
SelectCard
(
CardId
.
WhiteStoneOfAncients
);
}
}
return
true
;
return
true
;
}
}
private
bool
TradeInEffect
()
private
bool
TradeInEffect
()
{
{
if
(
Bot
.
HasInHand
(
(
int
)
CardId
.
DragonSpiritOfWhite
))
if
(
Bot
.
HasInHand
(
CardId
.
DragonSpiritOfWhite
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
return
true
;
return
true
;
}
}
else
if
(
HasTwoInHand
(
(
int
)
CardId
.
WhiteDragon
))
else
if
(
HasTwoInHand
(
CardId
.
WhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
return
true
;
return
true
;
}
}
else
if
(
HasTwoInHand
(
(
int
)
CardId
.
AlternativeWhiteDragon
))
else
if
(
HasTwoInHand
(
CardId
.
AlternativeWhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
AlternativeWhiteDragon
);
AI
.
SelectCard
(
CardId
.
AlternativeWhiteDragon
);
return
true
;
return
true
;
}
}
else
if
(!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
)
||
!
Bot
.
HasInHand
((
int
)
CardId
.
AlternativeWhiteDragon
))
else
if
(!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
)
||
!
Bot
.
HasInHand
(
CardId
.
AlternativeWhiteDragon
))
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
AlternativeWhiteDragon
CardId
.
AlternativeWhiteDragon
});
});
return
true
;
return
true
;
}
}
...
@@ -362,22 +362,22 @@ namespace WindBot.Game.AI.Decks
...
@@ -362,22 +362,22 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
List
<
int
>
targets
=
new
List
<
int
>
{
List
<
int
>
targets
=
new
List
<
int
>
{
(
int
)
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
(
int
)
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
GalaxyEyesDarkMatterDragon
,
(
int
)
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
(
int
)
CardId
.
AzureEyesSilverDragon
,
CardId
.
AzureEyesSilverDragon
,
(
int
)
CardId
.
BlueEyesSpiritDragon
,
CardId
.
BlueEyesSpiritDragon
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
CardId
.
DragonSpiritOfWhite
};
};
if
(!
Bot
.
HasInGraveyard
(
targets
))
if
(!
Bot
.
HasInGraveyard
(
targets
))
{
{
return
false
;
return
false
;
}
}
ClientCard
floodgate
=
Enemy
.
SpellZone
.
GetFloodgate
();
ClientCard
floodgate
=
Enemy
.
SpellZone
.
GetFloodgate
();
if
(
floodgate
!=
null
&&
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
DragonSpiritOfWhite
))
if
(
floodgate
!=
null
&&
Bot
.
HasInGraveyard
(
CardId
.
DragonSpiritOfWhite
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
else
else
{
{
...
@@ -390,11 +390,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -390,11 +390,11 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Enemy
.
GetSpellCount
()
>
0
)
if
(
Enemy
.
GetSpellCount
()
>
0
)
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
else
else
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
}
}
return
true
;
return
true
;
}
}
...
@@ -403,8 +403,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -403,8 +403,8 @@ namespace WindBot.Game.AI.Decks
{
{
return
!
Bot
.
HasInHand
(
new
List
<
int
>
return
!
Bot
.
HasInHand
(
new
List
<
int
>
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
});
});
}
}
...
@@ -416,16 +416,16 @@ namespace WindBot.Game.AI.Decks
...
@@ -416,16 +416,16 @@ namespace WindBot.Game.AI.Decks
}
}
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
EffectVeiler
,
CardId
.
EffectVeiler
,
(
int
)
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
});
});
return
true
;
return
true
;
}
}
private
bool
WhiteStoneSummonForSage
()
private
bool
WhiteStoneSummonForSage
()
{
{
return
Bot
.
HasInHand
(
(
int
)
CardId
.
SageWithEyesOfBlue
);
return
Bot
.
HasInHand
(
CardId
.
SageWithEyesOfBlue
);
}
}
private
bool
SageWithEyesOfBlueEffectInHand
()
private
bool
SageWithEyesOfBlueEffectInHand
()
...
@@ -436,30 +436,30 @@ namespace WindBot.Game.AI.Decks
...
@@ -436,30 +436,30 @@ namespace WindBot.Game.AI.Decks
}
}
if
(!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
CardId
.
DragonSpiritOfWhite
}))
}))
{
{
return
false
;
return
false
;
}
}
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
});
});
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
if
(
spells
.
Count
==
0
)
if
(
spells
.
Count
==
0
)
{
{
AI
.
SelectNextCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectNextCard
(
CardId
.
WhiteDragon
);
}
}
else
else
{
{
AI
.
SelectNextCard
(
(
int
)
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectNextCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
return
true
;
return
true
;
}
}
...
@@ -481,9 +481,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -481,9 +481,9 @@ namespace WindBot.Game.AI.Decks
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
End
)
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
End
)
{
{
return
HaveEnoughWhiteDragonInHand
()
return
HaveEnoughWhiteDragonInHand
()
&&
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
AzureEyesSilverDragon
,
true
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
AzureEyesSilverDragon
,
true
)
&&
!
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
DragonSpiritOfWhite
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
DragonSpiritOfWhite
)
&&
!
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
WhiteDragon
);
&&
!
Bot
.
HasInGraveyard
(
CardId
.
WhiteDragon
);
}
}
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
{
{
...
@@ -495,20 +495,20 @@ namespace WindBot.Game.AI.Decks
...
@@ -495,20 +495,20 @@ namespace WindBot.Game.AI.Decks
private
bool
BlueEyesSpiritDragonEffect
()
private
bool
BlueEyesSpiritDragonEffect
()
{
{
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
BlueEyesSpiritDragon
,
0
))
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
CardId
.
BlueEyesSpiritDragon
,
0
))
{
{
return
LastChainPlayer
==
1
;
return
LastChainPlayer
==
1
;
}
}
else
if
(
Duel
.
Player
==
1
&&
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
||
Duel
.
Phase
==
DuelPhase
.
End
))
else
if
(
Duel
.
Player
==
1
&&
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
||
Duel
.
Phase
==
DuelPhase
.
End
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
AzureEyesSilverDragon
);
AI
.
SelectCard
(
CardId
.
AzureEyesSilverDragon
);
return
true
;
return
true
;
}
}
else
else
{
{
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
AzureEyesSilverDragon
);
AI
.
SelectCard
(
CardId
.
AzureEyesSilverDragon
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -517,7 +517,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -517,7 +517,7 @@ namespace WindBot.Game.AI.Decks
private
bool
HopeHarbingerDragonTitanicGalaxyEffect
()
private
bool
HopeHarbingerDragonTitanicGalaxyEffect
()
{
{
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
0
))
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
0
))
{
{
return
LastChainPlayer
==
1
;
return
LastChainPlayer
==
1
;
}
}
...
@@ -526,31 +526,31 @@ namespace WindBot.Game.AI.Decks
...
@@ -526,31 +526,31 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteStoneOfAncientsEffect
()
private
bool
WhiteStoneOfAncientsEffect
()
{
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
WhiteStoneOfAncients
,
0
))
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
CardId
.
WhiteStoneOfAncients
,
0
))
{
{
if
(
Bot
.
HasInHand
(
(
int
)
CardId
.
TradeIn
)
if
(
Bot
.
HasInHand
(
CardId
.
TradeIn
)
&&
!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
)
&&
!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
)
&&
!
Bot
.
HasInHand
(
(
int
)
CardId
.
AlternativeWhiteDragon
))
&&
!
Bot
.
HasInHand
(
CardId
.
AlternativeWhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
return
true
;
return
true
;
}
}
if
(
AlternativeWhiteDragonSummoned
)
if
(
AlternativeWhiteDragonSummoned
)
{
{
return
false
;
return
false
;
}
}
if
(
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
)
if
(
Bot
.
HasInHand
(
CardId
.
WhiteDragon
)
&&
!
Bot
.
HasInHand
(
(
int
)
CardId
.
AlternativeWhiteDragon
)
&&
!
Bot
.
HasInHand
(
CardId
.
AlternativeWhiteDragon
)
&&
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
AlternativeWhiteDragon
))
&&
Bot
.
HasInGraveyard
(
CardId
.
AlternativeWhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
AlternativeWhiteDragon
);
AI
.
SelectCard
(
CardId
.
AlternativeWhiteDragon
);
return
true
;
return
true
;
}
}
if
(
Bot
.
HasInHand
(
(
int
)
CardId
.
AlternativeWhiteDragon
)
if
(
Bot
.
HasInHand
(
CardId
.
AlternativeWhiteDragon
)
&&
!
Bot
.
HasInHand
(
(
int
)
CardId
.
WhiteDragon
)
&&
!
Bot
.
HasInHand
(
CardId
.
WhiteDragon
)
&&
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
WhiteDragon
))
&&
Bot
.
HasInGraveyard
(
CardId
.
WhiteDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -560,11 +560,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -560,11 +560,11 @@ namespace WindBot.Game.AI.Decks
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
if
(
spells
.
Count
==
0
)
if
(
spells
.
Count
==
0
)
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
}
}
else
else
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
return
true
;
return
true
;
}
}
...
@@ -580,12 +580,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -580,12 +580,12 @@ namespace WindBot.Game.AI.Decks
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
CardId
.
DragonSpiritOfWhite
});
});
}
}
...
@@ -628,7 +628,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -628,7 +628,7 @@ namespace WindBot.Game.AI.Decks
private
bool
GalaxyEyesFullArmorPhotonDragonSummon
()
private
bool
GalaxyEyesFullArmorPhotonDragonSummon
()
{
{
if
(
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
GalaxyEyesCipherDragon
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesCipherDragon
))
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
foreach
(
ClientCard
monster
in
monsters
)
...
@@ -641,11 +641,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -641,11 +641,11 @@ namespace WindBot.Game.AI.Decks
}
}
}
}
}
}
if
(
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
GalaxyEyesPrimePhotonDragon
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesPrimePhotonDragon
))
{
{
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
4000
,
false
))
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
4000
,
false
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
GalaxyEyesPrimePhotonDragon
);
AI
.
SelectCard
(
CardId
.
GalaxyEyesPrimePhotonDragon
);
return
true
;
return
true
;
}
}
}
}
...
@@ -654,9 +654,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -654,9 +654,9 @@ namespace WindBot.Game.AI.Decks
private
bool
GalaxyEyesCipherBladeDragonSummon
()
private
bool
GalaxyEyesCipherBladeDragonSummon
()
{
{
if
(
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
)
&&
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
)
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesFullArmorPhotonDragon
)
&&
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
)
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
);
AI
.
SelectCard
(
CardId
.
GalaxyEyesFullArmorPhotonDragon
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -664,9 +664,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -664,9 +664,9 @@ namespace WindBot.Game.AI.Decks
private
bool
GalaxyEyesDarkMatterDragonSummon
()
private
bool
GalaxyEyesDarkMatterDragonSummon
()
{
{
if
(
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesFullArmorPhotonDragon
))
{
{
AI
.
SelectCard
(
(
int
)
CardId
.
GalaxyEyesFullArmorPhotonDragon
);
AI
.
SelectCard
(
CardId
.
GalaxyEyesFullArmorPhotonDragon
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -803,17 +803,17 @@ namespace WindBot.Game.AI.Decks
...
@@ -803,17 +803,17 @@ namespace WindBot.Game.AI.Decks
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
WhiteDragon
CardId
.
WhiteDragon
});
});
AI
.
SelectNextCard
(
new
[]
AI
.
SelectNextCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
WhiteDragon
CardId
.
WhiteDragon
});
});
return
true
;
return
true
;
}
}
...
@@ -877,9 +877,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -877,9 +877,9 @@ namespace WindBot.Game.AI.Decks
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
CardId
.
DragonSpiritOfWhite
}))
}))
{
{
return
true
;
return
true
;
...
@@ -895,15 +895,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -895,15 +895,15 @@ namespace WindBot.Game.AI.Decks
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
});
});
return
true
;
return
true
;
}
}
private
bool
SoulChargeEffect
()
private
bool
SoulChargeEffect
()
{
{
if
(
Bot
.
HasInMonstersZone
(
(
int
)
CardId
.
BlueEyesSpiritDragon
,
true
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
BlueEyesSpiritDragon
,
true
))
return
false
;
return
false
;
int
count
=
Bot
.
GetGraveyardMonsters
().
Count
;
int
count
=
Bot
.
GetGraveyardMonsters
().
Count
;
int
space
=
5
-
Bot
.
GetMonsterCount
();
int
space
=
5
-
Bot
.
GetMonsterCount
();
...
@@ -933,14 +933,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -933,14 +933,14 @@ namespace WindBot.Game.AI.Decks
}
}
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
BlueEyesSpiritDragon
,
CardId
.
BlueEyesSpiritDragon
,
(
int
)
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
(
int
)
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
,
CardId
.
DragonSpiritOfWhite
,
(
int
)
CardId
.
AzureEyesSilverDragon
,
CardId
.
AzureEyesSilverDragon
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
});
});
SoulChargeUsed
=
true
;
SoulChargeUsed
=
true
;
return
true
;
return
true
;
...
@@ -957,14 +957,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -957,14 +957,14 @@ namespace WindBot.Game.AI.Decks
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
(
if
(
Card
.
IsDefense
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
BlueEyesSpiritDragon
Card
.
Id
==
CardId
.
BlueEyesSpiritDragon
||
Card
.
Id
==
(
int
)
CardId
.
AzureEyesSilverDragon
||
Card
.
Id
==
CardId
.
AzureEyesSilverDragon
))
))
return
true
;
return
true
;
if
(
Card
.
IsAttack
()
&&
(
if
(
Card
.
IsAttack
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
SageWithEyesOfBlue
Card
.
Id
==
CardId
.
SageWithEyesOfBlue
||
Card
.
Id
==
(
int
)
CardId
.
WhiteStoneOfAncients
||
Card
.
Id
==
CardId
.
WhiteStoneOfAncients
||
Card
.
Id
==
(
int
)
CardId
.
WhiteStoneOfLegend
||
Card
.
Id
==
CardId
.
WhiteStoneOfLegend
))
))
return
true
;
return
true
;
return
false
;
return
false
;
...
@@ -972,7 +972,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -972,7 +972,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SpellSet
()
private
bool
SpellSet
()
{
{
return
(
Card
.
IsTrap
()
||
(
Card
.
Id
==
(
int
)
CardId
.
SilversCry
))
&&
Bot
.
GetSpellCountWithoutField
()
<
4
;
return
(
Card
.
IsTrap
()
||
(
Card
.
Id
==
CardId
.
SilversCry
))
&&
Bot
.
GetSpellCountWithoutField
()
<
4
;
}
}
private
bool
HasTwoInHand
(
int
id
)
private
bool
HasTwoInHand
(
int
id
)
...
@@ -990,19 +990,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -990,19 +990,19 @@ namespace WindBot.Game.AI.Decks
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
(
int
)
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
(
int
)
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
(
int
)
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
(
int
)
CardId
.
DragonSpiritOfWhite
CardId
.
DragonSpiritOfWhite
})
||
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
AlternativeWhiteDragon
)>=
2
;
})
||
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
CardId
.
AlternativeWhiteDragon
)>=
2
;
}
}
private
bool
HaveEnoughWhiteDragonInHand
()
private
bool
HaveEnoughWhiteDragonInHand
()
{
{
return
HasTwoInHand
(
(
int
)
CardId
.
WhiteDragon
)
||
(
return
HasTwoInHand
(
CardId
.
WhiteDragon
)
||
(
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
WhiteDragon
)
Bot
.
HasInGraveyard
(
CardId
.
WhiteDragon
)
&&
Bot
.
HasInGraveyard
(
(
int
)
CardId
.
WhiteStoneOfAncients
)
&&
Bot
.
HasInGraveyard
(
CardId
.
WhiteStoneOfAncients
)
);
);
}
}
}
}
...
...
Game/AI/DefaultExecutor.cs
View file @
4bd3a76f
...
@@ -9,28 +9,28 @@ namespace WindBot.Game.AI
...
@@ -9,28 +9,28 @@ namespace WindBot.Game.AI
{
{
public
abstract
class
DefaultExecutor
:
Executor
public
abstract
class
DefaultExecutor
:
Executor
{
{
pr
ivate
enum
CardId
pr
otected
class
_
CardId
{
{
JizukirutheStarDestroyingKaiju
=
63941210
,
public
static
int
JizukirutheStarDestroyingKaiju
=
63941210
;
GadarlatheMysteryDustKaiju
=
36956512
,
public
static
int
GadarlatheMysteryDustKaiju
=
36956512
;
GamecieltheSeaTurtleKaiju
=
55063751
,
public
static
int
GamecieltheSeaTurtleKaiju
=
55063751
;
RadiantheMultidimensionalKaiju
=
28674152
,
public
static
int
RadiantheMultidimensionalKaiju
=
28674152
;
KumongoustheStickyStringKaiju
=
29726552
,
public
static
int
KumongoustheStickyStringKaiju
=
29726552
;
ThunderKingtheLightningstrikeKaiju
=
48770333
,
public
static
int
ThunderKingtheLightningstrikeKaiju
=
48770333
;
DogorantheMadFlameKaiju
=
93332803
,
public
static
int
DogorantheMadFlameKaiju
=
93332803
;
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
,
public
static
int
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
;
MysticalSpaceTyphoon
=
5318639
,
public
static
int
MysticalSpaceTyphoon
=
5318639
;
CosmicCyclone
=
8267140
,
public
static
int
CosmicCyclone
=
8267140
;
ChickenGame
=
67616300
,
public
static
int
ChickenGame
=
67616300
;
CastelTheSkyblasterMusketeer
=
82633039
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
}
}
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
:
base
(
ai
,
duel
)
{
{
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ChickenGame
,
DefaultChickenGame
);
AddExecutor
(
ExecutorType
.
Activate
,
_
CardId
.
ChickenGame
,
DefaultChickenGame
);
}
}
/// <summary>
/// <summary>
...
@@ -39,7 +39,7 @@ namespace WindBot.Game.AI
...
@@ -39,7 +39,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultMysticalSpaceTyphoon
()
protected
bool
DefaultMysticalSpaceTyphoon
()
{
{
foreach
(
ClientCard
card
in
CurrentChain
)
foreach
(
ClientCard
card
in
CurrentChain
)
if
(
card
.
Id
==
(
int
)
CardId
.
MysticalSpaceTyphoon
)
if
(
card
.
Id
==
_
CardId
.
MysticalSpaceTyphoon
)
return
false
;
return
false
;
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
...
@@ -72,7 +72,7 @@ namespace WindBot.Game.AI
...
@@ -72,7 +72,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultCosmicCyclone
()
protected
bool
DefaultCosmicCyclone
()
{
{
foreach
(
ClientCard
card
in
CurrentChain
)
foreach
(
ClientCard
card
in
CurrentChain
)
if
(
card
.
Id
==
(
int
)
CardId
.
CosmicCyclone
)
if
(
card
.
Id
==
_
CardId
.
CosmicCyclone
)
return
false
;
return
false
;
return
(
Duel
.
LifePoints
[
0
]
>
1000
)
&&
DefaultMysticalSpaceTyphoon
();
return
(
Duel
.
LifePoints
[
0
]
>
1000
)
&&
DefaultMysticalSpaceTyphoon
();
}
}
...
@@ -390,9 +390,9 @@ namespace WindBot.Game.AI
...
@@ -390,9 +390,9 @@ namespace WindBot.Game.AI
}
}
if
(
count
>
1
||
Duel
.
LifePoints
[
0
]
<=
1000
)
if
(
count
>
1
||
Duel
.
LifePoints
[
0
]
<=
1000
)
return
false
;
return
false
;
if
(
Duel
.
LifePoints
[
0
]
<=
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
ChickenGame
,
0
))
if
(
Duel
.
LifePoints
[
0
]
<=
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
_
CardId
.
ChickenGame
,
0
))
return
true
;
return
true
;
if
(
Duel
.
LifePoints
[
0
]
>
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
ChickenGame
,
1
))
if
(
Duel
.
LifePoints
[
0
]
>
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
_
CardId
.
ChickenGame
,
1
))
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
@@ -493,26 +493,26 @@ namespace WindBot.Game.AI
...
@@ -493,26 +493,26 @@ namespace WindBot.Game.AI
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
GamecieltheSeaTurtleKaiju
,
_
CardId
.
GamecieltheSeaTurtleKaiju
,
(
int
)
CardId
.
KumongoustheStickyStringKaiju
,
_
CardId
.
KumongoustheStickyStringKaiju
,
(
int
)
CardId
.
RadiantheMultidimensionalKaiju
,
_
CardId
.
RadiantheMultidimensionalKaiju
,
(
int
)
CardId
.
GadarlatheMysteryDustKaiju
_
CardId
.
GadarlatheMysteryDustKaiju
});
});
return
true
;
return
true
;
}
}
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
(
int
)
CardId
.
JizukirutheStarDestroyingKaiju
,
_
CardId
.
JizukirutheStarDestroyingKaiju
,
(
int
)
CardId
.
RadiantheMultidimensionalKaiju
,
_
CardId
.
RadiantheMultidimensionalKaiju
,
(
int
)
CardId
.
GadarlatheMysteryDustKaiju
,
_
CardId
.
GadarlatheMysteryDustKaiju
,
(
int
)
CardId
.
KumongoustheStickyStringKaiju
_
CardId
.
KumongoustheStickyStringKaiju
});
});
AI
.
SelectNextCard
(
new
[]
AI
.
SelectNextCard
(
new
[]
{
{
(
int
)
CardId
.
GamecieltheSeaTurtleKaiju
,
_
CardId
.
GamecieltheSeaTurtleKaiju
,
(
int
)
CardId
.
KumongoustheStickyStringKaiju
,
_
CardId
.
KumongoustheStickyStringKaiju
,
(
int
)
CardId
.
GadarlatheMysteryDustKaiju
,
_
CardId
.
GadarlatheMysteryDustKaiju
,
(
int
)
CardId
.
RadiantheMultidimensionalKaiju
_
CardId
.
RadiantheMultidimensionalKaiju
});
});
return
DefaultDarkHole
();
return
DefaultDarkHole
();
}
}
...
@@ -523,14 +523,14 @@ namespace WindBot.Game.AI
...
@@ -523,14 +523,14 @@ namespace WindBot.Game.AI
protected
bool
DefaultKaijuSpsummon
()
protected
bool
DefaultKaijuSpsummon
()
{
{
IList
<
int
>
kaijus
=
new
[]
{
IList
<
int
>
kaijus
=
new
[]
{
(
int
)
CardId
.
JizukirutheStarDestroyingKaiju
,
_
CardId
.
JizukirutheStarDestroyingKaiju
,
(
int
)
CardId
.
GadarlatheMysteryDustKaiju
,
_
CardId
.
GadarlatheMysteryDustKaiju
,
(
int
)
CardId
.
GamecieltheSeaTurtleKaiju
,
_
CardId
.
GamecieltheSeaTurtleKaiju
,
(
int
)
CardId
.
RadiantheMultidimensionalKaiju
,
_
CardId
.
RadiantheMultidimensionalKaiju
,
(
int
)
CardId
.
KumongoustheStickyStringKaiju
,
_
CardId
.
KumongoustheStickyStringKaiju
,
(
int
)
CardId
.
ThunderKingtheLightningstrikeKaiju
,
_
CardId
.
ThunderKingtheLightningstrikeKaiju
,
(
int
)
CardId
.
DogorantheMadFlameKaiju
,
_
CardId
.
DogorantheMadFlameKaiju
,
(
int
)
CardId
.
SuperAntiKaijuWarMachineMechaDogoran
_
CardId
.
SuperAntiKaijuWarMachineMechaDogoran
};
};
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
{
{
...
@@ -612,7 +612,7 @@ namespace WindBot.Game.AI
...
@@ -612,7 +612,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultCastelTheSkyblasterMusketeerEffect
()
protected
bool
DefaultCastelTheSkyblasterMusketeerEffect
()
{
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
0
))
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
(
_
CardId
.
CastelTheSkyblasterMusketeer
,
0
))
return
false
;
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
if
(
target
!=
null
)
if
(
target
!=
null
)
...
...
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