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
3d24ffab
Commit
3d24ffab
authored
Nov 22, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const reference in field::get_control
parent
2a595bc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+4
-5
processor.cpp
processor.cpp
+4
-4
No files found.
field.h
View file @
3d24ffab
...
...
@@ -564,7 +564,7 @@ public:
void
change_target_param
(
uint8
chaincount
,
int32
param
);
void
remove_counter
(
uint32
reason
,
card
*
pcard
,
uint32
rplayer
,
uint32
s
,
uint32
o
,
uint32
countertype
,
uint32
count
);
void
remove_overlay_card
(
uint32
reason
,
card
*
pcard
,
uint32
rplayer
,
uint32
s
,
uint32
o
,
uint16
min
,
uint16
max
);
void
get_control
(
c
ard_set
*
targets
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
);
void
get_control
(
c
onst
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
,
card_set
*
targets1
,
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
);
...
...
libduel.cpp
View file @
3d24ffab
...
...
@@ -1410,7 +1410,7 @@ int32 scriptlib::duel_get_control(lua_State *L) {
if
(
pcard
)
pduel
->
game_field
->
get_control
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
playerid
,
reset_phase
,
reset_count
,
zone
);
else
pduel
->
game_field
->
get_control
(
&
pgroup
->
container
,
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
playerid
,
reset_phase
,
reset_count
,
zone
);
pduel
->
game_field
->
get_control
(
pgroup
->
container
,
pduel
->
game_field
->
core
.
reason_effect
,
pduel
->
game_field
->
core
.
reason_player
,
playerid
,
reset_phase
,
reset_count
,
zone
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_pushinteger
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
...
...
operations.cpp
View file @
3d24ffab
...
...
@@ -112,15 +112,14 @@ void field::remove_counter(uint32 reason, card* pcard, uint32 rplayer, uint32 s,
void
field
::
remove_overlay_card
(
uint32
reason
,
card
*
pcard
,
uint32
rplayer
,
uint32
s
,
uint32
o
,
uint16
min
,
uint16
max
)
{
add_process
(
PROCESSOR_REMOVE_OVERLAY
,
0
,
nullptr
,
(
group
*
)
pcard
,
(
rplayer
<<
16
)
+
(
s
<<
8
)
+
o
,
(
max
<<
16
)
+
min
,
reason
);
}
void
field
::
get_control
(
c
ard_set
*
targets
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
)
{
group
*
ng
=
pduel
->
new_group
(
*
targets
);
void
field
::
get_control
(
c
onst
card_set
&
targets
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
)
{
group
*
ng
=
pduel
->
new_group
(
targets
);
ng
->
is_readonly
=
GTYPE_READ_ONLY
;
add_process
(
PROCESSOR_GET_CONTROL
,
0
,
reason_effect
,
ng
,
0
,
(
reason_player
<<
28
)
+
(
playerid
<<
24
)
+
(
reset_phase
<<
8
)
+
reset_count
,
zone
);
}
void
field
::
get_control
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason_player
,
uint32
playerid
,
uint32
reset_phase
,
uint32
reset_count
,
uint32
zone
)
{
card_set
tset
;
tset
.
insert
(
target
);
get_control
(
&
tset
,
reason_effect
,
reason_player
,
playerid
,
reset_phase
,
reset_count
,
zone
);
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
,
card_set
*
targets1
,
card_set
*
targets2
,
uint32
reset_phase
,
uint32
reset_count
)
{
group
*
ng1
=
pduel
->
new_group
(
*
targets1
);
...
...
processor.cpp
View file @
3d24ffab
...
...
@@ -4896,8 +4896,8 @@ int32 field::adjust_step(uint16 step) {
}
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
core
.
re_adjust
=
TRUE
;
get_control
(
&
core
.
control_adjust_set
[
1
-
infos
.
turn_player
],
0
,
PLAYER_NONE
,
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
&
core
.
control_adjust_set
[
infos
.
turn_player
],
0
,
PLAYER_NONE
,
1
-
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
core
.
control_adjust_set
[
1
-
infos
.
turn_player
],
0
,
PLAYER_NONE
,
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
core
.
control_adjust_set
[
infos
.
turn_player
],
0
,
PLAYER_NONE
,
1
-
infos
.
turn_player
,
0
,
0
,
0xff
);
for
(
auto
&
rcard
:
reason_cards
)
{
++
core
.
readjust_map
[
rcard
];
if
(
core
.
readjust_map
[
rcard
]
>
3
)
...
...
@@ -4936,8 +4936,8 @@ int32 field::adjust_step(uint16 step) {
core
.
remove_brainwashing
=
res
;
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
core
.
re_adjust
=
TRUE
;
get_control
(
&
core
.
control_adjust_set
[
1
-
infos
.
turn_player
],
0
,
PLAYER_NONE
,
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
&
core
.
control_adjust_set
[
infos
.
turn_player
],
0
,
PLAYER_NONE
,
1
-
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
core
.
control_adjust_set
[
1
-
infos
.
turn_player
],
0
,
PLAYER_NONE
,
infos
.
turn_player
,
0
,
0
,
0xff
);
get_control
(
core
.
control_adjust_set
[
infos
.
turn_player
],
0
,
PLAYER_NONE
,
1
-
infos
.
turn_player
,
0
,
0
,
0xff
);
}
}
core
.
units
.
begin
()
->
step
=
7
;
...
...
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