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
0851c4bf
Commit
0851c4bf
authored
Apr 19, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Due.GetLocationCountFromEx
parent
b7e3c6e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
libduel.cpp
libduel.cpp
+23
-0
operations.cpp
operations.cpp
+4
-0
No files found.
libduel.cpp
View file @
0851c4bf
...
@@ -1506,11 +1506,34 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
...
@@ -1506,11 +1506,34 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
uint32
uplayer
=
pduel
->
game_field
->
core
.
reason_player
;
uint32
uplayer
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
lua_gettop
(
L
)
>=
2
)
if
(
lua_gettop
(
L
)
>=
2
)
uplayer
=
lua_tointeger
(
L
,
2
);
uplayer
=
lua_tointeger
(
L
,
2
);
group
*
mg
=
0
;
uint32
used_location
=
0
;
player_info
::
card_vector
list_mzone
;
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
uint32
digit
=
1
;
for
(
auto
cit
=
pduel
->
game_field
->
player
[
playerid
].
list_mzone
.
begin
();
cit
!=
pduel
->
game_field
->
player
[
playerid
].
list_mzone
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
if
(
pcard
&&
mg
->
container
.
find
(
pcard
)
==
mg
->
container
.
end
())
{
used_location
|=
digit
;
list_mzone
.
push_back
(
pcard
);
}
else
list_mzone
.
push_back
(
0
);
digit
<<=
1
;
}
std
::
swap
(
used_location
,
pduel
->
game_field
->
player
[
playerid
].
used_location
);
pduel
->
game_field
->
player
[
playerid
].
list_mzone
.
swap
(
list_mzone
);
}
uint32
zone
=
0xff
;
uint32
zone
=
0xff
;
if
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
if
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
0
,
playerid
,
uplayer
,
zone
));
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count_fromex
(
0
,
playerid
,
uplayer
,
zone
));
else
else
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_MZONE
,
uplayer
,
LOCATION_REASON_TOFIELD
,
zone
));
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
LOCATION_MZONE
,
uplayer
,
LOCATION_REASON_TOFIELD
,
zone
));
if
(
mg
)
{
pduel
->
game_field
->
player
[
playerid
].
used_location
=
used_location
;
pduel
->
game_field
->
player
[
playerid
].
list_mzone
.
swap
(
list_mzone
);
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_get_usable_mzone_count
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_get_usable_mzone_count
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
0851c4bf
...
@@ -4925,6 +4925,10 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -4925,6 +4925,10 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
2
:
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_GROUP
);
return
TRUE
;
}
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
core
.
operated_set
.
insert
(
pcard
);
core
.
operated_set
.
insert
(
pcard
);
int32
pv
=
0
;
int32
pv
=
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