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
3d3341a3
Commit
3d3341a3
authored
Jun 26, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use card_set in Duel.SelectSynchroMaterial
parent
73bda6d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
libduel.cpp
libduel.cpp
+6
-4
No files found.
libduel.cpp
View file @
3d3341a3
...
...
@@ -3222,12 +3222,13 @@ int32 scriptlib::duel_select_synchro_material(lua_State *L) {
}
auto filter1 = interpreter::get_function_handle(L, 3);
auto filter2 = interpreter::get_function_handle(L, 4);
pduel->game_field->core.select_cards.clear()
;
field::card_set select_cards
;
if (mg) {
for (auto& pm : mg->container) {
if (pduel->game_field->check_tuner_material(L, pcard, pm, 3, 4, min, max, nullptr, mg))
pduel->game_field->core.select_cards.push_back
(pm);
select_cards.insert
(pm);
}
pduel->game_field->core.select_cards.assign(select_cards.begin(), select_cards.end());
pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 0, nullptr, nullptr, playerid, min + (max << 16), filter1, filter2, pcard, mg);
}
else {
...
...
@@ -3235,8 +3236,9 @@ int32 scriptlib::duel_select_synchro_material(lua_State *L) {
pduel->game_field->get_synchro_material(playerid, &material);
for (auto& tuner : material) {
if (pduel->game_field->check_tuner_material(L, pcard, tuner, 3, 4, min, max, smat, nullptr))
pduel->game_field->core.select_cards.push_back
(tuner);
select_cards.insert
(tuner);
}
pduel->game_field->core.select_cards.assign(select_cards.begin(), select_cards.end());
pduel->game_field->add_process(PROCESSOR_SELECT_SYNCHRO, 0, nullptr, nullptr, playerid + 0x10000, min + (max << 16), filter1, filter2, pcard, smat);
}
return lua_yield(L, 0);
...
...
@@ -3286,7 +3288,7 @@ int32 scriptlib::duel_select_tuner_material(lua_State *L) {
check_param(L, PARAM_TYPE_GROUP, 8);
mg = *(group**) lua_touserdata(L, 8);
}
if(!pduel->game_field->check_tuner_material(L, pcard, tuner, 4, 5, min, max,
0
, mg))
if(!pduel->game_field->check_tuner_material(L, pcard, tuner, 4, 5, min, max,
nullptr
, mg))
return 0;
pduel->game_field->core.select_cards.clear();
pduel->game_field->core.select_cards.push_back(tuner);
...
...
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