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
242b903f
Commit
242b903f
authored
Sep 30, 2020
by
mercury233
Committed by
GitHub
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Duel.SwapControl (#342)
parent
972a3806
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
operations.cpp
operations.cpp
+12
-6
No files found.
operations.cpp
View file @
242b903f
...
...
@@ -1039,13 +1039,16 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
uint8 s1 = pcard1->current.sequence;
uint32 flag;
get_useable_count(NULL, p1, LOCATION_MZONE, reason_player, LOCATION_REASON_CONTROL, 0xff, &flag);
flag = (flag & ~(1 << s1) & 0xff) | ~0x1f;
if(reason_player == p1)
flag = (flag & ~(1 << s1) & 0xff) | ~0x1f;
else
flag = ((flag & ~(1 << s1)) << 16 & 0xff0000) | ~0x1f0000;
card* pcard2 = *targets2->it;
pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(
p1
);
pduel->write_buffer8(
reason_player
);
pduel->write_buffer32(pcard2->data.code);
add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0,
p1
, flag, 1);
add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0,
reason_player
, flag, 1);
return FALSE;
}
case 2: {
...
...
@@ -1055,13 +1058,16 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
uint8 s2 = pcard2->current.sequence;
uint32 flag;
get_useable_count(NULL, p2, LOCATION_MZONE, reason_player, LOCATION_REASON_CONTROL, 0xff, &flag);
flag = (flag & ~(1 << s2) & 0xff) | ~0x1f;
if(reason_player == p2)
flag = (flag & ~(1 << s2) & 0xff) | ~0x1f;
else
flag = ((flag & ~(1 << s2)) << 16 & 0xff0000) | ~0x1f0000;
card* pcard1 = *targets1->it;
pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(
p2
);
pduel->write_buffer8(
reason_player
);
pduel->write_buffer32(pcard1->data.code);
add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0,
p2
, flag, 1);
add_process(PROCESSOR_SELECT_PLACE, 0, 0, 0,
reason_player
, flag, 1);
return FALSE;
}
case 3: {
...
...
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