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
724c738b
Commit
724c738b
authored
Apr 16, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
4f39fa7f
719d7b1b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
485 additions
and
183 deletions
+485
-183
Game/AI/Decks/ChainBurnExecutor.cs
Game/AI/Decks/ChainBurnExecutor.cs
+26
-15
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
+428
-163
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+21
-1
Game/AI/Enums/Floodgate.cs
Game/AI/Enums/Floodgate.cs
+8
-2
Game/GameBehavior.cs
Game/GameBehavior.cs
+2
-2
No files found.
Game/AI/Decks/ChainBurnExecutor.cs
View file @
724c738b
...
...
@@ -353,8 +353,13 @@ namespace WindBot.Game.AI.Decks
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) one_turn_kill = 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
;
...
...
@@ -370,8 +375,12 @@ namespace WindBot.Game.AI.Decks
//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 (Enemy.LifePoints <= expected_blood && Duel.Player==1) one_turn_kill_1 = true;
/*if (!one_turn_kill && Enemy.LifePoints <= expected_blood && Duel.Player == 1)
{
Logger.DebugWriteLine(" one_turn_kill_1");
one_turn_kill_1 = true;
}*/
}
...
...
@@ -410,8 +419,7 @@ namespace WindBot.Game.AI.Decks
private
bool
AbouluteKingBackJackeff
()
{
if
(
ActivateDescription
==
-
1
)
{
{
AI
.
SelectCard
(
AbouluteKingBackJack_List_1
());
AI
.
SelectNextCard
(
AbouluteKingBackJack_List_2
());
}
...
...
@@ -441,7 +449,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ThreateningRoareff
()
{
if
(
drawfirst
)
return
true
;
if
(
must_chain
())
return
DefaultUniqueTrap
();
if
(
DefaultOnBecomeTarget
())
return
DefaultUniqueTrap
();
if
(
prevent_used
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
prevent_used
=
true
;
return
DefaultUniqueTrap
();
...
...
@@ -459,7 +467,7 @@ namespace WindBot.Game.AI.Decks
Linkuribohused
=
false
;
return
true
;
}
if
(
must_chain
())
if
(
DefaultOnBecomeTarget
())
{
Linkuribohused
=
false
;
return
DefaultUniqueTrap
();
...
...
@@ -510,7 +518,7 @@ namespace WindBot.Game.AI.Decks
}
bool
Demiseused
=
AI
.
Utils
.
ChainContainsCard
(
CardId
.
CardOfDemise
);
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
must_chain
()
&&
count
>
1
)
return
true
;
if
(
DefaultOnBecomeTarget
()
&&
count
>
1
)
return
true
;
if
(
Demiseused
)
return
false
;
if
(
count
>
1
)
return
true
;
if
(
Bot
.
LifePoints
<=
2000
)
return
true
;
...
...
@@ -522,7 +530,7 @@ namespace WindBot.Game.AI.Decks
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
must_chain
())
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
Enemy
.
GetFieldHandCount
();
if
(
Enemy
.
LifePoints
<
count
*
200
)
return
true
;
if
(
count
>=
8
)
return
true
;
...
...
@@ -533,7 +541,7 @@ namespace WindBot.Game.AI.Decks
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
must_chain
())
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
Enemy
.
GetFieldCount
();
if
(
Enemy
.
LifePoints
<
count
*
300
)
return
true
;
if
(
count
>=
5
)
return
true
;
...
...
@@ -551,7 +559,7 @@ namespace WindBot.Game.AI.Decks
if
(
drawfirst
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill_1
)
return
DefaultUniqueTrap
();
if
(
one_turn_kill
)
return
DefaultUniqueTrap
();
if
(
must_chain
())
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
Enemy
.
GetMonsterCount
();
if
(
Enemy
.
LifePoints
<=
count
*
500
)
return
true
;
if
(
Bot
.
HasInSpellZone
(
CardId
.
OjamaTrio
)
&&
count
<=
2
&&
count
>=
1
)
...
...
@@ -566,7 +574,7 @@ namespace WindBot.Game.AI.Decks
{
if
(
drawfirst
)
return
true
;
if
(
must_chain
())
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
chain
=
Duel
.
CurrentChain
.
Count
;
if
(
strike_count
>=
2
&&
chain
>=
2
)
return
true
;
if
(
Enemy
.
LifePoints
<=
(
chain
+
1
)
*
400
)
return
true
;
...
...
@@ -576,7 +584,7 @@ namespace WindBot.Game.AI.Decks
private
bool
BalanceOfJudgmenteff
()
{
if
(
must_chain
())
return
true
;
if
(
DefaultOnBecomeTarget
())
return
true
;
int
count
=
(
Enemy
.
GetFieldCount
()
-
Bot
.
GetFieldHandCount
());
if
(
count
>=
2
)
return
true
;
return
false
;
...
...
@@ -628,7 +636,10 @@ namespace WindBot.Game.AI.Decks
newlist
.
Add
(
newmonster
);
}
if
(!
Linkuribohused
)
return
false
;
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
&&
Bot
.
HasInSpellZone
(
CardId
.
MagicCylinder
))
return
false
;
if
(
Enemy
.
BattlingMonster
!=
null
)
{
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
&&
Bot
.
HasInSpellZone
(
CardId
.
MagicCylinder
))
return
false
;
}
if
(
GetTotalATK
(
newlist
)
>=
3000
&&
Bot
.
HasInSpellZone
(
CardId
.
BlazingMirrorForce
))
return
false
;
if
(
AI
.
Utils
.
GetLastChainCard
()
==
null
)
return
true
;
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
CardId
.
Linkuriboh
)
return
false
;
...
...
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
View file @
724c738b
This diff is collapsed.
Click to expand it.
Game/AI/DefaultExecutor.cs
View file @
724c738b
...
...
@@ -20,10 +20,12 @@ namespace WindBot.Game.AI
public
const
int
GamecieltheSeaTurtleKaiju
=
55063751
;
public
const
int
SuperAntiKaijuWarMachineMechaDogoran
=
84769941
;
public
const
int
UltimateConductorTytanno
=
18940556
;
public
const
int
DupeFrog
=
46239604
;
public
const
int
MaraudingCaptain
=
2460565
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
MysticalSpaceTyphoon
=
5318639
;
public
const
int
CosmicCyclone
=
8267140
;
public
const
int
ChickenGame
=
67616300
;
...
...
@@ -86,9 +88,18 @@ namespace WindBot.Game.AI
if
(!
attacker
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
IsMonster
Dangerous
()
||
(
defender
.
IsMonsterInvincible
()
&&
defender
.
IsDefense
()
))
if
(
defender
.
IsMonster
Invincible
()
&&
defender
.
IsDefense
(
))
return
false
;
if
(
defender
.
IsMonsterDangerous
())
{
bool
canignoreit
=
false
;
if
(
attacker
.
Id
==
_CardId
.
UltimateConductorTytanno
&&
!
attacker
.
IsDisabled
()
&&
defender
.
IsDefense
())
canignoreit
=
true
;
if
(!
canignoreit
)
return
false
;
}
if
(
defender
.
Id
==
_CardId
.
CrystalWingSynchroDragon
&&
defender
.
IsAttack
()
&&
!
defender
.
IsDisabled
()
&&
attacker
.
Level
>=
5
)
return
false
;
...
...
@@ -452,6 +463,15 @@ namespace WindBot.Game.AI
return
false
;
}
/// <summary>
/// if spell/trap is the target or enermy activate HarpiesFeatherDuster
/// </summary>
protected
bool
DefaultOnBecomeTarget
()
{
if
(
AI
.
Utils
.
IsChainTarget
(
Card
))
return
true
;
if
(
Enemy
.
HasInSpellZone
(
_CardId
.
HarpiesFeatherDuster
,
true
))
return
true
;
return
false
;
}
/// <summary>
/// Chain enemy activation or summon.
/// </summary>
...
...
Game/AI/Enums/Floodgate.cs
View file @
724c738b
...
...
@@ -59,13 +59,19 @@
NaturiaExterio
=
99916754
,
TheLastWarriorfromAnotherPlanet
=
86099788
,
ThousandEyesRestrict
=
63519819
,
ElShaddollWinda
=
94977269
,
MaskedHERODarkLaw
=
58481572
,
NaturiaBeast
=
33198837
,
NaturiaBarkion
=
2956282
,
EvilswarmOphion
=
91279700
,
MermailAbyssgaios
=
74371660
,
AbyssDweller
=
21044178
,
ZoodiacDrident
=
48905153
ZoodiacDrident
=
48905153
,
InvokedMechaba
=
75286621
,
ElShaddollShekhinaga
=
74822425
,
ElShaddollConstruct
=
20366274
,
ElShaddollGrysra
=
48424886
,
ElShaddollWinda
=
94977269
,
UltimateConductorTytanno
=
18940556
,
OvertexCoatls
=
41782653
}
}
Game/GameBehavior.cs
View file @
724c738b
...
...
@@ -271,8 +271,8 @@ namespace WindBot.Game
{
int
player
=
packet
.
ReadInt16
();
string
message
=
packet
.
ReadUnicode
(
256
);
string
myName
=
_room
.
Position
==
0
?
_room
.
Names
[
0
]
:
_room
.
Names
[
1
];
string
otherName
=
_room
.
Position
==
0
?
_room
.
Names
[
1
]
:
_room
.
Names
[
0
];
string
myName
=
(
player
!=
0
)
?
_room
.
Names
[
1
]
:
_room
.
Names
[
0
];
string
otherName
=
(
player
==
0
)
?
_room
.
Names
[
1
]
:
_room
.
Names
[
0
];
if
(
player
<
4
)
Logger
.
DebugWriteLine
(
otherName
+
" say to "
+
myName
+
": "
+
message
);
}
...
...
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