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
xiaoye
ygopro-core
Commits
8ededdfd
Commit
8ededdfd
authored
Nov 22, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const reference in field::special_summon
parent
0adcaa52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+3
-4
operations.cpp
operations.cpp
+3
-3
No files found.
field.h
View file @
8ededdfd
...
@@ -575,7 +575,7 @@ public:
...
@@ -575,7 +575,7 @@ public:
void
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
special_summon
(
c
ard_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon
(
c
onst
card_set
&
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_step
(
card
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_step
(
card
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_complete
(
effect
*
reason_effect
,
uint8
reason_player
);
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_set
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
=
2
,
uint32
destination
=
0
,
uint32
sequence
=
0
);
...
...
libduel.cpp
View file @
8ededdfd
...
@@ -577,11 +577,10 @@ int32 scriptlib::duel_special_summon(lua_State *L) {
...
@@ -577,11 +577,10 @@ int32 scriptlib::duel_special_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
8
)
if
(
lua_gettop
(
L
)
>=
8
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
8
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
8
);
if
(
pcard
)
{
if
(
pcard
)
{
card_set
cset
;
card_set
cset
{
pcard
};
cset
.
insert
(
pcard
);
pduel
->
game_field
->
special_summon
(
cset
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
pduel
->
game_field
->
special_summon
(
&
cset
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
}
else
}
else
pduel
->
game_field
->
special_summon
(
&
(
pgroup
->
container
)
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
pduel
->
game_field
->
special_summon
(
pgroup
->
container
,
sumtype
,
sumplayer
,
playerid
,
nocheck
,
nolimit
,
positions
,
zone
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_pushinteger
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
lua_pushinteger
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
...
...
operations.cpp
View file @
8ededdfd
...
@@ -158,10 +158,10 @@ void field::mset(uint32 setplayer, card* target, effect* proc, uint32 ignore_cou
...
@@ -158,10 +158,10 @@ void field::mset(uint32 setplayer, card* target, effect* proc, uint32 ignore_cou
void
field
::
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
)
{
void
field
::
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
)
{
add_process
(
PROCESSOR_SPSUMMON_RULE
,
0
,
0
,
(
group
*
)
target
,
sumplayer
,
summon_type
,
action_type
);
add_process
(
PROCESSOR_SPSUMMON_RULE
,
0
,
0
,
(
group
*
)
target
,
sumplayer
,
summon_type
,
action_type
);
}
}
void
field
::
special_summon
(
c
ard_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
void
field
::
special_summon
(
c
onst
card_set
&
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DIVINE_LIGHT
))
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DIVINE_LIGHT
))
positions
=
(
positions
&
POS_FACEUP
)
|
((
positions
&
POS_FACEDOWN
)
>>
1
);
positions
=
(
positions
&
POS_FACEUP
)
|
((
positions
&
POS_FACEDOWN
)
>>
1
);
for
(
auto
&
pcard
:
*
target
)
{
for
(
auto
&
pcard
:
target
)
{
pcard
->
temp
.
reason
=
pcard
->
current
.
reason
;
pcard
->
temp
.
reason
=
pcard
->
current
.
reason
;
pcard
->
temp
.
reason_effect
=
pcard
->
current
.
reason_effect
;
pcard
->
temp
.
reason_effect
=
pcard
->
current
.
reason_effect
;
pcard
->
temp
.
reason_player
=
pcard
->
current
.
reason_player
;
pcard
->
temp
.
reason_player
=
pcard
->
current
.
reason_player
;
...
@@ -172,7 +172,7 @@ void field::special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, u
...
@@ -172,7 +172,7 @@ void field::special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, u
pcard
->
current
.
reason_player
=
core
.
reason_player
;
pcard
->
current
.
reason_player
=
core
.
reason_player
;
pcard
->
spsummon_param
=
(
playerid
<<
24
)
+
(
nocheck
<<
16
)
+
(
nolimit
<<
8
)
+
positions
;
pcard
->
spsummon_param
=
(
playerid
<<
24
)
+
(
nocheck
<<
16
)
+
(
nolimit
<<
8
)
+
positions
;
}
}
group
*
pgroup
=
pduel
->
new_group
(
*
target
);
group
*
pgroup
=
pduel
->
new_group
(
target
);
pgroup
->
is_readonly
=
GTYPE_READ_ONLY
;
pgroup
->
is_readonly
=
GTYPE_READ_ONLY
;
add_process
(
PROCESSOR_SPSUMMON
,
0
,
core
.
reason_effect
,
pgroup
,
core
.
reason_player
,
zone
);
add_process
(
PROCESSOR_SPSUMMON
,
0
,
core
.
reason_effect
,
pgroup
,
core
.
reason_player
,
zone
);
}
}
...
...
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