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
nanahira
windbot
Commits
4b13cd1c
Commit
4b13cd1c
authored
May 01, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
cdb22dba
21ad797c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
71 deletions
+71
-71
Game/AI/Decks/MathMechExecutor.cs
Game/AI/Decks/MathMechExecutor.cs
+70
-70
WindBotInfo.cs
WindBotInfo.cs
+1
-1
No files found.
Game/AI/Decks/MathMechExecutor.cs
View file @
4b13cd1c
...
...
@@ -12,7 +12,7 @@ namespace WindBot.Game.AI.Decks
[
Deck
(
"MathMech"
,
"AI_Mathmech"
)]
public
class
MathmechExecutor
:
DefaultExecutor
{
public
class
CardI
D
public
class
CardI
d
{
public
const
int
MathmechNebla
=
53577438
;
public
const
int
MathmechSigma
=
27182739
;
...
...
@@ -45,47 +45,47 @@ namespace WindBot.Game.AI.Decks
public
MathmechExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
raigeki
,
when_raigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
upstartGoblin
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
OneTimePasscode
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardI
D
.
threanteningRoar
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
cosmicCyclone
,
when_cosmic
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
lightningStorm
,
lightstorm_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
foolishBurial
,
foolish_burial_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
mathmechEquation
,
mathmech_equation_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
PotOfDesires
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
raigeki
,
when_raigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
upstartGoblin
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
OneTimePasscode
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardI
d
.
threanteningRoar
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
cosmicCyclone
,
when_cosmic
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
lightningStorm
,
lightstorm_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
foolishBurial
,
foolish_burial_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
mathmechEquation
,
mathmech_equation_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
PotOfDesires
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
MathmechNebla
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
BalancerLord
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
Mathmechdouble
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
MathmechSubtra
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
MathmechAddition
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
D
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
threanteningRoar
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
MathmechNebla
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
BalancerLord
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
Mathmechdouble
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
MathmechSubtra
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
MathmechAddition
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Summon
,
CardI
d
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
threanteningRoar
);
//xyz summons
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
D
.
Mathmechalem
,
when_Mathmechalem
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
d
.
Mathmechalem
,
when_Mathmechalem
);
//xyz effects
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
Mathmechalem
,
mathchalenEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
Mathmechalem
,
mathchalenEffect
);
//Synchro
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
D
.
MathmechFinalSigma
,
FinalSigmaSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
d
.
MathmechFinalSigma
,
FinalSigmaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
Mathmechdouble
,
doubleEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
Mathmechdouble
,
doubleEffect
);
//normal effects
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechNebla
,
NeblaEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechDivision
,
divisionEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
BalancerLord
,
active_balancer
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechSubtra
,
whom_subtra
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechAddition
,
whom_addition
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechNebla
,
NeblaEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechDivision
,
divisionEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
BalancerLord
,
active_balancer
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechSubtra
,
whom_subtra
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechAddition
,
whom_addition
);
//spell effects
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
cynetmining
,
how_to_cynet_mine
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
D
.
MathmechMagma
,
MagmaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechFinalSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
D
.
MathmechMagma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
cynetmining
,
how_to_cynet_mine
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardI
d
.
MathmechMagma
,
MagmaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechFinalSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardI
d
.
MathmechMagma
);
//function
...
...
@@ -155,9 +155,9 @@ namespace WindBot.Game.AI.Decks
private
bool
active_balancer
()
{
if
(
Bot
.
HasInHand
(
CardI
D
.
MathmechNebla
))
if
(
Bot
.
HasInHand
(
CardI
d
.
MathmechNebla
))
{
AI
.
SelectCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectCard
(
CardI
d
.
MathmechNebla
);
return
true
;
}
else
...
...
@@ -182,9 +182,9 @@ namespace WindBot.Game.AI.Decks
private
bool
mathmech_equation_target
()
{
if
(
Bot
.
HasInGraveyard
(
CardI
D
.
MathmechNebla
))
if
(
Bot
.
HasInGraveyard
(
CardI
d
.
MathmechNebla
))
{
AI
.
SelectCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectCard
(
CardI
d
.
MathmechNebla
);
return
true
;
}
else
...
...
@@ -196,29 +196,29 @@ namespace WindBot.Game.AI.Decks
private
bool
foolish_burial_target
()
{
AI
.
SelectCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectCard
(
CardI
d
.
MathmechNebla
);
return
true
;
}
private
bool
how_to_cynet_mine
()
{
AI
.
SelectCard
(
Util
.
GetWorstBotMonster
());
if
(!
Bot
.
HasInHandOrInMonstersZoneOrInGraveyard
(
CardI
D
.
MathmechSigma
))
if
(!
Bot
.
HasInHandOrInMonstersZoneOrInGraveyard
(
CardI
d
.
MathmechSigma
))
{
AI
.
SelectNextCard
(
CardI
D
.
MathmechSigma
);
AI
.
SelectNextCard
(
CardI
d
.
MathmechSigma
);
return
true
;
}
return
true
;
}
private
bool
when_Mathmechalem
()
{
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechNebla
)){
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechNebla
)){
return
false
;
}
else
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardID
.
Mathmechdouble
))
else
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechdouble
))
{
return
false
;
}
else
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
Mathmechalem
))
else
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
Mathmechalem
))
{
return
false
;
}
...
...
@@ -233,7 +233,7 @@ namespace WindBot.Game.AI.Decks
{
return
false
;
}
if
((
Bot
.
HasInMonstersZone
(
CardI
D
.
Mathmechdouble
)
&&
((
Bot
.
HasInMonstersZone
(
CardID
.
MathmechSigma
))
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechNebla
))))
if
((
Bot
.
HasInMonstersZone
(
CardI
d
.
Mathmechdouble
)
&&
((
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
))))
{
AI
.
SelectPosition
(
CardPosition
.
Attack
);
try
{
AI
.
SelectPlace
(
Zones
.
ExtraMonsterZones
);
}
...
...
@@ -249,16 +249,16 @@ namespace WindBot.Game.AI.Decks
}
private
bool
NeblaEffect
()
{
bool
a
=
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechSubtra
)
||
Bot
.
HasInMonstersZone
(
CardID
.
securitytoken
)
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechSigma
)
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechAddition
)
||
Bot
.
HasInMonstersZone
(
CardID
.
Mathmechalem
)
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechDivision
);
bool
a
=
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechSubtra
)
||
Bot
.
HasInMonstersZone
(
CardId
.
securitytoken
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechAddition
)
||
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechalem
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechDivision
);
if
(
a
)
{
List
<
int
>
cards
=
new
List
<
int
>();
cards
.
Add
(
CardI
D
.
MathmechSigma
);
cards
.
Add
(
CardI
D
.
MathmechSubtra
);
cards
.
Add
(
CardI
D
.
MathmechAddition
);
cards
.
Add
(
item
:
CardI
D
.
MathmechDivision
);
cards
.
Add
(
item
:
CardI
D
.
Mathmechalem
);
cards
.
Add
(
CardI
D
.
securitytoken
);
cards
.
Add
(
CardI
d
.
MathmechSigma
);
cards
.
Add
(
CardI
d
.
MathmechSubtra
);
cards
.
Add
(
CardI
d
.
MathmechAddition
);
cards
.
Add
(
item
:
CardI
d
.
MathmechDivision
);
cards
.
Add
(
item
:
CardI
d
.
Mathmechalem
);
cards
.
Add
(
CardI
d
.
securitytoken
);
int
u
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonstersInMainZone
();
for
(
int
i
=
0
;
i
<
monsters
.
Count
;
i
++)
...
...
@@ -270,11 +270,11 @@ namespace WindBot.Game.AI.Decks
}
else
{
u
=
CardI
D
.
securitytoken
;
u
=
CardI
d
.
securitytoken
;
}
}
AI
.
SelectCard
(
CardI
D
.
securitytoken
);
AI
.
SelectNextCard
(
CardI
D
.
Mathmechdouble
);
AI
.
SelectCard
(
CardI
d
.
securitytoken
);
AI
.
SelectNextCard
(
CardI
d
.
Mathmechdouble
);
return
true
;
...
...
@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
}
private
bool
doubleEffect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechSigma
))
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
{
return
true
;
};
...
...
@@ -311,32 +311,32 @@ namespace WindBot.Game.AI.Decks
{
return
false
;
}
if
(
(
Bot
.
HasInHandOrInGraveyard
(
CardI
D
.
MathmechNebla
)
&&
!
Bot
.
HasInMonstersZone
(
CardID
.
MathmechNebla
))
&&
(
Card
.
Location
==
CardLocation
.
FieldZone
&&
Card
.
HasXyzMaterial
(
0
))
)
if
(
(
Bot
.
HasInHandOrInGraveyard
(
CardI
d
.
MathmechNebla
)
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
))
&&
(
Card
.
Location
==
CardLocation
.
FieldZone
&&
Card
.
HasXyzMaterial
(
0
))
)
{
AI
.
SelectCard
(
CardI
D
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectCard
(
CardI
d
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardI
d
.
MathmechNebla
);
return
true
;
}
if
(
Bot
.
HasInHandOrInGraveyard
(
CardI
D
.
Mathmechdouble
)
&&
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardID
.
MathmechSigma
))
&&
if
(
Bot
.
HasInHandOrInGraveyard
(
CardI
d
.
Mathmechdouble
)
&&
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
&&
Card
.
Location
==
CardLocation
.
FieldZone
&&
Card
.
HasXyzMaterial
(
0
))
{
AI
.
SelectCard
(
CardI
D
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardI
D
.
Mathmechdouble
);
AI
.
SelectCard
(
CardI
d
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardI
d
.
Mathmechdouble
);
return
true
;
}
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardI
D
.
MathmechNebla
)
&&
Card
.
HasXyzMaterial
(
2
))
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardI
d
.
MathmechNebla
)
&&
Card
.
HasXyzMaterial
(
2
))
{
AI
.
SelectCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectThirdCard
(
CardI
D
.
MathmechNebla
);
AI
.
SelectCard
(
CardI
d
.
MathmechNebla
);
AI
.
SelectThirdCard
(
CardI
d
.
MathmechNebla
);
return
true
;
}
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardI
D
.
MathmechSigma
)
&&
Card
.
HasXyzMaterial
(
2
))
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardI
d
.
MathmechSigma
)
&&
Card
.
HasXyzMaterial
(
2
))
{
AI
.
SelectCard
(
CardI
D
.
MathmechSigma
);
AI
.
SelectThirdCard
(
CardI
D
.
MathmechSigma
);
AI
.
SelectCard
(
CardI
d
.
MathmechSigma
);
AI
.
SelectThirdCard
(
CardI
d
.
MathmechSigma
);
return
true
;
}
else
...
...
@@ -349,12 +349,12 @@ namespace WindBot.Game.AI.Decks
private
bool
MagmaSummon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechNebla
))
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechNebla
))
{
return
false
;
}
if
(
Bot
.
HasInMonstersZone
(
CardI
D
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardID
.
Mathmechdouble
))
if
(
Bot
.
HasInMonstersZone
(
CardI
d
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechdouble
))
{
return
false
;
}
...
...
@@ -366,7 +366,7 @@ namespace WindBot.Game.AI.Decks
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
if
(
cardId
==
CardI
D
.
MathmechFinalSigma
)
if
(
cardId
==
CardI
d
.
MathmechFinalSigma
)
{
if
((
Zones
.
z5
&
available
)
>
0
)
return
Zones
.
z5
;
if
((
Zones
.
z6
&
available
)
>
0
)
return
Zones
.
z6
;
...
...
WindBotInfo.cs
View file @
4b13cd1c
...
...
@@ -22,7 +22,7 @@ namespace WindBot
Host
=
"127.0.0.1"
;
Port
=
7911
;
HostInfo
=
""
;
Version
=
0x135
0
;
Version
=
0x135
1
;
Hand
=
0
;
Debug
=
false
;
Chat
=
true
;
...
...
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