Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
windbot
Commits
b9dac6e5
Commit
b9dac6e5
authored
Nov 04, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some default executors
parent
ac1d1cdf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
236 deletions
+123
-236
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+2
-9
Game/AI/Decks/LightswornExecutor.cs
Game/AI/Decks/LightswornExecutor.cs
+7
-82
Game/AI/Decks/NekrozExecutor.cs
Game/AI/Decks/NekrozExecutor.cs
+2
-16
Game/AI/Decks/RainbowExecutor.cs
Game/AI/Decks/RainbowExecutor.cs
+9
-95
Game/AI/Decks/YosenjuExecutor.cs
Game/AI/Decks/YosenjuExecutor.cs
+4
-24
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+1
-9
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+98
-1
No files found.
Game/AI/Decks/DragunityExecutor.cs
View file @
b9dac6e5
...
@@ -94,8 +94,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -94,8 +94,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
CardsOfConsonance
,
SetUselessCards
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
CardsOfConsonance
,
SetUselessCards
);
// Chain traps and monsters
// Chain traps and monsters
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragonAssaultMode
,
StardustDragon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragonAssaultMode
,
DefaultStardustDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
StardustDragon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
DefaultStardustDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StarlightRoad
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StarlightRoad
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MirrorForce
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MirrorForce
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DimensionalPrison
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DimensionalPrison
,
DefaultTrap
);
...
@@ -464,13 +464,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -464,13 +464,6 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
StardustDragon
()
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
return
true
;
return
LastChainPlayer
==
1
;
}
private
bool
AssaultModeActivate
()
private
bool
AssaultModeActivate
()
{
{
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
...
...
Game/AI/Decks/LightswornExecutor.cs
View file @
b9dac6e5
...
@@ -72,13 +72,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -72,13 +72,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
Goblindbergh
,
GoblindberghSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
(
int
)
CardId
.
Goblindbergh
,
GoblindberghSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Goblindbergh
,
GoblindberghEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Goblindbergh
,
GoblindberghEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
CastelTheSkyblasterMusketeerSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
Default
CastelTheSkyblasterMusketeerSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
CastelTheSkyblasterMusketeerEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
Default
CastelTheSkyblasterMusketeerEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
ScarlightRedDragonArchfiendSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
Default
ScarlightRedDragonArchfiendSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
ScarlightRedDragonArchfiendEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
Default
ScarlightRedDragonArchfiendEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
NumberS39Utopiat
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
DefaultNumberS39UtopiaT
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
...
@@ -217,80 +217,5 @@ namespace WindBot.Game.AI.Decks
...
@@ -217,80 +217,5 @@ namespace WindBot.Game.AI.Decks
{
{
return
Duel
.
Phase
!=
DuelPhase
.
Main1
;
return
Duel
.
Phase
!=
DuelPhase
.
Main1
;
}
}
private
bool
EvilswarmExcitonKnightSummon
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
()
+
Bot
.
GetHandCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
+
Enemy
.
GetHandCount
();
return
(
selfCount
-
1
<
oppoCount
)
&&
EvilswarmExcitonKnightEffect
();
}
private
bool
EvilswarmExcitonKnightEffect
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
();
int
selfAttack
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
selfAttack
+=
monster
.
GetDefensePower
();
}
int
oppoAttack
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
oppoAttack
+=
monster
.
GetDefensePower
();
}
return
(
selfCount
<
oppoCount
)
||
(
selfAttack
<
oppoAttack
);
}
private
bool
ScarlightRedDragonArchfiendSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
(
selfBestAttack
<=
oppoBestAttack
&&
oppoBestAttack
<=
3000
)
||
ScarlightRedDragonArchfiendEffect
();
}
private
bool
ScarlightRedDragonArchfiendEffect
()
{
int
selfCount
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(!
monster
.
Equals
(
Card
)
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
selfCount
++;
}
int
oppoCount
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
oppoCount
++;
}
return
(
oppoCount
>
0
&&
selfCount
<=
oppoCount
)
||
oppoCount
>
2
;
}
private
bool
CastelTheSkyblasterMusketeerSummon
()
{
return
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
;
}
private
bool
CastelTheSkyblasterMusketeerEffect
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
0
))
return
false
;
AI
.
SelectNextCard
(
AI
.
Utils
.
GetProblematicEnemyCard
());
return
true
;
}
private
bool
NumberS39UtopiatheLightningSummon
()
{
return
AI
.
Utils
.
IsOneEnemyBetter
();
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/NekrozExecutor.cs
View file @
b9dac6e5
...
@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Brionac
,
BrionacEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Brionac
,
BrionacEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Clausolas
,
ClausolasEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Clausolas
,
ClausolasEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Trishula
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Trishula
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
PhantomOfChaos
,
PhantomOfChaosEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
PhantomOfChaos
,
PhantomOfChaosEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MaxxC
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MaxxC
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ThousandHands
,
ThousandHandsEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ThousandHands
,
ThousandHandsEffect
);
...
@@ -98,7 +98,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -98,7 +98,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Brionac
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Brionac
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Unicore
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Unicore
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Clausolas
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Clausolas
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightSummon
);
}
}
private
bool
ThousandHandsSummon
()
private
bool
ThousandHandsSummon
()
...
@@ -167,20 +167,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -167,20 +167,6 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
EvilswarmExcitonKnightSummon
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
()
+
Bot
.
GetHandCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
+
Enemy
.
GetHandCount
();
return
(
selfCount
-
1
<
oppoCount
)
&&
EvilswarmExcitonKnightEffect
();
}
private
bool
EvilswarmExcitonKnightEffect
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
();
return
selfCount
<
oppoCount
;
}
private
bool
ValkyrusEffect
()
private
bool
ValkyrusEffect
()
{
{
if
(
Duel
.
Phase
==
DuelPhase
.
Battle
)
if
(
Duel
.
Phase
==
DuelPhase
.
Battle
)
...
...
Game/AI/Decks/RainbowExecutor.cs
View file @
b9dac6e5
...
@@ -79,8 +79,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -79,8 +79,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GagagaCowboy
,
GagagaCowboySummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
GagagaCowboy
,
GagagaCowboySummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GagagaCowboy
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
GagagaCowboy
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvolzarLaggia
,
EvolzarLaggiaSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvolzarLaggia
,
EvolzarLaggiaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvolzarLaggia
,
EvolzarLaggiaEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvolzarLaggia
,
EvolzarLaggiaEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmNightmare
,
EvilswarmNightmareSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmNightmare
,
EvilswarmNightmareSummon
);
...
@@ -96,21 +96,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -96,21 +96,21 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SmashingGround
,
DefaultSmashingGround
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
SmashingGround
,
DefaultSmashingGround
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
CastelTheSkyblasterMusketeerSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
Default
CastelTheSkyblasterMusketeerSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
CastelTheSkyblasterMusketeerEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
Default
CastelTheSkyblasterMusketeerEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
IgnisterProminenceTheBlastingDracoslayer
,
IgnisterProminenceTheBlastingDracoslayerSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
IgnisterProminenceTheBlastingDracoslayer
,
IgnisterProminenceTheBlastingDracoslayerSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
IgnisterProminenceTheBlastingDracoslayer
,
IgnisterProminenceTheBlastingDracoslayerEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
IgnisterProminenceTheBlastingDracoslayer
,
IgnisterProminenceTheBlastingDracoslayerEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
ScarlightRedDragonArchfiendSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
Default
ScarlightRedDragonArchfiendSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
ScarlightRedDragonArchfiendEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ScarlightRedDragonArchfiend
,
Default
ScarlightRedDragonArchfiendEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
NumberS39Utopiat
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
DefaultNumberS39UtopiaT
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
StardustDragon
,
StardustDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
StardustDragon
,
Default
StardustDragonSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
StardustDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
Default
StardustDragonEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number59CrookedCook
,
Number59CrookedCookSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number59CrookedCook
,
Number59CrookedCookSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Number59CrookedCook
,
Number59CrookedCookEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
Number59CrookedCook
,
Number59CrookedCookEffect
);
...
@@ -259,77 +259,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -259,77 +259,6 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
EvilswarmExcitonKnightSummon
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
()
+
Bot
.
GetHandCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
+
Enemy
.
GetHandCount
();
return
(
selfCount
-
1
<
oppoCount
)
&&
EvilswarmExcitonKnightEffect
();
}
private
bool
EvilswarmExcitonKnightEffect
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
();
int
selfAttack
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
selfAttack
+=
monster
.
GetDefensePower
();
}
int
oppoAttack
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
oppoAttack
+=
monster
.
GetDefensePower
();
}
return
(
selfCount
<
oppoCount
)
||
(
selfAttack
<
oppoAttack
);
}
private
bool
ScarlightRedDragonArchfiendSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
(
selfBestAttack
<=
oppoBestAttack
&&
oppoBestAttack
<=
3000
)
||
ScarlightRedDragonArchfiendEffect
();
}
private
bool
ScarlightRedDragonArchfiendEffect
()
{
int
selfCount
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(!
monster
.
Equals
(
Card
)
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
selfCount
++;
}
int
oppoCount
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
// 没有办法获取特殊召唤的状态,只好默认全部是特招的
if
(
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
oppoCount
++;
}
return
(
oppoCount
>
0
&&
selfCount
<=
oppoCount
)
||
oppoCount
>
2
;
}
private
bool
CastelTheSkyblasterMusketeerSummon
()
{
return
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
;
}
private
bool
CastelTheSkyblasterMusketeerEffect
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
0
))
return
false
;
AI
.
SelectNextCard
(
AI
.
Utils
.
GetProblematicEnemyCard
());
return
true
;
}
private
bool
IgnisterProminenceTheBlastingDracoslayerSummon
()
private
bool
IgnisterProminenceTheBlastingDracoslayerSummon
()
{
{
return
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
;
return
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
;
...
@@ -419,16 +348,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -419,16 +348,6 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
private
bool
StardustDragonSummon
()
{
return
(
AI
.
Utils
.
IsOneEnemyBetter
()
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
}
private
bool
StardustDragonEffect
()
{
return
(
Card
.
Location
==
CardLocation
.
Grave
)
||
DefaultTrap
();
}
private
bool
EvolzarLaggiaSummon
()
private
bool
EvolzarLaggiaSummon
()
{
{
return
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
return
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
...
@@ -496,11 +415,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -496,11 +415,6 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
NumberS39UtopiatheLightningSummon
()
{
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
);
}
private
bool
TrapSet
()
private
bool
TrapSet
()
{
{
return
!
Bot
.
HasInMonstersZone
((
int
)
CardId
.
Number59CrookedCook
,
true
,
true
);
return
!
Bot
.
HasInMonstersZone
((
int
)
CardId
.
Number59CrookedCook
,
true
,
true
);
...
...
Game/AI/Decks/YosenjuExecutor.cs
View file @
b9dac6e5
...
@@ -120,18 +120,18 @@ namespace WindBot.Game.AI.Decks
...
@@ -120,18 +120,18 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
PotOfDuality
,
CardOfDemiseAcivated
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
PotOfDuality
,
CardOfDemiseAcivated
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
CosmicCyclone
,
CardOfDemiseAcivated
);
AddExecutor
(
ExecutorType
.
SpellSet
,
(
int
)
CardId
.
CosmicCyclone
,
CardOfDemiseAcivated
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
EvilswarmExcitonKnight
,
Default
EvilswarmExcitonKnightEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
DarkRebellionXyzDragon
,
DarkRebellionXyzDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
DarkRebellionXyzDragon
,
DarkRebellionXyzDragonSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DarkRebellionXyzDragon
,
DarkRebellionXyzDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DarkRebellionXyzDragon
,
DarkRebellionXyzDragonEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
NumberS39Utopiat
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
DefaultNumberS39UtopiaT
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiaOne
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiaOne
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
StardustDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StardustDragon
,
Default
StardustDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StarlightRoad
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StarlightRoad
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MagicDrain
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MagicDrain
);
...
@@ -298,20 +298,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -298,20 +298,6 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
EvilswarmExcitonKnightSummon
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
()
+
Bot
.
GetHandCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
+
Enemy
.
GetHandCount
();
return
(
selfCount
-
1
<
oppoCount
)
&&
EvilswarmExcitonKnightEffect
();
}
private
bool
EvilswarmExcitonKnightEffect
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
();
return
selfCount
<
oppoCount
;
}
private
bool
DarkRebellionXyzDragonSummon
()
private
bool
DarkRebellionXyzDragonSummon
()
{
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
...
@@ -336,11 +322,5 @@ namespace WindBot.Game.AI.Decks
...
@@ -336,11 +322,5 @@ namespace WindBot.Game.AI.Decks
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
selfBestAttack
<=
oppoBestAttack
;
return
selfBestAttack
<=
oppoBestAttack
;
}
}
private
bool
StardustDragonEffect
()
{
return
LastChainPlayer
==
1
;
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/ZoodiacExecutor.cs
View file @
b9dac6e5
...
@@ -71,7 +71,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -71,7 +71,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
PhotonThrasher
,
PhotonThrasherSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
PhotonThrasher
,
PhotonThrasherSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
NumberS39Utopiat
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
Number39Utopia
,
DefaultNumberS39UtopiaT
heLightningSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
NumberS39UtopiatheLightning
);
...
@@ -148,14 +148,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -148,14 +148,6 @@ namespace WindBot.Game.AI.Decks
return
attacker
.
RealPower
>
defender
.
GetDefensePower
();
return
attacker
.
RealPower
>
defender
.
GetDefensePower
();
}
}
private
bool
NumberS39UtopiatheLightningSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
selfBestAttack
<
oppoBestAttack
;
}
private
bool
PhotonThrasherSummon
()
private
bool
PhotonThrasherSummon
()
{
{
return
Bot
.
HasInHand
((
int
)
CardId
.
AleisterTheInvoker
)
return
Bot
.
HasInHand
((
int
)
CardId
.
AleisterTheInvoker
)
...
...
Game/AI/DefaultExecutor.cs
View file @
b9dac6e5
...
@@ -19,9 +19,12 @@ namespace WindBot.Game.AI
...
@@ -19,9 +19,12 @@ namespace WindBot.Game.AI
ThunderKingtheLightningstrikeKaiju
=
48770333
,
ThunderKingtheLightningstrikeKaiju
=
48770333
,
DogorantheMadFlameKaiju
=
93332803
,
DogorantheMadFlameKaiju
=
93332803
,
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
,
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
,
MysticalSpaceTyphoon
=
5318639
,
MysticalSpaceTyphoon
=
5318639
,
CosmicCyclone
=
8267140
,
CosmicCyclone
=
8267140
,
ChickenGame
=
67616300
ChickenGame
=
67616300
,
CastelTheSkyblasterMusketeer
=
82633039
}
}
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -555,5 +558,99 @@ namespace WindBot.Game.AI
...
@@ -555,5 +558,99 @@ namespace WindBot.Game.AI
return
false
;
return
false
;
}
}
protected
bool
DefaultNumberS39UtopiaTheLightningSummon
()
{
int
bestBotAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
return
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
bestBotAttack
,
false
);
}
protected
bool
DefaultEvilswarmExcitonKnightSummon
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
()
+
Bot
.
GetHandCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
+
Enemy
.
GetHandCount
();
return
(
selfCount
-
1
<
oppoCount
)
&&
DefaultEvilswarmExcitonKnightEffect
();
}
protected
bool
DefaultEvilswarmExcitonKnightEffect
()
{
int
selfCount
=
Bot
.
GetMonsterCount
()
+
Bot
.
GetSpellCount
();
int
oppoCount
=
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
();
int
selfAttack
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
selfAttack
+=
monster
.
GetDefensePower
();
}
int
oppoAttack
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
oppoAttack
+=
monster
.
GetDefensePower
();
}
return
(
selfCount
<
oppoCount
)
||
(
selfAttack
<
oppoAttack
);
}
protected
bool
DefaultStardustDragonSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
(
selfBestAttack
<=
oppoBestAttack
&&
oppoBestAttack
<=
2500
)
||
AI
.
Utils
.
IsTurn1OrMain2
();
}
protected
bool
DefaultStardustDragonEffect
()
{
return
(
Card
.
Location
==
CardLocation
.
Grave
)
||
LastChainPlayer
==
1
;
}
protected
bool
DefaultCastelTheSkyblasterMusketeerSummon
()
{
return
AI
.
Utils
.
GetProblematicEnemyCard
()
!=
null
;
}
protected
bool
DefaultCastelTheSkyblasterMusketeerEffect
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
CastelTheSkyblasterMusketeer
,
0
))
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
if
(
target
!=
null
)
{
AI
.
SelectNextCard
(
target
);
return
true
;
}
return
false
;
}
protected
bool
DefaultScarlightRedDragonArchfiendSummon
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Bot
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestPower
(
Enemy
);
return
(
selfBestAttack
<=
oppoBestAttack
&&
oppoBestAttack
<=
3000
)
||
DefaultScarlightRedDragonArchfiendEffect
();
}
protected
bool
DefaultScarlightRedDragonArchfiendEffect
()
{
int
selfCount
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
// The bot don't know if the card is special summoned, so let we assume all monsters are special summoned
if
(!
monster
.
Equals
(
Card
)
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
selfCount
++;
}
int
oppoCount
=
0
;
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
oppoCount
++;
}
return
(
oppoCount
>
0
&&
selfCount
<=
oppoCount
)
||
oppoCount
>
2
;
}
}
}
}
}
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