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
638feefb
Commit
638feefb
authored
Aug 21, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
47404a59
a829ae8c
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1687 additions
and
27 deletions
+1687
-27
Decks/AI_BlueEyesMaxDragon.ydk
Decks/AI_BlueEyesMaxDragon.ydk
+73
-0
Decks/AI_Phantasm.ydk
Decks/AI_Phantasm.ydk
+65
-0
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+13
-0
Game/AI/CardSelector.cs
Game/AI/CardSelector.cs
+2
-2
Game/AI/Decks/AltergeistExecutor.cs
Game/AI/Decks/AltergeistExecutor.cs
+1
-1
Game/AI/Decks/BlueEyesMaxDragonExecutor.cs
Game/AI/Decks/BlueEyesMaxDragonExecutor.cs
+625
-0
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+1
-3
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
+7
-17
Game/AI/Decks/PhantasmExecutor.cs
Game/AI/Decks/PhantasmExecutor.cs
+743
-0
Game/AI/Decks/RainbowExecutor.cs
Game/AI/Decks/RainbowExecutor.cs
+2
-0
Game/AI/Decks/YosenjuExecutor.cs
Game/AI/Decks/YosenjuExecutor.cs
+1
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+137
-0
Game/AI/Enums/Floodgate.cs
Game/AI/Enums/Floodgate.cs
+2
-1
Game/GameAI.cs
Game/GameAI.cs
+6
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+7
-3
WindBot.csproj
WindBot.csproj
+2
-0
No files found.
Decks/AI_BlueEyesMaxDragon.ydk
0 → 100644
View file @
638feefb
#created by ...
#main
89631139
55410871
89631139
80701178
31036355
38517737
80701178
80701178
95492061
95492061
95492061
53303460
53303460
53303460
14558127
14558127
23434538
55410871
55410871
31036355
31036355
48800175
48800175
48800175
70368879
70368879
70368879
21082832
46052429
46052429
46052429
24224830
24224830
24224830
73915051
10045474
10045474
37576645
37576645
37576645
#extra
31833038
85289965
74997493
5043010
65330383
38342335
2857636
28776350
75452921
3987233
3987233
99111753
98978921
41999284
41999284
!side
75732622
15397015
15397015
73642296
23434538
5821478
77058170
3679218
25774450
43898403
23002292
23002292
84749824
84749824
Decks/AI_Phantasm.ydk
0 → 100644
View file @
638feefb
#created by ...
#main
81823360
81823360
81823360
14558127
14558127
63845230
18144506
35261759
35261759
47325505
47325505
59750328
59750328
59750328
73628505
98645731
98645731
98645731
73915051
73915051
2819435
2819435
2819435
10045474
34302287
34302287
34302287
47475363
58120309
61397885
61397885
89208725
89208725
19089195
19089195
19089195
53334471
53334471
82732705
99188141
#extra
44508094
5821478
31833038
85289965
65330383
72529749
61665245
38342335
2857636
75452921
50588353
3987233
98978921
41999284
41999284
!side
24094258
47475363
61397885
30241314
30241314
82732705
Game/AI/AIFunctions.cs
View file @
638feefb
...
@@ -41,6 +41,19 @@ namespace WindBot.Game.AI
...
@@ -41,6 +41,19 @@ namespace WindBot.Game.AI
return
1
;
return
1
;
}
}
/// <summary>
/// Get the total ATK Monster of the player.
/// </summary>
public
int
GetTotalAttackingMonsterAttack
(
int
player
)
{
int
atk
=
0
;
foreach
(
ClientCard
m
in
Duel
.
Fields
[
player
].
GetMonsters
())
{
if
(
m
.
IsAttack
())
atk
+=
m
.
Attack
;
}
return
atk
;
}
/// <summary>
/// <summary>
/// Get the best ATK or DEF power of the field.
/// Get the best ATK or DEF power of the field.
/// </summary>
/// </summary>
...
...
Game/AI/CardSelector.cs
View file @
638feefb
...
@@ -63,7 +63,7 @@ namespace WindBot.Game.AI
...
@@ -63,7 +63,7 @@ namespace WindBot.Game.AI
break
;
break
;
case
SelectType
.
Cards
:
case
SelectType
.
Cards
:
foreach
(
ClientCard
card
in
_cards
)
foreach
(
ClientCard
card
in
_cards
)
if
(
cards
.
Contains
(
card
))
if
(
cards
.
Contains
(
card
)
&&
!
result
.
Contains
(
card
)
)
result
.
Add
(
card
);
result
.
Add
(
card
);
break
;
break
;
case
SelectType
.
Id
:
case
SelectType
.
Id
:
...
@@ -74,7 +74,7 @@ namespace WindBot.Game.AI
...
@@ -74,7 +74,7 @@ namespace WindBot.Game.AI
case
SelectType
.
Ids
:
case
SelectType
.
Ids
:
foreach
(
int
id
in
_ids
)
foreach
(
int
id
in
_ids
)
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
if
(
card
.
Id
==
id
)
if
(
card
.
Id
==
id
&&
!
result
.
Contains
(
card
)
)
result
.
Add
(
card
);
result
.
Add
(
card
);
break
;
break
;
case
SelectType
.
Location
:
case
SelectType
.
Location
:
...
...
Game/AI/Decks/AltergeistExecutor.cs
View file @
638feefb
...
@@ -1135,7 +1135,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -1135,7 +1135,7 @@ namespace WindBot.Game.AI.Decks
}
}
if
(!
AI
.
Utils
.
IsTurn1OrMain2
())
if
(!
AI
.
Utils
.
IsTurn1OrMain2
())
{
{
ClientCard
self_best
=
AI
.
Utils
.
GetBestBotMonster
(
true
);
ClientCard
self_best
=
AI
.
Utils
.
GetBestBotMonster
();
ClientCard
enemy_best
=
AI
.
Utils
.
GetProblematicEnemyCard
(
self_best
.
Attack
+
1
,
true
);
ClientCard
enemy_best
=
AI
.
Utils
.
GetProblematicEnemyCard
(
self_best
.
Attack
+
1
,
true
);
ClientCard
enemy_target
=
GetProblematicEnemyCard_Alter
(
true
,
false
);
ClientCard
enemy_target
=
GetProblematicEnemyCard_Alter
(
true
,
false
);
...
...
Game/AI/Decks/BlueEyesMaxDragonExecutor.cs
0 → 100644
View file @
638feefb
This diff is collapsed.
Click to expand it.
Game/AI/Decks/DragunityExecutor.cs
View file @
638feefb
...
@@ -382,9 +382,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -382,9 +382,7 @@ namespace WindBot.Game.AI.Decks
if
(
destroyCard
==
null
)
if
(
destroyCard
==
null
)
return
false
;
return
false
;
if
(
tributeId
!=
-
1
)
AI
.
SelectCard
(
tributeId
);
AI
.
SelectCard
(
tributeId
);
AI
.
SelectNextCard
(
destroyCard
);
AI
.
SelectNextCard
(
destroyCard
);
return
true
;
return
true
;
...
...
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
View file @
638feefb
...
@@ -57,7 +57,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -57,7 +57,8 @@ namespace WindBot.Game.AI.Decks
public
GrenMajuThunderBoarderExecutor
(
GameAI
ai
,
Duel
duel
)
public
GrenMajuThunderBoarderExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
:
base
(
ai
,
duel
)
{
{
AddExecutor
(
ExecutorType
.
GoToBattlePhase
,
EvenlyMatchedToBP
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
EvenlyMatched
,
EvenlyMatchedeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
EvenlyMatched
,
EvenlyMatchedeff
);
//Sticker
//Sticker
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MacroCosmos
,
MacroCosmoseff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MacroCosmos
,
MacroCosmoseff
);
...
@@ -102,19 +103,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -102,19 +103,11 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
SpellSet
);
}
}
bool
CardOfDemiseeff_used
=
false
;
bool
CardOfDemiseeff_used
=
false
;
bool
plan_A
=
false
;
bool
eater_eff
=
false
;
bool
eater_eff
=
false
;
public
override
void
OnNewTurn
()
public
override
void
OnNewTurn
()
{
{
eater_eff
=
false
;
eater_eff
=
false
;
CardOfDemiseeff_used
=
false
;
CardOfDemiseeff_used
=
false
;
if
(
Bot
.
HasInHand
(
CardId
.
EvenlyMatched
)
&&
Duel
.
Turn
==
2
&&
Enemy
.
GetFieldCount
()>=
2
)
{
Logger
.
DebugWriteLine
(
"***********plan_A"
);
plan_A
=
true
;
//todo:Duel.Global.ToBattlePhase = true;
}
}
}
public
override
void
OnNewPhase
()
public
override
void
OnNewPhase
()
...
@@ -182,15 +175,17 @@ namespace WindBot.Game.AI.Decks
...
@@ -182,15 +175,17 @@ namespace WindBot.Game.AI.Decks
return
Duel
.
Player
==
1
;
return
Duel
.
Player
==
1
;
}
}
private
bool
EvenlyMatchedToBP
()
{
return
Bot
.
HasInHand
(
CardId
.
EvenlyMatched
)
&&
Duel
.
Turn
>=
2
&&
Enemy
.
GetFieldCount
()
>=
2
;
}
private
bool
EvenlyMatchedeff
()
private
bool
EvenlyMatchedeff
()
{
{
// todo:Duel.Global.ToBattlePhase = false;
plan_A
=
false
;
return
true
;
return
true
;
}
}
private
bool
InfiniteImpermanenceeff
()
private
bool
InfiniteImpermanenceeff
()
{
{
if
(
plan_A
)
return
false
;
AI
.
SelectPlace
(
Zones
.
z2
);
AI
.
SelectPlace
(
Zones
.
z2
);
ClientCard
target
=
Enemy
.
MonsterZone
.
GetShouldBeDisabledBeforeItUseEffectMonster
();
ClientCard
target
=
Enemy
.
MonsterZone
.
GetShouldBeDisabledBeforeItUseEffectMonster
();
if
(
target
!=
null
)
if
(
target
!=
null
)
...
@@ -368,21 +363,18 @@ namespace WindBot.Game.AI.Decks
...
@@ -368,21 +363,18 @@ namespace WindBot.Game.AI.Decks
private
bool
InspectBoardersummon
()
private
bool
InspectBoardersummon
()
{
{
if
(
plan_A
)
return
false
;
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
return
true
;
return
true
;
}
}
private
bool
GrenMajuDaEizosummon
()
private
bool
GrenMajuDaEizosummon
()
{
{
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(
plan_A
)
return
false
;
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
return
Bot
.
Banished
.
Count
>=
6
;
return
Bot
.
Banished
.
Count
>=
6
;
}
}
private
bool
ThunderKingRaiOhsummon
()
private
bool
ThunderKingRaiOhsummon
()
{
{
if
(
plan_A
)
return
false
;
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
AI
.
SelectPlace
(
Zones
.
z4
|
Zones
.
z0
);
return
true
;
return
true
;
}
}
...
@@ -440,7 +432,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -440,7 +432,6 @@ namespace WindBot.Game.AI.Decks
private
bool
EaterOfMillionssp
()
private
bool
EaterOfMillionssp
()
{
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
InspectBoarder
)
&&
!
eater_eff
)
return
false
;
if
(
Bot
.
HasInMonstersZone
(
CardId
.
InspectBoarder
)
&&
!
eater_eff
)
return
false
;
if
(
plan_A
)
return
false
;
if
(
AI
.
Utils
.
GetProblematicEnemyMonster
()
==
null
&&
Bot
.
ExtraDeck
.
Count
<
5
)
return
false
;
if
(
AI
.
Utils
.
GetProblematicEnemyMonster
()
==
null
&&
Bot
.
ExtraDeck
.
Count
<
5
)
return
false
;
if
(
Bot
.
GetMonstersInMainZone
().
Count
>=
5
)
return
false
;
if
(
Bot
.
GetMonstersInMainZone
().
Count
>=
5
)
return
false
;
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
return
false
;
if
(
AI
.
Utils
.
IsTurn1OrMain2
())
return
false
;
...
@@ -547,7 +538,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -547,7 +538,6 @@ namespace WindBot.Game.AI.Decks
private
bool
SpellSet
()
private
bool
SpellSet
()
{
{
if
(
plan_A
)
return
false
;
int
count
=
0
;
int
count
=
0
;
foreach
(
ClientCard
check
in
Bot
.
Hand
)
foreach
(
ClientCard
check
in
Bot
.
Hand
)
{
{
...
...
Game/AI/Decks/PhantasmExecutor.cs
0 → 100644
View file @
638feefb
This diff is collapsed.
Click to expand it.
Game/AI/Decks/RainbowExecutor.cs
View file @
638feefb
...
@@ -358,6 +358,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -358,6 +358,7 @@ namespace WindBot.Game.AI.Decks
private
bool
LightningChidoriEffect
()
private
bool
LightningChidoriEffect
()
{
{
ClientCard
problematicCard
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
problematicCard
=
AI
.
Utils
.
GetProblematicEnemyCard
();
AI
.
SelectCard
(
0
);
AI
.
SelectNextCard
(
problematicCard
);
AI
.
SelectNextCard
(
problematicCard
);
return
true
;
return
true
;
}
}
...
@@ -423,6 +424,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -423,6 +424,7 @@ namespace WindBot.Game.AI.Decks
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
if
(
result
!=
null
)
if
(
result
!=
null
)
{
{
AI
.
SelectCard
(
0
);
AI
.
SelectNextCard
(
result
);
AI
.
SelectNextCard
(
result
);
return
true
;
return
true
;
}
}
...
...
Game/AI/Decks/YosenjuExecutor.cs
View file @
638feefb
...
@@ -312,6 +312,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -312,6 +312,7 @@ namespace WindBot.Game.AI.Decks
ClientCard
target
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
oppoBestAttack
,
true
);
ClientCard
target
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
oppoBestAttack
,
true
);
if
(
target
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectCard
(
0
);
AI
.
SelectNextCard
(
target
);
AI
.
SelectNextCard
(
target
);
}
}
return
true
;
return
true
;
...
...
Game/AI/DefaultExecutor.cs
View file @
638feefb
...
@@ -42,6 +42,19 @@ namespace WindBot.Game.AI
...
@@ -42,6 +42,19 @@ namespace WindBot.Game.AI
public
const
int
InjectionFairyLily
=
79575620
;
public
const
int
InjectionFairyLily
=
79575620
;
public
const
int
BlueEyesChaosMAXDragon
=
55410871
;
public
const
int
BlueEyesChaosMAXDragon
=
55410871
;
public
const
int
AshBlossom
=
14558127
;
public
const
int
MaxxC
=
23434538
;
public
const
int
LockBird
=
94145021
;
public
const
int
GhostOgreAndSnowRabbit
=
59438930
;
public
const
int
GhostBelle
=
73642296
;
public
const
int
EffectVeiler
=
63845230
;
public
const
int
CalledByTheGrave
=
24224830
;
public
const
int
InfiniteImpermanence
=
10045474
;
public
const
int
GalaxySoldier
=
46659709
;
public
const
int
MacroCosmos
=
30241314
;
public
const
int
UpstartGoblin
=
70368879
;
public
const
int
EaterOfMillions
=
63845230
;
}
}
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
...
@@ -312,6 +325,129 @@ namespace WindBot.Game.AI
...
@@ -312,6 +325,129 @@ namespace WindBot.Game.AI
return
true
;
return
true
;
}
}
/// <summary>
/// Always active in opponent's turn.
/// </summary>
protected
bool
DefaultMaxxC
()
{
return
Duel
.
Player
==
1
;
}
/// <summary>
/// Always disable opponent's effect except some cards like UpstartGoblin
/// </summary>
protected
bool
DefaultAshBlossomAndJoyousSpring
()
{
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
MacroCosmos
)
return
false
;
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
UpstartGoblin
)
return
false
;
return
Duel
.
LastChainPlayer
==
1
;
}
/// <summary>
/// Always activate unless the activating card is disabled
/// </summary>
protected
bool
DefaultGhostOgreAndSnowRabbit
()
{
if
(
AI
.
Utils
.
GetLastChainCard
()
!=
null
&&
AI
.
Utils
.
GetLastChainCard
().
IsDisabled
())
return
false
;
return
DefaultTrap
();
}
/// <summary>
/// Always disable opponent's effect
/// </summary>
protected
bool
DefaultGhostBelleAndHauntedMansion
()
{
return
DefaultTrap
();
}
/// <summary>
/// Same as DefaultBreakthroughSkill
/// </summary>
protected
bool
DefaultEffectVeiler
()
{
if
(
AI
.
Utils
.
GetLastChainCard
()
!=
null
&&
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
GalaxySoldier
&&
Enemy
.
Hand
.
Count
>=
3
)
return
false
;
if
(
AI
.
Utils
.
ChainContainsCard
(
_CardId
.
EffectVeiler
))
return
false
;
return
DefaultBreakthroughSkill
();
}
/// <summary>
/// Chain common hand traps
/// </summary>
protected
bool
DefaultCalledByTheGrave
()
{
if
(
Duel
.
LastChainPlayer
==
1
)
{
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
MaxxC
)
{
AI
.
SelectCard
(
_CardId
.
MaxxC
);
return
UniqueFaceupSpell
();
}
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
LockBird
)
{
AI
.
SelectCard
(
_CardId
.
LockBird
);
return
UniqueFaceupSpell
();
}
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
GhostOgreAndSnowRabbit
)
{
AI
.
SelectCard
(
_CardId
.
GhostOgreAndSnowRabbit
);
return
UniqueFaceupSpell
();
}
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
AshBlossom
)
{
AI
.
SelectCard
(
_CardId
.
AshBlossom
);
return
UniqueFaceupSpell
();
}
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
_CardId
.
GhostBelle
)
{
AI
.
SelectCard
(
_CardId
.
GhostBelle
);
return
UniqueFaceupSpell
();
}
}
return
false
;
}
/// <summary>
/// Default InfiniteImpermanence effect
/// </summary>
protected
bool
DefaultInfiniteImpermanence
()
{
ClientCard
target
=
Enemy
.
MonsterZone
.
GetShouldBeDisabledBeforeItUseEffectMonster
();
if
(
target
!=
null
)
{
AI
.
SelectCard
(
target
);
return
true
;
}
if
(
Duel
.
LastChainPlayer
==
1
)
{
foreach
(
ClientCard
check
in
Enemy
.
GetMonsters
())
{
if
(
AI
.
Utils
.
GetLastChainCard
()
==
check
)
{
target
=
check
;
break
;
}
}
if
(
target
!=
null
&&
!
target
.
IsDisabled
())
{
AI
.
SelectCard
(
target
);
return
true
;
}
}
if
(
Bot
.
BattlingMonster
!=
null
&&
Enemy
.
BattlingMonster
!=
null
)
{
if
(
Enemy
.
BattlingMonster
.
IsDisabled
())
return
false
;
if
(
Enemy
.
BattlingMonster
.
Id
==
_CardId
.
EaterOfMillions
)
{
AI
.
SelectCard
(
Enemy
.
BattlingMonster
);
return
true
;
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
&&
Duel
.
Player
==
1
&&
Enemy
.
HasInMonstersZone
(
_CardId
.
NumberS39UtopiaTheLightning
,
true
))
{
AI
.
SelectCard
(
_CardId
.
NumberS39UtopiaTheLightning
);
return
UniqueFaceupSpell
();
}
return
false
;
}
/// <summary>
/// <summary>
/// Chain the enemy monster, or disable monster like Rescue Rabbit.
/// Chain the enemy monster, or disable monster like Rescue Rabbit.
/// </summary>
/// </summary>
...
@@ -862,6 +998,7 @@ namespace WindBot.Game.AI
...
@@ -862,6 +998,7 @@ namespace WindBot.Game.AI
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
ClientCard
target
=
AI
.
Utils
.
GetProblematicEnemyCard
();
if
(
target
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectCard
(
0
);
AI
.
SelectNextCard
(
target
);
AI
.
SelectNextCard
(
target
);
return
true
;
return
true
;
}
}
...
...
Game/AI/Enums/Floodgate.cs
View file @
638feefb
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
FirePrison
=
269510
,
FirePrison
=
269510
,
LairOfDarkness
=
59160188
,
LairOfDarkness
=
59160188
,
SuperboltThunderDragon
=
15291624
,
SuperboltThunderDragon
=
15291624
,
ThunderDragonLord
=
41685633
ThunderDragonLord
=
41685633
,
CyberDragonInfinity
=
10443957
}
}
}
}
Game/GameAI.cs
View file @
638feefb
...
@@ -573,6 +573,12 @@ namespace WindBot.Game
...
@@ -573,6 +573,12 @@ namespace WindBot.Game
if
(
mode
)
if
(
mode
)
{
{
// equal
// equal
if
(
sum
==
0
&&
min
==
0
)
{
return
new
List
<
ClientCard
>();
}
if
(
min
<=
1
)
if
(
min
<=
1
)
{
{
// try special level first
// try special level first
...
...
Game/GameBehavior.cs
View file @
638feefb
...
@@ -27,6 +27,7 @@ namespace WindBot.Game
...
@@ -27,6 +27,7 @@ namespace WindBot.Game
private
int
_hand
;
private
int
_hand
;
private
bool
_debug
;
private
bool
_debug
;
private
int
_select_hint
;
private
int
_select_hint
;
private
GameMessage
_lastMessage
;
public
GameBehavior
(
GameClient
game
)
public
GameBehavior
(
GameClient
game
)
{
{
...
@@ -61,6 +62,7 @@ namespace WindBot.Game
...
@@ -61,6 +62,7 @@ namespace WindBot.Game
GameMessage
msg
=
(
GameMessage
)
packet
.
ReadByte
();
GameMessage
msg
=
(
GameMessage
)
packet
.
ReadByte
();
if
(
_messages
.
ContainsKey
(
msg
))
if
(
_messages
.
ContainsKey
(
msg
))
_messages
[
msg
](
packet
);
_messages
[
msg
](
packet
);
_lastMessage
=
msg
;
return
;
return
;
}
}
if
(
_packets
.
ContainsKey
(
id
))
if
(
_packets
.
ContainsKey
(
id
))
...
@@ -312,7 +314,7 @@ namespace WindBot.Game
...
@@ -312,7 +314,7 @@ namespace WindBot.Game
{
{
_ai
.
OnRetry
();
_ai
.
OnRetry
();
Connection
.
Close
();
Connection
.
Close
();
throw
new
Exception
(
"Got MSG_RETRY.
"
);
throw
new
Exception
(
"Got MSG_RETRY.
Last message is "
+
_lastMessage
);
}
}
private
void
OnHint
(
BinaryReader
packet
)
private
void
OnHint
(
BinaryReader
packet
)
...
@@ -1314,9 +1316,11 @@ namespace WindBot.Game
...
@@ -1314,9 +1316,11 @@ namespace WindBot.Game
{
{
result
[
index
++]
=
0
;
result
[
index
++]
=
0
;
}
}
for
(
int
i
=
0
;
i
<
selected
.
Count
;
++
i
)
int
l
=
0
;
while
(
l
<
selected
.
Count
)
{
{
result
[
index
++]
=
(
byte
)
selected
[
i
].
SelectSeq
;
result
[
index
++]
=
(
byte
)
selected
[
l
].
SelectSeq
;
++
l
;
}
}
BinaryWriter
reply
=
GamePacketFactory
.
Create
(
CtosMessage
.
Response
);
BinaryWriter
reply
=
GamePacketFactory
.
Create
(
CtosMessage
.
Response
);
...
...
WindBot.csproj
View file @
638feefb
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
<Compile
Include=
"Game\AI\Decks\GravekeeperExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\GravekeeperExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\RainbowExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\RainbowExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlueEyesExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlueEyesExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlueEyesMaxDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BurnExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BurnExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ChainBurnExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ChainBurnExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\EvilswarmExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\EvilswarmExecutor.cs"
/>
...
@@ -85,6 +86,7 @@
...
@@ -85,6 +86,7 @@
<Compile
Include=
"Game\AI\Decks\GrenMajuThunderBoarderExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\GrenMajuThunderBoarderExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LightswornExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LightswornExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LightswornShaddoldinosourExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LightswornShaddoldinosourExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\PhantasmExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\QliphortExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\QliphortExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ST1732Executor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ST1732Executor.cs"
/>
<Compile
Include=
"Game\AI\Decks\TrickstarExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\TrickstarExecutor.cs"
/>
...
...
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