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
a859dd54
Commit
a859dd54
authored
Feb 14, 2026
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OnHintZone
parent
b9f20076
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
0 deletions
+52
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+27
-0
Game/AI/Executor.cs
Game/AI/Executor.cs
+10
-0
Game/GameAI.cs
Game/GameAI.cs
+10
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+5
-0
No files found.
Game/AI/DefaultExecutor.cs
View file @
a859dd54
...
@@ -255,6 +255,8 @@ namespace WindBot.Game.AI
...
@@ -255,6 +255,8 @@ 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
>();
/// <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
>();
/// <summary>
/// <summary>
/// Defined:
/// Defined:
...
@@ -590,6 +592,30 @@ namespace WindBot.Game.AI
...
@@ -590,6 +592,30 @@ namespace WindBot.Game.AI
field
.
HintDescriptions
.
Remove
(
description
);
field
.
HintDescriptions
.
Remove
(
description
);
}
}
public
override
void
OnHintZone
(
int
player
,
int
zone
)
{
base
.
OnHintZone
(
player
,
zone
);
ChainInfo
currentChainInfo
=
Duel
.
GetCurrentSolvingChainInfo
();
if
(
currentChainInfo
!=
null
)
{
if
(
currentChainInfo
.
IsCode
(
_CardId
.
InfiniteImpermanence
))
{
// Zone bit mapping: 0x100=col0, 0x200=col1, 0x400=col2, 0x800=col3, 0x1000=col4.
for
(
int
i
=
0
;
i
<=
4
;
i
++)
{
if
((
zone
&
(
0x100
<<
i
))
==
0
)
continue
;
if
(
currentChainInfo
.
ActivatePlayer
==
0
)
{
infiniteImpermanenceNegatedColumns
.
Add
(
i
);
}
else
{
infiniteImpermanenceNegatedColumns
.
Add
(
4
-
i
);
}
}
}
}
}
public
override
void
OnReceivingAnnouce
(
int
player
,
int
data
)
public
override
void
OnReceivingAnnouce
(
int
player
,
int
data
)
{
{
if
(
player
==
1
&&
data
==
Util
.
GetStringId
(
_CardId
.
LightningStorm
,
0
)
||
data
==
Util
.
GetStringId
(
_CardId
.
LightningStorm
,
1
))
if
(
player
==
1
&&
data
==
Util
.
GetStringId
(
_CardId
.
LightningStorm
,
0
)
||
data
==
Util
.
GetStringId
(
_CardId
.
LightningStorm
,
1
))
...
@@ -611,6 +637,7 @@ namespace WindBot.Game.AI
...
@@ -611,6 +637,7 @@ namespace WindBot.Game.AI
/// </summary>
/// </summary>
public
override
void
OnNewTurn
()
public
override
void
OnNewTurn
()
{
{
infiniteImpermanenceNegatedColumns
.
Clear
();
if
(
Duel
.
Turn
<=
1
)
calledbytheGraveIdCountMap
.
Clear
();
if
(
Duel
.
Turn
<=
1
)
calledbytheGraveIdCountMap
.
Clear
();
List
<
int
>
keyList
=
calledbytheGraveIdCountMap
.
Keys
.
ToList
();
List
<
int
>
keyList
=
calledbytheGraveIdCountMap
.
Keys
.
ToList
();
foreach
(
int
dic
in
keyList
)
foreach
(
int
dic
in
keyList
)
...
...
Game/AI/Executor.cs
View file @
a859dd54
...
@@ -132,6 +132,16 @@ namespace WindBot.Game.AI
...
@@ -132,6 +132,16 @@ namespace WindBot.Game.AI
// For overriding
// For overriding
}
}
/// <summary>
/// Called when a zone hint is received.
/// </summary>
/// <param name="player">Player index.</param>
/// <param name="zone">Zone data (hinted zones, bit field).</param>
public
virtual
void
OnHintZone
(
int
player
,
int
zone
)
{
// For overriding
}
public
virtual
void
OnMove
(
ClientCard
card
,
int
previousControler
,
int
previousLocation
,
int
currentControler
,
int
currentLocation
)
public
virtual
void
OnMove
(
ClientCard
card
,
int
previousControler
,
int
previousLocation
,
int
currentControler
,
int
currentLocation
)
{
{
// Some AI need do something on card's moving
// Some AI need do something on card's moving
...
...
Game/GameAI.cs
View file @
a859dd54
...
@@ -196,6 +196,16 @@ namespace WindBot.Game
...
@@ -196,6 +196,16 @@ namespace WindBot.Game
Executor
.
OnPlayerHint
(
player
,
hintType
,
description
);
Executor
.
OnPlayerHint
(
player
,
hintType
,
description
);
}
}
/// <summary>
/// Called when a zone hint is received.
/// </summary>
/// <param name="player">Player index.</param>
/// <param name="zone">Zone data (hinted zones, bit field).</param>
public
void
OnHintZone
(
int
player
,
int
zone
)
{
Executor
.
OnHintZone
(
player
,
zone
);
}
/// <summary>
/// <summary>
/// Called when receiving annouce
/// Called when receiving annouce
/// </summary>
/// </summary>
...
...
Game/GameBehavior.cs
View file @
a859dd54
...
@@ -364,6 +364,11 @@ namespace WindBot.Game
...
@@ -364,6 +364,11 @@ namespace WindBot.Game
{
{
_ai
.
OnReceivingAnnouce
(
player
,
data
);
_ai
.
OnReceivingAnnouce
(
player
,
data
);
}
}
if
(
type
==
11
)
// HINT_ZONE
{
Logger
.
DebugWriteLine
(
"HINT_ZONE received: player="
+
player
+
", zone="
+
data
);
_ai
.
OnHintZone
(
player
,
data
);
}
}
}
private
void
OnStart
(
BinaryReader
packet
)
private
void
OnStart
(
BinaryReader
packet
)
...
...
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