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
YSP
windbot
Commits
1170afe6
Commit
1170afe6
authored
Nov 26, 2022
by
YSPplayer
Committed by
GitHub
Nov 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bot Kashtira (#156)
parent
8b06b9a8
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1499 additions
and
1 deletion
+1499
-1
Decks/AI_Kashtira.ydk
Decks/AI_Kashtira.ydk
+59
-0
Game/AI/Decks/KashtiraExecutor.cs
Game/AI/Decks/KashtiraExecutor.cs
+1349
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+90
-1
WindBot.csproj
WindBot.csproj
+1
-0
No files found.
Decks/AI_Kashtira.ydk
0 → 100644
View file @
1170afe6
#created by ...
#main
27204311
68304193
68304193
68304193
32909498
32909498
32909498
4928565
78534861
78534861
91800273
91800273
72090076
31149212
31149212
31149212
14558127
14558127
14558127
23434538
23434538
31480215
34447918
34447918
34447918
73628505
84211599
84211599
24224830
24224830
65681983
69540484
69540484
69540484
71832012
71832012
71832012
10045474
10045474
33925864
#extra
15291624
27548199
21915012
48626373
48626373
95474755
95474755
95474755
10389142
73542331
73542331
21887175
44097050
22423493
65741786
!side
Game/AI/Decks/KashtiraExecutor.cs
0 → 100644
View file @
1170afe6
This diff is collapsed.
Click to expand it.
Game/GameBehavior.cs
View file @
1170afe6
...
@@ -1150,7 +1150,96 @@ namespace WindBot.Game
...
@@ -1150,7 +1150,96 @@ namespace WindBot.Game
private
void
OnSelectDisfield
(
BinaryReader
packet
)
private
void
OnSelectDisfield
(
BinaryReader
packet
)
{
{
OnSelectPlace
(
packet
);
packet
.
ReadByte
();
// player
packet
.
ReadByte
();
// TODO: min
int
field
=
~
packet
.
ReadInt32
();
int
player
;
CardLocation
location
;
int
filter
;
if
((
field
&
0x7f0000
)
!=
0
)
{
player
=
1
;
location
=
CardLocation
.
MonsterZone
;
filter
=
(
field
>>
16
)
&
Zones
.
MonsterZones
;
}
else
if
((
field
&
0x1f000000
)
!=
0
)
{
player
=
1
;
location
=
CardLocation
.
SpellZone
;
filter
=
(
field
>>
24
)
&
Zones
.
SpellZones
;
}
else
if
((
field
&
0x7f
)
!=
0
)
{
player
=
0
;
location
=
CardLocation
.
MonsterZone
;
filter
=
field
&
Zones
.
MonsterZones
;
}
else
if
((
field
&
0x1f00
)
!=
0
)
{
player
=
0
;
location
=
CardLocation
.
SpellZone
;
filter
=
(
field
>>
8
)
&
Zones
.
SpellZones
;
}
else
if
((
field
&
0x2000
)
!=
0
)
{
player
=
0
;
location
=
CardLocation
.
FieldZone
;
filter
=
Zones
.
FieldZone
;
}
else
if
((
field
&
0xc000
)
!=
0
)
{
player
=
0
;
location
=
CardLocation
.
PendulumZone
;
filter
=
(
field
>>
14
)
&
Zones
.
PendulumZones
;
}
else
if
((
field
&
0x20000000
)
!=
0
)
{
player
=
1
;
location
=
CardLocation
.
FieldZone
;
filter
=
Zones
.
FieldZone
;
}
else
{
player
=
1
;
location
=
CardLocation
.
PendulumZone
;
filter
=
(
field
>>
30
)
&
Zones
.
PendulumZones
;
}
int
selected
=
_ai
.
OnSelectPlace
(
_select_hint
,
player
,
location
,
filter
);
_select_hint
=
0
;
byte
[]
resp
=
new
byte
[
3
];
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
player
);
if
(
location
!=
CardLocation
.
PendulumZone
&&
location
!=
CardLocation
.
FieldZone
)
{
resp
[
1
]
=
(
byte
)
location
;
if
((
selected
&
filter
)
>
0
)
filter
&=
selected
;
if
((
filter
&
Zones
.
z2
)
!=
0
)
resp
[
2
]
=
2
;
else
if
((
filter
&
Zones
.
z1
)
!=
0
)
resp
[
2
]
=
1
;
else
if
((
filter
&
Zones
.
z3
)
!=
0
)
resp
[
2
]
=
3
;
else
if
((
filter
&
Zones
.
z0
)
!=
0
)
resp
[
2
]
=
0
;
else
if
((
filter
&
Zones
.
z4
)
!=
0
)
resp
[
2
]
=
4
;
else
if
((
filter
&
Zones
.
z6
)
!=
0
)
resp
[
2
]
=
6
;
else
if
((
filter
&
Zones
.
z5
)
!=
0
)
resp
[
2
]
=
5
;
}
else
{
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
if
((
selected
&
filter
)
>
0
)
filter
&=
selected
;
if
((
filter
&
Zones
.
FieldZone
)
!=
0
)
resp
[
2
]
=
5
;
if
((
filter
&
Zones
.
z0
)
!=
0
)
resp
[
2
]
=
6
;
// left pendulum zone
if
((
filter
&
Zones
.
z1
)
!=
0
)
resp
[
2
]
=
7
;
// right pendulum zone
}
BinaryWriter
reply
=
GamePacketFactory
.
Create
(
CtosMessage
.
Response
);
reply
.
Write
(
resp
);
Connection
.
Send
(
reply
);
}
}
private
void
OnSelectEffectYn
(
BinaryReader
packet
)
private
void
OnSelectEffectYn
(
BinaryReader
packet
)
...
...
WindBot.csproj
View file @
1170afe6
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
<Compile
Include=
"Game\AI\Decks\BraveExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BraveExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\FamiliarPossessedExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\FamiliarPossessedExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\KashtiraExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LuckyExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\LuckyExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MathMechExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MathMechExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\PureWindsExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\PureWindsExecutor.cs"
/>
...
...
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