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
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
MyCard
windbot
Commits
0c914f52
Commit
0c914f52
authored
Feb 23, 2026
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DefaultCheckWhetherBotCanSearch, DefaultCheckWhetherEnemyCanDraw
parent
ef8d96d1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
47 deletions
+119
-47
Game/AI/Decks/ApophisExecutor.cs
Game/AI/Decks/ApophisExecutor.cs
+24
-46
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+88
-1
Game/ChainInfo.cs
Game/ChainInfo.cs
+7
-0
No files found.
Game/AI/Decks/ApophisExecutor.cs
View file @
0c914f52
This diff is collapsed.
Click to expand it.
Game/AI/DefaultExecutor.cs
View file @
0c914f52
...
@@ -143,6 +143,11 @@ namespace WindBot.Game.AI
...
@@ -143,6 +143,11 @@ namespace WindBot.Game.AI
public
const
int
VaylantzWorld_KonigWissen
=
75952542
;
public
const
int
VaylantzWorld_KonigWissen
=
75952542
;
public
const
int
DivineArsenalAAZEUS_SkyThunder
=
90448279
;
public
const
int
DivineArsenalAAZEUS_SkyThunder
=
90448279
;
public
const
int
LightningStorm
=
14532163
;
public
const
int
LightningStorm
=
14532163
;
public
const
int
MistakenArrest
=
4227096
;
public
const
int
ThunderKingRaiOh
=
71564252
;
public
const
int
ThunderDragonColossus
=
15291624
;
public
const
int
DeckLockdown
=
1149109
;
public
const
int
DoomZDestruction
=
80320877
;
public
const
int
BelialMarquisOfDarkness
=
33655493
;
public
const
int
BelialMarquisOfDarkness
=
33655493
;
public
const
int
Chirubim
é
PrincessOfAutumnLeaves
=
87294988
;
public
const
int
Chirubim
é
PrincessOfAutumnLeaves
=
87294988
;
...
@@ -257,6 +262,16 @@ namespace WindBot.Game.AI
...
@@ -257,6 +262,16 @@ namespace WindBot.Game.AI
protected
int
lightningStormOption
=
-
1
;
protected
int
lightningStormOption
=
-
1
;
Dictionary
<
int
,
int
>
calledbytheGraveIdCountMap
=
new
Dictionary
<
int
,
int
>();
Dictionary
<
int
,
int
>
calledbytheGraveIdCountMap
=
new
Dictionary
<
int
,
int
>();
List
<
int
>
crossoutDesignatorIdList
=
new
List
<
int
>();
List
<
int
>
crossoutDesignatorIdList
=
new
List
<
int
>();
int
mistakenArrestAffectedCount
=
0
;
/// <summary>
/// List of effect IDs that have been resolved this turn.
/// </summary>
protected
List
<
int
>
resolvedEffectIdList
=
new
List
<
int
>();
/// <summary>
/// List of effect IDs that have been resolved by enemy this turn.
/// </summary>
protected
List
<
int
>
enemyResolvedEffectIdList
=
new
List
<
int
>();
/// <summary>Columns 0-4 on Bot's field negated by Infinite Impermanence (enemy's col converted to ours: 4-col). Cleared at turn start.</summary>
/// <summary>Columns 0-4 on Bot's field negated by Infinite Impermanence (enemy's col converted to ours: 4-col). Cleared at turn start.</summary>
protected
List
<
int
>
infiniteImpermanenceNegatedColumns
=
new
List
<
int
>();
protected
List
<
int
>
infiniteImpermanenceNegatedColumns
=
new
List
<
int
>();
...
@@ -628,6 +643,39 @@ namespace WindBot.Game.AI
...
@@ -628,6 +643,39 @@ namespace WindBot.Game.AI
base
.
OnReceivingAnnouce
(
player
,
data
);
base
.
OnReceivingAnnouce
(
player
,
data
);
}
}
public
override
void
OnChainSolved
(
int
chainIndex
)
{
ChainInfo
currentChain
=
Duel
.
GetCurrentSolvingChainInfo
();
if
(
currentChain
!=
null
&&
!
Duel
.
IsCurrentSolvingChainNegated
())
{
if
(
currentChain
.
IsActivateCode
(
_CardId
.
LockBird
))
{
resolvedEffectIdList
.
Add
(
_CardId
.
LockBird
);
}
if
(
currentChain
.
ActivatePlayer
==
1
)
{
if
(
currentChain
.
IsActivateCode
(
_CardId
.
MaxxC
))
enemyResolvedEffectIdList
.
Add
(
_CardId
.
MaxxC
);
if
(
currentChain
.
IsActivateCode
(
_CardId
.
MulcharmyPurulia
))
enemyResolvedEffectIdList
.
Add
(
_CardId
.
MulcharmyPurulia
);
if
(
currentChain
.
IsActivateCode
(
_CardId
.
MulcharmyFuwalos
))
enemyResolvedEffectIdList
.
Add
(
_CardId
.
MulcharmyFuwalos
);
if
(
currentChain
.
IsActivateCode
(
_CardId
.
MulcharmyNyalus
))
enemyResolvedEffectIdList
.
Add
(
_CardId
.
MulcharmyNyalus
);
if
(
currentChain
.
IsActivateCode
(
_CardId
.
MistakenArrest
))
{
if
(
Duel
.
Player
==
1
)
{
mistakenArrestAffectedCount
=
Math
.
Max
(
mistakenArrestAffectedCount
,
3
);
}
else
{
mistakenArrestAffectedCount
=
Math
.
Max
(
mistakenArrestAffectedCount
,
2
);
}
}
}
}
}
public
override
void
OnChainEnd
()
public
override
void
OnChainEnd
()
{
{
lightningStormOption
=
-
1
;
lightningStormOption
=
-
1
;
...
@@ -640,7 +688,14 @@ namespace WindBot.Game.AI
...
@@ -640,7 +688,14 @@ namespace WindBot.Game.AI
public
override
void
OnNewTurn
()
public
override
void
OnNewTurn
()
{
{
infiniteImpermanenceNegatedColumns
.
Clear
();
infiniteImpermanenceNegatedColumns
.
Clear
();
if
(
Duel
.
Turn
<=
1
)
calledbytheGraveIdCountMap
.
Clear
();
resolvedEffectIdList
.
Clear
();
enemyResolvedEffectIdList
.
Clear
();
if
(
Duel
.
Turn
<=
1
)
{
calledbytheGraveIdCountMap
.
Clear
();
mistakenArrestAffectedCount
=
0
;
}
mistakenArrestAffectedCount
=
Math
.
Max
(
mistakenArrestAffectedCount
-
1
,
0
);
List
<
int
>
keyList
=
calledbytheGraveIdCountMap
.
Keys
.
ToList
();
List
<
int
>
keyList
=
calledbytheGraveIdCountMap
.
Keys
.
ToList
();
foreach
(
int
dic
in
keyList
)
foreach
(
int
dic
in
keyList
)
{
{
...
@@ -1732,5 +1787,37 @@ namespace WindBot.Game.AI
...
@@ -1732,5 +1787,37 @@ namespace WindBot.Game.AI
// check whether will be negated by Infinite Impermanence
// check whether will be negated by Infinite Impermanence
return
DefaultCheckAllAvailableSpellColumnNegated
();
return
DefaultCheckAllAvailableSpellColumnNegated
();
}
}
/// <summary>
/// Check whether bot can search cards from deck.
/// </summary>
/// <returns></returns>
protected
bool
DefaultCheckWhetherBotCanSearch
()
{
if
(
resolvedEffectIdList
.
Contains
(
_CardId
.
LockBird
))
return
false
;
if
(
mistakenArrestAffectedCount
>
0
)
return
false
;
if
(
Bot
.
HasInMonstersZone
(
_CardId
.
ThunderKingRaiOh
,
notDisabled
:
true
,
faceUp
:
true
)
||
Enemy
.
HasInMonstersZone
(
_CardId
.
ThunderKingRaiOh
,
notDisabled
:
true
,
faceUp
:
true
))
return
false
;
if
(
Enemy
.
HasInMonstersZone
(
_CardId
.
ThunderDragonColossus
))
return
false
;
if
(
Bot
.
HasInSpellZone
(
_CardId
.
DeckLockdown
,
notDisabled
:
true
,
faceUp
:
true
)
||
Enemy
.
HasInSpellZone
(
_CardId
.
DeckLockdown
,
notDisabled
:
true
,
faceUp
:
true
))
return
false
;
if
(
Enemy
.
HasInSpellZone
(
_CardId
.
DoomZDestruction
,
notDisabled
:
true
,
faceUp
:
true
))
return
false
;
return
true
;
}
/// <summary>
/// Check whether enemy can draw cards.
/// </summary>
/// <returns></returns>
protected
bool
DefaultCheckWhetherEnemyCanDraw
()
{
if
(
resolvedEffectIdList
.
Contains
(
_CardId
.
LockBird
))
return
false
;
return
true
;
}
}
}
}
}
Game/ChainInfo.cs
View file @
0c914f52
...
@@ -12,6 +12,7 @@ namespace WindBot.Game
...
@@ -12,6 +12,7 @@ namespace WindBot.Game
public
ClientCard
RelatedCard
{
get
;
private
set
;
}
public
ClientCard
RelatedCard
{
get
;
private
set
;
}
public
int
ActivatePlayer
{
get
;
private
set
;
}
public
int
ActivatePlayer
{
get
;
private
set
;
}
public
int
ActivateId
{
get
;
private
set
;
}
public
int
ActivateId
{
get
;
private
set
;
}
public
int
ActivateAlias
{
get
;
private
set
;
}
public
int
ActivateController
{
get
;
private
set
;
}
public
int
ActivateController
{
get
;
private
set
;
}
public
int
ActivatePosition
{
get
;
private
set
;
}
public
int
ActivatePosition
{
get
;
private
set
;
}
public
int
ActivateSequence
{
get
;
private
set
;
}
public
int
ActivateSequence
{
get
;
private
set
;
}
...
@@ -35,6 +36,7 @@ namespace WindBot.Game
...
@@ -35,6 +36,7 @@ namespace WindBot.Game
RelatedCard
=
card
;
RelatedCard
=
card
;
ActivatePlayer
=
player
;
ActivatePlayer
=
player
;
ActivateId
=
card
.
Id
;
ActivateId
=
card
.
Id
;
ActivateAlias
=
card
.
Alias
;
ActivateController
=
card
.
Controller
;
ActivateController
=
card
.
Controller
;
ActivatePosition
=
card
.
Position
;
ActivatePosition
=
card
.
Position
;
ActivateSequence
=
card
.
Sequence
;
ActivateSequence
=
card
.
Sequence
;
...
@@ -61,6 +63,11 @@ namespace WindBot.Game
...
@@ -61,6 +63,11 @@ namespace WindBot.Game
return
((
int
)
ActivateLocation
&
(
int
)
location
)
!=
0
;
return
((
int
)
ActivateLocation
&
(
int
)
location
)
!=
0
;
}
}
public
bool
IsActivateCode
(
int
id
)
{
return
ActivateId
==
id
||
Math
.
Abs
(
ActivateAlias
-
ActivateId
)
<=
20
&&
ActivateAlias
==
id
;
}
public
bool
IsCode
(
int
id
)
public
bool
IsCode
(
int
id
)
{
{
return
RelatedCard
!=
null
&&
RelatedCard
.
IsCode
(
id
);
return
RelatedCard
!=
null
&&
RelatedCard
.
IsCode
(
id
);
...
...
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