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
nanahira
windbot
Commits
66d208f0
Commit
66d208f0
authored
May 15, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
d0c0e4c2
b268fcb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
Game/AI/Decks/WitchcraftExecutor.cs
Game/AI/Decks/WitchcraftExecutor.cs
+26
-10
No files found.
Game/AI/Decks/WitchcraftExecutor.cs
View file @
66d208f0
...
...
@@ -1272,6 +1272,8 @@ namespace WindBot.Game.AI.Decks
bool
lesssummon
=
false
;
int
extra_attack
=
CheckPlusAttackforMadameVerre
(
true
,
false
,
true
);
int
best_power
=
Util
.
GetBestAttack
(
Bot
);
if
(
CheckRemainInDeck
(
CardId
.
Haine
)
>
0
&&
best_power
<
2400
)
best_power
=
2400
;
Logger
.
DebugWriteLine
(
"less summon check: "
+
(
best_power
+
extra_attack
-
1000
).
ToString
()
+
" to "
+
(
best_power
+
extra_attack
).
ToString
());
if
(
Util
.
GetOneEnemyBetterThanValue
(
best_power
)
!=
null
&&
Util
.
GetOneEnemyBetterThanValue
(
best_power
+
extra_attack
)
==
null
&&
Util
.
GetOneEnemyBetterThanValue
(
best_power
+
extra_attack
-
1000
)
!=
null
)
...
...
@@ -1295,6 +1297,11 @@ namespace WindBot.Game.AI.Decks
}
}
// check whether continue to ss
bool
should_attack
=
Util
.
GetOneEnemyBetterThanValue
(
Card
.
Attack
)
==
null
;
if
((
should_attack
^
Card
.
IsDefense
())
&&
Duel
.
Player
==
1
)
return
false
;
if
(
CheckRemainInDeck
(
CardId
.
Haine
,
CardId
.
MadameVerre
,
CardId
.
GolemAruru
)
==
0
)
return
false
;
// SS higer level
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Haine
)
||
(
lesssummon
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
MadameVerre
,
true
)))
{
...
...
@@ -1759,23 +1766,28 @@ namespace WindBot.Game.AI.Decks
{
if
(
hand
.
IsMonster
()
&&
hand
.
Level
<=
4
&&
hand
.
Attack
>
bestPower
)
bestPower
=
hand
.
Attack
;
}
int
opt
=
-
1
;
// destroy monster
if
(
Enemy
.
MonsterZone
.
GetFirstMatchingCard
(
card
=>
card
.
IsFloodgate
()
&&
card
.
IsAttack
())
!=
null
||
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsAttack
()
&&
card
.
Attack
>=
bestPower
)
>=
2
)
||
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsAttack
()
&&
card
.
Attack
>=
bestPower
)
>=
2
)
opt
=
0
;
// destroy spell/trap
else
if
(
Enemy
.
GetSpellCount
()
>=
2
||
Util
.
GetProblematicEnemySpell
()
!=
null
)
opt
=
1
;
if
(
opt
==
-
1
)
return
false
;
// only one selection
if
(
Enemy
.
MonsterZone
.
GetFirstMatchingCard
(
card
=>
card
.
IsAttack
())
==
null
||
Enemy
.
GetSpellCount
()
==
0
)
{
AI
.
SelectOption
(
Util
.
GetStringId
(
CardId
.
LightningStorm
,
0
)
);
AI
.
SelectOption
(
0
);
SelectSTPlace
(
null
,
true
);
return
true
;
}
// destroy spell/trap
if
(
Enemy
.
GetSpellCount
()
>=
2
||
Util
.
GetProblematicEnemySpell
()
!=
null
)
{
AI
.
SelectOption
(
Util
.
GetStringId
(
CardId
.
LightningStorm
,
1
));
AI
.
SelectOption
(
opt
);
SelectSTPlace
(
null
,
true
);
return
true
;
}
return
false
;
}
// activate of PotofExtravagance
public
bool
PotofExtravaganceActivate
()
...
...
@@ -2341,8 +2353,12 @@ namespace WindBot.Game.AI.Decks
// activate of Patronus
public
bool
PatronusActivate
()
{
// activate immediately
if
(
ActivateDescription
==
94
)
{
return
true
;
}
// search
//if (ActivateDescription == Util.GetStringId(CardId.Patronus, 0))
if
(
Card
.
Location
==
CardLocation
.
SpellZone
)
{
if
(
NegatedCheck
(
true
)
||
Duel
.
LastChainPlayer
==
0
)
return
false
;
...
...
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