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
0adcaa52
Commit
0adcaa52
authored
Nov 22, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const reference in field::swap_control
parent
3d24ffab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+6
-8
No files found.
field.h
View file @
0adcaa52
...
...
@@ -566,7 +566,7 @@ public:
void
remove_overlay_card
(
uint32
reason
,
card
*
pcard
,
uint32
rplayer
,
uint32
s
,
uint32
o
,
uint16
min
,
uint16
max
);
void
get_control
(
const
card_set
&
targets
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
);
void
get_control
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
);
void
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
c
ard_set
*
targets1
,
card_set
*
targets2
,
uint32
reset_phase
,
uint32
reset_count
);
void
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
c
onst
card_set
&
targets1
,
const
card_set
&
targets2
,
uint32
reset_phase
,
uint32
reset_count
);
void
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
card
*
pcard1
,
card
*
pcard2
,
uint32
reset_phase
,
uint32
reset_count
);
void
equip
(
uint32
equip_player
,
card
*
equip_card
,
card
*
target
,
uint32
up
,
uint32
is_step
);
void
draw
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
count
);
...
...
libduel.cpp
View file @
0adcaa52
...
...
@@ -1444,7 +1444,7 @@ int32 scriptlib::duel_swap_control(lua_State *L) {
if
(
pcard1
)
pduel
->
game_field
->
swap_control
(
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
pcard1
,
pcard2
,
reset_phase
,
reset_count
);
else
pduel
->
game_field
->
swap_control
(
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
&
pgroup1
->
container
,
&
pgroup2
->
container
,
reset_phase
,
reset_count
);
pduel
->
game_field
->
swap_control
(
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
pgroup1
->
container
,
pgroup2
->
container
,
reset_phase
,
reset_count
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_pushboolean
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
...
...
operations.cpp
View file @
0adcaa52
...
...
@@ -121,19 +121,17 @@ void field::get_control(card* target, effect* reason_effect, uint32 reason_playe
card_set
tset
{
target
};
get_control
(
tset
,
reason_effect
,
reason_player
,
playerid
,
reset_phase
,
reset_count
,
zone
);
}
void
field
::
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
c
ard_set
*
targets1
,
card_set
*
targets2
,
uint32
reset_phase
,
uint32
reset_count
)
{
group
*
ng1
=
pduel
->
new_group
(
*
targets1
);
void
field
::
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
c
onst
card_set
&
targets1
,
const
card_set
&
targets2
,
uint32
reset_phase
,
uint32
reset_count
)
{
group
*
ng1
=
pduel
->
new_group
(
targets1
);
ng1
->
is_readonly
=
GTYPE_READ_ONLY
;
group
*
ng2
=
pduel
->
new_group
(
*
targets2
);
group
*
ng2
=
pduel
->
new_group
(
targets2
);
ng2
->
is_readonly
=
GTYPE_READ_ONLY
;
add_process
(
PROCESSOR_SWAP_CONTROL
,
0
,
reason_effect
,
ng1
,
reason_player
,
reset_phase
,
reset_count
,
0
,
ng2
);
}
void
field
::
swap_control
(
effect
*
reason_effect
,
uint32
reason_player
,
card
*
pcard1
,
card
*
pcard2
,
uint32
reset_phase
,
uint32
reset_count
)
{
card_set
tset1
;
tset1
.
insert
(
pcard1
);
card_set
tset2
;
tset2
.
insert
(
pcard2
);
swap_control
(
reason_effect
,
reason_player
,
&
tset1
,
&
tset2
,
reset_phase
,
reset_count
);
card_set
tset1
{
pcard1
};
card_set
tset2
{
pcard2
};
swap_control
(
reason_effect
,
reason_player
,
tset1
,
tset2
,
reset_phase
,
reset_count
);
}
void
field
::
equip
(
uint32
equip_player
,
card
*
equip_card
,
card
*
target
,
uint32
up
,
uint32
is_step
)
{
add_process
(
PROCESSOR_EQUIP
,
0
,
nullptr
,
(
group
*
)
target
,
0
,
equip_player
+
(
up
<<
16
)
+
(
is_step
<<
24
),
0
,
0
,
equip_card
);
...
...
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