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
eaf25b84
Commit
eaf25b84
authored
Apr 18, 2024
by
mercury233
Committed by
GitHub
Apr 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Duel.GetSynchroMaterial (#569)
parent
2c4f4742
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
libduel.cpp
libduel.cpp
+11
-1
No files found.
libduel.cpp
View file @
eaf25b84
...
@@ -3172,9 +3172,19 @@ int32 scriptlib::duel_get_synchro_material(lua_State *L) {
...
@@ -3172,9 +3172,19 @@ int32 scriptlib::duel_get_synchro_material(lua_State *L) {
int32 playerid = (int32)lua_tointeger(L, 1);
int32 playerid = (int32)lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
if(playerid != 0 && playerid != 1)
return 0;
return 0;
uint32 facedown = FALSE;
if (lua_gettop(L) >= 2)
facedown = lua_toboolean(L, 2);
duel* pduel = interpreter::get_duel_info(L);
duel* pduel = interpreter::get_duel_info(L);
group::card_set mats;
pduel->game_field->get_synchro_material(playerid, &mats);
group* pgroup = pduel->new_group();
group* pgroup = pduel->new_group();
pduel
->
game_field
->
get_synchro_material
(
playerid
,
&
pgroup
->
container
);
for (auto cit = mats.begin(); cit != mats.end(); ++cit) {
card* pcard = *cit;
if (pcard->current.location == LOCATION_MZONE && !pcard->is_position(POS_FACEUP) && !facedown)
continue;
pgroup->container.insert(*cit);
}
interpreter::group2value(L, pgroup);
interpreter::group2value(L, pgroup);
return 1;
return 1;
}
}
...
...
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