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
7e629c18
Commit
7e629c18
authored
Nov 29, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
143620be
3d410f38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
237 additions
and
74 deletions
+237
-74
Game/AI/Decks/KashtiraExecutor.cs
Game/AI/Decks/KashtiraExecutor.cs
+46
-25
Game/AI/Decks/ThunderDragonExecutor.cs
Game/AI/Decks/ThunderDragonExecutor.cs
+191
-49
No files found.
Game/AI/Decks/KashtiraExecutor.cs
View file @
7e629c18
...
@@ -60,6 +60,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -60,6 +60,7 @@ namespace WindBot.Game.AI.Decks
bool
activate_KashtiraTearlaments_1
=
false
;
bool
activate_KashtiraTearlaments_1
=
false
;
bool
activate_DimensionShifter
=
false
;
bool
activate_DimensionShifter
=
false
;
bool
activate_pre_PrimePlanetParaisos
=
false
;
bool
activate_pre_PrimePlanetParaisos
=
false
;
bool
activate_pre_PrimePlanetParaisos_2
=
false
;
bool
active_KashtiraPapiyas_1
=
false
;
bool
active_KashtiraPapiyas_1
=
false
;
bool
active_KashtiraPapiyas_2
=
false
;
bool
active_KashtiraPapiyas_2
=
false
;
bool
active_KashtiraBirth
=
false
;
bool
active_KashtiraBirth
=
false
;
...
@@ -128,7 +129,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -128,7 +129,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CupidPitch
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CupidPitch
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
BorreloadSavageDragon
,
BorreloadSavageDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
BorreloadSavageDragon
,
BorreloadSavageDragonSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
NemesesCorridor
,
NemesesCorridorEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
NemesesCorridor
,
NemesesCorridorEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MekkKnightCrusadiaAvramax
,
MekkKnightCrusadiaAvramaxSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
MekkKnightCrusadiaAvramax
,
MekkKnightCrusadiaAvramaxSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MekkKnightCrusadiaAvramax
,
MekkKnightCrusadiaAvramaxEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MekkKnightCrusadiaAvramax
,
MekkKnightCrusadiaAvramaxEffect
);
//link mode
//link mode
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraRiseheart
,
KashtiraRiseheartEffect_2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraRiseheart
,
KashtiraRiseheartEffect_2
);
...
@@ -137,6 +138,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -137,6 +138,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraPapiyas
,
KashtiraPapiyasEffect_2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraPapiyas
,
KashtiraPapiyasEffect_2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraBirth
,
KashtiraBirthEffect_3
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
KashtiraBirth
,
KashtiraBirthEffect_3
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
KashtiraRiseheart
,
KashtiraRiseheartSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
KashtiraRiseheart
,
KashtiraRiseheartSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
KashtiraTearlaments
,
DefaultSummon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultRepos
);
}
}
...
@@ -153,6 +155,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -153,6 +155,7 @@ namespace WindBot.Game.AI.Decks
activate_KashtiraScareclaw_1
=
false
;
activate_KashtiraScareclaw_1
=
false
;
activate_KashtiraTearlaments_1
=
false
;
activate_KashtiraTearlaments_1
=
false
;
activate_KashtiraShangriIra
=
false
;
activate_KashtiraShangriIra
=
false
;
activate_pre_PrimePlanetParaisos_2
=
false
;
active_KashtiraPapiyas_1
=
false
;
active_KashtiraPapiyas_1
=
false
;
active_KashtiraPapiyas_2
=
false
;
active_KashtiraPapiyas_2
=
false
;
active_KashtiraBirth
=
false
;
active_KashtiraBirth
=
false
;
...
@@ -335,7 +338,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -335,7 +338,7 @@ namespace WindBot.Game.AI.Decks
List
<
ClientCard
>
nRelease
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
nRelease
=
new
List
<
ClientCard
>();
foreach
(
var
card
in
cards
)
foreach
(
var
card
in
cards
)
{
{
if
(
card
==
null
||
card
.
IsExtraCard
(
)
||
card
.
IsFacedown
())
continue
;
if
(
card
==
null
||
(
card
.
IsExtraCard
()
&&
card
.
Id
!=
CardId
.
DiablosistheMindHacker
)
||
card
.
IsFacedown
())
continue
;
if
(
card
.
Id
==
CardId
.
Token
||
card
.
Id
==
CardId
.
Token_2
)
if
(
card
.
Id
==
CardId
.
Token
||
card
.
Id
==
CardId
.
Token_2
)
tRelease
.
Add
(
card
);
tRelease
.
Add
(
card
);
else
nRelease
.
Add
(
card
);
else
nRelease
.
Add
(
card
);
...
@@ -571,7 +574,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -571,7 +574,7 @@ namespace WindBot.Game.AI.Decks
foreach
(
var
card
in
cards
)
foreach
(
var
card
in
cards
)
{
{
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
temp
.
Count
(
_card
=>
_card
!=
null
&&
_card
.
Id
==
card
.
Id
)
>
0
)
if
(
temp
.
Count
(
_card
=>
_card
!=
null
&&
_card
.
Id
==
card
.
Id
)
>
0
&&
res
.
Count
(
_card
=>
_card
!=
null
&&
_card
.
Id
==
card
.
Id
)
<=
0
)
res
.
Add
(
card
);
res
.
Add
(
card
);
else
else
temp
.
Add
(
card
);
temp
.
Add
(
card
);
...
@@ -670,14 +673,24 @@ namespace WindBot.Game.AI.Decks
...
@@ -670,14 +673,24 @@ namespace WindBot.Game.AI.Decks
private
bool
CalledbytheGraveEffect
()
private
bool
CalledbytheGraveEffect
()
{
{
ClientCard
card
=
Util
.
GetLastChainCard
();
ClientCard
card
=
Util
.
GetLastChainCard
();
if
(
Duel
.
LastChainPlayer
!=
0
&&
card
!=
null
&&
card
.
Location
==
CardLocation
.
Grave
if
(
card
==
null
)
return
false
;
&&
card
.
HasType
(
CardType
.
Monster
))
int
id
=
card
.
Id
;
List
<
ClientCard
>
g_cards
=
Enemy
.
GetGraveyardMonsters
().
Where
(
g_card
=>
g_card
!=
null
&&
g_card
.
Id
==
id
).
ToList
();
if
(
Duel
.
LastChainPlayer
!=
0
&&
card
!=
null
)
{
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
}
AI
.
SelectCard
(
card
);
if
(
card
.
Location
==
CardLocation
.
Grave
&&
card
.
HasType
(
CardType
.
Monster
))
{
AI
.
SelectCard
(
card
);
}
else
if
(
g_cards
.
Count
()
>
0
&&
card
.
HasType
(
CardType
.
Monster
))
{
AI
.
SelectCard
(
g_cards
);
}
else
return
false
;
select_CalledbytheGrave
=
true
;
select_CalledbytheGrave
=
true
;
return
true
;
return
true
;
}
}
...
@@ -758,7 +771,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -758,7 +771,7 @@ namespace WindBot.Game.AI.Decks
List
<
ClientCard
>
nRelease
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
nRelease
=
new
List
<
ClientCard
>();
foreach
(
var
card
in
Bot
.
GetMonsters
())
foreach
(
var
card
in
Bot
.
GetMonsters
())
{
{
if
(
card
==
null
||
card
.
IsExtraCard
()
||
card
.
IsFacedown
())
continue
;
if
(
card
==
null
||
(
card
.
IsExtraCard
()
&&
card
.
Id
!=
CardId
.
DiablosistheMindHacker
)
||
card
.
IsFacedown
())
continue
;
if
(
card
.
Id
==
CardId
.
Token
||
card
.
Id
==
CardId
.
Token_2
)
if
(
card
.
Id
==
CardId
.
Token
||
card
.
Id
==
CardId
.
Token_2
)
tRelease
.
Add
(
card
);
tRelease
.
Add
(
card
);
else
nRelease
.
Add
(
card
);
else
nRelease
.
Add
(
card
);
...
@@ -864,8 +877,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -864,8 +877,8 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
PrimePlanetParaisosEffect
()
private
bool
PrimePlanetParaisosEffect
()
{
{
if
(
SpellActivate
())
return
true
;
if
(
SpellActivate
())
{
activate_pre_PrimePlanetParaisos_2
=
true
;
return
true
;
}
if
(
activate_pre_PrimePlanetParaisos
)
return
false
;
if
(
activate_pre_PrimePlanetParaisos
_2
||
activate_pre_PrimePlanetParaisos
)
return
false
;
List
<
ClientCard
>
cards
=
GetEnemyOnFields
().
Where
(
card
=>
card
!=
null
&&
!
card
.
IsShouldNotBeTarget
()).
ToList
();
List
<
ClientCard
>
cards
=
GetEnemyOnFields
().
Where
(
card
=>
card
!=
null
&&
!
card
.
IsShouldNotBeTarget
()).
ToList
();
if
(
cards
==
null
||
cards
.
Count
<=
0
)
return
false
;
if
(
cards
==
null
||
cards
.
Count
<=
0
)
return
false
;
return
true
;
return
true
;
...
@@ -891,7 +904,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -891,7 +904,7 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
GalaxyTomahawkSummon
()
private
bool
GalaxyTomahawkSummon
()
{
{
if
(
CheckRemainInDeck
(
CardId
.
MechaPhantom
)
<
0
)
return
false
;
if
(
CheckRemainInDeck
(
CardId
.
MechaPhantom
)
<
=
0
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
>=
4
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
>=
4
)
return
false
;
if
(
onlyXyzSummon
||
activate_DimensionShifter
||
Bot
.
HasInMonstersZone
(
CardId
.
KashtiraAriseHeart
,
true
,
false
,
true
))
return
false
;
if
(
onlyXyzSummon
||
activate_DimensionShifter
||
Bot
.
HasInMonstersZone
(
CardId
.
KashtiraAriseHeart
,
true
,
false
,
true
))
return
false
;
if
(!
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
)
&&
!(
Bot
.
HasInExtra
(
CardId
.
CupidPitch
)
||
Bot
.
HasInExtra
(
CardId
.
BorreloadSavageDragon
)))
return
false
;
if
(!
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
)
&&
!(
Bot
.
HasInExtra
(
CardId
.
CupidPitch
)
||
Bot
.
HasInExtra
(
CardId
.
BorreloadSavageDragon
)))
return
false
;
...
@@ -946,7 +959,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -946,7 +959,7 @@ namespace WindBot.Game.AI.Decks
if
(
Bot
.
MonsterZone
.
Count
()
<=
0
if
(
Bot
.
MonsterZone
.
Count
()
<=
0
&&
((
Bot
.
HasInHand
(
CardId
.
KashtiraFenrir
)
&&
!
activate_KashtiraFenrir_1
)
&&
((
Bot
.
HasInHand
(
CardId
.
KashtiraFenrir
)
&&
!
activate_KashtiraFenrir_1
)
||
(
Bot
.
HasInHand
(
CardId
.
KashtiraUnicorn
)
&&
!
activate_KashtiraUnicorn_1
)))
return
false
;
||
(
Bot
.
HasInHand
(
CardId
.
KashtiraUnicorn
)
&&
!
activate_KashtiraUnicorn_1
)))
return
false
;
if
(
Bot
.
HasInHand
(
CardId
.
PrimePlanetParaisos
)
&&
!
activate_
PrimePlanetParaisos
)
return
false
;
if
(
Bot
.
HasInHand
(
CardId
.
PrimePlanetParaisos
)
&&
!
activate_
pre_PrimePlanetParaisos_2
)
return
false
;
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
hand_cards
=
Bot
.
Hand
.
GetMatchingCards
(
card
=>
card
!=
null
&&
card
.
HasSetcode
(
0x189
)).
ToList
();
List
<
ClientCard
>
hand_cards
=
Bot
.
Hand
.
GetMatchingCards
(
card
=>
card
!=
null
&&
card
.
HasSetcode
(
0x189
)).
ToList
();
List
<
ClientCard
>
grave_cards
=
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
!=
null
&&
card
.
HasSetcode
(
0x189
)).
ToList
();
List
<
ClientCard
>
grave_cards
=
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
!=
null
&&
card
.
HasSetcode
(
0x189
)).
ToList
();
...
@@ -965,7 +978,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -965,7 +978,8 @@ namespace WindBot.Game.AI.Decks
if
(((
activate_KashtiraUnicorn_1
||
summon_KashtiraUnicorn
)
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraUnicorn
)
>
0
)
if
(((
activate_KashtiraUnicorn_1
||
summon_KashtiraUnicorn
)
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraUnicorn
)
>
0
)
||
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraUnicorn
)
>
1
)
||
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraUnicorn
)
>
1
)
cardsid
.
Add
(
CardId
.
KashtiraUnicorn
);
cardsid
.
Add
(
CardId
.
KashtiraUnicorn
);
if
(
cardId
!=
CardId
.
KashtiraScareclaw
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraScareclaw
)
>
0
)
if
((
cardId
!=
CardId
.
KashtiraScareclaw
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraScareclaw
)
>
0
)
||
(
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraScareclaw
)
>
1
))
cardsid
.
Add
(
CardId
.
KashtiraScareclaw
);
cardsid
.
Add
(
CardId
.
KashtiraScareclaw
);
if
((
activate_KashtiraRiseheart_2
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraRiseheart
)
>
0
)
if
((
activate_KashtiraRiseheart_2
&&
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraRiseheart
)
>
0
)
||
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraRiseheart
)
>
1
)
||
hand_cards
.
Count
(
card
=>
card
!=
null
&&
card
.
Id
==
CardId
.
KashtiraRiseheart
)
>
1
)
...
@@ -1046,7 +1060,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1046,7 +1060,7 @@ namespace WindBot.Game.AI.Decks
{
{
isSummoned
=
true
;
isSummoned
=
true
;
if
(
Card
.
Id
==
CardId
.
KashtiraUnicorn
)
summon_KashtiraUnicorn
=
true
;
if
(
Card
.
Id
==
CardId
.
KashtiraUnicorn
)
summon_KashtiraUnicorn
=
true
;
else
summon_KashtiraFenrir
=
true
;
else
if
(
Card
.
Id
==
CardId
.
KashtiraFenrir
)
summon_KashtiraFenrir
=
true
;
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -1150,9 +1164,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -1150,9 +1164,9 @@ namespace WindBot.Game.AI.Decks
{
AI
.
SelectCard
(
card
);
if
(
isXyz
)
AI
.
SelectNextCard
(
card
);
return
true
;
}
{
AI
.
SelectCard
(
card
);
if
(
isXyz
)
AI
.
SelectNextCard
(
card
);
return
true
;
}
if
(
GetEnemyOnFields
().
Count
(
_card
=>
_card
!=
null
&&
!
_card
.
IsShouldNotBeTarget
()
&&
!(
faceUp
&
!
_card
.
IsFaceup
())
&&
!
_card
.
HasType
(
CardType
.
Token
))
<=
0
)
return
false
;
if
(
GetEnemyOnFields
().
Count
(
_card
=>
_card
!=
null
&&
!
_card
.
IsShouldNotBeTarget
()
&&
!(
faceUp
&
!
_card
.
IsFaceup
())
&&
!
_card
.
HasType
(
CardType
.
Token
))
<=
0
)
return
false
;
ClientCard
dcard
=
GetEnemyOnFields
().
GetDangerousMonster
(
true
);
ClientCard
dcard
=
GetEnemyOnFields
().
GetDangerousMonster
(
true
);
if
(
Duel
.
Phase
>=
DuelPhase
.
Battle
||
Util
.
GetBestAttack
(
Enemy
)
>=
Util
.
GetBestAttack
(
Bot
)
||
dcard
!=
null
)
if
(
Duel
.
Phase
>=
DuelPhase
.
Battle
Start
||
Util
.
GetBestAttack
(
Enemy
)
>=
Util
.
GetBestAttack
(
Bot
)
||
dcard
!=
null
)
{
{
if
(
dcard
!=
null
){
AI
.
SelectCard
(
dcard
);
if
(
isXyz
)
AI
.
SelectNextCard
(
dcard
)
;
return
true
;
}
if
(
dcard
!=
null
)
{
AI
.
SelectCard
(
dcard
);
if
(
isXyz
)
AI
.
SelectNextCard
(
dcard
)
;
return
true
;
}
List
<
ClientCard
>
cards
=
GetEnemyOnFields
().
Where
(
_card
=>
_card
!=
null
&&
!
_card
.
IsShouldNotBeTarget
()
&&
!(!
_card
.
IsFaceup
()
&
faceUp
)).
ToList
();
List
<
ClientCard
>
cards
=
GetEnemyOnFields
().
Where
(
_card
=>
_card
!=
null
&&
!
_card
.
IsShouldNotBeTarget
()
&&
!(!
_card
.
IsFaceup
()
&
faceUp
)).
ToList
();
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
cards
.
Reverse
();
cards
.
Reverse
();
...
@@ -1166,21 +1180,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -1166,21 +1180,15 @@ namespace WindBot.Game.AI.Decks
private
bool
KashtiraFenrirEffect
()
private
bool
KashtiraFenrirEffect
()
{
{
if
(
Card
.
IsDisabled
())
return
false
;
if
(
Card
.
IsDisabled
())
return
false
;
if
(
Duel
.
Phase
==
DuelPhase
.
Battle
||
Duel
.
CurrentChain
.
Count
>
0
)
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
KashtiraFenrir
,
1
))
{
if
(
Duel
.
LastChainPlayer
==
0
&&
Util
.
GetLastChainCard
()
!=
null
&&
Util
.
GetLastChainCard
().
Id
==
CardId
.
PrimePlanetParaisos
)
return
false
;
return
SelectEnemyCard
();
}
else
{
{
IList
<
int
>
cardsId
=
new
List
<
int
>();
IList
<
int
>
cardsId
=
new
List
<
int
>();
if
((!
Bot
.
HasInHandOrInSpellZone
(
CardId
.
KashtiraBirth
)
||
isSummoned
)
if
((!
Bot
.
HasInHandOrInSpellZone
(
CardId
.
KashtiraBirth
)
||
isSummoned
)
&&
!
Bot
.
HasInHand
(
CardId
.
KashtiraRiseheart
)
&&
(!
activate_KashtiraRiseheart_2
&&
(!
activate_KashtiraRiseheart_1
||
!
isSummoned
))
&&
CheckRemainInDeck
(
CardId
.
KashtiraRiseheart
)
>
0
)
&&
!
Bot
.
HasInHand
(
CardId
.
KashtiraRiseheart
)
&&
(!
activate_KashtiraRiseheart_2
&&
(!
activate_KashtiraRiseheart_1
||
!
isSummoned
))
&&
CheckRemainInDeck
(
CardId
.
KashtiraRiseheart
)
>
0
)
cardsId
.
Add
(
CardId
.
KashtiraRiseheart
);
cardsId
.
Add
(
CardId
.
KashtiraRiseheart
);
if
(
Bot
.
HasInHandOrInSpellZone
(
CardId
.
KashtiraBirth
)
&&
!
isSummoned
&&
!
Bot
.
HasInHand
(
CardId
.
KashtiraUnicorn
)
&&
!
activate_KashtiraUnicorn_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraUnicorn
)
>
0
)
if
(
Bot
.
HasInHandOrInSpellZone
(
CardId
.
KashtiraBirth
)
&&
!
isSummoned
&&
!
Bot
.
HasInHand
(
CardId
.
KashtiraUnicorn
)
&&
!
activate_KashtiraUnicorn_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraUnicorn
)
>
0
)
cardsId
.
Add
(
CardId
.
KashtiraUnicorn
);
cardsId
.
Add
(
CardId
.
KashtiraUnicorn
);
if
(!
Bot
.
HasInHand
(
CardId
.
KashtiraTearlaments
)
&&
!
activate_KashtiraTearlaments_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraTearlaments
)
>
0
)
if
(!
Bot
.
HasInHand
(
CardId
.
KashtiraTearlaments
)
&&
!
activate_KashtiraTearlaments_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraTearlaments
)
>
0
)
cardsId
.
Add
(
CardId
.
KashtiraTearlaments
);
cardsId
.
Add
(
CardId
.
KashtiraTearlaments
);
if
(!
Bot
.
HasInHand
(
CardId
.
KashtiraScareclaw
)
&&
!
activate_KashtiraScareclaw_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraScareclaw
)
>
0
)
if
(!
Bot
.
HasInHand
(
CardId
.
KashtiraScareclaw
)
&&
!
activate_KashtiraScareclaw_1
&&
CheckRemainInDeck
(
CardId
.
KashtiraScareclaw
)
>
0
)
cardsId
.
Add
(
CardId
.
KashtiraScareclaw
);
cardsId
.
Add
(
CardId
.
KashtiraScareclaw
);
...
@@ -1190,6 +1198,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -1190,6 +1198,19 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
cardsId
);
AI
.
SelectCard
(
cardsId
);
return
true
;
return
true
;
}
}
else
{
if
(
Duel
.
LastChainPlayer
==
0
&&
Util
.
GetLastChainCard
()
!=
null
&&
Util
.
GetLastChainCard
().
Id
==
CardId
.
PrimePlanetParaisos
)
return
false
;
List
<
ClientCard
>
cards
=
GetEnemyOnFields
().
Where
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()).
ToList
();
if
(
cards
.
Count
>
0
)
{
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
cards
.
Reverse
();
AI
.
SelectCard
(
cards
);
}
return
true
;
}
}
}
private
bool
TerraformingEffect
()
private
bool
TerraformingEffect
()
...
@@ -1346,4 +1367,4 @@ namespace WindBot.Game.AI.Decks
...
@@ -1346,4 +1367,4 @@ namespace WindBot.Game.AI.Decks
}
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/ThunderDragonExecutor.cs
View file @
7e629c18
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System
;
using
WindBot
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
WindBot.Game.AI
;
...
@@ -62,13 +61,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -62,13 +61,12 @@ namespace WindBot.Game.AI.Decks
ChaosSpace_2
,
ChaosSpace_2
,
ThunderDragonColossus
,
ThunderDragonColossus
,
AccesscodeTalker
,
AccesscodeTalker
,
DestroyReplace
,
DestroyReplace
ThunderDragonTitan
};
};
private
const
int
THUNDER_COUNTD
=
18
;
private
const
int
THUNDER_COUNTD
=
18
;
List
<
bool
>
selectFlag
=
new
List
<
bool
>()
List
<
bool
>
selectFlag
=
new
List
<
bool
>()
{
{
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
false
,
false
,
false
,
false
,
false
,
false
,
false
};
};
List
<
bool
>
selectAtt
=
new
List
<
bool
>()
List
<
bool
>
selectAtt
=
new
List
<
bool
>()
{
{
...
@@ -274,6 +272,93 @@ namespace WindBot.Game.AI.Decks
...
@@ -274,6 +272,93 @@ namespace WindBot.Game.AI.Decks
for
(
int
i
=
0
;
i
<
selectAtt
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
selectAtt
.
Count
;
i
++)
selectAtt
[
i
]
=
false
;
selectAtt
[
i
]
=
false
;
}
}
private
bool
IsAvailableZone
(
int
seq
)
{
ClientCard
card
=
Bot
.
MonsterZone
[
seq
];
if
(
seq
==
5
&&
Bot
.
MonsterZone
[
6
]
!=
null
&&
Bot
.
MonsterZone
[
6
].
Controller
==
0
)
return
false
;
if
(
seq
==
6
&&
Bot
.
MonsterZone
[
5
]
!=
null
&&
Bot
.
MonsterZone
[
5
].
Controller
==
0
)
return
false
;
if
(
card
==
null
)
return
true
;
if
(
card
.
Controller
!=
0
)
return
false
;
if
(
card
.
IsFacedown
())
return
false
;
if
(
card
.
IsDisabled
())
return
true
;
if
(
card
.
Id
==
CardId
.
ThunderDragonColossus
||
card
.
Id
==
CardId
.
ThunderDragonTitan
||
card
.
Id
==
CardId
.
UnderworldGoddessoftheClosedWorld
||
card
.
Id
==
CardId
.
MekkKnightCrusadiaAvramax
||
card
.
Id
==
CardId
.
AccesscodeTalker
||
(
card
.
Id
==
CardId
.
BowoftheGoddess
&&
card
.
Attack
>
800
)
||
(
card
.
Id
==
CardId
.
UnionCarrier
&&
summon_UnionCarrier
))
return
false
;
return
true
;
}
private
bool
IsAvailableLinkZone
()
{
int
zones
=
0
;
List
<
ClientCard
>
cards
=
Bot
.
GetMonstersInMainZone
().
Where
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()).
ToList
();
foreach
(
var
card
in
cards
)
{
zones
|=
card
.
GetLinkedZones
();
}
ClientCard
e_card
=
Bot
.
MonsterZone
[
5
];
if
(
e_card
!=
null
&&
e_card
.
IsFaceup
()
&&
e_card
.
HasType
(
CardType
.
Link
))
{
if
(
e_card
.
Controller
==
0
)
{
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
BottomLeft
))
zones
|=
1
<<
0
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
Bottom
))
zones
|=
1
<<
1
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
BottomRight
))
zones
|=
1
<<
2
;
}
if
(
e_card
.
Controller
==
1
)
{
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
TopLeft
))
zones
|=
1
<<
2
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
Top
))
zones
|=
1
<<
1
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
TopRight
))
zones
|=
1
<<
0
;
}
}
e_card
=
Bot
.
MonsterZone
[
6
];
if
(
e_card
!=
null
&&
e_card
.
IsFaceup
()
&&
e_card
.
HasType
(
CardType
.
Link
))
{
if
(
e_card
.
Controller
==
0
)
{
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
BottomLeft
))
zones
|=
1
<<
2
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
Bottom
))
zones
|=
1
<<
3
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
BottomRight
))
zones
|=
1
<<
4
;
}
if
(
e_card
.
Controller
==
1
)
{
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
TopLeft
))
zones
|=
1
<<
4
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
Top
))
zones
|=
1
<<
3
;
if
(
e_card
.
HasLinkMarker
(
CardLinkMarker
.
TopRight
))
zones
|=
1
<<
2
;
}
}
zones
&=
0x7f
;
if
((
zones
&
Zones
.
z0
)
>
0
&&
IsAvailableZone
(
0
))
return
true
;
if
((
zones
&
Zones
.
z1
)
>
0
&&
IsAvailableZone
(
1
))
return
true
;
if
((
zones
&
Zones
.
z2
)
>
0
&&
IsAvailableZone
(
2
))
return
true
;
if
((
zones
&
Zones
.
z3
)
>
0
&&
IsAvailableZone
(
3
))
return
true
;
if
((
zones
&
Zones
.
z4
)
>
0
&&
IsAvailableZone
(
4
))
return
true
;
if
(
IsAvailableZone
(
5
))
return
true
;
if
(
IsAvailableZone
(
6
))
return
true
;
return
false
;
}
private
void
ResetFlag
()
{
for
(
int
i
=
0
;
i
<
selectFlag
.
Count
;
++
i
)
{
selectFlag
[
i
]
=
false
;
}
}
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
{
if
(
player
==
0
&&
location
==
CardLocation
.
MonsterZone
)
if
(
player
==
0
&&
location
==
CardLocation
.
MonsterZone
)
...
@@ -301,11 +386,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -301,11 +386,6 @@ namespace WindBot.Game.AI.Decks
if
((
Zones
.
z0
&
available
)
>
0
)
return
Zones
.
z0
;
if
((
Zones
.
z0
&
available
)
>
0
)
return
Zones
.
z0
;
if
((
Zones
.
z4
&
available
)
>
0
)
return
Zones
.
z4
;
if
((
Zones
.
z4
&
available
)
>
0
)
return
Zones
.
z4
;
}
}
if
((
Bot
.
HasInMonstersZone
(
CardId
.
ThunderDragonTitan
,
false
,
false
,
true
)
||
Bot
.
HasInMonstersZone
(
CardId
.
ThunderDragonColossus
,
false
,
false
,
true
))
&&
Bot
.
HasInMonstersZone
(
CardId
.
CrossSheep
,
false
,
false
,
true
))
{
if
((
Zones
.
z1
&
available
)
>
0
)
return
Zones
.
z1
;
if
((
Zones
.
z3
&
available
)
>
0
)
return
Zones
.
z3
;
}
if
(
place_Link_4
)
if
(
place_Link_4
)
{
{
place_Link_4
=
false
;
place_Link_4
=
false
;
...
@@ -340,14 +420,15 @@ namespace WindBot.Game.AI.Decks
...
@@ -340,14 +420,15 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
for
(
int
i
=
0
;
i
<
selectFlag
.
Count
;
++
i
)
ResetFlag
();
selectFlag
[
i
]
=
false
;
return
null
;
return
null
;
}
}
}
}
if
(
selectFlag
[(
int
)
Select
.
NormalThunderDragon
])
if
(
selectFlag
[(
int
)
Select
.
NormalThunderDragon
])
{
{
selectFlag
[(
int
)
Select
.
NormalThunderDragon
]
=
false
;
selectFlag
[(
int
)
Select
.
NormalThunderDragon
]
=
false
;
//ThunderDragonTitan
if
(
cards
.
Any
(
card
=>
card
!=
null
&&
card
.
Controller
!=
0
))
return
null
;
if
(
cards
.
Count
<=
1
)
return
null
;
if
(
cards
.
Count
<=
1
)
return
null
;
if
(
Bot
.
HasInHand
(
CardId
.
ChaosSpace
)
&&
!
activate_ChaosSpace_hand
)
if
(
Bot
.
HasInHand
(
CardId
.
ChaosSpace
)
&&
!
activate_ChaosSpace_hand
)
return
Util
.
CheckSelectCount
(
cards
,
cards
,
max
,
max
);
return
Util
.
CheckSelectCount
(
cards
,
cards
,
max
,
max
);
...
@@ -550,6 +631,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -550,6 +631,9 @@ namespace WindBot.Game.AI.Decks
List
<
ClientCard
>
grave_2
=
cards
.
Where
(
card
=>
card
!=
null
&&
card
.
Location
==
CardLocation
.
Grave
&&
(
card
.
Id
==
CardId
.
ThunderDragonroar
||
card
.
Id
==
CardId
.
ThunderDragondark
)).
ToList
();
List
<
ClientCard
>
grave_2
=
cards
.
Where
(
card
=>
card
!=
null
&&
card
.
Location
==
CardLocation
.
Grave
&&
(
card
.
Id
==
CardId
.
ThunderDragonroar
||
card
.
Id
==
CardId
.
ThunderDragondark
)).
ToList
();
if
(
grave_1
.
Count
>
0
)
res
.
AddRange
(
grave_1
);
if
(
grave_1
.
Count
>
0
)
res
.
AddRange
(
grave_1
);
if
(
grave_2
.
Count
>
0
)
res
.
AddRange
(
grave_2
);
if
(
grave_2
.
Count
>
0
)
res
.
AddRange
(
grave_2
);
List
<
ClientCard
>
monsters
=
cards
.
Where
(
card
=>
card
!=
null
&&
card
.
Location
==
CardLocation
.
MonsterZone
).
ToList
();
monsters
.
Sort
(
CardContainer
.
CompareCardAttack
);
if
(
monsters
.
Count
>
0
)
res
.
AddRange
(
monsters
);
if
(
res
.
Count
>
0
)
return
Util
.
CheckSelectCount
(
res
,
cards
,
min
,
max
);
if
(
res
.
Count
>
0
)
return
Util
.
CheckSelectCount
(
res
,
cards
,
min
,
max
);
return
null
;
return
null
;
}
}
...
@@ -601,6 +685,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -601,6 +685,10 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
BrandedRegainedEffect
()
private
bool
BrandedRegainedEffect
()
{
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
AI
.
SelectCard
(
CardId
.
BystialDruiswurm
,
CardId
.
BystialMagnamhut
,
CardId
.
TheBystialLubellion
);
AI
.
SelectCard
(
CardId
.
BystialDruiswurm
,
CardId
.
BystialMagnamhut
,
CardId
.
TheBystialLubellion
);
return
true
;
return
true
;
}
}
...
@@ -768,7 +856,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -768,7 +856,7 @@ namespace WindBot.Game.AI.Decks
{
{
IList
<
CardAttribute
>
attributes
=
new
List
<
CardAttribute
>();
IList
<
CardAttribute
>
attributes
=
new
List
<
CardAttribute
>();
for
(
int
i
=
0
;
i
<
selectAtt
.
Count
;
++
i
)
for
(
int
i
=
0
;
i
<
selectAtt
.
Count
;
++
i
)
if
(
selectAtt
[
i
])
attributes
.
Add
((
CardAttribute
)(
Math
.
Pow
(
2
,
i
)));
if
(
selectAtt
[
i
])
attributes
.
Add
((
CardAttribute
)(
System
.
Math
.
Pow
(
2
,
i
)));
if
(
attributes
.
Count
>
0
)
return
attributes
;
if
(
attributes
.
Count
>
0
)
return
attributes
;
return
null
;
return
null
;
}
}
...
@@ -804,6 +892,20 @@ namespace WindBot.Game.AI.Decks
...
@@ -804,6 +892,20 @@ namespace WindBot.Game.AI.Decks
return
0
;
return
0
;
return
1
;
return
1
;
}
}
private
IList
<
ClientCard
>
CardsIdToClientCards
(
IList
<
int
>
cardsId
,
IList
<
ClientCard
>
cardsList
,
bool
uniqueId
=
true
,
bool
alias
=
true
)
{
if
(
cardsList
?.
Count
()
<=
0
||
cardsId
?.
Count
()
<=
0
)
return
new
List
<
ClientCard
>();
List
<
ClientCard
>
res
=
new
List
<
ClientCard
>();
foreach
(
var
cardid
in
cardsId
)
{
List
<
ClientCard
>
cards
=
cardsList
.
Where
(
card
=>
card
!=
null
&&
(
card
.
Id
==
cardid
||
((
card
.
Alias
!=
0
&&
cardid
==
card
.
Alias
)
&
alias
))).
ToList
();
if
(
cards
?.
Count
<=
0
)
continue
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
if
(
uniqueId
)
res
.
Add
(
cards
.
First
());
else
res
.
AddRange
(
cards
);
}
return
res
;
}
private
bool
IPEffect
()
private
bool
IPEffect
()
{
{
if
(
Duel
.
LastChainPlayer
==
0
)
return
false
;
if
(
Duel
.
LastChainPlayer
==
0
)
return
false
;
...
@@ -813,10 +915,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -813,10 +915,21 @@ namespace WindBot.Game.AI.Decks
CardId
.
UnionCarrier
,
CardId
.
UnionCarrier
,
CardId
.
CrossSheep
CardId
.
CrossSheep
};
};
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsCode
(
materials
))
>=
1
&&
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
))
if
(
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
))
{
{
List
<
ClientCard
>
m
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
pre_m
=
CardsIdToClientCards
(
materials
,
Bot
.
GetMonsters
().
Where
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()).
ToList
());
if
(
pre_m
?.
Count
<=
0
)
return
false
;
int
link_count
=
0
;
foreach
(
var
card
in
pre_m
)
{
m
.
Add
(
card
);
link_count
+=
(
card
.
HasType
(
CardType
.
Link
))
?
card
.
LinkCount
:
1
;
if
(
link_count
>=
4
)
break
;
}
if
(
link_count
<
4
)
return
false
;
AI
.
SelectCard
(
CardId
.
MekkKnightCrusadiaAvramax
);
AI
.
SelectCard
(
CardId
.
MekkKnightCrusadiaAvramax
);
AI
.
SelectMaterials
(
m
aterials
);
AI
.
SelectMaterials
(
m
);
return
true
;
return
true
;
}
}
else
if
(
Bot
.
HasInExtra
(
CardId
.
KnightmareUnicorn
))
else
if
(
Bot
.
HasInExtra
(
CardId
.
KnightmareUnicorn
))
...
@@ -831,24 +944,25 @@ namespace WindBot.Game.AI.Decks
...
@@ -831,24 +944,25 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
card
.
Id
==
CardId
.
UnionCarrier
&&
summon_UnionCarrier
)
continue
;
if
(
card
.
Id
==
CardId
.
UnionCarrier
&&
summon_UnionCarrier
)
continue
;
if
((
GetLinkMark
(
card
.
Id
)
<
3
||
card
.
Id
==
CardId
.
BowoftheGoddess
&&
card
.
Attack
<=
800
)
&&
card
.
Id
!=
CardId
.
ThunderDragonTitan
if
((
GetLinkMark
(
card
.
Id
)
<
3
||
(
card
.
Id
==
CardId
.
BowoftheGoddess
&&
card
.
Attack
<=
800
)
)
&&
card
.
Id
!=
CardId
.
ThunderDragonTitan
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
()
&&
materials_2
.
Count
(
_card
=>
_card
!=
null
&&
_card
.
Id
==
card
.
Id
)
<=
0
)
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
()
&&
materials_2
.
Count
(
_card
=>
_card
!=
null
&&
_card
.
Id
==
card
.
Id
)
<=
0
)
materials_2
.
Add
(
card
);
materials_2
.
Add
(
card
);
}
}
int
link_count
=
0
;
int
link_count
=
0
;
materials_2
.
Sort
(
CardContainer
.
CompareCardAttack
);
materials_2
.
Sort
(
CardContainer
.
CompareCardAttack
);
materials_2
.
Sort
(
CompareCardLink
);
materials_2
.
Sort
(
CompareCardLink
);
materials_2
.
Reverse
();
if
(
materials_2
.
Count
<=
0
)
return
false
;
if
(
materials_2
.
Count
<=
0
)
return
false
;
foreach
(
var
card
in
materials_2
)
foreach
(
var
card
in
materials_2
)
{
{
if
(!
resMaterials
.
Contains
(
card
))
if
(!
resMaterials
.
Contains
(
card
))
{
{
resMaterials
.
Add
(
card
);
resMaterials
.
Add
(
card
);
link_count
+=
1
;
link_count
+=
(
card
.
HasType
(
CardType
.
Link
))
?
card
.
LinkCount
:
1
;
if
(
link_count
>=
1
)
break
;
if
(
link_count
>=
3
)
break
;
}
}
}
}
if
(
link_count
>=
1
)
{
AI
.
SelectCard
(
CardId
.
KnightmareUnicorn
);
AI
.
SelectMaterials
(
resMaterials
);
return
true
;
}
if
(
link_count
>=
3
)
{
AI
.
SelectCard
(
CardId
.
KnightmareUnicorn
);
AI
.
SelectMaterials
(
resMaterials
);
return
true
;
}
}
}
return
false
;
return
false
;
}
}
...
@@ -859,8 +973,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -859,8 +973,9 @@ namespace WindBot.Game.AI.Decks
if
(
Card
.
IsDisabled
())
return
false
;
if
(
Card
.
IsDisabled
())
return
false
;
if
(
Bot
.
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
HasType
(
CardType
.
Link
))
<=
0
)
return
false
;
if
(
Bot
.
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
HasType
(
CardType
.
Link
))
<=
0
)
return
false
;
IList
<
CardAttribute
>
attributes
=
GetAttUsed
();
IList
<
CardAttribute
>
attributes
=
GetAttUsed
();
if
(
attributes
==
null
||
attributes
.
Count
<=
0
)
{
selectFlag
[(
int
)
Select
.
AccesscodeTalker
]
=
true
;
return
true
;
}
if
(
attributes
==
null
||
attributes
.
Count
<=
0
)
{
ResetFlag
();
selectFlag
[(
int
)
Select
.
AccesscodeTalker
]
=
true
;
return
true
;
}
if
(
Bot
.
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
HasType
(
CardType
.
Link
)
&&
!
attributes
.
Contains
((
CardAttribute
)
card
.
Attribute
))
<=
0
)
return
false
;
if
(
Bot
.
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
HasType
(
CardType
.
Link
)
&&
!
attributes
.
Contains
((
CardAttribute
)
card
.
Attribute
))
<=
0
)
return
false
;
ResetFlag
();
selectFlag
[(
int
)
Select
.
AccesscodeTalker
]
=
true
;
selectFlag
[(
int
)
Select
.
AccesscodeTalker
]
=
true
;
return
true
;
return
true
;
}
}
...
@@ -876,10 +991,24 @@ namespace WindBot.Game.AI.Decks
...
@@ -876,10 +991,24 @@ namespace WindBot.Game.AI.Decks
private
bool
CalledbytheGraveEffect
()
private
bool
CalledbytheGraveEffect
()
{
{
ClientCard
card
=
Util
.
GetLastChainCard
();
ClientCard
card
=
Util
.
GetLastChainCard
();
if
(
Duel
.
LastChainPlayer
!=
0
&&
card
!=
null
&&
card
.
Location
==
CardLocation
.
Grave
if
(
card
==
null
)
return
false
;
&&
card
.
HasType
(
CardType
.
Monster
))
int
id
=
card
.
Id
;
List
<
ClientCard
>
g_cards
=
Enemy
.
GetGraveyardMonsters
().
Where
(
g_card
=>
g_card
!=
null
&&
g_card
.
Id
==
id
).
ToList
();
if
(
Duel
.
LastChainPlayer
!=
0
&&
card
!=
null
)
{
{
AI
.
SelectCard
(
card
);
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
if
(
card
.
Location
==
CardLocation
.
Grave
&&
card
.
HasType
(
CardType
.
Monster
))
{
AI
.
SelectCard
(
card
);
}
else
if
(
g_cards
.
Count
()
>
0
&&
card
.
HasType
(
CardType
.
Monster
))
{
AI
.
SelectCard
(
g_cards
);
}
else
return
false
;
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -952,7 +1081,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -952,7 +1081,6 @@ namespace WindBot.Game.AI.Decks
res
.
AddRange
(
mcards
);
res
.
AddRange
(
mcards
);
res
.
AddRange
(
scards
);
res
.
AddRange
(
scards
);
AI
.
SelectCard
(
res
);
AI
.
SelectCard
(
res
);
selectFlag
[(
int
)
Select
.
ThunderDragonTitan
]
=
true
;
return
true
;
return
true
;
}
}
else
else
...
@@ -967,7 +1095,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -967,7 +1095,7 @@ namespace WindBot.Game.AI.Decks
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
PredaplantVerteAnaconda
,
1
))
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
PredaplantVerteAnaconda
,
1
))
{
{
if
(
CheckRemainInDeck
(
CardId
.
ThunderDragonFusion
)
<=
0
)
return
false
;
if
(
CheckRemainInDeck
(
CardId
.
ThunderDragonFusion
)
<=
0
)
return
false
;
if
(
Bot
.
GetMonstersInMainZone
().
Count
>
4
&&
Bot
.
GetMonstersInMainZone
().
Count
(
card
=>
card
!=
null
&&
!
card
.
IsExtraCard
()
&&
card
.
HasSetcode
(
0x11c
)
&&
card
.
HasType
(
CardType
.
Monster
))
<=
0
)
return
false
;
if
(
Bot
.
GetMonstersInMainZone
().
Count
>
4
&&
Bot
.
GetMonstersInMainZone
().
Count
(
card
=>
card
!=
null
&&
!
card
.
IsExtraCard
()
&&
card
.
HasSetcode
(
0x11c
)
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
)
<=
0
)
return
false
;
List
<
ClientCard
>
g_card
=
Bot
.
Graveyard
.
ToList
();
List
<
ClientCard
>
g_card
=
Bot
.
Graveyard
.
ToList
();
List
<
ClientCard
>
b_card
=
Bot
.
Banished
.
ToList
();
List
<
ClientCard
>
b_card
=
Bot
.
Banished
.
ToList
();
g_card
.
AddRange
(
b_card
);
g_card
.
AddRange
(
b_card
);
...
@@ -1070,24 +1198,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -1070,24 +1198,6 @@ namespace WindBot.Game.AI.Decks
}
}
return
false
;
return
false
;
}
}
private
bool
LinkZoneCheck
()
{
bool
res
=
false
;
foreach
(
var
card
in
Bot
.
GetMonstersInMainZone
())
{
if
(
card
==
null
)
continue
;
if
(
card
.
Id
!=
CardId
.
ThunderDragonTitan
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
(
card
.
LinkCount
<
3
||
(
card
.
Id
==
CardId
.
BowoftheGoddess
&&
card
.
Attack
<=
800
)))
{
if
(
Util
.
GetBotAvailZonesFromExtraDeck
(
card
)
>
0
)
{
res
=
true
;
break
;
}
}
}
if
(!
res
)
return
false
;
return
true
;
}
private
bool
PredaplantVerteAnacondaSummon
()
private
bool
PredaplantVerteAnacondaSummon
()
{
{
if
(
CheckRemainInDeck
(
CardId
.
ThunderDragonFusion
)
<=
0
)
return
false
;
if
(
CheckRemainInDeck
(
CardId
.
ThunderDragonFusion
)
<=
0
)
return
false
;
...
@@ -1104,7 +1214,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1104,7 +1214,7 @@ namespace WindBot.Game.AI.Decks
if
(
card
.
IsCode
(
CardId
.
NormalThunderDragon
))
if
(
card
.
IsCode
(
CardId
.
NormalThunderDragon
))
++
Lcount
;
++
Lcount
;
}
}
if
(!
LinkZoneCheck
())
return
false
;
if
(!
IsAvailableLinkZone
())
return
false
;
if
((
count
>=
3
&&
Bot
.
HasInExtra
(
CardId
.
ThunderDragonTitan
))
||
if
((
count
>=
3
&&
Bot
.
HasInExtra
(
CardId
.
ThunderDragonTitan
))
||
(
Bot
.
HasInExtra
(
CardId
.
ThunderDragonColossus
)
&&
Lcount
>
0
&&
g_card
.
Count
(
card
=>
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
))
>
1
))
(
Bot
.
HasInExtra
(
CardId
.
ThunderDragonColossus
)
&&
Lcount
>
0
&&
g_card
.
Count
(
card
=>
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
))
>
1
))
{
{
...
@@ -1124,6 +1234,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1124,6 +1234,7 @@ namespace WindBot.Game.AI.Decks
private
bool
KnightmareUnicornSummon
()
private
bool
KnightmareUnicornSummon
()
{
{
if
(
Bot
.
Hand
.
Count
<=
0
)
return
false
;
if
(
Bot
.
Hand
.
Count
<=
0
)
return
false
;
if
(!
IsAvailableLinkZone
())
return
false
;
List
<
ClientCard
>
pre_cards
=
Enemy
.
GetMonsters
();
List
<
ClientCard
>
pre_cards
=
Enemy
.
GetMonsters
();
pre_cards
.
AddRange
(
Enemy
.
GetSpells
());
pre_cards
.
AddRange
(
Enemy
.
GetSpells
());
if
(
pre_cards
.
Count
(
card
=>
card
!=
null
&&
!
card
.
IsShouldNotBeTarget
())
<=
0
)
return
false
;
if
(
pre_cards
.
Count
(
card
=>
card
!=
null
&&
!
card
.
IsShouldNotBeTarget
())
<=
0
)
return
false
;
...
@@ -1224,6 +1335,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1224,6 +1335,7 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
BowoftheGoddessSummon
()
private
bool
BowoftheGoddessSummon
()
{
{
if
(!
IsAvailableLinkZone
())
return
false
;
if
(
Card
.
Id
==
CardId
.
AccesscodeTalker
)
if
(
Card
.
Id
==
CardId
.
AccesscodeTalker
)
{
{
if
(
Duel
.
Turn
==
0
||
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
<=
0
)
return
false
;
if
(
Duel
.
Turn
==
0
||
Enemy
.
GetMonsterCount
()
+
Enemy
.
GetSpellCount
()
<=
0
)
return
false
;
...
@@ -1244,7 +1356,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -1244,7 +1356,6 @@ namespace WindBot.Game.AI.Decks
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
()
&&
!
card
.
HasType
(
CardType
.
Token
))
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
()
&&
!
card
.
HasType
(
CardType
.
Token
))
tempmaterials
.
Add
(
card
);
tempmaterials
.
Add
(
card
);
}
}
if
(!
LinkZoneCheck
())
return
false
;
int
link_count
=
0
;
int
link_count
=
0
;
List
<
ClientCard
>
materials
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
materials
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
link_materials
=
tempmaterials
.
Where
(
card
=>
card
!=
null
&&
(
card
.
LinkCount
==
3
||
card
.
LinkCount
==
2
)).
ToList
();
List
<
ClientCard
>
link_materials
=
tempmaterials
.
Where
(
card
=>
card
!=
null
&&
(
card
.
LinkCount
==
3
||
card
.
LinkCount
==
2
)).
ToList
();
...
@@ -1324,6 +1435,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1324,6 +1435,7 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
ThunderDragonColossusSummon
()
private
bool
ThunderDragonColossusSummon
()
{
{
ResetFlag
();
selectFlag
[(
int
)
Select
.
ThunderDragonColossus
]
=
true
;
selectFlag
[(
int
)
Select
.
ThunderDragonColossus
]
=
true
;
place_ThunderDragonColossus
=
true
;
place_ThunderDragonColossus
=
true
;
return
true
;
return
true
;
...
@@ -1341,12 +1453,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -1341,12 +1453,14 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
IPSummon
()
private
bool
IPSummon
()
{
{
if
(
Duel
.
Turn
>
0
&&
Duel
.
Phase
<
DuelPhase
.
Main2
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
<=
2
)
return
false
;
if
(
Bot
.
HasInMonstersZone
(
CardId
.
ThunderDragonColossus
)
&&
Bot
.
GetMonsterCount
()
<=
3
)
return
false
;
if
(
Bot
.
HasInMonstersZone
(
CardId
.
ThunderDragonColossus
)
&&
Bot
.
GetMonsterCount
()
<=
3
)
return
false
;
if
(!
Bot
.
HasInExtra
(
CardId
.
KnightmareUnicorn
)
&&
!
Bot
.
HasInExtra
(
CardId
.
BowoftheGoddess
)
if
(!
Bot
.
HasInExtra
(
CardId
.
KnightmareUnicorn
)
&&
!
Bot
.
HasInExtra
(
CardId
.
BowoftheGoddess
)
&&
!
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
)
&&
!
Bot
.
HasInExtra
(
CardId
.
AccesscodeTalker
)
&&
!
Bot
.
HasInExtra
(
CardId
.
UnderworldGoddessoftheClosedWorld
))
return
false
;
&&
!
Bot
.
HasInExtra
(
CardId
.
MekkKnightCrusadiaAvramax
)
&&
!
Bot
.
HasInExtra
(
CardId
.
AccesscodeTalker
)
&&
!
Bot
.
HasInExtra
(
CardId
.
UnderworldGoddessoftheClosedWorld
))
return
false
;
List
<
ClientCard
>
cards
=
Bot
.
GetMonsters
().
Where
(
card
=>
card
!=
null
&&
GetLinkMark
(
card
.
Id
)
<
3
&&
card
.
Id
!=
CardId
.
ThunderDragonTitan
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
!
card
.
HasType
(
CardType
.
Link
)
&&
card
.
Attack
<=
2500
&&
card
.
EquipCards
.
Count
(
ecard
=>
ecard
!=
null
&&
ecard
.
Id
==
CardId
.
DragonBusterDestructionSword
&&
!
ecard
.
IsDisabled
())<=
0
).
ToList
();
List
<
ClientCard
>
cards
=
Bot
.
GetMonsters
().
Where
(
card
=>
card
!=
null
&&
GetLinkMark
(
card
.
Id
)
<
3
&&
card
.
Id
!=
CardId
.
ThunderDragonTitan
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
!
card
.
HasType
(
CardType
.
Link
)
&&
card
.
Attack
<=
2500
&&
card
.
EquipCards
.
Count
(
ecard
=>
ecard
!=
null
&&
ecard
.
Id
==
CardId
.
DragonBusterDestructionSword
&&
!
ecard
.
IsDisabled
())<=
0
).
ToList
();
if
(
cards
.
Count
<
2
)
return
false
;
if
(
cards
.
Count
<
2
)
return
false
;
if
(!
LinkZoneCheck
())
return
false
;
if
(!
IsAvailableLinkZone
())
return
false
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
List
<
int
>
cardsId
=
new
List
<
int
>();
List
<
int
>
cardsId
=
new
List
<
int
>();
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
MonsterZone
))
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
MonsterZone
))
...
@@ -1362,6 +1476,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1362,6 +1476,7 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
ThunderDragonlordSummon
()
private
bool
ThunderDragonlordSummon
()
{
{
if
(
Bot
.
GetMonstersInMainZone
().
Count
>
4
&&
Bot
.
GetMonstersInMainZone
().
Count
(
card
=>
card
!=
null
&&
card
.
Level
<=
8
&&
card
.
HasType
(
CardType
.
Tuner
)
&&
!
card
.
IsExtraCard
()
&&
card
.
IsFaceup
())
<=
0
)
return
false
;
IList
<
int
>
cardsId
=
new
List
<
int
>();
IList
<
int
>
cardsId
=
new
List
<
int
>();
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
Hand
)
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
Hand
)
||
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
MonsterZone
,
true
))
||
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
MonsterZone
,
true
))
...
@@ -1372,17 +1487,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -1372,17 +1487,21 @@ namespace WindBot.Game.AI.Decks
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
Hand
)
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
Hand
)
||
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
MonsterZone
,
true
))
||
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
MonsterZone
,
true
))
cardsId
.
Add
(
CardId
.
ThunderDragonmatrix
);
cardsId
.
Add
(
CardId
.
ThunderDragonmatrix
);
List
<
ClientCard
>
handCards
=
Bot
.
Hand
.
ToList
();
List
<
ClientCard
>
handCards
=
Bot
.
Hand
.
Where
(
card
=>
card
!=
null
).
ToList
();
handCards
.
Sort
(
CardContainer
.
CompareCardLevel
);
handCards
.
Sort
(
CardContainer
.
CompareCardLevel
);
List
<
ClientCard
>
monsterCards
=
Bot
.
GetMonsters
().
ToList
();
List
<
ClientCard
>
monsterCards
=
Bot
.
GetMonsters
().
ToList
();
monsterCards
.
Sort
(
CardContainer
.
CompareCardAttack
);
monsterCards
.
Sort
(
CardContainer
.
CompareCardAttack
);
foreach
(
var
card
in
handCards
)
foreach
(
var
card
in
handCards
)
if
(
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
)
&&
card
.
Level
<=
8
)
{
if
(
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
)
&&
card
.
Level
<=
8
)
cardsId
.
Add
(
card
.
Id
);
cardsId
.
Add
(
card
.
Id
);
}
foreach
(
var
card
in
monsterCards
)
foreach
(
var
card
in
monsterCards
)
{
if
(
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
)
&&
card
.
Level
<=
8
if
(
card
!=
null
&&
card
.
HasRace
(
CardRace
.
Thunder
)
&&
card
.
Level
<=
8
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
())
&&
card
.
Id
!=
CardId
.
ThunderDragonColossus
&&
card
.
IsFaceup
())
cardsId
.
Add
(
card
.
Id
);
cardsId
.
Add
(
card
.
Id
);
}
if
(
cardsId
.
Count
<=
0
)
return
false
;
if
(
cardsId
.
Count
<=
0
)
return
false
;
AI
.
SelectCard
(
cardsId
);
AI
.
SelectCard
(
cardsId
);
return
true
;
return
true
;
...
@@ -1445,7 +1564,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1445,7 +1564,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Bot
.
ExtraDeck
.
Count
(
card
=>
card
!=
null
&&
card
.
LinkCount
==
2
)
<=
0
)
return
false
;
if
(
Bot
.
ExtraDeck
.
Count
(
card
=>
card
!=
null
&&
card
.
LinkCount
==
2
)
<=
0
)
return
false
;
}
}
if
(
Card
.
Id
==
CardId
.
ThunderDragonroar
||
Card
.
Id
==
CardId
.
ThunderDragondark
)
if
(
Card
.
Id
==
CardId
.
ThunderDragonroar
||
Card
.
Id
==
CardId
.
ThunderDragondark
||
Card
.
Id
==
CardId
.
NormalThunderDragon
)
{
{
if
(!
Bot
.
HasInExtra
(
CardId
.
ThunderDragonColossus
)
||
!
handActivated
)
return
false
;
if
(!
Bot
.
HasInExtra
(
CardId
.
ThunderDragonColossus
)
||
!
handActivated
)
return
false
;
}
}
...
@@ -1544,6 +1663,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1544,6 +1663,7 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
GoldSarcophagusEffect
()
private
bool
GoldSarcophagusEffect
()
{
{
if
(
GetRemainingThunderCount
()
<=
0
)
return
false
;
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
Deck
)
&&
Bot
.
GetMonstersInMainZone
().
Count
<
5
)
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonroar
,
CardLocation
.
Deck
)
&&
Bot
.
GetMonstersInMainZone
().
Count
<
5
)
AI
.
SelectCard
(
CardId
.
ThunderDragonroar
);
AI
.
SelectCard
(
CardId
.
ThunderDragonroar
);
else
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragondark
,
CardLocation
.
Deck
))
else
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragondark
,
CardLocation
.
Deck
))
...
@@ -1551,6 +1671,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -1551,6 +1671,10 @@ namespace WindBot.Game.AI.Decks
else
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
Deck
))
else
if
(
HasInZoneNoActivate
(
CardId
.
ThunderDragonmatrix
,
CardLocation
.
Deck
))
AI
.
SelectCard
(
CardId
.
ThunderDragonmatrix
);
AI
.
SelectCard
(
CardId
.
ThunderDragonmatrix
);
else
AI
.
SelectCard
(
CardId
.
ThunderDragonmatrix
);
else
AI
.
SelectCard
(
CardId
.
ThunderDragonmatrix
);
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
return
true
;
return
true
;
}
}
private
bool
UnionCarrierSummon
()
private
bool
UnionCarrierSummon
()
...
@@ -1626,6 +1750,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1626,6 +1750,7 @@ namespace WindBot.Game.AI.Decks
&&
raceThunderCards
.
Count
()
<
2
&&
raceDragonCards
.
Count
()
<
2
&&
raceBeastCards
.
Count
()
<
2
)
&&
raceThunderCards
.
Count
()
<
2
&&
raceDragonCards
.
Count
()
<
2
&&
raceBeastCards
.
Count
()
<
2
)
return
false
;
return
false
;
if
(!
LinkCheck
(
false
)
||
!
LinkCheck
(
true
))
return
false
;
if
(!
LinkCheck
(
false
)
||
!
LinkCheck
(
true
))
return
false
;
if
(!
IsAvailableLinkZone
())
return
false
;
if
(
Bot
.
MonsterZone
[
6
]
!=
null
&&
Bot
.
MonsterZone
[
6
].
Controller
==
0
&&
GetLinkMark
(
Bot
.
MonsterZone
[
6
].
Id
)
>
1
)
return
false
;
if
(
Bot
.
MonsterZone
[
6
]
!=
null
&&
Bot
.
MonsterZone
[
6
].
Controller
==
0
&&
GetLinkMark
(
Bot
.
MonsterZone
[
6
].
Id
)
>
1
)
return
false
;
int
[]
materials
=
new
[]
{
int
[]
materials
=
new
[]
{
CardId
.
StrikerDragon
,
CardId
.
BatterymanToken
,
CardId
.
BatterymanSolar
,
CardId
.
StrikerDragon
,
CardId
.
BatterymanToken
,
CardId
.
BatterymanSolar
,
...
@@ -1790,6 +1915,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1790,6 +1915,7 @@ namespace WindBot.Game.AI.Decks
pre_res
.
Add
(
mcard
);
pre_res
.
Add
(
mcard
);
}
}
}
}
if
(
res
.
Count
()
<=
0
)
return
false
;
if
(
pre_res
.
Count
>
0
)
res
.
AddRange
(
pre_res
);
if
(
pre_res
.
Count
>
0
)
res
.
AddRange
(
pre_res
);
AI
.
SelectCard
(
res
);
AI
.
SelectCard
(
res
);
}
}
...
@@ -1845,6 +1971,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1845,6 +1971,7 @@ namespace WindBot.Game.AI.Decks
if
(!
isShoudlSummon_1
)
return
false
;
if
(!
isShoudlSummon_1
)
return
false
;
}
}
if
(!
IsAvailableLinkZone
())
return
false
;
IList
<
int
>
cardsid
=
GetZoneRepeatCardsId
(
0
,
Bot
.
MonsterZone
,
true
);
IList
<
int
>
cardsid
=
GetZoneRepeatCardsId
(
0
,
Bot
.
MonsterZone
,
true
);
if
(!
cardsid
.
Contains
(-
1
)
&&
Bot
.
MonsterZone
.
Count
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()
&&
!
card
.
IsOriginalCode
(
CardId
.
ThunderDragonColossus
)
&&
GetLinkMark
(
card
.
Id
)
<=
1
)
if
(!
cardsid
.
Contains
(-
1
)
&&
Bot
.
MonsterZone
.
Count
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()
&&
!
card
.
IsOriginalCode
(
CardId
.
ThunderDragonColossus
)
&&
GetLinkMark
(
card
.
Id
)
<=
1
)
-
cardsid
.
Count
()
<
2
)
return
false
;
-
cardsid
.
Count
()
<
2
)
return
false
;
...
@@ -2148,6 +2275,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -2148,6 +2275,7 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
if
(
Bot
.
GetMonstersInMainZone
().
Count
>
4
&&
Bot
.
GetMonstersInMainZone
().
Count
(
card
=>
card
!=
null
&&
!
card
.
IsExtraCard
()
&&
card
.
HasSetcode
(
0x11c
)
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
())
<=
0
)
return
false
;
List
<
ClientCard
>
cards
=
Bot
.
Graveyard
.
ToList
();
List
<
ClientCard
>
cards
=
Bot
.
Graveyard
.
ToList
();
IList
<
ClientCard
>
banish
=
Bot
.
Banished
;
IList
<
ClientCard
>
banish
=
Bot
.
Banished
;
cards
.
AddRange
(
banish
);
cards
.
AddRange
(
banish
);
...
@@ -2162,6 +2290,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -2162,6 +2290,10 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
CardId
.
ThunderDragonColossus
,
CardId
.
ThunderDragonTitan
);
AI
.
SelectCard
(
CardId
.
ThunderDragonColossus
,
CardId
.
ThunderDragonTitan
);
return
true
;
return
true
;
}
}
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
return
false
;
return
false
;
}
}
}
}
...
@@ -2203,8 +2335,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -2203,8 +2335,13 @@ namespace WindBot.Game.AI.Decks
(
card
.
HasAttribute
(
CardAttribute
.
Dark
)
||
card
.
HasAttribute
(
CardAttribute
.
Light
))
(
card
.
HasAttribute
(
CardAttribute
.
Dark
)
||
card
.
HasAttribute
(
CardAttribute
.
Light
))
&&
!
card
.
IsCode
(
CardId
.
ThunderDragonroar
)
&&
!
card
.
IsCode
(
CardId
.
ThunderDragondark
)
&&
!
card
.
IsCode
(
CardId
.
ThunderDragonhawk
)
&&
!
card
.
IsCode
(
CardId
.
ThunderDragonroar
)
&&
!
card
.
IsCode
(
CardId
.
ThunderDragondark
)
&&
!
card
.
IsCode
(
CardId
.
ThunderDragonhawk
)
&&
!
card
.
IsCode
(
CardId
.
NormalThunderDragon
)))
return
false
;
&&
!
card
.
IsCode
(
CardId
.
NormalThunderDragon
)))
return
false
;
ResetFlag
();
selectFlag
[(
int
)
Select
.
ChaosSpace_1
]
=
true
;
selectFlag
[(
int
)
Select
.
ChaosSpace_1
]
=
true
;
activate_ChaosSpace_hand
=
true
;
activate_ChaosSpace_hand
=
true
;
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -2266,6 +2403,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -2266,6 +2403,10 @@ namespace WindBot.Game.AI.Decks
cardsid
.
AddRange
(
cardsid_2
);
cardsid
.
AddRange
(
cardsid_2
);
AI
.
SelectCard
(
cardsid
);
AI
.
SelectCard
(
cardsid
);
}
}
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
AI
.
SelectPlace
(
SelectSTPlace
(
Card
,
true
));
}
return
true
;
return
true
;
}
}
private
bool
ThunderDragondarkEffect_2
()
private
bool
ThunderDragondarkEffect_2
()
...
@@ -2351,6 +2492,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -2351,6 +2492,7 @@ namespace WindBot.Game.AI.Decks
private
bool
NormalThunderDragonEffect
()
private
bool
NormalThunderDragonEffect
()
{
{
handActivated
=
true
;
handActivated
=
true
;
ResetFlag
();
selectFlag
[(
int
)
Select
.
NormalThunderDragon
]
=
true
;
selectFlag
[(
int
)
Select
.
NormalThunderDragon
]
=
true
;
return
true
;
return
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