Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
ygopro-core
Commits
9e285715
Commit
9e285715
authored
Jun 08, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
fe21fe91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
libduel.cpp
libduel.cpp
+12
-12
No files found.
libduel.cpp
View file @
9e285715
...
@@ -2010,6 +2010,12 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
...
@@ -2010,6 +2010,12 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
list
=
0
;
uint32
list
=
0
;
auto
count
=
pduel
->
game_field
->
get_useable_count
(
nullptr
,
playerid
,
LOCATION_MZONE
,
uplayer
,
reason
,
zone
,
&
list
);
auto
count
=
pduel
->
game_field
->
get_useable_count
(
nullptr
,
playerid
,
LOCATION_MZONE
,
uplayer
,
reason
,
zone
,
&
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
if
(
uplayer
==
playerid
&&
reason
==
LOCATION_REASON_TOFIELD
)
{
if
(
uplayer
==
playerid
&&
reason
==
LOCATION_REASON_TOFIELD
)
{
int32
kaiser_limit
=
0xff
;
int32
kaiser_limit
=
0xff
;
if
(
mcard
)
{
if
(
mcard
)
{
...
@@ -2022,12 +2028,6 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
...
@@ -2022,12 +2028,6 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
}
}
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
list
);
lua_pushinteger
(
L
,
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
return
2
;
return
2
;
}
}
// Condition: uplayer moves scard or any card with type from Extra Deck to playerid's field
// Condition: uplayer moves scard or any card with type from Extra Deck to playerid's field
...
@@ -2091,6 +2091,12 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
...
@@ -2091,6 +2091,12 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
list
=
0
;
uint32
list
=
0
;
auto
count
=
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
,
&
list
);
auto
count
=
pduel
->
game_field
->
get_useable_count_fromex
(
scard
,
playerid
,
uplayer
,
zone
,
&
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
if
(
uplayer
==
playerid
)
{
if
(
uplayer
==
playerid
)
{
int32
kaiser_limit
=
0xff
;
int32
kaiser_limit
=
0xff
;
if
(
mcard
)
{
if
(
mcard
)
{
...
@@ -2103,12 +2109,6 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
...
@@ -2103,12 +2109,6 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
}
}
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
count
);
lua_pushinteger
(
L
,
list
);
lua_pushinteger
(
L
,
list
);
if
(
swapped
)
{
pduel
->
game_field
->
player
[
0
].
used_location
=
used_location
[
0
];
pduel
->
game_field
->
player
[
1
].
used_location
=
used_location
[
1
];
pduel
->
game_field
->
player
[
0
].
list_mzone
.
swap
(
list_mzone
[
0
]);
pduel
->
game_field
->
player
[
1
].
list_mzone
.
swap
(
list_mzone
[
1
]);
}
if
(
use_temp_card
)
{
if
(
use_temp_card
)
{
scard
->
current
.
location
=
0
;
scard
->
current
.
location
=
0
;
scard
->
data
.
type
=
0
;
scard
->
data
.
type
=
0
;
...
...
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