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
612905ee
Commit
612905ee
authored
Feb 26, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/mycard/windbot
parents
fe1b6810
7c1d538c
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 @
612905ee
...
...
@@ -64,6 +64,7 @@ namespace WindBot.Game.AI.Decks
bool
snake_four_s
=
false
;
bool
tuner_eff_used
=
false
;
bool
crystal_eff_used
=
false
;
int
red_ss_count
=
0
;
public
TrickstarExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
...
...
@@ -480,43 +481,35 @@ namespace WindBot.Game.AI.Decks
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
))
{
AI
.
SelectCard
(
m
);
return
true
;
}
red_ss_count
+=
1
;
AI
.
SelectCard
(
m
);
return
true
;
}
}
if
(
LastChainPlayer
==
1
)
return
true
;
}
if
(
LastChainPlayer
==
1
)
return
true
;
if
(
Duel
.
Player
==
0
)
{
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
return
false
;
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
();
ClientCard
tosolve_enemy
=
AI
.
Utils
.
GetOneEnemyBetterThanMyBest
();
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
)
{
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
}
if
(
tosolve_enemy
!=
null
)
...
...
@@ -524,11 +517,19 @@ namespace WindBot.Game.AI.Decks
if
(
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
*
2
<
tosolve_enemy
.
Attack
)
{
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
;
}
if
(!
Bot
.
HasInHand
(
CardId
.
White
)
&&
c
.
Attack
<
tosolve_enemy
.
Attack
)
{
AI
.
SelectCard
(
c
);
red_ss_count
+=
1
;
return
true
;
}
}
...
...
@@ -537,11 +538,19 @@ namespace WindBot.Game.AI.Decks
}
}
else
{
if
(
LastChainPlayer
==
1
)
return
true
;
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
)
{
red_ss_count
+=
1
;
return
true
;
}
}
...
...
@@ -916,7 +925,7 @@ namespace WindBot.Game.AI.Decks
ClientCard
m
=
AI
.
Utils
.
GetProblematicEnemyMonster
();
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_2
=
Bot
.
MonsterZone
[
6
];
...
...
@@ -1067,6 +1076,7 @@ namespace WindBot.Game.AI.Decks
public
bool
MonsterRepos
()
{
if
(
Card
.
Id
==
CardId
.
Eater
)
return
false
;
if
(
Card
.
Id
==
CardId
.
Sheep
+
1
)
return
false
;
bool
enemyBetter
=
AI
.
Utils
.
IsAllEnemyBetter
(
true
);
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
...
...
@@ -1089,6 +1099,7 @@ namespace WindBot.Game.AI.Decks
pink_ss
=
false
;
snake_four_s
=
false
;
crystal_eff_used
=
false
;
red_ss_count
=
0
;
}
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