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
ccf0e090
Commit
ccf0e090
authored
Apr 02, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
900d70d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
17 deletions
+40
-17
operations.cpp
operations.cpp
+40
-17
No files found.
operations.cpp
View file @
ccf0e090
...
@@ -973,23 +973,46 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
...
@@ -973,23 +973,46 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
if(!pcard->is_affect_by_effect(reason_effect))
if(!pcard->is_affect_by_effect(reason_effect))
return FALSE;
return FALSE;
}
}
for(int32 p = 0; p < 2; ++p) {
int32 max = 5;
int32 max = 5;
effect_set eset;
effect_set eset;
filter_player_effect(p
, EFFECT_MAX_MZONE, &eset);
filter_player_effect(p1
, EFFECT_MAX_MZONE, &eset);
for (int32 i = 0; i < eset.size(); ++i) {
for (int32 i = 0; i < eset.size(); ++i) {
pduel->lua->add_param(p
, PARAM_TYPE_INT);
pduel->lua->add_param(p1
, PARAM_TYPE_INT);
pduel->lua->add_param(reason_player, PARAM_TYPE_INT);
pduel->lua->add_param(reason_player, PARAM_TYPE_INT);
pduel->lua->add_param(LOCATION_REASON_CONTROL, PARAM_TYPE_INT);
pduel->lua->add_param(LOCATION_REASON_CONTROL, PARAM_TYPE_INT);
int32 v = eset[i]->get_value(3);
int32 v = eset[i]->get_value(3);
if (max > v)
if (max > v)
max = v;
max = v;
}
}
int32 count = std::count_if(player[p].list_mzone.begin(), player[p].list_mzone.end(),
std::set<card*> cset;
[](card* pcard) { return pcard; });
cset.insert(targets1->container.begin(), targets1->container.end());
if(count > max)
for(int32 i = 0; i < 5; ++i) {
card* pcard = player[p1].list_mzone[i];
if(pcard)
cset.insert(pcard);
}
if((int32)cset.size() > max)
return FALSE;
return FALSE;
max = 5;
eset.clear();
filter_player_effect(p2, EFFECT_MAX_MZONE, &eset);
for (int32 i = 0; i < eset.size(); ++i) {
pduel->lua->add_param(p2, PARAM_TYPE_INT);
pduel->lua->add_param(reason_player, PARAM_TYPE_INT);
pduel->lua->add_param(LOCATION_REASON_CONTROL, PARAM_TYPE_INT);
int32 v = eset[i]->get_value(3);
if (max > v)
max = v;
}
}
cset.clear();
cset.insert(targets2->container.begin(), targets2->container.end());
for(int32 i = 0; i < 5; ++i) {
card* pcard = player[p2].list_mzone[i];
if(pcard)
cset.insert(pcard);
}
if((int32)cset.size() > max)
return FALSE;
for(auto cit = targets1->container.begin(); cit != targets1->container.end(); ++cit) {
for(auto cit = targets1->container.begin(); cit != targets1->container.end(); ++cit) {
card* pcard = *cit;
card* pcard = *cit;
if(pcard->unique_code && (pcard->unique_location & LOCATION_MZONE))
if(pcard->unique_code && (pcard->unique_location & LOCATION_MZONE))
...
...
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