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
36a817aa
Commit
36a817aa
authored
Nov 09, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/moecube/windbot
parents
34f1c0db
b489285e
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
980 additions
and
963 deletions
+980
-963
Decks/AI_Dragunity.ydk
Decks/AI_Dragunity.ydk
+1
-1
Decks/AI_Rainbow.ydk
Decks/AI_Rainbow.ydk
+3
-3
Game/AI/CardContainer.cs
Game/AI/CardContainer.cs
+4
-4
Game/AI/CardExtension.cs
Game/AI/CardExtension.cs
+10
-2
Game/AI/Decks/BlackwingExecutor.cs
Game/AI/Decks/BlackwingExecutor.cs
+20
-27
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+57
-79
Game/AI/Decks/BurnExecutor.cs
Game/AI/Decks/BurnExecutor.cs
+22
-22
Game/AI/Decks/CyberDragonExecutor.cs
Game/AI/Decks/CyberDragonExecutor.cs
+28
-28
Game/AI/Decks/DoEveryThingExecutor.cs
Game/AI/Decks/DoEveryThingExecutor.cs
+2
-2
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+35
-42
Game/AI/Decks/EvilswarmExecutor.cs
Game/AI/Decks/EvilswarmExecutor.cs
+6
-6
Game/AI/Decks/FrogExecutor.cs
Game/AI/Decks/FrogExecutor.cs
+19
-28
Game/AI/Decks/GravekeeperExecutor.cs
Game/AI/Decks/GravekeeperExecutor.cs
+24
-24
Game/AI/Decks/GraydleExecutor.cs
Game/AI/Decks/GraydleExecutor.cs
+5
-5
Game/AI/Decks/HorusExecutor.cs
Game/AI/Decks/HorusExecutor.cs
+22
-22
Game/AI/Decks/LightswornExecutor.cs
Game/AI/Decks/LightswornExecutor.cs
+37
-44
Game/AI/Decks/MokeyMokeyExecutor.cs
Game/AI/Decks/MokeyMokeyExecutor.cs
+2
-7
Game/AI/Decks/MokeyMokeyKingExecutor.cs
Game/AI/Decks/MokeyMokeyKingExecutor.cs
+2
-2
Game/AI/Decks/NekrozExecutor.cs
Game/AI/Decks/NekrozExecutor.cs
+24
-24
Game/AI/Decks/OldSchoolExecutor.cs
Game/AI/Decks/OldSchoolExecutor.cs
+20
-27
Game/AI/Decks/QliphortExecutor.cs
Game/AI/Decks/QliphortExecutor.cs
+34
-25
Game/AI/Decks/RainbowExecutor.cs
Game/AI/Decks/RainbowExecutor.cs
+59
-68
Game/AI/Decks/Rank5Executor.cs
Game/AI/Decks/Rank5Executor.cs
+68
-70
Game/AI/Decks/ST1732Executor.cs
Game/AI/Decks/ST1732Executor.cs
+47
-55
Game/AI/Decks/ToadallyAwesomeExecutor.cs
Game/AI/Decks/ToadallyAwesomeExecutor.cs
+72
-81
Game/AI/Decks/YosenjuExecutor.cs
Game/AI/Decks/YosenjuExecutor.cs
+40
-54
Game/AI/Decks/ZexalWeaponsExecutor.cs
Game/AI/Decks/ZexalWeaponsExecutor.cs
+56
-63
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+39
-49
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+93
-23
Game/AI/Enums/DangerousMonster.cs
Game/AI/Enums/DangerousMonster.cs
+6
-1
Game/AI/Enums/PreventActivationEffectInBattle.cs
Game/AI/Enums/PreventActivationEffectInBattle.cs
+14
-0
Game/AI/Executor.cs
Game/AI/Executor.cs
+28
-30
Game/ClientField.cs
Game/ClientField.cs
+18
-7
Game/GameAI.cs
Game/GameAI.cs
+2
-2
Game/GameBehavior.cs
Game/GameBehavior.cs
+1
-2
LICENSE
LICENSE
+21
-0
Properties/AssemblyInfo.cs
Properties/AssemblyInfo.cs
+3
-3
README.md
README.md
+7
-3
WindBot.csproj
WindBot.csproj
+1
-0
WindBotInfo.cs
WindBotInfo.cs
+28
-28
No files found.
Decks/AI_Dragunity.ydk
View file @
36a817aa
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
70368879
70368879
71490127
71490127
73628505
73628505
73628505
81439173
81439173
5318639
5318639
5318639
5318639
...
@@ -32,6 +31,7 @@
...
@@ -32,6 +31,7 @@
60004971
60004971
62265044
62265044
62265044
62265044
62265044
44095762
44095762
58120309
58120309
58120309
58120309
...
...
Decks/AI_Rainbow.ydk
View file @
36a817aa
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
74852097
74852097
74852097
74852097
74852097
74852097
81823360
81823360
81823360
75195825
75195825
75195825
75195825
75195825
75195825
...
@@ -15,9 +18,6 @@
...
@@ -15,9 +18,6 @@
33256280
33256280
33256280
33256280
33256280
33256280
51934376
51934376
51934376
85138716
85138716
85138716
85138716
85138716
85138716
...
...
Game/AI/CardContainer.cs
View file @
36a817aa
...
@@ -121,9 +121,9 @@ namespace WindBot.Game.AI
...
@@ -121,9 +121,9 @@ namespace WindBot.Game.AI
return
count
;
return
count
;
}
}
public
static
I
List
<
ClientCard
>
GetMonsters
(
this
IEnumerable
<
ClientCard
>
cards
)
public
static
List
<
ClientCard
>
GetMonsters
(
this
IEnumerable
<
ClientCard
>
cards
)
{
{
I
List
<
ClientCard
>
cardlist
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
cardlist
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
...
@@ -135,9 +135,9 @@ namespace WindBot.Game.AI
...
@@ -135,9 +135,9 @@ namespace WindBot.Game.AI
return
cardlist
;
return
cardlist
;
}
}
public
static
I
List
<
ClientCard
>
GetFaceupPendulumMonsters
(
this
IEnumerable
<
ClientCard
>
cards
)
public
static
List
<
ClientCard
>
GetFaceupPendulumMonsters
(
this
IEnumerable
<
ClientCard
>
cards
)
{
{
I
List
<
ClientCard
>
cardlist
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
cardlist
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
...
...
Game/AI/CardExtension.cs
View file @
36a817aa
...
@@ -10,7 +10,7 @@ namespace WindBot.Game.AI
...
@@ -10,7 +10,7 @@ namespace WindBot.Game.AI
/// </summary>
/// </summary>
public
static
bool
IsMonsterInvincible
(
this
ClientCard
card
)
public
static
bool
IsMonsterInvincible
(
this
ClientCard
card
)
{
{
return
Enum
.
IsDefined
(
typeof
(
InvincibleMonster
),
card
.
Id
);
return
!
card
.
IsDisabled
()
&&
Enum
.
IsDefined
(
typeof
(
InvincibleMonster
),
card
.
Id
);
}
}
/// <summary>
/// <summary>
...
@@ -18,7 +18,15 @@ namespace WindBot.Game.AI
...
@@ -18,7 +18,15 @@ namespace WindBot.Game.AI
/// </summary>
/// </summary>
public
static
bool
IsMonsterDangerous
(
this
ClientCard
card
)
public
static
bool
IsMonsterDangerous
(
this
ClientCard
card
)
{
{
return
Enum
.
IsDefined
(
typeof
(
DangerousMonster
),
card
.
Id
);
return
!
card
.
IsDisabled
()
&&
Enum
.
IsDefined
(
typeof
(
DangerousMonster
),
card
.
Id
);
}
/// <summary>
/// Do this monster prevents activation of opponent's effect monsters in battle?
/// </summary>
public
static
bool
IsMonsterHasPreventActivationEffectInBattle
(
this
ClientCard
card
)
{
return
!
card
.
IsDisabled
()
&&
Enum
.
IsDefined
(
typeof
(
PreventActivationEffectInBattle
),
card
.
Id
);
}
}
public
static
bool
IsFloodgate
(
this
ClientCard
card
)
public
static
bool
IsFloodgate
(
this
ClientCard
card
)
...
...
Game/AI/Decks/BlackwingExecutor.cs
View file @
36a817aa
...
@@ -12,26 +12,26 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,26 +12,26 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
KrisTheCrackOfDawn
=
81105204
;
public
const
int
KrisTheCrackOfDawn
=
81105204
;
public
static
int
SiroccoTheDawn
=
75498415
;
public
const
int
SiroccoTheDawn
=
75498415
;
public
static
int
ShuraTheBlueFlame
=
58820853
;
public
const
int
ShuraTheBlueFlame
=
58820853
;
public
static
int
BoraTheSpear
=
49003716
;
public
const
int
BoraTheSpear
=
49003716
;
public
static
int
KalutTheMoonShadow
=
85215458
;
public
const
int
KalutTheMoonShadow
=
85215458
;
public
static
int
GaleTheWhirlwind
=
2009101
;
public
const
int
GaleTheWhirlwind
=
2009101
;
public
static
int
BlizzardTheFarNorth
=
22835145
;
public
const
int
BlizzardTheFarNorth
=
22835145
;
public
static
int
MistralTheSilverShield
=
46710683
;
public
const
int
MistralTheSilverShield
=
46710683
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BlackWhirlwind
=
91351370
;
public
const
int
BlackWhirlwind
=
91351370
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
DeltaCrowAntiReverse
=
59839761
;
public
const
int
DeltaCrowAntiReverse
=
59839761
;
public
static
int
DimensionalPrison
=
70342110
;
public
const
int
DimensionalPrison
=
70342110
;
public
static
int
SilverwindTheAscendant
=
33236860
;
public
const
int
SilverwindTheAscendant
=
33236860
;
public
static
int
BlackWingedDragon
=
9012916
;
public
const
int
BlackWingedDragon
=
9012916
;
public
static
int
ArmorMaster
=
69031175
;
public
const
int
ArmorMaster
=
69031175
;
public
static
int
ArmedWing
=
76913983
;
public
const
int
ArmedWing
=
76913983
;
public
static
int
GramTheShiningStar
=
17377751
;
public
const
int
GramTheShiningStar
=
17377751
;
}
}
public
BlackwingExecutor
(
GameAI
ai
,
Duel
duel
)
public
BlackwingExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -82,13 +82,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -82,13 +82,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
}
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
83104731
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
ShuraTheBlueFlameSummon
()
private
bool
ShuraTheBlueFlameSummon
()
{
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
SiroccoTheDawn
)
&&
Bot
.
GetMonsters
().
GetHighestAttackMonster
().
Attack
<
3800
)
if
(
Bot
.
HasInMonstersZone
(
CardId
.
SiroccoTheDawn
)
&&
Bot
.
GetMonsters
().
GetHighestAttackMonster
().
Attack
<
3800
)
...
...
Game/AI/Decks/BlueEyesExecutor.cs
View file @
36a817aa
...
@@ -11,35 +11,35 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,35 +11,35 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
WhiteDragon
=
89631139
;
public
const
int
WhiteDragon
=
89631139
;
public
static
int
AlternativeWhiteDragon
=
38517737
;
public
const
int
AlternativeWhiteDragon
=
38517737
;
public
static
int
DragonSpiritOfWhite
=
45467446
;
public
const
int
DragonSpiritOfWhite
=
45467446
;
public
static
int
WhiteStoneOfAncients
=
71039903
;
public
const
int
WhiteStoneOfAncients
=
71039903
;
public
static
int
WhiteStoneOfLegend
=
79814787
;
public
const
int
WhiteStoneOfLegend
=
79814787
;
public
static
int
SageWithEyesOfBlue
=
8240199
;
public
const
int
SageWithEyesOfBlue
=
8240199
;
public
static
int
EffectVeiler
=
97268402
;
public
const
int
EffectVeiler
=
97268402
;
public
static
int
GalaxyCyclone
=
5133471
;
public
const
int
GalaxyCyclone
=
5133471
;
public
static
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
static
int
ReturnOfTheDragonLords
=
6853254
;
public
const
int
ReturnOfTheDragonLords
=
6853254
;
public
static
int
PotOfDesires
=
35261759
;
public
const
int
PotOfDesires
=
35261759
;
public
static
int
TradeIn
=
38120068
;
public
const
int
TradeIn
=
38120068
;
public
static
int
CardsOfConsonance
=
39701395
;
public
const
int
CardsOfConsonance
=
39701395
;
public
static
int
DragonShrine
=
41620959
;
public
const
int
DragonShrine
=
41620959
;
public
static
int
MelodyOfAwakeningDragon
=
48800175
;
public
const
int
MelodyOfAwakeningDragon
=
48800175
;
public
static
int
SoulCharge
=
54447022
;
public
const
int
SoulCharge
=
54447022
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
SilversCry
=
87025064
;
public
const
int
SilversCry
=
87025064
;
public
static
int
Giganticastle
=
63422098
;
public
const
int
Giganticastle
=
63422098
;
public
static
int
AzureEyesSilverDragon
=
40908371
;
public
const
int
AzureEyesSilverDragon
=
40908371
;
public
static
int
BlueEyesSpiritDragon
=
59822133
;
public
const
int
BlueEyesSpiritDragon
=
59822133
;
public
static
int
GalaxyEyesDarkMatterDragon
=
58820923
;
public
const
int
GalaxyEyesDarkMatterDragon
=
58820923
;
public
static
int
GalaxyEyesCipherBladeDragon
=
2530830
;
public
const
int
GalaxyEyesCipherBladeDragon
=
2530830
;
public
static
int
GalaxyEyesFullArmorPhotonDragon
=
39030163
;
public
const
int
GalaxyEyesFullArmorPhotonDragon
=
39030163
;
public
static
int
GalaxyEyesPrimePhotonDragon
=
31801517
;
public
const
int
GalaxyEyesPrimePhotonDragon
=
31801517
;
public
static
int
GalaxyEyesCipherDragon
=
18963306
;
public
const
int
GalaxyEyesCipherDragon
=
18963306
;
public
static
int
HopeHarbingerDragonTitanicGalaxy
=
63767246
;
public
const
int
HopeHarbingerDragonTitanicGalaxy
=
63767246
;
public
static
int
SylvanPrincessprite
=
33909817
;
public
const
int
SylvanPrincessprite
=
33909817
;
}
}
private
List
<
ClientCard
>
UsedAlternativeWhiteDragon
=
new
List
<
ClientCard
>();
private
List
<
ClientCard
>
UsedAlternativeWhiteDragon
=
new
List
<
ClientCard
>();
...
@@ -123,11 +123,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -123,11 +123,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
}
}
public
override
bool
OnSelectHand
()
{
return
Program
.
Rand
.
Next
(
2
)
>
0
;
}
public
override
void
OnNewTurn
()
public
override
void
OnNewTurn
()
{
{
// reset
// reset
...
@@ -231,16 +226,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -231,16 +226,6 @@ namespace WindBot.Game.AI.Decks
return
null
;
return
null
;
}
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
return
attacker
.
Attack
>
0
;
}
private
bool
DragonShrineEffect
()
private
bool
DragonShrineEffect
()
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
...
@@ -332,17 +317,17 @@ namespace WindBot.Game.AI.Decks
...
@@ -332,17 +317,17 @@ namespace WindBot.Game.AI.Decks
private
bool
AlternativeWhiteDragonEffect
()
private
bool
AlternativeWhiteDragonEffect
()
{
{
ClientCard
card
=
AI
.
Utils
.
GetProblematicEnemyMonster
(
Card
.
GetDefensePower
());
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyMonster
(
Card
.
GetDefensePower
());
if
(
card
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectCard
(
card
);
AI
.
SelectCard
(
target
);
UsedAlternativeWhiteDragon
.
Add
(
Card
);
UsedAlternativeWhiteDragon
.
Add
(
Card
);
return
true
;
return
true
;
}
}
if
(
CanDealWithUsedAlternativeWhiteDragon
())
if
(
CanDealWithUsedAlternativeWhiteDragon
())
{
{
card
=
AI
.
Utils
.
GetBestEnemyMonster
();
target
=
AI
.
Utils
.
GetBestEnemyMonster
();
AI
.
SelectCard
(
card
);
AI
.
SelectCard
(
target
);
UsedAlternativeWhiteDragon
.
Add
(
Card
);
UsedAlternativeWhiteDragon
.
Add
(
Card
);
return
true
;
return
true
;
}
}
...
@@ -361,7 +346,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -361,7 +346,7 @@ namespace WindBot.Game.AI.Decks
// Let Azure-Eyes spsummon first
// Let Azure-Eyes spsummon first
return
false
;
return
false
;
}
}
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
...
@@ -401,7 +386,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -401,7 +386,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SageWithEyesOfBlueSummon
()
private
bool
SageWithEyesOfBlueSummon
()
{
{
return
!
Bot
.
HasInHand
(
new
List
<
int
>
return
!
Bot
.
HasInHand
(
new
[]
{
{
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
...
@@ -434,11 +419,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -434,11 +419,11 @@ namespace WindBot.Game.AI.Decks
{
{
return
false
;
return
false
;
}
}
if
(!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
...
@@ -452,14 +437,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -452,14 +437,13 @@ namespace WindBot.Game.AI.Decks
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
});
});
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
if
(
Enemy
.
GetSpellCount
()
>
0
)
if
(
spells
.
Count
==
0
)
{
{
AI
.
SelectNextCard
(
CardId
.
WhiteDragon
);
AI
.
SelectNextCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
else
else
{
{
AI
.
SelectNextCard
(
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectNextCard
(
CardId
.
WhiteDragon
);
}
}
return
true
;
return
true
;
}
}
...
@@ -472,25 +456,24 @@ namespace WindBot.Game.AI.Decks
...
@@ -472,25 +456,24 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
return
true
;
return
true
;
}
}
else
else
if
(
HaveEnoughWhiteDragonInHand
())
{
{
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
{
{
return
HaveEnoughWhiteDragonInHand
()
&&
Card
.
Attacked
;
return
Card
.
Attacked
;
}
}
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
End
)
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
End
)
{
{
return
HaveEnoughWhiteDragonInHand
()
return
Bot
.
HasInMonstersZone
(
CardId
.
AzureEyesSilverDragon
,
true
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
AzureEyesSilverDragon
,
true
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
DragonSpiritOfWhite
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
DragonSpiritOfWhite
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
WhiteDragon
);
&&
!
Bot
.
HasInGraveyard
(
CardId
.
WhiteDragon
);
}
}
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
{
{
return
HaveEnoughWhiteDragonInHand
()
;
return
true
;
}
}
return
false
;
}
}
return
false
;
}
}
private
bool
BlueEyesSpiritDragonEffect
()
private
bool
BlueEyesSpiritDragonEffect
()
...
@@ -557,14 +540,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -557,14 +540,13 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
if
(
Enemy
.
GetSpellCount
()
>
0
)
if
(
spells
.
Count
==
0
)
{
{
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
}
}
else
else
{
{
AI
.
SelectCard
(
CardId
.
DragonSpiritOfWhite
);
AI
.
SelectCard
(
CardId
.
WhiteDragon
);
}
}
return
true
;
return
true
;
}
}
...
@@ -578,7 +560,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -578,7 +560,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteStoneSummon
()
private
bool
WhiteStoneSummon
()
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
...
@@ -630,8 +612,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -630,8 +612,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesCipherDragon
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
GalaxyEyesCipherDragon
))
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
((
monster
.
IsDisabled
()
&&
monster
.
HasType
(
CardType
.
Xyz
)
&&
!
monster
.
Equals
(
UsedGalaxyEyesCipherDragon
))
if
((
monster
.
IsDisabled
()
&&
monster
.
HasType
(
CardType
.
Xyz
)
&&
!
monster
.
Equals
(
UsedGalaxyEyesCipherDragon
))
||
(
Duel
.
Phase
==
DuelPhase
.
Main2
&&
monster
.
Equals
(
UsedGalaxyEyesCipherDragon
)))
||
(
Duel
.
Phase
==
DuelPhase
.
Main2
&&
monster
.
Equals
(
UsedGalaxyEyesCipherDragon
)))
...
@@ -716,8 +697,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -716,8 +697,7 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
return
true
;
return
true
;
}
}
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
foreach
(
ClientCard
spell
in
Enemy
.
GetSpells
())
foreach
(
ClientCard
spell
in
spells
)
{
{
if
(
spell
.
IsFaceup
())
if
(
spell
.
IsFaceup
())
{
{
...
@@ -875,7 +855,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -875,7 +855,7 @@ namespace WindBot.Game.AI.Decks
{
{
return
true
;
return
true
;
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
...
@@ -906,7 +886,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -906,7 +886,7 @@ namespace WindBot.Game.AI.Decks
if
(
Bot
.
HasInMonstersZone
(
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
.
GetMonster
Count
()
;
int
space
=
5
-
Bot
.
GetMonster
sInMainZone
().
Count
;
if
(
count
<
space
)
if
(
count
<
space
)
count
=
space
;
count
=
space
;
if
(
count
<
2
||
Duel
.
LifePoints
[
0
]
<
count
*
1000
)
if
(
count
<
2
||
Duel
.
LifePoints
[
0
]
<
count
*
1000
)
...
@@ -915,16 +895,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -915,16 +895,14 @@ namespace WindBot.Game.AI.Decks
{
{
int
attack
=
0
;
int
attack
=
0
;
int
defence
=
0
;
int
defence
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(!
monster
.
IsDefense
())
if
(!
monster
.
IsDefense
())
{
{
attack
+=
monster
.
Attack
;
attack
+=
monster
.
Attack
;
}
}
}
}
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
defence
+=
monster
.
GetDefensePower
();
defence
+=
monster
.
GetDefensePower
();
}
}
...
@@ -988,7 +966,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -988,7 +966,7 @@ namespace WindBot.Game.AI.Decks
private
bool
CanDealWithUsedAlternativeWhiteDragon
()
private
bool
CanDealWithUsedAlternativeWhiteDragon
()
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
...
...
Game/AI/Decks/BurnExecutor.cs
View file @
36a817aa
...
@@ -11,28 +11,28 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,28 +11,28 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
LavaGolem
=
102380
;
public
const
int
LavaGolem
=
102380
;
public
static
int
ReflectBounder
=
2851070
;
public
const
int
ReflectBounder
=
2851070
;
public
static
int
FencingFireFerret
=
97396380
;
public
const
int
FencingFireFerret
=
97396380
;
public
static
int
BlastSphere
=
26302522
;
public
const
int
BlastSphere
=
26302522
;
public
static
int
Marshmallon
=
31305911
;
public
const
int
Marshmallon
=
31305911
;
public
static
int
SpiritReaper
=
23205979
;
public
const
int
SpiritReaper
=
23205979
;
public
static
int
NaturiaBeans
=
44789585
;
public
const
int
NaturiaBeans
=
44789585
;
public
static
int
ThunderShort
=
20264508
;
public
const
int
ThunderShort
=
20264508
;
public
static
int
Ookazi
=
19523799
;
public
const
int
Ookazi
=
19523799
;
public
static
int
GoblinThief
=
45311864
;
public
const
int
GoblinThief
=
45311864
;
public
static
int
TremendousFire
=
46918794
;
public
const
int
TremendousFire
=
46918794
;
public
static
int
SwordsOfRevealingLight
=
72302403
;
public
const
int
SwordsOfRevealingLight
=
72302403
;
public
static
int
SupremacyBerry
=
98380593
;
public
const
int
SupremacyBerry
=
98380593
;
public
static
int
ChainEnergy
=
79323590
;
public
const
int
ChainEnergy
=
79323590
;
public
static
int
DarkRoomofNightmare
=
85562745
;
public
const
int
DarkRoomofNightmare
=
85562745
;
public
static
int
PoisonOfTheOldMan
=
8842266
;
public
const
int
PoisonOfTheOldMan
=
8842266
;
public
static
int
OjamaTrio
=
29843091
;
public
const
int
OjamaTrio
=
29843091
;
public
static
int
Ceasefire
=
36468556
;
public
const
int
Ceasefire
=
36468556
;
public
static
int
MagicCylinder
=
62279055
;
public
const
int
MagicCylinder
=
62279055
;
public
static
int
MinorGoblinOfficial
=
1918087
;
public
const
int
MinorGoblinOfficial
=
1918087
;
public
static
int
ChainBurst
=
48276469
;
public
const
int
ChainBurst
=
48276469
;
public
static
int
SkullInvitation
=
98139712
;
public
const
int
SkullInvitation
=
98139712
;
}
}
public
BurnExecutor
(
GameAI
ai
,
Duel
duel
)
public
BurnExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
Game/AI/Decks/CyberDragonExecutor.cs
View file @
36a817aa
...
@@ -14,33 +14,33 @@ namespace WindBot.Game.AI.Decks
...
@@ -14,33 +14,33 @@ namespace WindBot.Game.AI.Decks
public
class
CardId
public
class
CardId
{
{
public
static
int
CyberLaserDragon
=
4162088
;
public
const
int
CyberLaserDragon
=
4162088
;
public
static
int
CyberBarrierDragon
=
68774379
;
public
const
int
CyberBarrierDragon
=
68774379
;
public
static
int
CyberDragon
=
70095154
;
public
const
int
CyberDragon
=
70095154
;
public
static
int
CyberDragonDrei
=
59281922
;
public
const
int
CyberDragonDrei
=
59281922
;
public
static
int
CyberPhoenix
=
3370104
;
public
const
int
CyberPhoenix
=
3370104
;
public
static
int
ArmoredCybern
=
67159705
;
public
const
int
ArmoredCybern
=
67159705
;
public
static
int
ProtoCyberDragon
=
26439287
;
public
const
int
ProtoCyberDragon
=
26439287
;
public
static
int
CyberKirin
=
76986005
;
public
const
int
CyberKirin
=
76986005
;
public
static
int
CyberDragonCore
=
23893227
;
public
const
int
CyberDragonCore
=
23893227
;
public
static
int
CyberValley
=
3657444
;
public
const
int
CyberValley
=
3657444
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
DifferentDimensionCapsule
=
11961740
;
public
const
int
DifferentDimensionCapsule
=
11961740
;
public
static
int
Polymerization
=
24094653
;
public
const
int
Polymerization
=
24094653
;
public
static
int
PowerBond
=
37630732
;
public
const
int
PowerBond
=
37630732
;
public
static
int
EvolutionBurst
=
52875873
;
public
const
int
EvolutionBurst
=
52875873
;
public
static
int
PhotonGeneratorUnit
=
66607691
;
public
const
int
PhotonGeneratorUnit
=
66607691
;
public
static
int
DeFusion
=
95286165
;
public
const
int
DeFusion
=
95286165
;
public
static
int
BottomlessTrapHole
=
29401950
;
public
const
int
BottomlessTrapHole
=
29401950
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
AttackReflectorUnit
=
91989718
;
public
const
int
AttackReflectorUnit
=
91989718
;
public
static
int
CyberneticHiddenTechnology
=
92773018
;
public
const
int
CyberneticHiddenTechnology
=
92773018
;
public
static
int
CallOfTheHaunted
=
97077563
;
public
const
int
CallOfTheHaunted
=
97077563
;
public
static
int
SevenToolsOfTheBandit
=
3819470
;
public
const
int
SevenToolsOfTheBandit
=
3819470
;
public
static
int
CyberTwinDragon
=
74157028
;
public
const
int
CyberTwinDragon
=
74157028
;
public
static
int
CyberEndDragon
=
1546123
;
public
const
int
CyberEndDragon
=
1546123
;
public
static
int
CyberDragonNova
=
58069384
;
public
const
int
CyberDragonNova
=
58069384
;
}
}
public
CyberDragonExecutor
(
GameAI
ai
,
Duel
duel
)
public
CyberDragonExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI.Decks
private
bool
Capsule
()
private
bool
Capsule
()
{
{
List
<
int
>
SelectedCard
=
new
List
<
int
>();
I
List
<
int
>
SelectedCard
=
new
List
<
int
>();
SelectedCard
.
Add
(
CardId
.
PowerBond
);
SelectedCard
.
Add
(
CardId
.
PowerBond
);
SelectedCard
.
Add
(
CardId
.
DarkHole
);
SelectedCard
.
Add
(
CardId
.
DarkHole
);
SelectedCard
.
Add
(
CardId
.
Raigeki
);
SelectedCard
.
Add
(
CardId
.
Raigeki
);
...
...
Game/AI/Decks/DoEveryThingExecutor.cs
View file @
36a817aa
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
LeoWizard
=
4392470
;
public
const
int
LeoWizard
=
4392470
;
public
static
int
Bunilla
=
69380702
;
public
const
int
Bunilla
=
69380702
;
}
}
public
DoEverythingExecutor
(
GameAI
ai
,
Duel
duel
)
public
DoEverythingExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
Game/AI/Decks/DragunityExecutor.cs
View file @
36a817aa
...
@@ -11,32 +11,32 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,32 +11,32 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
StardustDragonAssaultMode
=
61257789
;
public
const
int
StardustDragonAssaultMode
=
61257789
;
public
static
int
DragunityArmaMysletainn
=
876330
;
public
const
int
DragunityArmaMysletainn
=
876330
;
public
static
int
AssaultBeast
=
3431737
;
public
const
int
AssaultBeast
=
3431737
;
public
static
int
DragunityDux
=
28183605
;
public
const
int
DragunityDux
=
28183605
;
public
static
int
DragunityPhalanx
=
59755122
;
public
const
int
DragunityPhalanx
=
59755122
;
public
static
int
AssaultTeleport
=
29863101
;
public
const
int
AssaultTeleport
=
29863101
;
public
static
int
CardsOfConsonance
=
39701395
;
public
const
int
CardsOfConsonance
=
39701395
;
public
static
int
UpstartGoblin
=
70368879
;
public
const
int
UpstartGoblin
=
70368879
;
public
static
int
DragonsMirror
=
71490127
;
public
const
int
DragonsMirror
=
71490127
;
public
static
int
Terraforming
=
73628505
;
public
const
int
Terraforming
=
73628505
;
public
static
int
FoolishBurial
=
81439173
;
public
const
int
FoolishBurial
=
81439173
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
FireFormationTenki
=
57103969
;
public
const
int
FireFormationTenki
=
57103969
;
public
static
int
DragunitySpearOfDestiny
=
60004971
;
public
const
int
DragunitySpearOfDestiny
=
60004971
;
public
static
int
DragonRavine
=
62265044
;
public
const
int
DragonRavine
=
62265044
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
StarlightRoad
=
58120309
;
public
const
int
StarlightRoad
=
58120309
;
public
static
int
DimensionalPrison
=
70342110
;
public
const
int
DimensionalPrison
=
70342110
;
public
static
int
AssaultModeActivate
=
80280737
;
public
const
int
AssaultModeActivate
=
80280737
;
public
static
int
FiveHeadedDragon
=
99267150
;
public
const
int
FiveHeadedDragon
=
99267150
;
public
static
int
CrystalWingSynchroDragon
=
50954680
;
public
const
int
CrystalWingSynchroDragon
=
50954680
;
public
static
int
ScrapDragon
=
76774528
;
public
const
int
ScrapDragon
=
76774528
;
public
static
int
StardustDragon
=
44508094
;
public
const
int
StardustDragon
=
44508094
;
public
static
int
DragunityKnightGaeDearg
=
34116027
;
public
const
int
DragunityKnightGaeDearg
=
34116027
;
public
static
int
DragunityKnightVajrayana
=
21249921
;
public
const
int
DragunityKnightVajrayana
=
21249921
;
}
}
public
DragunityExecutor
(
GameAI
ai
,
Duel
duel
)
public
DragunityExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -200,7 +200,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -200,7 +200,7 @@ namespace WindBot.Game.AI.Decks
else
else
option
=
1
;
option
=
1
;
if
(
ActivateDescription
!=
CardId
.
DragonRavine
*
16
+
option
)
if
(
ActivateDescription
!=
AI
.
Utils
.
GetStringId
(
CardId
.
DragonRavine
,
option
)
)
return
false
;
return
false
;
AI
.
SelectCard
(
tributeId
);
AI
.
SelectCard
(
tributeId
);
...
@@ -243,20 +243,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -243,20 +243,13 @@ namespace WindBot.Game.AI.Decks
private
bool
FoolishBurial
()
private
bool
FoolishBurial
()
{
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
DragunityPhalanx
))
AI
.
SelectCard
(
new
[]
return
false
;
if
(
Bot
.
HasInHand
(
CardId
.
DragunityPhalanx
))
return
false
;
int
remaining
=
3
;
foreach
(
ClientCard
card
in
Bot
.
Banished
)
if
(
card
.
Id
==
CardId
.
DragunityPhalanx
)
remaining
--;
if
(
remaining
>
0
)
{
{
AI
.
SelectCard
(
CardId
.
DragunityPhalanx
);
CardId
.
DragunityPhalanx
,
return
true
;
CardId
.
AssaultBeast
,
}
CardId
.
StardustDragonAssaultMode
return
false
;
});
return
true
;
}
}
private
bool
MonsterReborn
()
private
bool
MonsterReborn
()
...
@@ -344,13 +337,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -344,13 +337,13 @@ namespace WindBot.Game.AI.Decks
{
{
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
// return true;
// return true;
ClientCard
invincible
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
invincible
=
AI
.
Utils
.
GetProblematicEnemyCard
(
3000
);
return
invincible
!=
null
;
return
invincible
!=
null
;
}
}
private
bool
ScrapDragonEffect
()
private
bool
ScrapDragonEffect
()
{
{
ClientCard
invincible
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
invincible
=
AI
.
Utils
.
GetProblematicEnemyCard
(
3000
);
if
(
invincible
==
null
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2800
-
1
,
false
))
if
(
invincible
==
null
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2800
-
1
,
false
))
return
false
;
return
false
;
...
...
Game/AI/Decks/EvilswarmExecutor.cs
View file @
36a817aa
...
@@ -12,12 +12,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,12 +12,12 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
CosmicCyclone
=
8267140
;
public
const
int
CosmicCyclone
=
8267140
;
public
static
int
InfestationPandemic
=
27541267
;
public
const
int
InfestationPandemic
=
27541267
;
public
static
int
SolemnJudgment
=
41420027
;
public
const
int
SolemnJudgment
=
41420027
;
public
static
int
SolemnWarning
=
84749824
;
public
const
int
SolemnWarning
=
84749824
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
SolemnStrike
=
40605147
;
}
}
public
EvilswarmExecutor
(
GameAI
ai
,
Duel
duel
)
public
EvilswarmExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
Game/AI/Decks/FrogExecutor.cs
View file @
36a817aa
...
@@ -11,25 +11,25 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,25 +11,25 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
CryomancerOfTheIceBarrier
=
23950192
;
public
const
int
CryomancerOfTheIceBarrier
=
23950192
;
public
static
int
DewdarkOfTheIceBarrier
=
90311614
;
public
const
int
DewdarkOfTheIceBarrier
=
90311614
;
public
static
int
SubmarineFrog
=
63948258
;
public
const
int
SubmarineFrog
=
63948258
;
public
static
int
SwapFrog
=
9126351
;
public
const
int
SwapFrog
=
9126351
;
public
static
int
FlipFlopFrog
=
81278754
;
public
const
int
FlipFlopFrog
=
81278754
;
public
static
int
Unifrog
=
56052205
;
public
const
int
Unifrog
=
56052205
;
public
static
int
Ronintoadin
=
1357146
;
public
const
int
Ronintoadin
=
1357146
;
public
static
int
DupeFrog
=
46239604
;
public
const
int
DupeFrog
=
46239604
;
public
static
int
Tradetoad
=
23408872
;
public
const
int
Tradetoad
=
23408872
;
public
static
int
TreebornFrog
=
12538374
;
public
const
int
TreebornFrog
=
12538374
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
Terraforming
=
73628505
;
public
const
int
Terraforming
=
73628505
;
public
static
int
PotOfDuality
=
98645731
;
public
const
int
PotOfDuality
=
98645731
;
public
static
int
Solidarity
=
86780027
;
public
const
int
Solidarity
=
86780027
;
public
static
int
Wetlands
=
2084239
;
public
const
int
Wetlands
=
2084239
;
public
static
int
FroggyForcefield
=
34351849
;
public
const
int
FroggyForcefield
=
34351849
;
public
static
int
GravityBind
=
85742772
;
public
const
int
GravityBind
=
85742772
;
public
static
int
TheHugeRevolutionIsOver
=
99188141
;
public
const
int
TheHugeRevolutionIsOver
=
99188141
;
}
}
public
FrogExecutor
(
GameAI
ai
,
Duel
duel
)
public
FrogExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -84,15 +84,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -84,15 +84,6 @@ namespace WindBot.Game.AI.Decks
private
int
m_swapFrogSummoned
;
private
int
m_swapFrogSummoned
;
private
int
m_flipFlopFrogSummoned
;
private
int
m_flipFlopFrogSummoned
;
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
attacker
.
Id
==
CardId
.
Unifrog
||
attacker
.
Id
==
CardId
.
DewdarkOfTheIceBarrier
)
return
true
;
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
CardId
.
SubmarineFrog
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
SwapFrogSummon
()
private
bool
SwapFrogSummon
()
{
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
...
...
Game/AI/Decks/GravekeeperExecutor.cs
View file @
36a817aa
...
@@ -12,30 +12,30 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,30 +12,30 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
GravekeepersOracle
=
25524823
;
public
const
int
GravekeepersOracle
=
25524823
;
public
static
int
MaleficStardustDragon
=
36521459
;
public
const
int
MaleficStardustDragon
=
36521459
;
public
static
int
GravekeepersVisionary
=
3825890
;
public
const
int
GravekeepersVisionary
=
3825890
;
public
static
int
GravekeepersChief
=
62473983
;
public
const
int
GravekeepersChief
=
62473983
;
public
static
int
ThunderKingRaiOh
=
71564252
;
public
const
int
ThunderKingRaiOh
=
71564252
;
public
static
int
GravekeepersCommandant
=
17393207
;
public
const
int
GravekeepersCommandant
=
17393207
;
public
static
int
GravekeepersAssailant
=
25262697
;
public
const
int
GravekeepersAssailant
=
25262697
;
public
static
int
GravekeepersDescendant
=
30213599
;
public
const
int
GravekeepersDescendant
=
30213599
;
public
static
int
GravekeepersSpy
=
24317029
;
public
const
int
GravekeepersSpy
=
24317029
;
public
static
int
GravekeepersRecruiter
=
93023479
;
public
const
int
GravekeepersRecruiter
=
93023479
;
public
static
int
AllureOfDarkness
=
1475311
;
public
const
int
AllureOfDarkness
=
1475311
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
RoyalTribute
=
72405967
;
public
const
int
RoyalTribute
=
72405967
;
public
static
int
GravekeepersStele
=
99523325
;
public
const
int
GravekeepersStele
=
99523325
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BookofMoon
=
14087893
;
public
const
int
BookofMoon
=
14087893
;
public
static
int
HiddenTemplesOfNecrovalley
=
70000776
;
public
const
int
HiddenTemplesOfNecrovalley
=
70000776
;
public
static
int
Necrovalley
=
47355498
;
public
const
int
Necrovalley
=
47355498
;
public
static
int
BottomlessTrapHole
=
29401950
;
public
const
int
BottomlessTrapHole
=
29401950
;
public
static
int
RiteOfSpirit
=
30450531
;
public
const
int
RiteOfSpirit
=
30450531
;
public
static
int
TorrentialTribute
=
53582587
;
public
const
int
TorrentialTribute
=
53582587
;
public
static
int
DimensionalPrison
=
70342110
;
public
const
int
DimensionalPrison
=
70342110
;
public
static
int
SolemnWarning
=
84749824
;
public
const
int
SolemnWarning
=
84749824
;
public
static
int
ImperialTombsOfNecrovalley
=
90434657
;
public
const
int
ImperialTombsOfNecrovalley
=
90434657
;
}
}
public
GravekeeperExecutor
(
GameAI
ai
,
Duel
duel
)
public
GravekeeperExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
Game/AI/Decks/GraydleExecutor.cs
View file @
36a817aa
...
@@ -12,11 +12,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,11 +12,11 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
CosmicCyclone
=
8267140
;
public
const
int
CosmicCyclone
=
8267140
;
public
static
int
SolemnJudgment
=
41420027
;
public
const
int
SolemnJudgment
=
41420027
;
public
static
int
SolemnWarning
=
84749824
;
public
const
int
SolemnWarning
=
84749824
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
SolemnStrike
=
40605147
;
}
}
public
GraydleExecutor
(
GameAI
ai
,
Duel
duel
)
public
GraydleExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
Game/AI/Decks/HorusExecutor.cs
View file @
36a817aa
...
@@ -11,28 +11,28 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,28 +11,28 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
AlexandriteDragon
=
43096270
;
public
const
int
AlexandriteDragon
=
43096270
;
public
static
int
LusterDragon
=
11091375
;
public
const
int
LusterDragon
=
11091375
;
public
static
int
WhiteNightDragon
=
79473793
;
public
const
int
WhiteNightDragon
=
79473793
;
public
static
int
HorusTheBlackFlameDragonLv8
=
48229808
;
public
const
int
HorusTheBlackFlameDragonLv8
=
48229808
;
public
static
int
HorusTheBlackFlameDragonLv6
=
11224103
;
public
const
int
HorusTheBlackFlameDragonLv6
=
11224103
;
public
static
int
CyberDragon
=
70095154
;
public
const
int
CyberDragon
=
70095154
;
public
static
int
AxeDragonute
=
84914462
;
public
const
int
AxeDragonute
=
84914462
;
public
static
int
DodgerDragon
=
47013502
;
public
const
int
DodgerDragon
=
47013502
;
public
static
int
GolemDragon
=
9666558
;
public
const
int
GolemDragon
=
9666558
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
HammerShot
=
26412047
;
public
const
int
HammerShot
=
26412047
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
Fissure
=
66788016
;
public
const
int
Fissure
=
66788016
;
public
static
int
StampingDestruction
=
81385346
;
public
const
int
StampingDestruction
=
81385346
;
public
static
int
FoolishBurial
=
81439173
;
public
const
int
FoolishBurial
=
81439173
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BellowOfTheSilverDragon
=
80600103
;
public
const
int
BellowOfTheSilverDragon
=
80600103
;
public
static
int
Mountain
=
50913601
;
public
const
int
Mountain
=
50913601
;
public
static
int
DragonsRebirth
=
20638610
;
public
const
int
DragonsRebirth
=
20638610
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
DimensionalPrison
=
70342110
;
public
const
int
DimensionalPrison
=
70342110
;
}
}
public
HorusExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
public
HorusExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
...
...
Game/AI/Decks/LightswornExecutor.cs
View file @
36a817aa
...
@@ -12,41 +12,41 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,41 +12,41 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
JudgmentDragon
=
57774843
;
public
const
int
JudgmentDragon
=
57774843
;
public
static
int
Wulf
=
58996430
;
public
const
int
Wulf
=
58996430
;
public
static
int
Garoth
=
59019082
;
public
const
int
Garoth
=
59019082
;
public
static
int
Raiden
=
77558536
;
public
const
int
Raiden
=
77558536
;
public
static
int
Lyla
=
22624373
;
public
const
int
Lyla
=
22624373
;
public
static
int
Felis
=
73176465
;
public
const
int
Felis
=
73176465
;
public
static
int
Lumina
=
95503687
;
public
const
int
Lumina
=
95503687
;
public
static
int
Minerva
=
40164421
;
public
const
int
Minerva
=
40164421
;
public
static
int
Ryko
=
21502796
;
public
const
int
Ryko
=
21502796
;
public
static
int
PerformageTrickClown
=
67696066
;
public
const
int
PerformageTrickClown
=
67696066
;
public
static
int
Goblindbergh
=
25259669
;
public
const
int
Goblindbergh
=
25259669
;
public
static
int
ThousandBlades
=
1833916
;
public
const
int
ThousandBlades
=
1833916
;
public
static
int
Honest
=
37742478
;
public
const
int
Honest
=
37742478
;
public
static
int
GlowUpBulb
=
67441435
;
public
const
int
GlowUpBulb
=
67441435
;
public
static
int
SolarRecharge
=
691925
;
public
const
int
SolarRecharge
=
691925
;
public
static
int
GalaxyCyclone
=
5133471
;
public
const
int
GalaxyCyclone
=
5133471
;
public
static
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
static
int
ReinforcementOfTheArmy
=
32807846
;
public
const
int
ReinforcementOfTheArmy
=
32807846
;
public
static
int
MetalfoesFusion
=
73594093
;
public
const
int
MetalfoesFusion
=
73594093
;
public
static
int
ChargeOfTheLightBrigade
=
94886282
;
public
const
int
ChargeOfTheLightBrigade
=
94886282
;
public
static
int
Michael
=
4779823
;
public
const
int
Michael
=
4779823
;
public
static
int
MinervaTheExalted
=
30100551
;
public
const
int
MinervaTheExalted
=
30100551
;
public
static
int
TrishulaDragonOfTheIceBarrier
=
52687916
;
public
const
int
TrishulaDragonOfTheIceBarrier
=
52687916
;
public
static
int
ScarlightRedDragonArchfiend
=
80666118
;
public
const
int
ScarlightRedDragonArchfiend
=
80666118
;
public
static
int
PSYFramelordOmega
=
74586817
;
public
const
int
PSYFramelordOmega
=
74586817
;
public
static
int
PSYFramelordZeta
=
37192109
;
public
const
int
PSYFramelordZeta
=
37192109
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
public
const
int
NumberS39UtopiatheLightning
=
56832966
;
public
static
int
Number39Utopia
=
84013237
;
public
const
int
Number39Utopia
=
84013237
;
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
const
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
static
int
EvilswarmExcitonKnight
=
46772449
;
public
const
int
EvilswarmExcitonKnight
=
46772449
;
public
static
int
DanteTravelerOfTheBurningAbyss
=
83531441
;
public
const
int
DanteTravelerOfTheBurningAbyss
=
83531441
;
public
static
int
DecodeTalker
=
1861629
;
public
const
int
DecodeTalker
=
1861629
;
public
static
int
MissusRadiant
=
3987233
;
public
const
int
MissusRadiant
=
3987233
;
}
}
bool
ClownUsed
=
false
;
bool
ClownUsed
=
false
;
...
@@ -95,19 +95,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -95,19 +95,12 @@ namespace WindBot.Game.AI.Decks
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
{
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Light
&&
Bot
.
HasInHand
(
CardId
.
Honest
))
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Light
&&
Bot
.
HasInHand
(
CardId
.
Honest
))
attacker
.
RealPower
=
attacker
.
RealPower
+
defender
.
Attack
;
attacker
.
RealPower
=
attacker
.
RealPower
+
defender
.
Attack
;
if
(
attacker
.
Id
==
CardId
.
NumberS39UtopiatheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
bool
cancelable
)
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
bool
cancelable
)
...
...
Game/AI/Decks/MokeyMokeyExecutor.cs
View file @
36a817aa
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
LeoWizard
=
4392470
;
public
const
int
LeoWizard
=
4392470
;
public
static
int
Bunilla
=
69380702
;
public
const
int
Bunilla
=
69380702
;
}
}
private
int
RockCount
=
0
;
private
int
RockCount
=
0
;
...
@@ -33,10 +33,5 @@ namespace WindBot.Game.AI.Decks
...
@@ -33,10 +33,5 @@ namespace WindBot.Game.AI.Decks
else
else
return
base
.
OnRockPaperScissors
();
return
base
.
OnRockPaperScissors
();
}
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
return
attacker
.
Attack
>
0
;
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/MokeyMokeyKingExecutor.cs
View file @
36a817aa
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,8 +11,8 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
LeoWizard
=
4392470
;
public
const
int
LeoWizard
=
4392470
;
public
static
int
Bunilla
=
69380702
;
public
const
int
Bunilla
=
69380702
;
}
}
private
int
RockCount
=
0
;
private
int
RockCount
=
0
;
...
...
Game/AI/Decks/NekrozExecutor.cs
View file @
36a817aa
...
@@ -12,31 +12,31 @@ namespace WindBot.Game.AI.Decks
...
@@ -12,31 +12,31 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
DancePrincess
=
52738610
;
public
const
int
DancePrincess
=
52738610
;
public
static
int
ThousandHands
=
23401839
;
public
const
int
ThousandHands
=
23401839
;
public
static
int
TenThousandHands
=
95492061
;
public
const
int
TenThousandHands
=
95492061
;
public
static
int
Shurit
=
90307777
;
public
const
int
Shurit
=
90307777
;
public
static
int
MaxxC
=
23434538
;
public
const
int
MaxxC
=
23434538
;
public
static
int
DecisiveArmor
=
88240999
;
public
const
int
DecisiveArmor
=
88240999
;
public
static
int
Trishula
=
52068432
;
public
const
int
Trishula
=
52068432
;
public
static
int
Valkyrus
=
25857246
;
public
const
int
Valkyrus
=
25857246
;
public
static
int
Gungnir
=
74122412
;
public
const
int
Gungnir
=
74122412
;
public
static
int
Brionac
=
26674724
;
public
const
int
Brionac
=
26674724
;
public
static
int
Unicore
=
89463537
;
public
const
int
Unicore
=
89463537
;
public
static
int
Clausolas
=
99185129
;
public
const
int
Clausolas
=
99185129
;
public
static
int
PhantomOfChaos
=
30312361
;
public
const
int
PhantomOfChaos
=
30312361
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
ReinforcementOfTheArmy
=
32807846
;
public
const
int
ReinforcementOfTheArmy
=
32807846
;
public
static
int
TradeIn
=
38120068
;
public
const
int
TradeIn
=
38120068
;
public
static
int
PreparationOfRites
=
96729612
;
public
const
int
PreparationOfRites
=
96729612
;
public
static
int
Mirror
=
14735698
;
public
const
int
Mirror
=
14735698
;
public
static
int
Kaleidoscope
=
51124303
;
public
const
int
Kaleidoscope
=
51124303
;
public
static
int
Cycle
=
97211663
;
public
const
int
Cycle
=
97211663
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
RoyalDecree
=
51452091
;
public
const
int
RoyalDecree
=
51452091
;
public
static
int
EvilswarmExcitonKnight
=
46772449
;
public
const
int
EvilswarmExcitonKnight
=
46772449
;
public
static
int
HeraldOfTheArcLight
=
79606837
;
public
const
int
HeraldOfTheArcLight
=
79606837
;
}
}
List
<
int
>
NekrozRituelCard
=
new
List
<
int
>();
List
<
int
>
NekrozRituelCard
=
new
List
<
int
>();
...
...
Game/AI/Decks/OldSchoolExecutor.cs
View file @
36a817aa
...
@@ -11,26 +11,26 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,26 +11,26 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
AncientGearGolem
=
83104731
;
public
const
int
AncientGearGolem
=
83104731
;
public
static
int
Frostosaurus
=
6631034
;
public
const
int
Frostosaurus
=
6631034
;
public
static
int
AlexandriteDragon
=
43096270
;
public
const
int
AlexandriteDragon
=
43096270
;
public
static
int
GeneWarpedWarwolf
=
69247929
;
public
const
int
GeneWarpedWarwolf
=
69247929
;
public
static
int
GearGolemTheMovingFortress
=
30190809
;
public
const
int
GearGolemTheMovingFortress
=
30190809
;
public
static
int
EvilswarmHeliotrope
=
77542832
;
public
const
int
EvilswarmHeliotrope
=
77542832
;
public
static
int
LusterDragon
=
11091375
;
public
const
int
LusterDragon
=
11091375
;
public
static
int
InsectKnight
=
35052053
;
public
const
int
InsectKnight
=
35052053
;
public
static
int
ArchfiendSoldier
=
49881766
;
public
const
int
ArchfiendSoldier
=
49881766
;
public
static
int
HeavyStorm
=
19613556
;
public
const
int
HeavyStorm
=
19613556
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
HammerShot
=
26412047
;
public
const
int
HammerShot
=
26412047
;
public
static
int
Fissure
=
66788016
;
public
const
int
Fissure
=
66788016
;
public
static
int
SwordsOfRevealingLight
=
72302403
;
public
const
int
SwordsOfRevealingLight
=
72302403
;
public
static
int
DoubleSummon
=
43422537
;
public
const
int
DoubleSummon
=
43422537
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
DimensionalPrison
=
70342110
;
public
const
int
DimensionalPrison
=
70342110
;
}
}
...
@@ -64,13 +64,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -64,13 +64,6 @@ namespace WindBot.Game.AI.Decks
private
int
_lastDoubleSummon
;
private
int
_lastDoubleSummon
;
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
CardId
.
AncientGearGolem
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
DoubleSummon
()
private
bool
DoubleSummon
()
{
{
if
(
_lastDoubleSummon
==
Duel
.
Turn
)
if
(
_lastDoubleSummon
==
Duel
.
Turn
)
...
...
Game/AI/Decks/QliphortExecutor.cs
View file @
36a817aa
...
@@ -11,34 +11,36 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,34 +11,36 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
Scout
=
65518099
;
public
const
int
Scout
=
65518099
;
public
static
int
Stealth
=
13073850
;
public
const
int
Stealth
=
13073850
;
public
static
int
Shell
=
90885155
;
public
const
int
Shell
=
90885155
;
public
static
int
Helix
=
37991342
;
public
const
int
Helix
=
37991342
;
public
static
int
Carrier
=
91907707
;
public
const
int
Carrier
=
91907707
;
public
static
int
DarkHole
=
53129443
;
public
static
int
CardOfDemise
=
59750328
;
public
const
int
DarkHole
=
53129443
;
public
static
int
SummonersArt
=
79816536
;
public
const
int
CardOfDemise
=
59750328
;
public
static
int
PotOfDuality
=
98645731
;
public
const
int
SummonersArt
=
79816536
;
public
static
int
Saqlifice
=
17639150
;
public
const
int
PotOfDuality
=
98645731
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
Saqlifice
=
17639150
;
public
static
int
TorrentialTribute
=
53582587
;
public
static
int
DimensionalBarrier
=
83326048
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
CompulsoryEvacuationDevice
=
94192409
;
public
const
int
TorrentialTribute
=
53582587
;
public
static
int
VanitysEmptiness
=
5851097
;
public
const
int
DimensionalBarrier
=
83326048
;
public
static
int
SkillDrain
=
82732705
;
public
const
int
CompulsoryEvacuationDevice
=
94192409
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
VanitysEmptiness
=
5851097
;
public
static
int
TheHugeRevolutionIsOver
=
99188141
;
public
const
int
SkillDrain
=
82732705
;
public
const
int
SolemnStrike
=
40605147
;
public
const
int
TheHugeRevolutionIsOver
=
99188141
;
}
}
bool
CardOfDemiseUsed
=
false
;
bool
CardOfDemiseUsed
=
false
;
List
<
int
>
LowScaleCards
=
new
List
<
int
>
IList
<
int
>
LowScaleCards
=
new
[]
{
{
CardId
.
Stealth
,
CardId
.
Stealth
,
CardId
.
Carrier
CardId
.
Carrier
};
};
List
<
int
>
HighScaleCards
=
new
List
<
int
>
IList
<
int
>
HighScaleCards
=
new
[]
{
{
CardId
.
Scout
,
CardId
.
Scout
,
CardId
.
Shell
,
CardId
.
Shell
,
...
@@ -136,11 +138,18 @@ namespace WindBot.Game.AI.Decks
...
@@ -136,11 +138,18 @@ namespace WindBot.Game.AI.Decks
{
{
return
null
;
return
null
;
}
}
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
// select the last cards
// pendulum summon, select the last cards
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
for
(
int
i
=
1
;
i
<=
max
;
++
i
)
for
(
int
i
=
1
;
i
<=
max
;
++
i
)
selected
.
Add
(
cards
[
cards
.
Count
-
i
]);
{
ClientCard
card
=
cards
[
cards
.
Count
-
i
];
if
(
card
.
Id
!=
CardId
.
Scout
||
(
card
.
Location
==
CardLocation
.
Extra
&&
!
Duel
.
IsNewRule
))
selected
.
Add
(
card
);
}
if
(
selected
.
Count
==
0
)
selected
.
Add
(
cards
[
cards
.
Count
-
1
]);
return
selected
;
return
selected
;
}
}
...
@@ -189,9 +198,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -189,9 +198,9 @@ namespace WindBot.Game.AI.Decks
private
bool
TrapSetUnique
()
private
bool
TrapSetUnique
()
{
{
foreach
(
ClientCard
card
in
Bot
.
SpellZone
)
foreach
(
ClientCard
card
in
Bot
.
GetSpells
()
)
{
{
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
)
if
(
card
.
Id
==
Card
.
Id
)
return
false
;
return
false
;
}
}
return
TrapSetWhenZoneFree
();
return
TrapSetWhenZoneFree
();
...
...
Game/AI/Decks/RainbowExecutor.cs
View file @
36a817aa
...
@@ -11,45 +11,45 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,45 +11,45 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
MysteryShellDragon
=
18108166
;
public
const
int
MysteryShellDragon
=
18108166
;
public
static
int
PhantomGryphon
=
74852097
;
public
const
int
PhantomGryphon
=
74852097
;
public
static
int
MasterPendulumTheDracoslayer
=
75195825
;
public
const
int
MasterPendulumTheDracoslayer
=
75195825
;
public
static
int
AngelTrumpeter
=
87979586
;
public
const
int
AngelTrumpeter
=
87979586
;
public
static
int
MetalfoesGoldriver
=
33256280
;
public
const
int
MetalfoesGoldriver
=
33256280
;
public
static
int
Kabazauls
=
51934376
;
public
const
int
MegalosmasherX
=
81823360
;
public
static
int
RescueRabbit
=
85138716
;
public
const
int
RescueRabbit
=
85138716
;
public
static
int
UnexpectedDai
=
911883
;
public
const
int
UnexpectedDai
=
911883
;
public
static
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
static
int
PotOfDesires
=
35261759
;
public
const
int
PotOfDesires
=
35261759
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
SmashingGround
=
97169186
;
public
const
int
SmashingGround
=
97169186
;
public
static
int
QuakingMirrorForce
=
40838625
;
public
const
int
QuakingMirrorForce
=
40838625
;
public
static
int
DrowningMirrorForce
=
47475363
;
public
const
int
DrowningMirrorForce
=
47475363
;
public
static
int
BlazingMirrorForce
=
75249652
;
public
const
int
BlazingMirrorForce
=
75249652
;
public
static
int
StormingMirrorForce
=
5650082
;
public
const
int
StormingMirrorForce
=
5650082
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
DarkMirrorForce
=
20522190
;
public
const
int
DarkMirrorForce
=
20522190
;
public
static
int
BottomlessTrapHole
=
29401950
;
public
const
int
BottomlessTrapHole
=
29401950
;
public
static
int
TraptrixTrapHoleNightmare
=
29616929
;
public
const
int
TraptrixTrapHoleNightmare
=
29616929
;
public
static
int
StarlightRoad
=
58120309
;
public
const
int
StarlightRoad
=
58120309
;
public
static
int
ScarlightRedDragonArchfiend
=
80666118
;
public
const
int
ScarlightRedDragonArchfiend
=
80666118
;
public
static
int
IgnisterProminenceTheBlastingDracoslayer
=
18239909
;
public
const
int
IgnisterProminenceTheBlastingDracoslayer
=
18239909
;
public
static
int
StardustDragon
=
44508094
;
public
const
int
StardustDragon
=
44508094
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
public
const
int
NumberS39UtopiatheLightning
=
56832966
;
public
static
int
Number37HopeWovenDragonSpiderShark
=
37279508
;
public
const
int
Number37HopeWovenDragonSpiderShark
=
37279508
;
public
static
int
Number39Utopia
=
84013237
;
public
const
int
Number39Utopia
=
84013237
;
public
static
int
EvolzarLaggia
=
74294676
;
public
const
int
EvolzarLaggia
=
74294676
;
public
static
int
Number59CrookedCook
=
82697249
;
public
const
int
Number59CrookedCook
=
82697249
;
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
const
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
static
int
StarliegePaladynamo
=
61344030
;
public
const
int
StarliegePaladynamo
=
61344030
;
public
static
int
LightningChidori
=
22653490
;
public
const
int
LightningChidori
=
22653490
;
public
static
int
EvilswarmExcitonKnight
=
46772449
;
public
const
int
EvilswarmExcitonKnight
=
46772449
;
public
static
int
GagagaCowboy
=
12014404
;
public
const
int
GagagaCowboy
=
12014404
;
public
static
int
EvilswarmNightmare
=
359563
;
public
const
int
EvilswarmNightmare
=
359563
;
public
static
int
TraptrixRafflesia
=
6511113
;
public
const
int
TraptrixRafflesia
=
6511113
;
}
}
private
bool
NormalSummoned
=
false
;
private
bool
NormalSummoned
=
false
;
...
@@ -67,7 +67,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -67,7 +67,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
DefaultPotOfDesires
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
DefaultPotOfDesires
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AngelTrumpeter
,
AngelTrumpeterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AngelTrumpeter
,
AngelTrumpeterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Kabazauls
,
Kabazauls
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MegalosmasherX
,
MegalosmasherX
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MasterPendulumTheDracoslayer
,
MasterPendulumTheDracoslayerSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MasterPendulumTheDracoslayer
,
MasterPendulumTheDracoslayerSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MysteryShellDragon
,
MysteryShellDragonSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MysteryShellDragon
,
MysteryShellDragonSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
PhantomGryphon
,
PhantomGryphonSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
PhantomGryphon
,
PhantomGryphonSummon
);
...
@@ -142,27 +142,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -142,27 +142,15 @@ namespace WindBot.Game.AI.Decks
{
{
NormalSummoned
=
false
;
NormalSummoned
=
false
;
}
}
public
override
bool
OnSelectHand
()
{
return
Program
.
Rand
.
Next
(
2
)
>
0
;
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
{
if
(
attacker
.
Id
==
CardId
.
NumberS39UtopiatheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Number37HopeWovenDragonSpiderShark
,
true
,
true
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Number37HopeWovenDragonSpiderShark
,
true
,
true
))
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
}
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
private
bool
UnexpectedDaiEffect
()
private
bool
UnexpectedDaiEffect
()
...
@@ -171,21 +159,22 @@ namespace WindBot.Game.AI.Decks
...
@@ -171,21 +159,22 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
CardId
.
MysteryShellDragon
,
CardId
.
MysteryShellDragon
,
CardId
.
PhantomGryphon
CardId
.
PhantomGryphon
,
CardId
.
MegalosmasherX
});
});
else
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
else
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
{
{
if
(
Bot
.
HasInHand
(
CardId
.
MysteryShellDragon
))
if
(
Bot
.
HasInHand
(
CardId
.
MysteryShellDragon
))
AI
.
SelectCard
(
CardId
.
MysteryShellDragon
);
AI
.
SelectCard
(
CardId
.
MysteryShellDragon
);
else
if
(
Bot
.
HasInHand
(
CardId
.
Kabazauls
))
else
if
(
Bot
.
HasInHand
(
CardId
.
MegalosmasherX
))
AI
.
SelectCard
(
CardId
.
Kabazauls
);
AI
.
SelectCard
(
CardId
.
MegalosmasherX
);
else
if
(
Bot
.
HasInHand
(
CardId
.
AngelTrumpeter
))
else
if
(
Bot
.
HasInHand
(
CardId
.
AngelTrumpeter
))
AI
.
SelectCard
(
CardId
.
AngelTrumpeter
);
AI
.
SelectCard
(
CardId
.
AngelTrumpeter
);
}
}
else
else
{
{
if
(
Bot
.
HasInHand
(
CardId
.
Kabazauls
))
if
(
Bot
.
HasInHand
(
CardId
.
MegalosmasherX
))
AI
.
SelectCard
(
CardId
.
Kabazauls
);
AI
.
SelectCard
(
CardId
.
MegalosmasherX
);
else
if
(
Bot
.
HasInHand
(
CardId
.
MasterPendulumTheDracoslayer
))
else
if
(
Bot
.
HasInHand
(
CardId
.
MasterPendulumTheDracoslayer
))
AI
.
SelectCard
(
CardId
.
MasterPendulumTheDracoslayer
);
AI
.
SelectCard
(
CardId
.
MasterPendulumTheDracoslayer
);
else
if
(
Bot
.
HasInHand
(
CardId
.
PhantomGryphon
))
else
if
(
Bot
.
HasInHand
(
CardId
.
PhantomGryphon
))
...
@@ -203,20 +192,24 @@ namespace WindBot.Game.AI.Decks
...
@@ -203,20 +192,24 @@ namespace WindBot.Game.AI.Decks
private
bool
RescueRabbitEffect
()
private
bool
RescueRabbitEffect
()
{
{
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
CardId
.
Kabazauls
,
CardId
.
MegalosmasherX
,
CardId
.
MysteryShellDragon
CardId
.
MysteryShellDragon
});
});
}
else
else
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
CardId
.
MasterPendulumTheDracoslayer
,
CardId
.
MasterPendulumTheDracoslayer
,
CardId
.
PhantomGryphon
,
CardId
.
PhantomGryphon
,
CardId
.
Kabazauls
,
CardId
.
MegalosmasherX
,
CardId
.
MetalfoesGoldriver
,
CardId
.
MetalfoesGoldriver
,
CardId
.
AngelTrumpeter
CardId
.
AngelTrumpeter
});
});
}
return
true
;
return
true
;
}
}
...
@@ -240,9 +233,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -240,9 +233,9 @@ namespace WindBot.Game.AI.Decks
{
{
return
Bot
.
HasInMonstersZone
(
CardId
.
MetalfoesGoldriver
);
return
Bot
.
HasInMonstersZone
(
CardId
.
MetalfoesGoldriver
);
}
}
private
bool
Kabazauls
Summon
()
private
bool
MegalosmasherX
Summon
()
{
{
return
Bot
.
HasInMonstersZone
(
CardId
.
Kabazauls
);
return
Bot
.
HasInMonstersZone
(
CardId
.
MegalosmasherX
);
}
}
private
bool
NormalSummon
()
private
bool
NormalSummon
()
{
{
...
@@ -321,16 +314,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -321,16 +314,14 @@ namespace WindBot.Game.AI.Decks
private
bool
LightningChidoriSummon
()
private
bool
LightningChidoriSummon
()
{
{
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
IsFacedown
())
if
(
monster
.
IsFacedown
())
{
{
return
true
;
return
true
;
}
}
}
}
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
foreach
(
ClientCard
spell
in
Enemy
.
GetSpells
())
foreach
(
ClientCard
spell
in
spells
)
{
{
if
(
spell
.
IsFacedown
())
if
(
spell
.
IsFacedown
())
{
{
...
@@ -350,7 +341,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -350,7 +341,7 @@ namespace WindBot.Game.AI.Decks
private
bool
EvolzarLaggiaSummon
()
private
bool
EvolzarLaggiaSummon
()
{
{
return
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
17
00
,
false
)
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
return
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
20
00
,
false
)
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
}
}
private
bool
EvilswarmNightmareSummon
()
private
bool
EvilswarmNightmareSummon
()
...
...
Game/AI/Decks/Rank5Executor.cs
View file @
36a817aa
...
@@ -11,32 +11,32 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,32 +11,32 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
MistArchfiend
=
28601770
;
public
const
int
MistArchfiend
=
28601770
;
public
static
int
CyberDragon
=
70095154
;
public
const
int
CyberDragon
=
70095154
;
public
static
int
ZWEagleClaw
=
29353756
;
public
const
int
ZWEagleClaw
=
29353756
;
public
static
int
SolarWindJammer
=
33911264
;
public
const
int
SolarWindJammer
=
33911264
;
public
static
int
QuickdrawSynchron
=
20932152
;
public
const
int
QuickdrawSynchron
=
20932152
;
public
static
int
WindUpSoldier
=
12299841
;
public
const
int
WindUpSoldier
=
12299841
;
public
static
int
StarDrawing
=
24610207
;
public
const
int
StarDrawing
=
24610207
;
public
static
int
ChronomalyGoldenJet
=
88552992
;
public
const
int
ChronomalyGoldenJet
=
88552992
;
public
static
int
InstantFusion
=
1845204
;
public
const
int
InstantFusion
=
1845204
;
public
static
int
DoubleSummon
=
43422537
;
public
const
int
DoubleSummon
=
43422537
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BookOfMoon
=
14087893
;
public
const
int
BookOfMoon
=
14087893
;
public
static
int
XyzUnit
=
13032689
;
public
const
int
XyzUnit
=
13032689
;
public
static
int
XyzReborn
=
26708437
;
public
const
int
XyzReborn
=
26708437
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
TorrentialTribute
=
53582587
;
public
const
int
TorrentialTribute
=
53582587
;
public
static
int
XyzVeil
=
96457619
;
public
const
int
XyzVeil
=
96457619
;
public
static
int
PanzerDragon
=
72959823
;
public
const
int
PanzerDragon
=
72959823
;
public
static
int
GaiaDragonTheThunderCharger
=
91949988
;
public
const
int
GaiaDragonTheThunderCharger
=
91949988
;
public
static
int
CyberDragonInfinity
=
10443957
;
public
const
int
CyberDragonInfinity
=
10443957
;
public
static
int
TirasKeeperOfGenesis
=
31386180
;
public
const
int
TirasKeeperOfGenesis
=
31386180
;
public
static
int
Number61Volcasaurus
=
29669359
;
public
const
int
Number61Volcasaurus
=
29669359
;
public
static
int
SharkFortress
=
50449881
;
public
const
int
SharkFortress
=
50449881
;
public
static
int
CyberDragonNova
=
58069384
;
public
const
int
CyberDragonNova
=
58069384
;
}
}
private
bool
NormalSummoned
=
false
;
private
bool
NormalSummoned
=
false
;
...
@@ -60,7 +60,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -60,7 +60,6 @@ namespace WindBot.Game.AI.Decks
// Level 5 monsters without side effects
// Level 5 monsters without side effects
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CyberDragon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CyberDragon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SolarWindJammer
,
SolarWindJammerSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
ZWEagleClaw
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
ZWEagleClaw
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ChronomalyGoldenJet
,
NormalSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ChronomalyGoldenJet
,
NormalSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ChronomalyGoldenJet
,
ChronomalyGoldenJetEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ChronomalyGoldenJet
,
ChronomalyGoldenJetEffect
);
...
@@ -80,6 +79,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -80,6 +79,7 @@ namespace WindBot.Game.AI.Decks
// Level 5 monsters with side effects
// Level 5 monsters with side effects
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SolarWindJammer
,
SolarWindJammerSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
QuickdrawSynchron
,
QuickdrawSynchronSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
QuickdrawSynchron
,
QuickdrawSynchronSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MistArchfiend
,
MistArchfiendSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MistArchfiend
,
MistArchfiendSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
InstantFusion
,
InstantFusionEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
InstantFusion
,
InstantFusionEffect
);
...
@@ -126,13 +126,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -126,13 +126,15 @@ namespace WindBot.Game.AI.Decks
private
bool
SolarWindJammerSummon
()
private
bool
SolarWindJammerSummon
()
{
{
if
(!
NeedLV5
())
return
false
;
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
return
true
;
}
}
private
bool
QuickdrawSynchronSummon
()
private
bool
QuickdrawSynchronSummon
()
{
{
if
(!
n
eedLV5
())
if
(!
N
eedLV5
())
return
false
;
return
false
;
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
...
@@ -150,7 +152,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -150,7 +152,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MistArchfiendSummon
()
private
bool
MistArchfiendSummon
()
{
{
if
(!
n
eedLV5
())
if
(!
N
eedLV5
())
return
false
;
return
false
;
AI
.
SelectOption
(
1
);
AI
.
SelectOption
(
1
);
NormalSummoned
=
true
;
NormalSummoned
=
true
;
...
@@ -159,20 +161,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -159,20 +161,21 @@ namespace WindBot.Game.AI.Decks
private
bool
InstantFusionEffect
()
private
bool
InstantFusionEffect
()
{
{
if
(!
n
eedLV5
())
if
(!
N
eedLV5
())
return
false
;
return
false
;
InstantFusionUsed
=
true
;
InstantFusionUsed
=
true
;
return
true
;
return
true
;
}
}
private
bool
n
eedLV5
()
private
bool
N
eedLV5
()
{
{
if
(
HaveLV5OnField
())
if
(
Have
Other
LV5OnField
())
return
true
;
return
true
;
int
lv5Count
=
0
;
int
lv5Count
=
0
;
IList
<
ClientCard
>
hand
=
Bot
.
Hand
;
foreach
(
ClientCard
card
in
Bot
.
Hand
)
foreach
(
ClientCard
card
in
hand
)
{
{
if
(
card
.
Id
==
CardId
.
SolarWindJammer
&&
Bot
.
GetMonsterCount
()
==
0
)
++
lv5Count
;
if
(
card
.
Id
==
CardId
.
InstantFusion
&&
!
InstantFusionUsed
)
if
(
card
.
Id
==
CardId
.
InstantFusion
&&
!
InstantFusionUsed
)
++
lv5Count
;
++
lv5Count
;
if
(
card
.
Id
==
CardId
.
QuickdrawSynchron
&&
Bot
.
Hand
.
ContainsMonsterWithLevel
(
4
))
if
(
card
.
Id
==
CardId
.
QuickdrawSynchron
&&
Bot
.
Hand
.
ContainsMonsterWithLevel
(
4
))
...
@@ -189,7 +192,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -189,7 +192,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WindUpSoldierEffect
()
private
bool
WindUpSoldierEffect
()
{
{
return
HaveLV5OnField
();
return
Have
Other
LV5OnField
();
}
}
private
bool
ChronomalyGoldenJetEffect
()
private
bool
ChronomalyGoldenJetEffect
()
...
@@ -201,18 +204,17 @@ namespace WindBot.Game.AI.Decks
...
@@ -201,18 +204,17 @@ namespace WindBot.Game.AI.Decks
{
{
if
(!
NormalSummoned
||
DoubleSummonUsed
)
if
(!
NormalSummoned
||
DoubleSummonUsed
)
return
false
;
return
false
;
IList
<
ClientCard
>
hand
=
Bot
.
Hand
;
if
(
Bot
.
HasInHand
(
new
[]
foreach
(
ClientCard
card
in
hand
)
{
if
(
card
.
Id
==
CardId
.
MistArchfiend
||
card
.
Id
==
CardId
.
WindUpSoldier
||
card
.
Id
==
CardId
.
StarDrawing
||
card
.
Id
==
CardId
.
ChronomalyGoldenJet
)
{
{
NormalSummoned
=
false
;
CardId
.
MistArchfiend
,
DoubleSummonUsed
=
true
;
CardId
.
WindUpSoldier
,
return
true
;
CardId
.
StarDrawing
,
}
CardId
.
ChronomalyGoldenJet
}))
{
NormalSummoned
=
false
;
DoubleSummonUsed
=
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
...
@@ -253,9 +255,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -253,9 +255,8 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
ClientCard
bestmonster
=
null
;
ClientCard
bestmonster
=
null
;
foreach
(
ClientCard
monster
in
monsters
)
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
()
)
{
{
if
(
monster
.
IsAttack
()
&&
(
bestmonster
==
null
||
monster
.
Attack
>=
bestmonster
.
Attack
))
if
(
monster
.
IsAttack
()
&&
(
bestmonster
==
null
||
monster
.
Attack
>=
bestmonster
.
Attack
))
bestmonster
=
monster
;
bestmonster
=
monster
;
...
@@ -290,6 +291,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -290,6 +291,8 @@ namespace WindBot.Game.AI.Decks
private
bool
TirasKeeperOfGenesisEffect
()
private
bool
TirasKeeperOfGenesisEffect
()
{
{
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
if
(
target
==
null
)
target
=
AI
.
Utils
.
GetBestEnemyCard
();
if
(
target
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
...
@@ -304,8 +307,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -304,8 +307,7 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
CardId
.
Number61Volcasaurus
);
AI
.
SelectCard
(
CardId
.
Number61Volcasaurus
);
return
true
;
return
true
;
}
}
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
HasType
(
CardType
.
Xyz
)
&&
!
monster
.
HasXyzMaterial
())
if
(
monster
.
HasType
(
CardType
.
Xyz
)
&&
!
monster
.
HasXyzMaterial
())
{
{
...
@@ -318,13 +320,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -318,13 +320,8 @@ namespace WindBot.Game.AI.Decks
private
bool
XyzRebornEffect
()
private
bool
XyzRebornEffect
()
{
{
foreach
(
ClientCard
card
in
Bot
.
SpellZone
)
if
(!
UniqueFaceupSpell
())
{
return
false
;
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
&&
card
.
HasPosition
(
CardPosition
.
FaceUp
))
return
false
;
}
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
new
[]
{
{
CardId
.
CyberDragonInfinity
,
CardId
.
CyberDragonInfinity
,
...
@@ -338,8 +335,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -338,8 +335,15 @@ namespace WindBot.Game.AI.Decks
private
bool
XyzUnitEffect
()
private
bool
XyzUnitEffect
()
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
return
monsters
.
Exists
(
p
=>
p
.
HasType
(
CardType
.
Xyz
));
{
if
(
monster
.
HasType
(
CardType
.
Xyz
))
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
return
false
;
}
}
private
bool
PanzerDragonEffect
()
private
bool
PanzerDragonEffect
()
...
@@ -355,14 +359,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -355,14 +359,9 @@ namespace WindBot.Game.AI.Decks
private
bool
XyzVeilEffect
()
private
bool
XyzVeilEffect
()
{
{
List
<
ClientCard
>
spells
=
Bot
.
GetSpells
();
if
(!
UniqueFaceupSpell
())
foreach
(
ClientCard
spell
in
spells
)
return
false
;
{
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
if
(
spell
.
Id
==
CardId
.
XyzVeil
&&
!
spell
.
IsFacedown
())
return
false
;
}
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
HasType
(
CardType
.
Xyz
))
if
(
monster
.
HasType
(
CardType
.
Xyz
))
return
true
;
return
true
;
...
@@ -370,10 +369,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -370,10 +369,9 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
HaveLV5OnField
()
private
bool
Have
Other
LV5OnField
()
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
HasType
(
CardType
.
Monster
)
&&
if
(
monster
.
HasType
(
CardType
.
Monster
)
&&
!
monster
.
HasType
(
CardType
.
Xyz
)
&&
!
monster
.
HasType
(
CardType
.
Xyz
)
&&
...
...
Game/AI/Decks/ST1732Executor.cs
View file @
36a817aa
...
@@ -11,44 +11,44 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,44 +11,44 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
Digitron
=
32295838
;
public
const
int
Digitron
=
32295838
;
public
static
int
Bitron
=
36211150
;
public
const
int
Bitron
=
36211150
;
public
static
int
DualAssembloom
=
7445307
;
public
const
int
DualAssembloom
=
7445307
;
public
static
int
BootStagguard
=
70950698
;
public
const
int
BootStagguard
=
70950698
;
public
static
int
Linkslayer
=
35595518
;
public
const
int
Linkslayer
=
35595518
;
public
static
int
RAMClouder
=
9190563
;
public
const
int
RAMClouder
=
9190563
;
public
static
int
ROMCloudia
=
44956694
;
public
const
int
ROMCloudia
=
44956694
;
public
static
int
BalancerLord
=
8567955
;
public
const
int
BalancerLord
=
8567955
;
public
static
int
Backlinker
=
71172240
;
public
const
int
Backlinker
=
71172240
;
public
static
int
Kleinant
=
45778242
;
public
const
int
Kleinant
=
45778242
;
public
static
int
Draconnet
=
62706865
;
public
const
int
Draconnet
=
62706865
;
public
static
int
DotScaper
=
18789533
;
public
const
int
DotScaper
=
18789533
;
public
static
int
MindControl
=
37520316
;
public
const
int
MindControl
=
37520316
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
CosmicCyclone
=
8267140
;
public
const
int
CosmicCyclone
=
8267140
;
public
static
int
BookOfMoon
=
14087893
;
public
const
int
BookOfMoon
=
14087893
;
public
static
int
CynetBackdoor
=
43839002
;
public
const
int
CynetBackdoor
=
43839002
;
public
static
int
MoonMirrorShield
=
19508728
;
public
const
int
MoonMirrorShield
=
19508728
;
public
static
int
CynetUniverse
=
61583217
;
public
const
int
CynetUniverse
=
61583217
;
public
static
int
BottomlessTrapHole
=
29401950
;
public
const
int
BottomlessTrapHole
=
29401950
;
public
static
int
MirrorForce
=
44095762
;
public
const
int
MirrorForce
=
44095762
;
public
static
int
TorrentialTribute
=
53582587
;
public
const
int
TorrentialTribute
=
53582587
;
public
static
int
RecodedAlive
=
70238111
;
public
const
int
RecodedAlive
=
70238111
;
public
static
int
DimensionalBarrier
=
83326048
;
public
const
int
DimensionalBarrier
=
83326048
;
public
static
int
CompulsoryEvacuationDevice
=
94192409
;
public
const
int
CompulsoryEvacuationDevice
=
94192409
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
SolemnStrike
=
40605147
;
public
static
int
DecodeTalker
=
1861629
;
public
const
int
DecodeTalker
=
1861629
;
public
static
int
EncodeTalker
=
6622715
;
public
const
int
EncodeTalker
=
6622715
;
public
static
int
TriGateWizard
=
32617464
;
public
const
int
TriGateWizard
=
32617464
;
public
static
int
Honeybot
=
34472920
;
public
const
int
Honeybot
=
34472920
;
public
static
int
BinarySorceress
=
79016563
;
public
const
int
BinarySorceress
=
79016563
;
public
static
int
LinkSpider
=
98978921
;
public
const
int
LinkSpider
=
98978921
;
public
static
int
StagToken
=
70950699
;
public
const
int
StagToken
=
70950699
;
}
}
bool
BalancerLordUsed
=
false
;
bool
BalancerLordUsed
=
false
;
...
@@ -212,7 +212,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -212,7 +212,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MonsterRebornEffect
()
private
bool
MonsterRebornEffect
()
{
{
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
DecodeTalker
,
CardId
.
DecodeTalker
,
CardId
.
EncodeTalker
,
CardId
.
EncodeTalker
,
CardId
.
TriGateWizard
,
CardId
.
TriGateWizard
,
...
@@ -237,8 +237,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -237,8 +237,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MoonMirrorShieldEffect
()
private
bool
MoonMirrorShieldEffect
()
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
AI
.
SelectCard
(
monster
);
AI
.
SelectCard
(
monster
);
return
true
;
return
true
;
...
@@ -250,8 +249,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -250,8 +249,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
if
(
Card
.
Location
==
CardLocation
.
Hand
)
return
DefaultField
();
return
DefaultField
();
IList
<
ClientCard
>
cards
=
Enemy
.
Graveyard
;
foreach
(
ClientCard
card
in
Enemy
.
Graveyard
)
foreach
(
ClientCard
card
in
cards
)
{
{
if
(
card
.
IsMonster
())
if
(
card
.
IsMonster
())
{
{
...
@@ -269,16 +267,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -269,16 +267,10 @@ namespace WindBot.Game.AI.Decks
{
{
return
false
;
return
false
;
}
}
foreach
(
ClientCard
card
in
Bot
.
SpellZone
)
if
(!
UniqueFaceupSpell
())
{
return
false
;
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
&&
card
.
HasPosition
(
CardPosition
.
FaceUp
))
return
false
;
}
bool
selected
=
false
;
bool
selected
=
false
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonstersInExtraZone
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonstersInExtraZone
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Attack
>
1000
)
if
(
monster
.
Attack
>
1000
)
{
{
...
@@ -289,7 +281,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -289,7 +281,7 @@ namespace WindBot.Game.AI.Decks
}
}
if
(!
selected
)
if
(!
selected
)
{
{
monsters
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Id
==
CardId
.
BalancerLord
)
if
(
monster
.
Id
==
CardId
.
BalancerLord
)
...
@@ -336,7 +328,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -336,7 +328,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Card
.
Location
==
CardLocation
.
Removed
)
if
(
Card
.
Location
==
CardLocation
.
Removed
)
return
true
;
return
true
;
bool
hastarget
=
Bot
.
HasInHand
(
new
List
<
int
>
{
bool
hastarget
=
Bot
.
HasInHand
(
new
[]
{
CardId
.
Draconnet
,
CardId
.
Draconnet
,
CardId
.
Kleinant
,
CardId
.
Kleinant
,
CardId
.
BalancerLord
,
CardId
.
BalancerLord
,
...
@@ -354,7 +346,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -354,7 +346,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ROMCloudiaSummon
()
private
bool
ROMCloudiaSummon
()
{
{
return
Bot
.
HasInGraveyard
(
new
List
<
int
>
{
return
Bot
.
HasInGraveyard
(
new
[]
{
CardId
.
BootStagguard
,
CardId
.
BootStagguard
,
CardId
.
BalancerLord
,
CardId
.
BalancerLord
,
CardId
.
Kleinant
,
CardId
.
Kleinant
,
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
36a817aa
...
@@ -11,37 +11,35 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,37 +11,35 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
CryomancerOfTheIceBarrier
=
23950192
;
public
const
int
CryomancerOfTheIceBarrier
=
23950192
;
public
static
int
DewdarkOfTheIceBarrier
=
90311614
;
public
const
int
DewdarkOfTheIceBarrier
=
90311614
;
public
static
int
SwapFrog
=
9126351
;
public
const
int
SwapFrog
=
9126351
;
public
static
int
PriorOfTheIceBarrier
=
50088247
;
public
const
int
PriorOfTheIceBarrier
=
50088247
;
public
static
int
Ronintoadin
=
1357146
;
public
const
int
Ronintoadin
=
1357146
;
public
static
int
DupeFrog
=
46239604
;
public
const
int
DupeFrog
=
46239604
;
public
static
int
GraydleSlimeJr
=
80250319
;
public
const
int
GraydleSlimeJr
=
80250319
;
public
static
int
GalaxyCyclone
=
5133471
;
public
const
int
GalaxyCyclone
=
5133471
;
public
static
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
static
int
Surface
=
33057951
;
public
const
int
Surface
=
33057951
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
CardDestruction
=
72892473
;
public
const
int
CardDestruction
=
72892473
;
public
static
int
FoolishBurial
=
81439173
;
public
const
int
FoolishBurial
=
81439173
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
MedallionOfTheIceBarrier
=
84206435
;
public
const
int
MedallionOfTheIceBarrier
=
84206435
;
public
static
int
Salvage
=
96947648
;
public
const
int
Salvage
=
96947648
;
public
static
int
AquariumStage
=
29047353
;
public
const
int
AquariumStage
=
29047353
;
public
static
int
HeraldOfTheArcLight
=
79606837
;
public
const
int
HeraldOfTheArcLight
=
79606837
;
public
static
int
ToadallyAwesome
=
90809975
;
public
const
int
ToadallyAwesome
=
90809975
;
public
static
int
SkyCavalryCentaurea
=
36776089
;
public
const
int
SkyCavalryCentaurea
=
36776089
;
public
static
int
DaigustoPhoenix
=
2766877
;
public
const
int
DaigustoPhoenix
=
2766877
;
public
static
int
CatShark
=
84224627
;
public
const
int
CatShark
=
84224627
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BookOfMoon
=
14087893
;
public
const
int
BookOfMoon
=
14087893
;
public
static
int
CallOfTheHaunted
=
97077563
;
public
const
int
CallOfTheHaunted
=
97077563
;
public
static
int
TorrentialTribute
=
53582587
;
public
const
int
TorrentialTribute
=
53582587
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
}
}
public
ToadallyAwesomeExecutor
(
GameAI
ai
,
Duel
duel
)
public
ToadallyAwesomeExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -116,26 +114,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -116,26 +114,21 @@ namespace WindBot.Game.AI.Decks
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
{
if
(
attacker
.
Id
==
CardId
.
SkyCavalryCentaurea
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
())
if
(
attacker
.
Id
==
CardId
.
SkyCavalryCentaurea
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
())
attacker
.
RealPower
=
Duel
.
LifePoints
[
0
]
+
attacker
.
Attack
;
attacker
.
RealPower
=
Duel
.
LifePoints
[
0
]
+
attacker
.
Attack
;
}
}
return
attacker
.
RealPower
>=
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
private
bool
MedallionOfTheIceBarrierEffect
()
private
bool
MedallionOfTheIceBarrierEffect
()
{
{
if
(
Bot
.
HasInHand
(
new
List
<
int
>
if
(
Bot
.
HasInHand
(
new
[]
{
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
CardId
.
DewdarkOfTheIceBarrier
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
CardId
.
DewdarkOfTheIceBarrier
...
@@ -180,7 +173,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -180,7 +173,6 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
private
bool
FoolishBurialEffect
()
private
bool
FoolishBurialEffect
()
{
{
if
(
Bot
.
HasInHand
(
CardId
.
GraydleSlimeJr
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
GraydleSlimeJr
))
if
(
Bot
.
HasInHand
(
CardId
.
GraydleSlimeJr
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
GraydleSlimeJr
))
...
@@ -288,8 +280,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -288,8 +280,7 @@ namespace WindBot.Game.AI.Decks
private
bool
NormalSummon
()
private
bool
NormalSummon
()
{
{
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Level
==
2
)
if
(
monster
.
Level
==
2
)
{
{
...
@@ -315,7 +306,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -315,7 +306,7 @@ namespace WindBot.Game.AI.Decks
{
{
// negate effect, select a cost for it
// negate effect, select a cost for it
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
int
>
suitableCost
=
new
List
<
int
>
{
IList
<
int
>
suitableCost
=
new
[]
{
CardId
.
SwapFrog
,
CardId
.
SwapFrog
,
CardId
.
Ronintoadin
,
CardId
.
Ronintoadin
,
CardId
.
GraydleSlimeJr
,
CardId
.
GraydleSlimeJr
,
...
@@ -330,35 +321,41 @@ namespace WindBot.Game.AI.Decks
...
@@ -330,35 +321,41 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
}
}
bool
haveAquariumStage
=
Bot
.
HasInSpellZone
(
CardId
.
AquariumStage
,
true
);
if
(!
Bot
.
HasInSpellZone
(
CardId
.
AquariumStage
,
true
))
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Id
==
CardId
.
DupeFrog
&&
!
haveAquariumStage
)
foreach
(
ClientCard
monster
in
monsters
)
{
{
AI
.
SelectCard
(
monster
);
if
(
monster
.
Id
==
CardId
.
DupeFrog
)
return
true
;
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
}
}
}
monsters
=
(
List
<
ClientCard
>)
Bot
.
Hand
;
List
<
ClientCard
>
hands
=
Bot
.
Hand
.
GetMonsters
();
bool
HaveTwoGraydleSlimeJrInHand
=
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
GraydleSlimeJr
)
>=
2
;
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
GraydleSlimeJr
)
>=
2
)
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Id
==
CardId
.
GraydleSlimeJr
&&
HaveTwoGraydleSlimeJrInHand
)
foreach
(
ClientCard
monster
in
hands
)
{
{
AI
.
SelectCard
(
monster
);
if
(
monster
.
Id
==
CardId
.
GraydleSlimeJr
)
return
true
;
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
}
}
}
bool
NeedDupeFrogInGrave
=
Bot
.
HasInGraveyard
(
CardId
.
Ronintoadin
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
DupeFrog
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
SwapFrog
);
if
(
Bot
.
HasInGraveyard
(
CardId
.
Ronintoadin
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
DupeFrog
)
&&
!
Bot
.
HasInGraveyard
(
CardId
.
SwapFrog
))
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Id
==
CardId
.
DupeFrog
&&
NeedDupeFrogInGrave
)
foreach
(
ClientCard
monster
in
hands
)
{
{
AI
.
SelectCard
(
monster
);
if
(
monster
.
Id
==
CardId
.
DupeFrog
)
return
true
;
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
}
}
}
foreach
(
ClientCard
monster
in
monster
s
)
foreach
(
ClientCard
monster
in
hand
s
)
{
{
if
(
monster
.
Id
==
CardId
.
Ronintoadin
||
monster
.
Id
==
CardId
.
DupeFrog
)
if
(
monster
.
Id
==
CardId
.
Ronintoadin
||
monster
.
Id
==
CardId
.
DupeFrog
)
{
{
...
@@ -366,7 +363,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -366,7 +363,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
}
}
foreach
(
ClientCard
monster
in
monster
s
)
foreach
(
ClientCard
monster
in
hand
s
)
{
{
AI
.
SelectCard
(
monster
);
AI
.
SelectCard
(
monster
);
return
true
;
return
true
;
...
@@ -425,15 +422,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -425,15 +422,14 @@ namespace WindBot.Game.AI.Decks
private
bool
CatSharkSummon
()
private
bool
CatSharkSummon
()
{
{
bool
should
=
Bot
.
HasInMonstersZone
(
CardId
.
ToadallyAwesome
)
if
(
Bot
.
HasInMonstersZone
(
CardId
.
ToadallyAwesome
)
&&
((
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
((
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
CatShark
,
CardId
.
CatShark
,
CardId
.
SkyCavalryCentaurea
CardId
.
SkyCavalryCentaurea
},
true
,
true
))
},
true
,
true
))
||
!
Bot
.
HasInExtra
(
CardId
.
ToadallyAwesome
));
||
!
Bot
.
HasInExtra
(
CardId
.
ToadallyAwesome
)))
if
(
should
)
{
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
return
true
;
...
@@ -477,8 +473,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -477,8 +473,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SkyCavalryCentaureaSummon
()
private
bool
SkyCavalryCentaureaSummon
()
{
{
int
num
=
0
;
int
num
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
Level
==
2
)
if
(
monster
.
Level
==
2
)
{
{
...
@@ -488,7 +483,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -488,7 +483,7 @@ namespace WindBot.Game.AI.Decks
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
AI
.
Utils
.
GetBestAttack
(
Enemy
)
>
2200
&&
AI
.
Utils
.
GetBestAttack
(
Enemy
)
>
2200
&&
num
<
4
&&
num
<
4
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SkyCavalryCentaurea
CardId
.
SkyCavalryCentaurea
},
true
,
true
);
},
true
,
true
);
...
@@ -500,16 +495,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -500,16 +495,14 @@ namespace WindBot.Game.AI.Decks
{
{
int
attack
=
0
;
int
attack
=
0
;
int
defence
=
0
;
int
defence
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(!
monster
.
IsDefense
())
if
(!
monster
.
IsDefense
())
{
{
attack
+=
monster
.
Attack
;
attack
+=
monster
.
Attack
;
}
}
}
}
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
foreach
(
ClientCard
monster
in
monsters
)
{
{
defence
+=
monster
.
GetDefensePower
();
defence
+=
monster
.
GetDefensePower
();
}
}
...
@@ -527,11 +520,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -527,11 +520,9 @@ namespace WindBot.Game.AI.Decks
private
bool
Repos
()
private
bool
Repos
()
{
{
bool
enemyBetter
=
AI
.
Utils
.
IsAllEnemyBetter
(
true
);
if
(
Card
.
IsFacedown
())
if
(
Card
.
IsFacedown
())
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
AI
.
Utils
.
IsAllEnemyBetter
(
true
)
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
Game/AI/Decks/YosenjuExecutor.cs
View file @
36a817aa
...
@@ -11,40 +11,40 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,40 +11,40 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
YosenjuKama1
=
65247798
;
public
const
int
YosenjuKama1
=
65247798
;
public
static
int
YosenjuKama2
=
92246806
;
public
const
int
YosenjuKama2
=
92246806
;
public
static
int
YosenjuKama3
=
28630501
;
public
const
int
YosenjuKama3
=
28630501
;
public
static
int
YosenjuTsujik
=
25244515
;
public
const
int
YosenjuTsujik
=
25244515
;
public
static
int
HarpiesFeatherDuster
=
18144507
;
public
const
int
HarpiesFeatherDuster
=
18144507
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
CardOfDemise
=
59750328
;
public
const
int
CardOfDemise
=
59750328
;
public
static
int
PotOfDuality
=
98645731
;
public
const
int
PotOfDuality
=
98645731
;
public
static
int
CosmicCyclone
=
8267140
;
public
const
int
CosmicCyclone
=
8267140
;
public
static
int
QuakingMirrorForce
=
40838625
;
public
const
int
QuakingMirrorForce
=
40838625
;
public
static
int
DrowningMirrorForce
=
47475363
;
public
const
int
DrowningMirrorForce
=
47475363
;
public
static
int
StarlightRoad
=
58120309
;
public
const
int
StarlightRoad
=
58120309
;
public
static
int
VanitysEmptiness
=
5851097
;
public
const
int
VanitysEmptiness
=
5851097
;
public
static
int
MacroCosmos
=
30241314
;
public
const
int
MacroCosmos
=
30241314
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
SolemnStrike
=
40605147
;
public
static
int
SolemnWarning
=
84749824
;
public
const
int
SolemnWarning
=
84749824
;
public
static
int
SolemnJudgment
=
41420027
;
public
const
int
SolemnJudgment
=
41420027
;
public
static
int
MagicDrain
=
59344077
;
public
const
int
MagicDrain
=
59344077
;
public
static
int
StardustDragon
=
44508094
;
public
const
int
StardustDragon
=
44508094
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
public
const
int
NumberS39UtopiatheLightning
=
56832966
;
public
static
int
NumberS39UtopiaOne
=
86532744
;
public
const
int
NumberS39UtopiaOne
=
86532744
;
public
static
int
DarkRebellionXyzDragon
=
16195942
;
public
const
int
DarkRebellionXyzDragon
=
16195942
;
public
static
int
Number39Utopia
=
84013237
;
public
const
int
Number39Utopia
=
84013237
;
public
static
int
Number103Ragnazero
=
94380860
;
public
const
int
Number103Ragnazero
=
94380860
;
public
static
int
BrotherhoodOfTheFireFistTigerKing
=
96381979
;
public
const
int
BrotherhoodOfTheFireFistTigerKing
=
96381979
;
public
static
int
Number106GiantHand
=
63746411
;
public
const
int
Number106GiantHand
=
63746411
;
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
const
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
static
int
DiamondDireWolf
=
95169481
;
public
const
int
DiamondDireWolf
=
95169481
;
public
static
int
LightningChidori
=
22653490
;
public
const
int
LightningChidori
=
22653490
;
public
static
int
EvilswarmExcitonKnight
=
46772449
;
public
const
int
EvilswarmExcitonKnight
=
46772449
;
public
static
int
AbyssDweller
=
21044178
;
public
const
int
AbyssDweller
=
21044178
;
public
static
int
GagagaCowboy
=
12014404
;
public
const
int
GagagaCowboy
=
12014404
;
}
}
bool
CardOfDemiseUsed
=
false
;
bool
CardOfDemiseUsed
=
false
;
...
@@ -171,19 +171,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -171,19 +171,12 @@ namespace WindBot.Game.AI.Decks
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
{
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Wind
&&
Bot
.
HasInHand
(
CardId
.
YosenjuTsujik
))
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Wind
&&
Bot
.
HasInHand
(
CardId
.
YosenjuTsujik
))
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
if
(
attacker
.
Id
==
CardId
.
NumberS39UtopiatheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
private
bool
PotOfDualityEffect
()
private
bool
PotOfDualityEffect
()
...
@@ -240,9 +233,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -240,9 +233,9 @@ namespace WindBot.Game.AI.Decks
private
bool
HaveAnotherYosenjuWithSameNameInHand
()
private
bool
HaveAnotherYosenjuWithSameNameInHand
()
{
{
foreach
(
ClientCard
card
in
Bot
.
Hand
)
foreach
(
ClientCard
card
in
Bot
.
Hand
.
GetMonsters
()
)
{
{
if
(
card
!=
null
&&
!
card
.
Equals
(
Card
)
&&
card
.
Id
==
Card
.
Id
)
if
(!
card
.
Equals
(
Card
)
&&
card
.
Id
==
Card
.
Id
)
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -250,9 +243,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -250,9 +243,9 @@ namespace WindBot.Game.AI.Decks
private
bool
TrapSetUnique
()
private
bool
TrapSetUnique
()
{
{
foreach
(
ClientCard
card
in
Bot
.
SpellZone
)
foreach
(
ClientCard
card
in
Bot
.
GetSpells
()
)
{
{
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
)
if
(
card
.
Id
==
Card
.
Id
)
return
false
;
return
false
;
}
}
return
TrapSetWhenZoneFree
();
return
TrapSetWhenZoneFree
();
...
@@ -315,12 +308,5 @@ namespace WindBot.Game.AI.Decks
...
@@ -315,12 +308,5 @@ namespace WindBot.Game.AI.Decks
}
}
return
true
;
return
true
;
}
}
private
bool
NumberS39UtopiatheLightningSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
selfBestAttack
<=
oppoBestAttack
;
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/ZexalWeaponsExecutor.cs
View file @
36a817aa
...
@@ -11,42 +11,42 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,42 +11,42 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
CyberDragon
=
70095155
;
public
const
int
CyberDragon
=
70095155
;
public
static
int
ZwTornadoBringer
=
81471108
;
public
const
int
ZwTornadoBringer
=
81471108
;
public
static
int
ZwLightningBlade
=
45082499
;
public
const
int
ZwLightningBlade
=
45082499
;
public
static
int
ZwAsuraStrike
=
40941889
;
public
const
int
ZwAsuraStrike
=
40941889
;
public
static
int
SolarWindJammer
=
33911264
;
public
const
int
SolarWindJammer
=
33911264
;
public
static
int
PhotonTrasher
=
65367484
;
public
const
int
PhotonTrasher
=
65367484
;
public
static
int
StarDrawing
=
24610207
;
public
const
int
StarDrawing
=
24610207
;
public
static
int
SacredCrane
=
30914564
;
public
const
int
SacredCrane
=
30914564
;
public
static
int
Goblindbergh
=
25259669
;
public
const
int
Goblindbergh
=
25259669
;
public
static
int
Honest
=
37742478
;
public
const
int
Honest
=
37742478
;
public
static
int
Kagetokage
=
94656263
;
public
const
int
Kagetokage
=
94656263
;
public
static
int
HeroicChallengerExtraSword
=
34143852
;
public
const
int
HeroicChallengerExtraSword
=
34143852
;
public
static
int
TinGoldfish
=
18063928
;
public
const
int
TinGoldfish
=
18063928
;
public
static
int
SummonerMonk
=
423585
;
public
const
int
SummonerMonk
=
423585
;
public
static
int
InstantFusion
=
1845204
;
public
const
int
InstantFusion
=
1845204
;
public
static
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
static
int
ReinforcementOfTheArmy
=
32807846
;
public
const
int
ReinforcementOfTheArmy
=
32807846
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
static
int
BreakthroughSkill
=
78474168
;
public
const
int
BreakthroughSkill
=
78474168
;
public
static
int
SolemnWarning
=
84749824
;
public
const
int
SolemnWarning
=
84749824
;
public
static
int
SolemnStrike
=
40605147
;
public
const
int
SolemnStrike
=
40605147
;
public
static
int
XyzChangeTactics
=
11705261
;
public
const
int
XyzChangeTactics
=
11705261
;
public
static
int
FlameSwordsman
=
45231177
;
public
const
int
FlameSwordsman
=
45231177
;
public
static
int
DarkfireDragon
=
17881964
;
public
const
int
DarkfireDragon
=
17881964
;
public
static
int
GaiaDragonTheThunderCharger
=
91949988
;
public
const
int
GaiaDragonTheThunderCharger
=
91949988
;
public
static
int
ZwLionArms
=
60992364
;
public
const
int
ZwLionArms
=
60992364
;
public
static
int
AdreusKeeperOfArmageddon
=
94119480
;
public
const
int
AdreusKeeperOfArmageddon
=
94119480
;
public
static
int
Number61Volcasaurus
=
29669359
;
public
const
int
Number61Volcasaurus
=
29669359
;
public
static
int
GemKnightPearl
=
71594310
;
public
const
int
GemKnightPearl
=
71594310
;
public
static
int
Number39Utopia
=
84013237
;
public
const
int
Number39Utopia
=
84013237
;
public
static
int
NumberS39UtopiaOne
=
86532744
;
public
const
int
NumberS39UtopiaOne
=
86532744
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
public
const
int
NumberS39UtopiatheLightning
=
56832966
;
public
static
int
MaestrokeTheSymphonyDjinn
=
25341652
;
public
const
int
MaestrokeTheSymphonyDjinn
=
25341652
;
public
static
int
GagagaCowboy
=
12014404
;
public
const
int
GagagaCowboy
=
12014404
;
}
}
public
ZexalWeaponsExecutor
(
GameAI
ai
,
Duel
duel
)
public
ZexalWeaponsExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -128,19 +128,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -128,19 +128,12 @@ namespace WindBot.Game.AI.Decks
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
{
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Light
&&
Bot
.
HasInHand
(
CardId
.
Honest
))
if
(
attacker
.
Attribute
==
(
int
)
CardAttribute
.
Light
&&
Bot
.
HasInHand
(
CardId
.
Honest
))
attacker
.
RealPower
=
attacker
.
RealPower
+
defender
.
Attack
;
attacker
.
RealPower
=
attacker
.
RealPower
+
defender
.
Attack
;
if
(
attacker
.
Id
==
CardId
.
NumberS39UtopiatheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
private
bool
Number39Utopia
()
private
bool
Number39Utopia
()
...
@@ -181,10 +174,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -181,10 +174,9 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Duel
.
LifePoints
[
0
]
<=
1000
)
if
(
Duel
.
LifePoints
[
0
]
<=
1000
)
return
false
;
return
false
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
int
count4
=
0
;
int
count4
=
0
;
int
count5
=
0
;
int
count5
=
0
;
foreach
(
ClientCard
card
in
monsters
)
foreach
(
ClientCard
card
in
Bot
.
GetMonsters
()
)
{
{
if
(
card
.
Level
==
5
)
if
(
card
.
Level
==
5
)
++
count5
;
++
count5
;
...
@@ -221,10 +213,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -221,10 +213,9 @@ namespace WindBot.Game.AI.Decks
private
bool
GoblindberghFirst
()
private
bool
GoblindberghFirst
()
{
{
IList
<
ClientCard
>
hand
=
Bot
.
Hand
;
foreach
(
ClientCard
card
in
Bot
.
Hand
.
GetMonsters
())
foreach
(
ClientCard
card
in
hand
)
{
{
if
(
card
!=
Card
&&
card
.
IsMonster
(
)
&&
card
.
Level
==
4
)
if
(
!
card
.
Equals
(
Card
)
&&
card
.
Level
==
4
)
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -244,30 +235,32 @@ namespace WindBot.Game.AI.Decks
...
@@ -244,30 +235,32 @@ namespace WindBot.Game.AI.Decks
private
bool
SummonerMonkEffect
()
private
bool
SummonerMonkEffect
()
{
{
if
(
Bot
.
HasInHand
(
CardId
.
InstantFusion
)
||
IList
<
int
>
costs
=
new
[]
Bot
.
HasInHand
(
CardId
.
MysticalSpaceTyphoon
))
{
CardId
.
XyzChangeTactics
,
CardId
.
DarkHole
,
CardId
.
MysticalSpaceTyphoon
,
CardId
.
InstantFusion
};
if
(
Bot
.
HasInHand
(
costs
))
{
{
AI
.
SelectCard
(
new
[]
AI
.
SelectCard
(
costs
);
AI
.
SelectNextCard
(
new
[]
{
{
CardId
.
InstantFusion
,
CardId
.
SacredCrane
,
CardId
.
MysticalSpaceTyphoon
CardId
.
StarDrawing
,
CardId
.
Goblindbergh
,
CardId
.
TinGoldfish
});
});
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
return
true
;
}
}
AI
.
SelectNextCard
(
new
[]
{
CardId
.
Goblindbergh
,
CardId
.
TinGoldfish
,
CardId
.
StarDrawing
,
CardId
.
Kagetokage
,
CardId
.
SacredCrane
});
return
false
;
return
false
;
}
}
private
bool
SolarWindJammer
()
private
bool
SolarWindJammer
()
{
{
if
(!
Bot
.
HasInHand
(
new
List
<
int
>
{
if
(!
Bot
.
HasInHand
(
new
[]
{
CardId
.
StarDrawing
,
CardId
.
StarDrawing
,
CardId
.
InstantFusion
CardId
.
InstantFusion
}))
}))
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
36a817aa
...
@@ -11,37 +11,37 @@ namespace WindBot.Game.AI.Decks
...
@@ -11,37 +11,37 @@ namespace WindBot.Game.AI.Decks
{
{
public
class
CardId
public
class
CardId
{
{
public
static
int
JizukirutheStarDestroyingKaiju
=
63941210
;
public
const
int
JizukirutheStarDestroyingKaiju
=
63941210
;
public
static
int
GadarlatheMysteryDustKaiju
=
36956512
;
public
const
int
GadarlatheMysteryDustKaiju
=
36956512
;
public
static
int
GamecieltheSeaTurtleKaiju
=
55063751
;
public
const
int
GamecieltheSeaTurtleKaiju
=
55063751
;
public
static
int
RadiantheMultidimensionalKaiju
=
28674152
;
public
const
int
RadiantheMultidimensionalKaiju
=
28674152
;
public
static
int
KumongoustheStickyStringKaiju
=
29726552
;
public
const
int
KumongoustheStickyStringKaiju
=
29726552
;
public
static
int
PhotonThrasher
=
65367484
;
public
const
int
PhotonThrasher
=
65367484
;
public
static
int
Thoroughblade
=
77150143
;
public
const
int
Thoroughblade
=
77150143
;
public
static
int
Whiptail
=
31755044
;
public
const
int
Whiptail
=
31755044
;
public
static
int
Ratpier
=
78872731
;
public
const
int
Ratpier
=
78872731
;
public
static
int
AleisterTheInvoker
=
86120751
;
public
const
int
AleisterTheInvoker
=
86120751
;
public
static
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
static
int
DarkHole
=
53129443
;
public
const
int
DarkHole
=
53129443
;
public
static
int
Terraforming
=
73628505
;
public
const
int
Terraforming
=
73628505
;
public
static
int
Invocation
=
74063034
;
public
const
int
Invocation
=
74063034
;
public
static
int
MonsterReborn
=
83764718
;
public
const
int
MonsterReborn
=
83764718
;
public
static
int
InterruptedKaijuSlumber
=
99330325
;
public
const
int
InterruptedKaijuSlumber
=
99330325
;
public
static
int
ZoodiacBarrage
=
46060017
;
public
const
int
ZoodiacBarrage
=
46060017
;
public
static
int
FireFormationTenki
=
57103969
;
public
const
int
FireFormationTenki
=
57103969
;
public
static
int
MagicalMeltdown
=
47679935
;
public
const
int
MagicalMeltdown
=
47679935
;
public
static
int
ZoodiacCombo
=
73881652
;
public
const
int
ZoodiacCombo
=
73881652
;
public
static
int
InvokedMechaba
=
75286621
;
public
const
int
InvokedMechaba
=
75286621
;
public
static
int
InvokedMagellanica
=
48791583
;
public
const
int
InvokedMagellanica
=
48791583
;
public
static
int
NumberS39UtopiatheLightning
=
56832966
;
public
const
int
NumberS39UtopiatheLightning
=
56832966
;
public
static
int
Number39Utopia
=
84013237
;
public
const
int
Number39Utopia
=
84013237
;
public
static
int
DaigustoEmeral
=
581014
;
public
const
int
DaigustoEmeral
=
581014
;
public
static
int
Tigermortar
=
11510448
;
public
const
int
Tigermortar
=
11510448
;
public
static
int
Chakanine
=
41375811
;
public
const
int
Chakanine
=
41375811
;
public
static
int
Drident
=
48905153
;
public
const
int
Drident
=
48905153
;
public
static
int
Broadbull
=
85115440
;
public
const
int
Broadbull
=
85115440
;
}
}
bool
TigermortarSpsummoned
=
false
;
bool
TigermortarSpsummoned
=
false
;
...
@@ -133,19 +133,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -133,19 +133,12 @@ namespace WindBot.Game.AI.Decks
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincib
le
())
if
(
!
defender
.
IsMonsterHasPreventActivationEffectInBatt
le
())
{
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
if
(
attacker
.
HasType
(
CardType
.
Fusion
)
&&
Bot
.
HasInHand
(
CardId
.
AleisterTheInvoker
))
return
false
;
attacker
.
RealPower
=
attacker
.
RealPower
+
1000
;
}
if
(!(
defender
.
Id
==
CardId
.
NumberS39UtopiatheLightning
))
{
//if (attacker.HasType(CardType.Fusion) && Bot.HasInHand(CardId.AleisterTheInvoker))
// attacker.RealPower = attacker.RealPower + 1000;
if
(
attacker
.
Id
==
CardId
.
NumberS39UtopiatheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
}
return
attacker
.
RealPower
>
defender
.
GetDefensePower
(
);
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
}
private
bool
PhotonThrasherSummon
()
private
bool
PhotonThrasherSummon
()
...
@@ -229,9 +222,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -229,9 +222,7 @@ namespace WindBot.Game.AI.Decks
private
void
SelectAleisterInGrave
()
private
void
SelectAleisterInGrave
()
{
{
IList
<
ClientCard
>
materials0
=
Bot
.
Graveyard
;
foreach
(
ClientCard
card
in
Enemy
.
Graveyard
)
IList
<
ClientCard
>
materials1
=
Enemy
.
Graveyard
;
foreach
(
ClientCard
card
in
materials1
)
{
{
if
(
card
.
Id
==
CardId
.
AleisterTheInvoker
)
if
(
card
.
Id
==
CardId
.
AleisterTheInvoker
)
{
{
...
@@ -239,7 +230,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -239,7 +230,7 @@ namespace WindBot.Game.AI.Decks
return
;
return
;
}
}
}
}
foreach
(
ClientCard
card
in
materials0
)
foreach
(
ClientCard
card
in
Bot
.
Graveyard
)
{
{
if
(
card
.
Id
==
CardId
.
AleisterTheInvoker
)
if
(
card
.
Id
==
CardId
.
AleisterTheInvoker
)
{
{
...
@@ -313,7 +304,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -313,7 +304,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Thoroughblade
)
&&
!
TigermortarSpsummoned
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Thoroughblade
)
&&
!
TigermortarSpsummoned
&&
Bot
.
HasInGraveyard
(
new
List
<
int
>
&&
Bot
.
HasInGraveyard
(
new
[]
{
{
CardId
.
Whiptail
,
CardId
.
Whiptail
,
CardId
.
Ratpier
CardId
.
Ratpier
...
@@ -548,8 +539,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -548,8 +539,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ZoodiacBarrageEffect
()
private
bool
ZoodiacBarrageEffect
()
{
{
IList
<
ClientCard
>
spells
=
Bot
.
GetSpells
();
foreach
(
ClientCard
spell
in
Bot
.
GetSpells
())
foreach
(
ClientCard
spell
in
spells
)
{
{
if
(
spell
.
Id
==
CardId
.
ZoodiacBarrage
&&
!
Card
.
Equals
(
spell
))
if
(
spell
.
Id
==
CardId
.
ZoodiacBarrage
&&
!
Card
.
Equals
(
spell
))
return
false
;
return
false
;
...
...
Game/AI/DefaultExecutor.cs
View file @
36a817aa
...
@@ -11,20 +11,28 @@ namespace WindBot.Game.AI
...
@@ -11,20 +11,28 @@ namespace WindBot.Game.AI
{
{
protected
class
_CardId
protected
class
_CardId
{
{
public
static
int
JizukirutheStarDestroyingKaiju
=
63941210
;
public
const
int
JizukirutheStarDestroyingKaiju
=
63941210
;
public
static
int
GadarlatheMysteryDustKaiju
=
36956512
;
public
const
int
GadarlatheMysteryDustKaiju
=
36956512
;
public
static
int
GamecieltheSeaTurtleKaiju
=
55063751
;
public
const
int
GamecieltheSeaTurtleKaiju
=
55063751
;
public
static
int
RadiantheMultidimensionalKaiju
=
28674152
;
public
const
int
RadiantheMultidimensionalKaiju
=
28674152
;
public
static
int
KumongoustheStickyStringKaiju
=
29726552
;
public
const
int
KumongoustheStickyStringKaiju
=
29726552
;
public
static
int
ThunderKingtheLightningstrikeKaiju
=
48770333
;
public
const
int
ThunderKingtheLightningstrikeKaiju
=
48770333
;
public
static
int
DogorantheMadFlameKaiju
=
93332803
;
public
const
int
DogorantheMadFlameKaiju
=
93332803
;
public
static
int
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
;
public
const
int
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
;
public
static
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
DupeFrog
=
46239604
;
public
static
int
CosmicCyclone
=
8267140
;
public
const
int
MaraudingCaptain
=
2460565
;
public
static
int
ChickenGame
=
67616300
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
CosmicCyclone
=
8267140
;
public
const
int
ChickenGame
=
67616300
;
public
const
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
const
int
CrystalWingSynchroDragon
=
50954680
;
public
const
int
NumberS39UtopiaTheLightning
=
56832966
;
public
const
int
Number39Utopia
=
84013237
;
public
const
int
UltimayaTzolkin
=
1686814
;
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
}
}
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -33,6 +41,55 @@ namespace WindBot.Game.AI
...
@@ -33,6 +41,55 @@ namespace WindBot.Game.AI
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
ChickenGame
,
DefaultChickenGame
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
ChickenGame
,
DefaultChickenGame
);
}
}
/// <summary>
/// Decide whether to declare attack between attacker and defender.
/// Can be overrided to update the RealPower of attacker for cards like Honest.
/// </summary>
/// <param name="attacker">Card that attack.</param>
/// <param name="defender">Card that defend.</param>
/// <returns>false if the attack can't be done.</returns>
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
attacker
.
RealPower
<=
0
)
return
false
;
if
(!
attacker
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonsterDangerous
()
||
(
defender
.
IsMonsterInvincible
()
&&
defender
.
IsDefense
()))
return
false
;
if
(
defender
.
Id
==
_CardId
.
CrystalWingSynchroDragon
&&
!
defender
.
IsDisabled
()
&&
attacker
.
Level
>=
5
)
return
false
;
if
(
defender
.
Id
==
_CardId
.
NumberS39UtopiaTheLightning
&&
!
defender
.
IsDisabled
()
&&
defender
.
HasXyzMaterial
(
2
,
_CardId
.
Number39Utopia
))
defender
.
RealPower
=
5000
;
}
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
attacker
.
Id
==
_CardId
.
NumberS39UtopiaTheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
_CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
if
(
Enemy
.
HasInMonstersZone
(
_CardId
.
DupeFrog
,
true
)
&&
defender
.
Id
!=
_CardId
.
DupeFrog
)
return
false
;
if
(
Enemy
.
HasInMonstersZone
(
_CardId
.
MaraudingCaptain
,
true
)
&&
defender
.
Id
!=
_CardId
.
MaraudingCaptain
&&
defender
.
Race
==
(
int
)
CardRace
.
Warrior
)
return
false
;
if
(
defender
.
Id
==
_CardId
.
UltimayaTzolkin
&&
!
defender
.
IsDisabled
())
{
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
HasType
(
CardType
.
Synchro
))
return
false
;
}
}
return
true
;
}
/// <summary>
/// <summary>
/// Destroy face-down cards first, in our turn.
/// Destroy face-down cards first, in our turn.
/// </summary>
/// </summary>
...
@@ -297,13 +354,8 @@ namespace WindBot.Game.AI
...
@@ -297,13 +354,8 @@ namespace WindBot.Game.AI
/// </summary>
/// </summary>
protected
bool
DefaultTributeSummon
()
protected
bool
DefaultTributeSummon
()
{
{
foreach
(
ClientCard
card
in
Bot
.
MonsterZone
)
if
(!
UniqueFaceupMonster
())
{
return
false
;
if
(
card
!=
null
&&
card
.
Id
==
Card
.
Id
&&
card
.
HasPosition
(
CardPosition
.
FaceUp
))
return
false
;
}
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
for
(
int
j
=
0
;
j
<
7
;
++
j
)
for
(
int
j
=
0
;
j
<
7
;
++
j
)
{
{
...
@@ -353,14 +405,32 @@ namespace WindBot.Game.AI
...
@@ -353,14 +405,32 @@ namespace WindBot.Game.AI
if
(
HasChainedTrap
(
0
))
if
(
HasChainedTrap
(
0
))
return
false
;
return
false
;
foreach
(
ClientCard
card
in
Bot
.
SpellZone
)
return
UniqueFaceupSpell
();
}
/// <summary>
/// Check no other our spell or trap card with same name face-up.
/// </summary>
protected
bool
UniqueFaceupSpell
()
{
foreach
(
ClientCard
card
in
Bot
.
GetSpells
())
{
{
if
(
card
!=
null
&&
if
(
card
.
Id
==
Card
.
Id
&&
card
.
IsFaceup
())
card
.
Id
==
Card
.
Id
&&
card
.
HasPosition
(
CardPosition
.
FaceUp
))
return
false
;
return
false
;
}
}
return
true
;
}
/// <summary>
/// Check no other our monster card with same name face-up.
/// </summary>
protected
bool
UniqueFaceupMonster
()
{
foreach
(
ClientCard
card
in
Bot
.
GetMonsters
())
{
if
(
card
.
Id
==
Card
.
Id
&&
card
.
IsFaceup
())
return
false
;
}
return
true
;
return
true
;
}
}
...
...
Game/AI/Enums/DangerousMonster.cs
View file @
36a817aa
...
@@ -9,6 +9,11 @@
...
@@ -9,6 +9,11 @@
Yubel
=
78371393
,
Yubel
=
78371393
,
YubelIncarnate
=
4779091
,
YubelIncarnate
=
4779091
,
YubelNightmare
=
31764700
,
YubelNightmare
=
31764700
,
MetaionTheTimelord
=
74530899
ZaphionTheTimelord
=
28929131
,
SadionTheTimelord
=
65314286
,
MetaionTheTimelord
=
74530899
,
KamionTheTimelord
=
91712985
,
LazionTheTimelord
=
92435533
,
EaterOfMillions
=
63845230
}
}
}
}
Game/AI/Enums/PreventActivationEffectInBattle.cs
0 → 100644
View file @
36a817aa
namespace
WindBot.Game.AI.Enums
{
public
enum
PreventActivationEffectInBattle
{
Deskbot009
=
25494711
,
ArchfiendBlackSkullDragon
=
45349196
,
FrightfurChimera
=
83866861
,
GladiatorBeastNerokius
=
29357956
,
GemKnightCitrine
=
67985943
,
FrightfurSheep
=
57477163
,
ArmadesKeeperOfBoundaries
=
88033975
,
NumberS39UtopiaTheLightning
=
56832966
,
}
}
Game/AI/Executor.cs
View file @
36a817aa
...
@@ -62,50 +62,48 @@ namespace WindBot.Game.AI
...
@@ -62,50 +62,48 @@ namespace WindBot.Game.AI
return
AI
.
ToMainPhase2
();
return
AI
.
ToMainPhase2
();
if
(
defenders
.
Count
==
0
)
if
(
defenders
.
Count
==
0
)
return
AI
.
Attack
(
attackers
[
0
],
null
);
for
(
int
i
=
defenders
.
Count
-
1
;
i
>=
0
;
--
i
)
{
{
ClientCard
defender
=
defenders
[
i
];
for
(
int
i
=
attackers
.
Count
-
1
;
i
>=
0
;
--
i
)
int
def
=
defender
.
GetDefensePower
();
for
(
int
j
=
0
;
j
<
attackers
.
Count
;
++
j
)
{
{
ClientCard
attacker
=
attackers
[
j
];
ClientCard
attacker
=
attackers
[
i
];
attacker
.
RealPower
=
attacker
.
Attack
;
if
(
attacker
.
Attack
>
0
)
if
(!
OnPreBattleBetween
(
attacker
,
defender
))
return
AI
.
Attack
(
attacker
,
null
);
continue
;
if
(
attacker
.
RealPower
>
def
||
(
attacker
.
RealPower
>=
def
&&
j
==
attackers
.
Count
-
1
))
return
AI
.
Attack
(
attacker
,
defender
);
}
}
}
}
else
for
(
int
i
=
attackers
.
Count
-
1
;
i
>=
0
;
--
i
)
{
{
ClientCard
attacker
=
attackers
[
i
];
for
(
int
i
=
defenders
.
Count
-
1
;
i
>=
0
;
--
i
)
if
(
attacker
.
CanDirectAttack
)
{
return
AI
.
Attack
(
attacker
,
null
);
ClientCard
defender
=
defenders
[
i
];
for
(
int
j
=
0
;
j
<
attackers
.
Count
;
++
j
)
{
ClientCard
attacker
=
attackers
[
j
];
attacker
.
RealPower
=
attacker
.
Attack
;
defender
.
RealPower
=
defender
.
GetDefensePower
();
if
(!
OnPreBattleBetween
(
attacker
,
defender
))
continue
;
if
(
attacker
.
RealPower
>
defender
.
RealPower
||
(
attacker
.
RealPower
>=
defender
.
RealPower
&&
j
==
attackers
.
Count
-
1
))
return
AI
.
Attack
(
attacker
,
defender
);
}
}
for
(
int
i
=
attackers
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
attacker
=
attackers
[
i
];
if
(
attacker
.
CanDirectAttack
)
return
AI
.
Attack
(
attacker
,
null
);
}
}
}
if
(!
Battle
.
CanMainPhaseTwo
)
if
(!
Battle
.
CanMainPhaseTwo
)
return
AI
.
Attack
(
attackers
[
attackers
.
Count
-
1
],
defenders
[
0
]);
return
AI
.
Attack
(
attackers
[
0
],
(
defenders
.
Count
==
0
)
?
null
:
defenders
[
0
]);
return
AI
.
ToMainPhase2
();
return
AI
.
ToMainPhase2
();
}
}
/// <summary>
/// Decide whether to declare attack between attacker and defender.
/// Can be overrided to update the RealPower of attacker for cards like Honest.
/// </summary>
/// <param name="attacker">Card that attack.</param>
/// <param name="defender">Card that defend.</param>
/// <returns>true if the attack can be done.</returns>
public
virtual
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
virtual
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
{
if
(
defender
.
IsMonsterInvincible
())
// Overrided in DefalultExecutor
{
if
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
())
return
false
;
}
return
true
;
return
true
;
}
}
...
...
Game/ClientField.cs
View file @
36a817aa
...
@@ -99,12 +99,23 @@ namespace WindBot.Game
...
@@ -99,12 +99,23 @@ namespace WindBot.Game
return
cards
;
return
cards
;
}
}
public
List
<
ClientCard
>
GetMonstersInMainZone
()
{
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>();
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
if
(
MonsterZone
[
i
]
!=
null
)
cards
.
Add
(
MonsterZone
[
i
]);
}
return
cards
;
}
public
bool
HasInHand
(
int
cardId
)
public
bool
HasInHand
(
int
cardId
)
{
{
return
HasInCards
(
Hand
,
cardId
);
return
HasInCards
(
Hand
,
cardId
);
}
}
public
bool
HasInHand
(
List
<
int
>
cardId
)
public
bool
HasInHand
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Hand
,
cardId
);
return
HasInCards
(
Hand
,
cardId
);
}
}
...
@@ -114,7 +125,7 @@ namespace WindBot.Game
...
@@ -114,7 +125,7 @@ namespace WindBot.Game
return
HasInCards
(
Graveyard
,
cardId
);
return
HasInCards
(
Graveyard
,
cardId
);
}
}
public
bool
HasInGraveyard
(
List
<
int
>
cardId
)
public
bool
HasInGraveyard
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Graveyard
,
cardId
);
return
HasInCards
(
Graveyard
,
cardId
);
}
}
...
@@ -124,7 +135,7 @@ namespace WindBot.Game
...
@@ -124,7 +135,7 @@ namespace WindBot.Game
return
HasInCards
(
Banished
,
cardId
);
return
HasInCards
(
Banished
,
cardId
);
}
}
public
bool
HasInBanished
(
List
<
int
>
cardId
)
public
bool
HasInBanished
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Banished
,
cardId
);
return
HasInCards
(
Banished
,
cardId
);
}
}
...
@@ -134,7 +145,7 @@ namespace WindBot.Game
...
@@ -134,7 +145,7 @@ namespace WindBot.Game
return
HasInCards
(
ExtraDeck
,
cardId
);
return
HasInCards
(
ExtraDeck
,
cardId
);
}
}
public
bool
HasInExtra
(
List
<
int
>
cardId
)
public
bool
HasInExtra
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
ExtraDeck
,
cardId
);
return
HasInCards
(
ExtraDeck
,
cardId
);
}
}
...
@@ -166,7 +177,7 @@ namespace WindBot.Game
...
@@ -166,7 +177,7 @@ namespace WindBot.Game
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
}
}
public
bool
HasInMonstersZone
(
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
public
bool
HasInMonstersZone
(
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
{
{
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
}
}
...
@@ -176,7 +187,7 @@ namespace WindBot.Game
...
@@ -176,7 +187,7 @@ namespace WindBot.Game
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
}
}
public
bool
HasInSpellZone
(
List
<
int
>
cardId
,
bool
notDisabled
=
false
)
public
bool
HasInSpellZone
(
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
)
{
{
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
}
}
...
@@ -264,7 +275,7 @@ namespace WindBot.Game
...
@@ -264,7 +275,7 @@ namespace WindBot.Game
return
false
;
return
false
;
}
}
private
static
bool
HasInCards
(
IEnumerable
<
ClientCard
>
cards
,
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
private
static
bool
HasInCards
(
IEnumerable
<
ClientCard
>
cards
,
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
{
{
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
...
...
Game/GameAI.cs
View file @
36a817aa
...
@@ -522,7 +522,7 @@ namespace WindBot.Game
...
@@ -522,7 +522,7 @@ namespace WindBot.Game
public
bool
OnSelectYesNo
(
int
desc
)
public
bool
OnSelectYesNo
(
int
desc
)
{
{
if
(
m_yesno
!=
-
1
)
if
(
m_yesno
!=
-
1
)
return
m_yesno
>
0
;
return
m_yesno
>
0
;
return
Executor
.
OnSelectYesNo
(
desc
);
return
Executor
.
OnSelectYesNo
(
desc
);
}
}
...
@@ -691,7 +691,7 @@ namespace WindBot.Game
...
@@ -691,7 +691,7 @@ namespace WindBot.Game
public
void
SelectYesNo
(
bool
opt
)
public
void
SelectYesNo
(
bool
opt
)
{
{
m_yesno
=
opt
?
1
:
0
;
m_yesno
=
opt
?
1
:
0
;
}
}
/// <summary>
/// <summary>
...
...
Game/GameBehavior.cs
View file @
36a817aa
...
@@ -351,7 +351,6 @@ namespace WindBot.Game
...
@@ -351,7 +351,6 @@ namespace WindBot.Game
private
void
OnTagSwap
(
BinaryReader
packet
)
private
void
OnTagSwap
(
BinaryReader
packet
)
{
{
int
player
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
player
=
GetLocalPlayer
(
packet
.
ReadByte
());
//Logger.DebugWriteLine("swap " + player);
int
mcount
=
packet
.
ReadByte
();
int
mcount
=
packet
.
ReadByte
();
int
ecount
=
packet
.
ReadByte
();
int
ecount
=
packet
.
ReadByte
();
/*int pcount = */
packet
.
ReadByte
();
/*int pcount = */
packet
.
ReadByte
();
...
@@ -768,7 +767,7 @@ namespace WindBot.Game
...
@@ -768,7 +767,7 @@ namespace WindBot.Game
}
}
IList
<
int
>
used
=
_ai
.
OnSelectCounter
(
type
,
quantity
,
cards
,
counters
);
IList
<
int
>
used
=
_ai
.
OnSelectCounter
(
type
,
quantity
,
cards
,
counters
);
byte
[]
result
=
new
byte
[
used
.
Count
*
2
];
byte
[]
result
=
new
byte
[
used
.
Count
*
2
];
for
(
int
i
=
0
;
i
<
used
.
Count
;
++
i
)
for
(
int
i
=
0
;
i
<
used
.
Count
;
++
i
)
{
{
result
[
i
*
2
]
=
(
byte
)(
used
[
i
]
&
0xff
);
result
[
i
*
2
]
=
(
byte
)(
used
[
i
]
&
0xff
);
...
...
LICENSE
0 → 100644
View file @
36a817aa
The MIT License (MIT)
Copyright (c) 2015-2017 IceYGO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Properties/AssemblyInfo.cs
View file @
36a817aa
...
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
...
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
// associated with an assembly.
[
assembly
:
AssemblyTitle
(
"WindBot"
)]
[
assembly
:
AssemblyTitle
(
"WindBot"
)]
[
assembly
:
AssemblyDescription
(
"A C# bot for
ygopro, compatible with ygosharp
."
)]
[
assembly
:
AssemblyDescription
(
"A C# bot for
YGOPro
."
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
"Ice"
)]
[
assembly
:
AssemblyCompany
(
"Ice
YGO
"
)]
[
assembly
:
AssemblyProduct
(
"WindBot"
)]
[
assembly
:
AssemblyProduct
(
"WindBot"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © Ice
2015
"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © Ice
YGO 2015-2017
"
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
...
...
README.md
View file @
36a817aa
# WindBot
# WindBot
A C# bot for
ygop
ro, compatible with the
[
YGOSharp
](
https://github.com/IceYGO/ygosharp
)
and
[
SRVPro
](
https://github.com/moecube/srvpro
)
server.
A C# bot for
YGOP
ro, compatible with the
[
YGOSharp
](
https://github.com/IceYGO/ygosharp
)
and
[
SRVPro
](
https://github.com/moecube/srvpro
)
server.
### How to use:
### How to use:
...
@@ -107,8 +107,6 @@ The parameters are same as commandlines, but low cased.
...
@@ -107,8 +107,6 @@ The parameters are same as commandlines, but low cased.
### Known issues
### Known issues
*
The bot will attack synchro monsters next to _Ultimaya Tzolkin_ because it don't know _Ultimaya Tzolkin_ can't be attacked.
*
The attack won't be canceled when battle replay happens.
*
The attack won't be canceled when battle replay happens.
*
If one chain includes two activation that use
`AI.SelectCard`
, the second one won't select correctly.
*
If one chain includes two activation that use
`AI.SelectCard`
, the second one won't select correctly.
...
@@ -125,6 +123,12 @@ The parameters are same as commandlines, but low cased.
...
@@ -125,6 +123,12 @@ The parameters are same as commandlines, but low cased.
*
`AI.SelectTribute`
*
`AI.SelectTribute`
*
Select cards to pendulum summon in executor.
*
Get equip of card.
*
Get attack target.
*
Better new master rule support
*
Better new master rule support
*
Update the known card enums
*
Update the known card enums
...
...
WindBot.csproj
View file @
36a817aa
...
@@ -111,6 +111,7 @@
...
@@ -111,6 +111,7 @@
<Compile
Include=
"Game\AI\Dialogs.cs"
/>
<Compile
Include=
"Game\AI\Dialogs.cs"
/>
<Compile
Include=
"Game\AI\Enums\DangerousMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\DangerousMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\FusionSpell.cs"
/>
<Compile
Include=
"Game\AI\Enums\FusionSpell.cs"
/>
<Compile
Include=
"Game\AI\Enums\PreventActivationEffectInBattle.cs"
/>
<Compile
Include=
"Game\AI\Enums\OneForXyz.cs"
/>
<Compile
Include=
"Game\AI\Enums\OneForXyz.cs"
/>
<Compile
Include=
"Game\AI\Enums\InvincibleMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\InvincibleMonster.cs"
/>
<Compile
Include=
"Game\AI\Enums\Floodgate.cs"
/>
<Compile
Include=
"Game\AI\Enums\Floodgate.cs"
/>
...
...
WindBotInfo.cs
View file @
36a817aa
using
System
;
using
System
;
namespace
WindBot
namespace
WindBot
{
{
public
class
WindBotInfo
public
class
WindBotInfo
{
{
public
string
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
string
Deck
{
get
;
set
;
}
public
string
Deck
{
get
;
set
;
}
public
string
Dialog
{
get
;
set
;
}
public
string
Dialog
{
get
;
set
;
}
public
string
Host
{
get
;
set
;
}
public
string
Host
{
get
;
set
;
}
public
int
Port
{
get
;
set
;
}
public
int
Port
{
get
;
set
;
}
public
string
HostInfo
{
get
;
set
;
}
public
string
HostInfo
{
get
;
set
;
}
public
int
Version
{
get
;
set
;
}
public
int
Version
{
get
;
set
;
}
public
int
Hand
{
get
;
set
;
}
public
int
Hand
{
get
;
set
;
}
public
WindBotInfo
()
public
WindBotInfo
()
{
{
Name
=
"WindBot"
;
Name
=
"WindBot"
;
Deck
=
null
;
Deck
=
null
;
Dialog
=
"default"
;
Dialog
=
"default"
;
Host
=
"127.0.0.1"
;
Host
=
"127.0.0.1"
;
Port
=
7911
;
Port
=
7911
;
HostInfo
=
""
;
HostInfo
=
""
;
Version
=
0x
233C
;
Version
=
0x
1340
;
Hand
=
0
;
Hand
=
0
;
}
}
}
}
}
}
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