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
0c4b3474
Commit
0c4b3474
authored
May 29, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ChainBurn deck by handsomekiwi
parent
745421f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
868 additions
and
685 deletions
+868
-685
Game/AI/Decks/ChainBurnExecutor.cs
Game/AI/Decks/ChainBurnExecutor.cs
+868
-685
No files found.
Game/AI/Decks/ChainBurnExecutor.cs
View file @
0c4b3474
...
...
@@ -11,7 +11,8 @@ namespace WindBot.Game.AI.Decks
{
public
class
CardId
{
public
const
int
SandaionTheTimloard
=
100227025
;
public
const
int
SandaionTheTimelord
=
100227025
;
public
const
int
MichionTimelord
=
100227021
;
public
const
int
Mathematician
=
41386308
;
public
const
int
DiceJar
=
3549275
;
public
const
int
CardcarD
=
45812361
;
...
...
@@ -48,16 +49,18 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDuality
,
PotOfDualityeff
);
//normal summon
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MichionTimelord
,
MichionTimelordsummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
SandaionTheTimelord
,
SandaionTheTimelord_summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Mathematician
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Mathematician
,
Mathematicianeff
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
DiceJar
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DiceJar
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
CardcarD
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AbouluteKingBackJack
,
AbouluteKingBackJacksummon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
AbouluteKingBackJack
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AbouluteKingBackJack
,
AbouluteKingBackJackeff
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
CardcarD
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
SandaionTheTimloard
,
SandaionTheTimloard_summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SandaionTheTimloard
,
SandaionTheTimloardeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MichionTimelord
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SandaionTheTimelord
,
SandaionTheTimelordeff
);
// Set traps
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
Waboku
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
ThreateningRoar
);
...
...
@@ -71,31 +74,33 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BalanceOfJudgment
,
BalanceOfJudgmenteff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AccuulatedFortune
);
//battle
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BlazingMirrorForce
,
BlazingMirrorForceeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MagicCylinder
,
MagicCylindereff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThreateningRoar
,
ThreateningRoareff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Waboku
,
Wabokueff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BattleFader
,
BattleFadereff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MagicCylinder
,
MagicCylindereff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BlazingMirrorForce
,
BlazingMirrorForceeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
RingOfDestruction
,
Ring_act
);
//chain
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
JustDesserts
,
JustDessertseff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
OjamaTrio
,
OjamaTrioeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Ceasefire
,
Ceasefireeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SecretBlast
,
SecretBlasteff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SectetBarrel
,
SectetBarreleff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
RecklessGreed
,
RecklessGreedeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
OjamaTrio
,
OjamaTrioeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AbouluteKingBackJack
,
AbouluteKingBackJackeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ChainStrike
,
ChainStrikeeff
);
//sp
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
Linkuriboh
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Linkuriboh
,
Linkuriboheff
);
AddExecutor
(
ExecutorType
.
Repos
,
MonsterRepos
);
}
public
int
[]
all_List
()
{
return
new
[]
{
CardId
.
SandaionTheTimloard
,
CardId
.
SandaionTheTimelord
,
CardId
.
MichionTimelord
,
CardId
.
Mathematician
,
CardId
.
DiceJar
,
CardId
.
CardcarD
,
...
...
@@ -143,7 +148,8 @@ namespace WindBot.Game.AI.Decks
public
int
[]
AbouluteKingBackJack_List_2
()
{
return
new
[]
{
CardId
.
SandaionTheTimloard
,
CardId
.
MichionTimelord
,
CardId
.
SandaionTheTimelord
,
CardId
.
PotOfDesires
,
CardId
.
Mathematician
,
CardId
.
DiceJar
,
...
...
@@ -186,7 +192,8 @@ namespace WindBot.Game.AI.Decks
return
new
[]
{
CardId
.
PotOfDesires
,
CardId
.
SandaionTheTimloard
,
CardId
.
MichionTimelord
,
CardId
.
SandaionTheTimelord
,
CardId
.
BattleFader
,
CardId
.
Waboku
,
...
...
@@ -218,8 +225,9 @@ namespace WindBot.Game.AI.Decks
}
public
bool
Has_prevent_list_1
(
int
id
)
{
return
(
id
==
CardId
.
SandaionTheTimloard
||
id
==
CardId
.
BattleFader
return
(
id
==
CardId
.
SandaionTheTimelord
||
id
==
CardId
.
BattleFader
||
id
==
CardId
.
MichionTimelord
);
}
bool
no_sp
=
false
;
...
...
@@ -228,11 +236,12 @@ namespace WindBot.Game.AI.Decks
int
expected_blood
=
0
;
bool
prevent_used
=
false
;
int
preventcount
=
0
;
bool
battleprevent
=
false
;
bool
OjamaTrioused
=
false
;
bool
OjamaTrioused_draw
=
false
;
bool
OjamaTrioused_do
=
false
;
bool
drawfirst
=
false
;
bool
Linkuribohused
=
true
;
bool
Timelord_check
=
false
;
int
Waboku_count
=
0
;
int
Roar_count
=
0
;
int
strike_count
=
0
;
...
...
@@ -242,6 +251,7 @@ namespace WindBot.Game.AI.Decks
int
just_count
=
0
;
int
Ojama_count
=
0
;
int
HasAccuulatedFortune
=
0
;
public
override
bool
OnSelectHand
()
{
return
true
;
...
...
@@ -249,17 +259,16 @@ namespace WindBot.Game.AI.Decks
public
override
void
OnNewTurn
()
{
if
(
Bot
.
HasInHand
(
CardId
.
SandaionTheTimelord
)
||
Bot
.
HasInHand
(
CardId
.
MichionTimelord
))
Logger
.
DebugWriteLine
(
"2222222222222222SandaionTheTimelord"
);
no_sp
=
false
;
prevent_used
=
false
;
Linkuribohused
=
true
;
Timelord_check
=
false
;
}
public
override
void
OnNewPhase
()
{
preventcount
=
0
;
battleprevent
=
false
;
OjamaTrioused
=
false
;
IList
<
ClientCard
>
trap
=
Bot
.
GetSpells
();
...
...
@@ -270,24 +279,35 @@ namespace WindBot.Game.AI.Decks
if
(
Has_prevent_list_0
(
card
.
Id
))
{
preventcount
++;
battleprevent
=
true
;
}
}
foreach
(
ClientCard
card
in
monster
)
{
if
(
Has_prevent_list_1
(
card
.
Id
))
{
preventcount
++;
battleprevent
=
true
;
}
}
foreach
(
ClientCard
card
in
monster
)
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
SandaionTheTimelord
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MichionTimelord
))
{
prevent_used
=
true
;
Timelord_check
=
true
;
}
}
if
(
prevent_used
&&
Timelord_check
)
{
if
(!
Bot
.
HasInMonstersZone
(
CardId
.
SandaionTheTimelord
)
||
!
Bot
.
HasInMonstersZone
(
CardId
.
MichionTimelord
))
prevent_used
=
false
;
}
expected_blood
=
0
;
one_turn_kill
=
false
;
one_turn_kill_1
=
false
;
OjamaTrioused_draw
=
false
;
OjamaTrioused_do
=
false
;
drawfirst
=
false
;
HasAccuulatedFortune
=
0
;
strike_count
=
0
;
...
...
@@ -348,11 +368,6 @@ namespace WindBot.Game.AI.Decks
Roar_count
++;
}
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
Enemy
.
GetMonsterCount
()
<=
2
&&
Enemy
.
GetMonsterCount
()
>=
1
)
{
if
(
HasAccuulatedFortune
>
0
)
OjamaTrioused_draw
=
true
;
}
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
);
if
(
Enemy
.
LifePoints
<=
expected_blood
&&
Duel
.
Player
==
1
)
{
...
...
@@ -366,21 +381,35 @@ namespace WindBot.Game.AI.Decks
if
(
barrel_count
>=
2
)
barrel_count
=
1
;
if
(
Waboku_count
>=
2
)
Waboku_count
=
1
;
if
(
Roar_count
>=
2
)
Roar_count
=
1
;
if
(
strike_count
>=
2
)
strike_count
=
1
;
int
currentchain
=
0
;
if
(
OjamaTrioused_d
raw
)
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
Roar_count
+
greed_count
+
strike_count
+
Ojama_count
;
if
(
OjamaTrioused_d
o
)
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
Roar_count
+
greed_count
+
Ojama_count
;
else
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
greed_count
+
Roar_count
+
strike_count
;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
greed_count
+
Roar_count
;
//if (currentchain >= 3 && Duel.Player == 1) drawfirst = true;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
;
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+(
currentchain
+
1
)*
400
);
/*if (!one_turn_kill && Enemy.LifePoints <= expected_blood && Duel.Player == 1)
if
(
Bot
.
HasInSpellZone
(
CardId
.
ChainStrike
))
{
Logger.DebugWriteLine(" one_turn_kill_1");
if
(
strike_count
==
1
)
{
if
(
OjamaTrioused_do
)
expected_blood
=
((
Enemy
.
GetMonsterCount
()
+
3
)
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
)
*
400
);
else
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
)
*
400
);
}
else
{
if
(
OjamaTrioused_do
)
expected_blood
=
((
Enemy
.
GetMonsterCount
()
+
3
)
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
+
currentchain
+
2
)
*
400
);
else
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
+
currentchain
+
2
)
*
400
);
}
if
(!
one_turn_kill
&&
Enemy
.
LifePoints
<=
expected_blood
&&
Duel
.
Player
==
1
)
{
Logger
.
DebugWriteLine
(
" %%%%%%%%%%%%%%%%%one_turn_kill_1"
);
one_turn_kill_1
=
true
;
}*/
OjamaTrioused
=
true
;
}
}
}
...
...
@@ -406,11 +435,17 @@ namespace WindBot.Game.AI.Decks
if
(
Card
.
Id
==
CardId
.
OjamaTrio
&&
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
))
return
false
;
return
(
Card
.
IsTrap
()
||
Card
.
HasType
(
CardType
.
QuickPlay
))
&&
Bot
.
GetSpellCountWithoutField
()
<
5
;
}
private
bool
SandaionTheTimloard_summon
()
private
bool
MichionTimelordsummon
()
{
if
(!
battleprevent
)
return
true
;
if
(
Duel
.
Turn
==
1
)
return
false
;
return
true
;
}
private
bool
SandaionTheTimelord_summon
()
{
Logger
.
DebugWriteLine
(
"&&&&&&&&&SandaionTheTimelord_summon"
);
return
true
;
}
private
bool
AbouluteKingBackJacksummon
()
{
...
...
@@ -434,34 +469,28 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
pot_list
());
return
true
;
}
private
bool
BlazingMirrorForceeff
()
{
if
(
prevent_used
)
return
false
;
IList
<
ClientCard
>
list
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
{
list
.
Add
(
monster
);
}
//if (GetTotalATK(list) / 2 >= Bot.LifePoints) return false;
if
(
GetTotalATK
(
list
)
<
3000
)
return
false
;
return
Enemy
.
HasAttackingMonster
()
&&
DefaultUniqueTrap
();
}
private
bool
ThreateningRoareff
()
{
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
if
(
drawfirst
)
return
true
;
if
(
DefaultOnBecomeTarget
())
return
DefaultUniqueTrap
();
if
(
DefaultOnBecomeTarget
())
{
prevent_used
=
true
;
return
true
;
}
if
(
prevent_used
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
prevent_used
=
true
;
return
DefaultUniqueTrap
();
}
private
bool
SandaionTheTim
loardeff
()
private
bool
SandaionTheTim
elordeff
()
{
prevent_used
=
true
;
Logger
.
DebugWriteLine
(
"***********SandaionTheTimelordeff"
);
return
true
;
}
private
bool
Wabokueff
()
{
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
if
(
drawfirst
)
{
Linkuribohused
=
false
;
...
...
@@ -470,7 +499,8 @@ namespace WindBot.Game.AI.Decks
if
(
DefaultOnBecomeTarget
())
{
Linkuribohused
=
false
;
return
DefaultUniqueTrap
();
prevent_used
=
true
;
return
true
;
}
if
(
prevent_used
||
Duel
.
Player
==
0
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
prevent_used
=
true
;
...
...
@@ -479,16 +509,38 @@ namespace WindBot.Game.AI.Decks
}
private
bool
BattleFadereff
()
{
if
(
AI
.
Utils
.
ChainContainsCard
(
CardId
.
BlazingMirrorForce
)
||
AI
.
Utils
.
ChainContainsCard
(
CardId
.
MagicCylinder
))
return
false
;
if
(
prevent_used
||
Duel
.
Player
==
0
)
return
false
;
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
prevent_used
=
true
;
return
true
;
}
private
bool
BlazingMirrorForceeff
()
{
if
(
prevent_used
)
return
false
;
IList
<
ClientCard
>
list
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
monster
in
Enemy
.
GetMonsters
())
{
if
(
monster
.
IsAttack
())
list
.
Add
(
monster
);
}
if
(
GetTotalATK
(
list
)
/
2
>=
Bot
.
LifePoints
)
return
false
;
Logger
.
DebugWriteLine
(
"!!!!!!!!BlazingMirrorForceeff"
+
GetTotalATK
(
list
)
/
2
);
if
(
GetTotalATK
(
list
)
/
2
>=
Enemy
.
LifePoints
)
return
DefaultUniqueTrap
();
if
(
GetTotalATK
(
list
)
<
3000
)
return
false
;
prevent_used
=
true
;
return
DefaultUniqueTrap
();
}
private
bool
MagicCylindereff
()
{
if
(
prevent_used
)
return
false
;
if
(
Bot
.
LifePoints
<=
Enemy
.
BattlingMonster
.
Attack
)
return
DefaultUniqueTrap
();
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
)
return
DefaultUniqueTrap
();
if
(
Enemy
.
LifePoints
<=
Enemy
.
BattlingMonster
.
Attack
)
return
DefaultUniqueTrap
();
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
)
return
DefaultUniqueTrap
();
return
false
;
}
public
bool
Ring_act
()
...
...
@@ -509,6 +561,7 @@ namespace WindBot.Game.AI.Decks
}
private
bool
RecklessGreedeff
()
{
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
int
count
=
0
;
foreach
(
ClientCard
card
in
Bot
.
GetSpells
())
{
...
...
@@ -517,33 +570,54 @@ namespace WindBot.Game.AI.Decks
}
bool
Demiseused
=
AI
.
Utils
.
ChainContainsCard
(
CardId
.
CardOfDemise
);
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
drawfirst
)
return
UniqueFaceupSpell
();
if
(
DefaultOnBecomeTarget
()
&&
count
>
1
)
return
true
;
if
(
Demiseused
)
return
false
;
if
(
count
>
1
)
return
true
;
if
(
Bot
.
LifePoints
<=
2000
)
return
true
;
if
(
Bot
.
LifePoints
<=
3000
)
return
true
;
if
(
Bot
.
GetHandCount
()
<
1
&&
Duel
.
Player
==
0
&&
Duel
.
Phase
!=
DuelPhase
.
Standby
)
return
true
;
return
false
;
}
private
bool
SectetBarreleff
()
{
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
DefaultOnBecomeTarget
())
return
true
;
if
(
Duel
.
Player
==
0
)
return
false
;
if
(
drawfirst
)
return
true
;
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
if
(
one_turn_kill
)
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
Enemy
.
GetFieldHandCount
();
int
monster_count
=
Enemy
.
GetMonsterCount
()
-
Enemy
.
GetMonstersExtraZoneCount
();
if
(
Enemy
.
LifePoints
<
count
*
200
)
return
true
;
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
monster_count
<=
2
&&
monster_count
>=
1
)
{
if
(
count
+
3
>=
8
)
{
OjamaTrioused
=
true
;
return
true
;
}
}
if
(
count
>=
8
)
return
true
;
return
false
;
}
private
bool
SecretBlasteff
()
{
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
DefaultOnBecomeTarget
())
return
true
;
if
(
Duel
.
Player
==
0
)
return
false
;
if
(
drawfirst
)
return
UniqueFaceupSpell
();
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
if
(
one_turn_kill
)
return
true
;
int
count
=
Enemy
.
GetFieldCount
();
int
monster_count
=
Enemy
.
GetMonsterCount
()
-
Enemy
.
GetMonstersExtraZoneCount
();
if
(
Enemy
.
LifePoints
<
count
*
300
)
return
true
;
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
monster_count
<=
2
&&
monster_count
>=
1
)
{
if
(
count
+
3
>=
5
)
{
OjamaTrioused
=
true
;
return
true
;
}
}
if
(
count
>=
5
)
return
true
;
return
false
;
...
...
@@ -555,24 +629,25 @@ namespace WindBot.Game.AI.Decks
}
private
bool
JustDessertseff
()
{
if
(
Duel
.
Player
==
0
)
return
false
;
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
Enemy
.
GetMonsterCount
();
if
(
Duel
.
Player
==
0
)
return
false
;
if
(
drawfirst
)
return
UniqueFaceupSpell
();
if
(
one_turn_kill_1
)
return
UniqueFaceupSpell
();
if
(
one_turn_kill
)
return
true
;
int
count
=
Enemy
.
GetMonsterCount
()-
Enemy
.
GetMonstersExtraZoneCount
();
if
(
Enemy
.
LifePoints
<=
count
*
500
)
return
true
;
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
count
<=
2
&&
count
>=
1
)
{
OjamaTrioused
=
true
;
return
true
;
}
if
(
count
>=
4
)
return
true
;
if
(
count
>=
3
)
return
true
;
return
false
;
}
private
bool
ChainStrikeeff
()
{
if
(
one_turn_kill
)
return
true
;
if
(
one_turn_kill_1
)
return
true
;
if
(
drawfirst
)
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
chain
=
Duel
.
CurrentChain
.
Count
;
...
...
@@ -634,10 +709,10 @@ namespace WindBot.Game.AI.Decks
}
private
bool
Linkuriboheff
()
{
IList
<
ClientCard
>
newlist
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
newmonster
in
Enemy
.
GetMonsters
())
{
if
(
newmonster
.
IsAttack
())
newlist
.
Add
(
newmonster
);
}
if
(!
Linkuribohused
)
return
false
;
...
...
@@ -645,47 +720,155 @@ namespace WindBot.Game.AI.Decks
{
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
&&
Bot
.
HasInSpellZone
(
CardId
.
MagicCylinder
))
return
false
;
}
if
(
GetTotalATK
(
newlist
)
>=
3000
&&
Bot
.
HasInSpellZone
(
CardId
.
BlazingMirrorForce
))
return
false
;
if
(
GetTotalATK
(
newlist
)
/
2
>=
Bot
.
LifePoints
&&
Bot
.
HasInSpellZone
(
CardId
.
BlazingMirrorForce
))
return
true
;
if
(
GetTotalATK
(
newlist
)
/
2
>=
Enemy
.
LifePoints
&&
Bot
.
HasInSpellZone
(
CardId
.
BlazingMirrorForce
))
return
false
;
if
(
AI
.
Utils
.
GetLastChainCard
()
==
null
)
return
true
;
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
CardId
.
Linkuriboh
)
return
false
;
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
CardId
.
Linkuriboh
)
return
false
;
return
true
;
}
public
bool
MonsterRepos
()
{
if
(
Card
.
IsFacedown
()
&&
Card
.
Id
!=
CardId
.
DiceJar
)
return
true
;
return
base
.
DefaultMonsterRepos
();
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
attacker
.
Id
==
CardId
.
Linkuriboh
&&
defender
.
IsFacedown
())
return
false
;
if
(
attacker
.
Id
==
CardId
.
SandaionTheTimelord
&&
!
attacker
.
IsDisabled
())
{
attacker
.
RealPower
=
9999
;
return
true
;
}
if
(
attacker
.
Id
==
CardId
.
MichionTimelord
&&
!
attacker
.
IsDisabled
())
{
attacker
.
RealPower
=
9999
;
return
true
;
}
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
/*private bool SwordsOfRevealingLight()
public
override
void
OnChaining
(
int
player
,
ClientCard
card
)
{
int count = Bot.SpellZone.GetCardCount(CardId.SwordsOfRevealingLight);
return count == 0;
}*/
expected_blood
=
0
;
one_turn_kill
=
false
;
one_turn_kill_1
=
false
;
OjamaTrioused_draw
=
false
;
OjamaTrioused_do
=
false
;
drawfirst
=
false
;
HasAccuulatedFortune
=
0
;
strike_count
=
0
;
greed_count
=
0
;
blast_count
=
0
;
barrel_count
=
0
;
just_count
=
0
;
Waboku_count
=
0
;
Roar_count
=
0
;
Ojama_count
=
0
;
/*
private bool SetInvincibleMonster()
IList
<
ClientCard
>
check
=
Bot
.
GetSpells
();
foreach
(
ClientCard
card1
in
check
)
{
foreach (ClientCard card in Bot.GetMonsters())
if
(
card1
.
Id
==
CardId
.
AccuulatedFortune
)
HasAccuulatedFortune
++;
}
foreach
(
ClientCard
card1
in
check
)
{
if (card.Id == CardId.Marshmallon || card.Id == CardId.SpiritReaper)
if
(
card1
.
Id
==
CardId
.
SecretBlast
)
blast_count
++;
}
foreach
(
ClientCard
card1
in
check
)
{
return false;
if
(
card1
.
Id
==
CardId
.
SectetBarrel
)
barrel_count
++;
}
foreach
(
ClientCard
card1
in
check
)
{
if
(
card1
.
Id
==
CardId
.
JustDesserts
)
just_count
++;
}
return true;
}*/
foreach
(
ClientCard
card1
in
check
)
{
if
(
card1
.
Id
==
CardId
.
ChainStrike
)
strike_count
++;
}
foreach
(
ClientCard
card1
in
Bot
.
GetSpells
())
{
if
(
card1
.
Id
==
CardId
.
RecklessGreed
)
greed_count
++;
/*
private bool ReposEverything()
}
foreach
(
ClientCard
card1
in
check
)
{
if (Card.Id == CardId.ReflectBounder)
return Card.IsDefense();
if (Card.Id == CardId.FencingFireFerret)
return DefaultMonsterRepos();
if (Card.IsAttack())
return true;
return false;
if
(
card1
.
Id
==
CardId
.
Waboku
)
Waboku_count
++;
}
foreach
(
ClientCard
card1
in
check
)
{
if
(
card1
.
Id
==
CardId
.
ThreateningRoar
)
Roar_count
++;
}
/*if (Bot.HasInSpellZone(CardId.OjamaTrio) && Enemy.GetMonsterCount() <= 2 && Enemy.GetMonsterCount() >= 1)
{
if (HasAccuulatedFortune > 0) OjamaTrioused_draw = true;
}*/
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
(
Enemy
.
GetMonsterCount
()
-
Enemy
.
GetMonstersExtraZoneCount
())
<=
2
&&
(
Enemy
.
GetMonsterCount
()
-
Enemy
.
GetMonstersExtraZoneCount
())
>=
1
)
{
OjamaTrioused_do
=
true
;
}
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
);
if
(
Enemy
.
LifePoints
<=
expected_blood
&&
Duel
.
Player
==
1
)
{
Logger
.
DebugWriteLine
(
" %%%%%%%%%%%%%%%%%one_turn_kill"
);
one_turn_kill
=
true
;
}
expected_blood
=
0
;
if
(
greed_count
>=
2
)
greed_count
=
1
;
if
(
blast_count
>=
2
)
blast_count
=
1
;
if
(
just_count
>=
2
)
just_count
=
1
;
if
(
barrel_count
>=
2
)
barrel_count
=
1
;
if
(
Waboku_count
>=
2
)
Waboku_count
=
1
;
if
(
Roar_count
>=
2
)
Roar_count
=
1
;
int
currentchain
=
0
;
if
(
OjamaTrioused_do
)
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
Roar_count
+
greed_count
+
Ojama_count
;
else
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
greed_count
+
Roar_count
;
//if (currentchain >= 3 && Duel.Player == 1) drawfirst = true;
if
(
Bot
.
HasInSpellZone
(
CardId
.
ChainStrike
))
{
if
(
strike_count
==
1
)
{
if
(
OjamaTrioused_do
)
expected_blood
=
((
Enemy
.
GetMonsterCount
()
+
3
)
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
)
*
400
);
else
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
)
*
400
);
}
else
{
if
(
OjamaTrioused_do
)
expected_blood
=
((
Enemy
.
GetMonsterCount
()
+
3
)
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
+
currentchain
+
2
)
*
400
);
else
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+
(
currentchain
+
1
+
currentchain
+
2
)
*
400
);
}
if
(!
one_turn_kill
&&
Enemy
.
LifePoints
<=
expected_blood
&&
Duel
.
Player
==
1
)
{
Logger
.
DebugWriteLine
(
" %%%%%%%%%%%%%%%%%one_turn_kill_1"
);
one_turn_kill_1
=
true
;
OjamaTrioused
=
true
;
}
}
base
.
OnChaining
(
player
,
card
);
}
}
}
\ No newline at end of file
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