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
605c2839
Commit
605c2839
authored
Nov 04, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update OnPreBattleBetween
parent
8dfcd0d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
33 deletions
+22
-33
Game/AI/CardExtension.cs
Game/AI/CardExtension.cs
+1
-1
Game/AI/Decks/BlackwingExecutor.cs
Game/AI/Decks/BlackwingExecutor.cs
+0
-7
Game/AI/Decks/FrogExecutor.cs
Game/AI/Decks/FrogExecutor.cs
+0
-9
Game/AI/Decks/OldSchoolExecutor.cs
Game/AI/Decks/OldSchoolExecutor.cs
+0
-7
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+15
-8
Game/AI/Enums/DangerousMonster.cs
Game/AI/Enums/DangerousMonster.cs
+6
-1
No files found.
Game/AI/CardExtension.cs
View file @
605c2839
...
...
@@ -10,7 +10,7 @@ namespace WindBot.Game.AI
/// </summary>
public
static
bool
IsMonsterInvincible
(
this
ClientCard
card
)
{
return
Enum
.
IsDefined
(
typeof
(
InvincibleMonster
),
card
.
Id
);
return
!
card
.
IsDisabled
()
&&
Enum
.
IsDefined
(
typeof
(
InvincibleMonster
),
card
.
Id
);
}
/// <summary>
...
...
Game/AI/Decks/BlackwingExecutor.cs
View file @
605c2839
...
...
@@ -82,13 +82,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
}
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
83104731
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
ShuraTheBlueFlameSummon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
SiroccoTheDawn
)
&&
Bot
.
GetMonsters
().
GetHighestAttackMonster
().
Attack
<
3800
)
...
...
Game/AI/Decks/FrogExecutor.cs
View file @
605c2839
...
...
@@ -84,15 +84,6 @@ namespace WindBot.Game.AI.Decks
private
int
m_swapFrogSummoned
;
private
int
m_flipFlopFrogSummoned
;
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
attacker
.
Id
==
CardId
.
Unifrog
||
attacker
.
Id
==
CardId
.
DewdarkOfTheIceBarrier
)
return
true
;
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
CardId
.
SubmarineFrog
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
SwapFrogSummon
()
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
...
...
Game/AI/Decks/OldSchoolExecutor.cs
View file @
605c2839
...
...
@@ -64,13 +64,6 @@ namespace WindBot.Game.AI.Decks
private
int
_lastDoubleSummon
;
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
()
&&
!
defender
.
IsMonsterDangerous
()
&&
attacker
.
Id
==
CardId
.
AncientGearGolem
)
return
true
;
return
base
.
OnPreBattleBetween
(
attacker
,
defender
);
}
private
bool
DoubleSummon
()
{
if
(
_lastDoubleSummon
==
Duel
.
Turn
)
...
...
Game/AI/DefaultExecutor.cs
View file @
605c2839
...
...
@@ -28,6 +28,7 @@ namespace WindBot.Game.AI
public
static
int
ChickenGame
=
67616300
;
public
static
int
CastelTheSkyblasterMusketeer
=
82633039
;
public
static
int
CrystalWingSynchroDragon
=
50954680
;
public
static
int
NumberS39UtopiaTheLightning
=
56832966
;
public
static
int
Number39Utopia
=
84013237
;
public
static
int
UltimayaTzolkin
=
1686814
;
...
...
@@ -49,23 +50,29 @@ namespace WindBot.Game.AI
/// <returns>true if the attack can be done.</returns>
public
override
bool
OnPreBattleBetween
(
ClientCard
attacker
,
ClientCard
defender
)
{
if
(
defender
.
IsMonsterInvincible
())
if
(!
attacker
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(!
attacker
.
IsMonsterHasPreventActivationEffectInBattle
()
&&
(
defender
.
IsMonsterDangerous
()
||
defender
.
IsDefense
()))
if
(
defender
.
IsMonsterDangerous
()
||
(
defender
.
IsMonsterInvincible
()
&&
defender
.
IsDefense
()))
{
return
false
;
}
if
(
defender
.
Id
==
_CardId
.
CrystalWingSynchroDragon
&&
!
defender
.
IsDisabled
()
&&
attacker
.
Level
>=
5
)
{
return
false
;
}
if
(
defender
.
Id
==
_CardId
.
NumberS39UtopiaTheLightning
&&
!
defender
.
IsDisabled
()
&&
defender
.
HasXyzMaterial
(
2
,
_CardId
.
Number39Utopia
))
defender
.
RealPower
=
5000
;
}
if
(!
defender
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
attacker
.
Id
==
_CardId
.
NumberS39UtopiaTheLightning
&&
!
attacker
.
IsDisabled
()
&&
attacker
.
HasXyzMaterial
(
2
,
_CardId
.
Number39Utopia
))
attacker
.
RealPower
=
5000
;
}
if
(!
attacker
.
IsMonsterHasPreventActivationEffectInBattle
())
{
if
(
defender
.
Id
==
_CardId
.
NumberS39UtopiaTheLightning
&&
!
defender
.
IsDisabled
()
&&
defender
.
HasXyzMaterial
(
2
,
_CardId
.
Number39Utopia
))
defender
.
RealPower
=
5000
;
}
if
(
Enemy
.
HasInMonstersZone
(
_CardId
.
DupeFrog
,
true
)
&&
defender
.
Id
!=
_CardId
.
DupeFrog
)
return
false
;
...
...
Game/AI/Enums/DangerousMonster.cs
View file @
605c2839
...
...
@@ -9,6 +9,11 @@
Yubel
=
78371393
,
YubelIncarnate
=
4779091
,
YubelNightmare
=
31764700
,
MetaionTheTimelord
=
74530899
ZaphionTheTimelord
=
28929131
,
SadionTheTimelord
=
65314286
,
MetaionTheTimelord
=
74530899
,
KamionTheTimelord
=
91712985
,
LazionTheTimelord
=
92435533
,
EaterOfMillions
=
63845230
}
}
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