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
c302730f
Commit
c302730f
authored
Nov 22, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const reference in field::release
parent
8ededdfd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
field.cpp
field.cpp
+1
-1
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+7
-8
No files found.
field.cpp
View file @
c302730f
...
...
@@ -1940,7 +1940,7 @@ void field::ritual_release(const card_set& material) {
rel
.
insert
(
pcard
);
}
send_to
(
&
tgy
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
release
(
&
rel
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
);
release
(
rel
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
);
send_to
(
&
rem
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_REMOVED
,
0
,
POS_FACEUP
);
}
void
field
::
get_xyz_material
(
lua_State
*
L
,
card
*
scard
,
int32
findex
,
uint32
lv
,
int32
maxc
,
group
*
mg
)
{
...
...
field.h
View file @
c302730f
...
...
@@ -580,7 +580,7 @@ public:
void
special_summon_complete
(
effect
*
reason_effect
,
uint8
reason_player
);
void
destroy
(
card_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
=
2
,
uint32
destination
=
0
,
uint32
sequence
=
0
);
void
destroy
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
=
2
,
uint32
destination
=
0
,
uint32
sequence
=
0
);
void
release
(
c
ard_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
);
void
release
(
c
onst
card_set
&
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
);
void
release
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
);
void
send_to
(
card_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
uint32
destination
,
uint32
sequence
,
uint32
position
,
uint8
send_activating
=
FALSE
);
void
send_to
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
uint32
destination
,
uint32
sequence
,
uint32
position
,
uint8
send_activating
=
FALSE
);
...
...
libduel.cpp
View file @
c302730f
...
...
@@ -838,7 +838,7 @@ int32 scriptlib::duel_release(lua_State *L) {
if
(
pcard
)
pduel
->
game_field
->
release
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
reason_player
);
else
pduel
->
game_field
->
release
(
&
(
pgroup
->
container
)
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
reason_player
);
pduel
->
game_field
->
release
(
pgroup
->
container
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
reason_player
);
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 @
c302730f
...
...
@@ -233,8 +233,8 @@ void field::destroy(card* target, effect* reason_effect, uint32 reason, uint32 r
tset
.
insert
(
target
);
destroy
(
&
tset
,
reason_effect
,
reason
,
reason_player
,
playerid
,
destination
,
sequence
);
}
void
field
::
release
(
c
ard_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
)
{
for
(
auto
&
pcard
:
*
targets
)
{
void
field
::
release
(
c
onst
card_set
&
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
)
{
for
(
auto
&
pcard
:
targets
)
{
pcard
->
temp
.
reason
=
pcard
->
current
.
reason
;
pcard
->
temp
.
reason_effect
=
pcard
->
current
.
reason_effect
;
pcard
->
temp
.
reason_player
=
pcard
->
current
.
reason_player
;
...
...
@@ -243,14 +243,13 @@ void field::release(card_set* targets, effect* reason_effect, uint32 reason, uin
pcard
->
current
.
reason_player
=
reason_player
;
pcard
->
sendto_param
.
set
(
pcard
->
owner
,
POS_FACEUP
,
LOCATION_GRAVE
);
}
group
*
ng
=
pduel
->
new_group
(
*
targets
);
group
*
ng
=
pduel
->
new_group
(
targets
);
ng
->
is_readonly
=
GTYPE_READ_ONLY
;
add_process
(
PROCESSOR_RELEASE
,
0
,
reason_effect
,
ng
,
reason
,
reason_player
);
}
void
field
::
release
(
card
*
target
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
)
{
card_set
tset
;
tset
.
insert
(
target
);
release
(
&
tset
,
reason_effect
,
reason
,
reason_player
);
card_set
tset
{
target
};
release
(
tset
,
reason_effect
,
reason
,
reason_player
);
}
void
field
::
send_to
(
card_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
uint32
destination
,
uint32
sequence
,
uint32
position
,
uint8
send_activating
)
{
if
(
destination
&
LOCATION_ONFIELD
)
...
...
@@ -1744,7 +1743,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
for
(
auto
&
pcard
:
*
tributes
)
pcard
->
current
.
reason_card
=
target
;
target
->
set_material
(
tributes
);
release
(
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
sumplayer
);
release
(
*
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
sumplayer
);
target
->
summon_info
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
|
(
LOCATION_HAND
<<
16
);
delete
tributes
;
core
.
units
.
begin
()
->
peffect
=
0
;
...
...
@@ -2335,7 +2334,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
for
(
auto
&
pcard
:
*
tributes
)
pcard
->
current
.
reason_card
=
target
;
target
->
set_material
(
tributes
);
release
(
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
setplayer
);
release
(
*
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
setplayer
);
target
->
summon_info
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
|
(
LOCATION_HAND
<<
16
);
delete
tributes
;
core
.
units
.
begin
()
->
peffect
=
0
;
...
...
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