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
神之吹息
windbot
Commits
0a10e115
Commit
0a10e115
authored
Apr 27, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update OnSelectPlace, fix hint for SelectUnselect
parent
edd7f02f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
19 deletions
+15
-19
Game/AI/Decks/AltergeistExecutor.cs
Game/AI/Decks/AltergeistExecutor.cs
+3
-3
Game/AI/Executor.cs
Game/AI/Executor.cs
+1
-1
Game/GameAI.cs
Game/GameAI.cs
+1
-1
Game/GameBehavior.cs
Game/GameBehavior.cs
+10
-14
YGOSharp.OCGWrapper.Enums.dll
YGOSharp.OCGWrapper.Enums.dll
+0
-0
No files found.
Game/AI/Decks/AltergeistExecutor.cs
View file @
0a10e115
...
...
@@ -2815,15 +2815,15 @@ namespace WindBot.Game.AI.Decks
return
0
;
}
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
int
location
,
int
available
)
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
if
(
player
==
0
)
{
if
(
location
==
(
int
)
CardLocation
.
SpellZone
)
if
(
location
==
CardLocation
.
SpellZone
)
{
// unfinished
}
else
if
(
location
==
(
int
)
CardLocation
.
MonsterZone
)
else
if
(
location
==
CardLocation
.
MonsterZone
)
{
if
(
cardId
==
CardId
.
Linkuriboh
)
{
...
...
Game/AI/Executor.cs
View file @
0a10e115
...
...
@@ -170,7 +170,7 @@ namespace WindBot.Game.AI
return
-
1
;
}
public
virtual
int
OnSelectPlace
(
int
cardId
,
int
player
,
int
location
,
int
available
)
public
virtual
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
// For overriding
return
0
;
...
...
Game/GameAI.cs
View file @
0a10e115
...
...
@@ -479,7 +479,7 @@ namespace WindBot.Game
return
0
;
// Always select the first option.
}
public
int
OnSelectPlace
(
int
cardId
,
int
player
,
int
location
,
int
available
)
public
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
int
selector_selected
=
m_place
;
m_place
=
0
;
...
...
Game/GameBehavior.cs
View file @
0a10e115
...
...
@@ -506,6 +506,7 @@ namespace WindBot.Game
_duel
.
Fields
[
1
].
BattlingMonster
=
null
;
_duel
.
Fields
[
0
].
UnderAttack
=
false
;
_duel
.
Fields
[
1
].
UnderAttack
=
false
;
_select_hint
=
0
;
_ai
.
OnNewPhase
();
}
...
...
@@ -982,7 +983,6 @@ namespace WindBot.Game
}
IList
<
ClientCard
>
selected
=
func
(
cards
,
(
finishable
?
0
:
1
),
1
,
_select_hint
,
cancelable
);
_select_hint
=
0
;
if
(
selected
.
Count
==
0
&&
cancelable
)
{
...
...
@@ -1210,48 +1210,44 @@ namespace WindBot.Game
packet
.
ReadByte
();
// min
int
field
=
~
packet
.
ReadInt32
();
const
int
LOCATION_MZONE
=
0x4
;
const
int
LOCATION_SZONE
=
0x8
;
const
int
LOCATION_PZONE
=
0x200
;
int
player
;
int
location
;
CardLocation
location
;
int
filter
;
if
((
field
&
0x7f
)
!=
0
)
{
player
=
0
;
location
=
LOCATION_MZONE
;
location
=
CardLocation
.
MonsterZone
;
filter
=
field
&
Zones
.
MonsterZones
;
}
else
if
((
field
&
0x1f00
)
!=
0
)
{
player
=
0
;
location
=
LOCATION_SZONE
;
location
=
CardLocation
.
SpellZone
;
filter
=
(
field
>>
8
)
&
Zones
.
SpellZones
;
}
else
if
((
field
&
0xc000
)
!=
0
)
{
player
=
0
;
location
=
LOCATION_PZONE
;
location
=
CardLocation
.
PendulumZone
;
filter
=
(
field
>>
14
)
&
Zones
.
PendulumZones
;
}
else
if
((
field
&
0x7f0000
)
!=
0
)
{
player
=
1
;
location
=
LOCATION_MZONE
;
location
=
CardLocation
.
MonsterZone
;
filter
=
(
field
>>
16
)
&
Zones
.
MonsterZones
;
}
else
if
((
field
&
0x1f000000
)
!=
0
)
{
player
=
1
;
location
=
LOCATION_SZONE
;
location
=
CardLocation
.
SpellZone
;
filter
=
(
field
>>
24
)
&
Zones
.
SpellZones
;
}
else
{
player
=
1
;
location
=
LOCATION_PZONE
;
location
=
CardLocation
.
PendulumZone
;
filter
=
(
field
>>
30
)
&
Zones
.
PendulumZones
;
}
...
...
@@ -1261,7 +1257,7 @@ namespace WindBot.Game
byte
[]
resp
=
new
byte
[
3
];
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
player
);
if
(
location
!=
LOCATION_PZONE
)
if
(
location
!=
CardLocation
.
PendulumZone
)
{
resp
[
1
]
=
(
byte
)
location
;
if
((
selected
&
filter
)
>
0
)
...
...
@@ -1277,7 +1273,7 @@ namespace WindBot.Game
}
else
{
resp
[
1
]
=
(
byte
)
LOCATION_SZONE
;
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
if
((
selected
&
filter
)
>
0
)
filter
&=
selected
;
...
...
YGOSharp.OCGWrapper.Enums.dll
View file @
0a10e115
No preview for this file type
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