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
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
MyCard
ygopro-core
Commits
07add807
Commit
07add807
authored
Oct 26, 2020
by
mercury233
Committed by
GitHub
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get_control (#344)
parent
28be2a68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
operations.cpp
operations.cpp
+3
-3
No files found.
operations.cpp
View file @
07add807
...
@@ -861,12 +861,12 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
...
@@ -861,12 +861,12 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
change = false;
change = false;
if(!pcard->is_affect_by_effect(reason_effect))
if(!pcard->is_affect_by_effect(reason_effect))
change = false;
change = false;
if
(
core
.
duel_rule
<=
4
&&
(
pcard
->
get_type
()
&
TYPE_TRAPMONSTER
)
&&
get_useable_count
(
pcard
,
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_CONTROL
)
<=
0
)
if(core.duel_rule <= 4 && (pcard->get_type() & TYPE_TRAPMONSTER) && get_useable_count(pcard, playerid, LOCATION_SZONE,
reason_player
, LOCATION_REASON_CONTROL) <= 0)
change = false;
change = false;
if(!change)
if(!change)
targets->container.erase(pcard);
targets->container.erase(pcard);
}
}
int32
fcount
=
get_useable_count
(
NULL
,
playerid
,
LOCATION_MZONE
,
playerid
,
LOCATION_REASON_CONTROL
,
zone
);
int32 fcount = get_useable_count(NULL, playerid, LOCATION_MZONE,
reason_player
, LOCATION_REASON_CONTROL, zone);
if(fcount <= 0) {
if(fcount <= 0) {
destroy_set->swap(targets->container);
destroy_set->swap(targets->container);
core.units.begin()->step = 5;
core.units.begin()->step = 5;
...
@@ -910,7 +910,7 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
...
@@ -910,7 +910,7 @@ int32 field::get_control(uint16 step, effect* reason_effect, uint8 reason_player
return FALSE;
return FALSE;
}
}
card* pcard = *targets->it;
card* pcard = *targets->it;
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
,
FALSE
,
0
,
FALSE
,
zone
);
move_to_field(pcard,
(reason_player != PLAYER_NONE) ? reason_player :
playerid, playerid, LOCATION_MZONE, pcard->current.position, FALSE, 0, FALSE, zone);
return FALSE;
return FALSE;
}
}
case 4: {
case 4: {
...
...
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