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
f0c9682e
Commit
f0c9682e
authored
Feb 26, 2018
by
wind2009
Committed by
mercury233
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update TrickstarExecutor.cs
Lycoris won't activate endlessly Scapegoat's token won't turn to attack
parent
fb6ad0ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
Game/AI/Decks/TrickstarExecutor.cs
Game/AI/Decks/TrickstarExecutor.cs
+34
-23
No files found.
Game/AI/Decks/TrickstarExecutor.cs
View file @
f0c9682e
...
@@ -64,6 +64,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -64,6 +64,7 @@ namespace WindBot.Game.AI.Decks
bool
snake_four_s
=
false
;
bool
snake_four_s
=
false
;
bool
tuner_eff_used
=
false
;
bool
tuner_eff_used
=
false
;
bool
crystal_eff_used
=
false
;
bool
crystal_eff_used
=
false
;
int
red_ss_count
=
0
;
public
TrickstarExecutor
(
GameAI
ai
,
Duel
duel
)
public
TrickstarExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
:
base
(
ai
,
duel
)
...
@@ -480,43 +481,35 @@ namespace WindBot.Game.AI.Decks
...
@@ -480,43 +481,35 @@ namespace WindBot.Game.AI.Decks
public
bool
Red_ss
()
public
bool
Red_ss
()
{
{
if
(
Duel
.
Player
==
0
)
if
(
red_ss_count
>=
9
)
return
false
;
if
(
LastChainPlayer
==
0
&&
GetLastChainCard
().
Id
==
CardId
.
Red
)
{
{
if
(
LastChainPlayer
==
0
&&
GetLastChainCard
().
Id
==
CardId
.
Red
)
foreach
(
ClientCard
m
in
Bot
.
GetMonsters
()
)
{
{
foreach
(
ClientCard
m
in
Bot
.
GetMonsters
(
))
if
(
AI
.
Utils
.
IsChainTarget
(
m
))
{
{
if
(
AI
.
Utils
.
IsChainTarget
(
m
))
red_ss_count
+=
1
;
{
AI
.
SelectCard
(
m
);
AI
.
SelectCard
(
m
);
return
true
;
return
true
;
}
}
}
}
}
if
(
LastChainPlayer
==
1
)
return
true
;
}
if
(
LastChainPlayer
==
1
)
return
true
;
if
(
Duel
.
Player
==
0
)
{
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
return
false
;
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
return
false
;
if
(
Duel
.
Phase
>
DuelPhase
.
Main1
&&
Duel
.
Phase
<
DuelPhase
.
Main2
)
if
(
Duel
.
Phase
>
DuelPhase
.
Main1
&&
Duel
.
Phase
<
DuelPhase
.
Main2
)
{
{
if
(
Duel
.
Player
==
1
)
{
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
1600
,
true
))
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
}
else
if
(
Bot
.
HasInHand
(
CardId
.
White
)
&&
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
3200
,
true
))
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
}
}
List
<
ClientCard
>
self_m
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
self_m
=
Bot
.
GetMonsters
();
ClientCard
tosolve_enemy
=
AI
.
Utils
.
GetOneEnemyBetterThanMyBest
();
ClientCard
tosolve_enemy
=
AI
.
Utils
.
GetOneEnemyBetterThanMyBest
();
foreach
(
ClientCard
c
in
self_m
)
foreach
(
ClientCard
c
in
self_m
)
{
{
if
(
c
.
Id
==
CardId
.
Yellow
||
c
.
Id
==
CardId
.
Pink
||
c
.
Id
==
CardId
.
White
)
if
(
IsTrickstar
(
c
.
Id
)
)
{
{
if
(
c
.
Attacked
)
if
(
c
.
Attacked
)
{
{
AI
.
SelectCard
(
c
);
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
return
true
;
}
}
if
(
tosolve_enemy
!=
null
)
if
(
tosolve_enemy
!=
null
)
...
@@ -524,11 +517,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -524,11 +517,19 @@ namespace WindBot.Game.AI.Decks
if
(
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
*
2
<
tosolve_enemy
.
Attack
)
if
(
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
*
2
<
tosolve_enemy
.
Attack
)
{
{
AI
.
SelectCard
(
c
);
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
}
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
tosolve_enemy
.
Attack
<=
3200
&&
c
.
Id
==
CardId
.
White
)
{
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
return
true
;
}
}
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
<
tosolve_enemy
.
Attack
)
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
<
tosolve_enemy
.
Attack
)
{
{
AI
.
SelectCard
(
c
);
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
return
true
;
}
}
}
}
...
@@ -537,11 +538,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -537,11 +538,19 @@ namespace WindBot.Game.AI.Decks
}
}
}
else
}
else
{
{
if
(
LastChainPlayer
==
1
)
return
true
;
if
(
Duel
.
Phase
>
DuelPhase
.
Main1
&&
Duel
.
Phase
<
DuelPhase
.
Main2
)
if
(
Duel
.
Phase
>
DuelPhase
.
Main1
&&
Duel
.
Phase
<
DuelPhase
.
Main2
)
{
{
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
1600
,
true
))
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
}
else
if
(
Bot
.
HasInHand
(
CardId
.
White
)
&&
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
3200
,
true
))
{
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
}
if
(
AI
.
Utils
.
GetOneEnemyBetterThanMyBest
()
!=
null
)
if
(
AI
.
Utils
.
GetOneEnemyBetterThanMyBest
()
!=
null
)
{
{
red_ss_count
+=
1
;
return
true
;
return
true
;
}
}
}
}
...
@@ -916,7 +925,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -916,7 +925,7 @@ namespace WindBot.Game.AI.Decks
ClientCard
m
=
AI
.
Utils
.
GetProblematicEnemyMonster
();
ClientCard
m
=
AI
.
Utils
.
GetProblematicEnemyMonster
();
if
(
m
==
null
)
if
(
m
==
null
)
{
{
return
(
Enemy
.
GetMonsterCount
()
==
0
&&
Duel
.
LifePoints
[
1
]
<=
1100
);
return
(
Enemy
.
GetMonsterCount
()
==
0
&&
Duel
.
LifePoints
[
1
]
<=
1100
&&
Duel
.
Phase
<
DuelPhase
.
Battle
);
}
}
ClientCard
ex_1
=
Bot
.
MonsterZone
[
5
];
ClientCard
ex_1
=
Bot
.
MonsterZone
[
5
];
ClientCard
ex_2
=
Bot
.
MonsterZone
[
6
];
ClientCard
ex_2
=
Bot
.
MonsterZone
[
6
];
...
@@ -1067,6 +1076,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1067,6 +1076,7 @@ namespace WindBot.Game.AI.Decks
public
bool
MonsterRepos
()
public
bool
MonsterRepos
()
{
{
if
(
Card
.
Id
==
CardId
.
Eater
)
return
false
;
if
(
Card
.
Id
==
CardId
.
Eater
)
return
false
;
if
(
Card
.
Id
==
CardId
.
Sheep
+
1
)
return
false
;
bool
enemyBetter
=
AI
.
Utils
.
IsAllEnemyBetter
(
true
);
bool
enemyBetter
=
AI
.
Utils
.
IsAllEnemyBetter
(
true
);
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
...
@@ -1089,6 +1099,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1089,6 +1099,7 @@ namespace WindBot.Game.AI.Decks
pink_ss
=
false
;
pink_ss
=
false
;
snake_four_s
=
false
;
snake_four_s
=
false
;
crystal_eff_used
=
false
;
crystal_eff_used
=
false
;
red_ss_count
=
0
;
}
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
...
...
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