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
675678a4
Commit
675678a4
authored
Apr 30, 2024
by
mercury233
Committed by
GitHub
Apr 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.GetPreviousOverlayCountOnField (#578)
parent
f5840678
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
1 deletion
+18
-1
card.cpp
card.cpp
+1
-0
card.h
card.h
+1
-0
libcard.cpp
libcard.cpp
+8
-0
operations.cpp
operations.cpp
+7
-1
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
675678a4
...
...
@@ -143,6 +143,7 @@ card::card(duel* pd) {
assume_type
=
0
;
assume_value
=
0
;
spsummon_code
=
0
;
xyz_materials_previous_count_onfield
=
0
;
current
.
controler
=
PLAYER_NONE
;
}
inline
void
update_cache
(
uint32
&
tdata
,
uint32
&
cache
,
int32
*&
p
,
uint32
&
query_flag
,
const
uint32
flag
)
{
...
...
card.h
View file @
675678a4
...
...
@@ -198,6 +198,7 @@ public:
card_set
effect_target_owner
;
card_set
effect_target_cards
;
card_vector
xyz_materials
;
int32
xyz_materials_previous_count_onfield
;
effect_container
single_effect
;
effect_container
field_effect
;
effect_container
equip_effect
;
...
...
libcard.cpp
View file @
675678a4
...
...
@@ -742,6 +742,13 @@ int32 scriptlib::card_get_previous_defense_onfield(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
previous
.
defense
);
return
1
;
}
int32
scriptlib
::
card_get_previous_overlay_count_onfield
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
xyz_materials_previous_count_onfield
);
return
1
;
}
int32
scriptlib
::
card_get_owner
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -3435,6 +3442,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetPreviousRaceOnField"
,
scriptlib
::
card_get_previous_race_onfield
},
{
"GetPreviousAttackOnField"
,
scriptlib
::
card_get_previous_attack_onfield
},
{
"GetPreviousDefenseOnField"
,
scriptlib
::
card_get_previous_defense_onfield
},
{
"GetPreviousOverlayCountOnField"
,
scriptlib
::
card_get_previous_overlay_count_onfield
},
{
"GetOwner"
,
scriptlib
::
card_get_owner
},
{
"GetControler"
,
scriptlib
::
card_get_controler
},
{
"GetPreviousControler"
,
scriptlib
::
card_get_previous_controler
},
...
...
operations.cpp
View file @
675678a4
...
...
@@ -4365,8 +4365,11 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
raise_single_event
(
pcard
,
0
,
EVENT_DESTROYED
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
if
(
pcard
->
xyz_materials
.
size
())
{
pcard
->
xyz_materials_previous_count_onfield
=
pcard
->
xyz_materials
.
size
();
for
(
auto
&
mcard
:
pcard
->
xyz_materials
)
overlays
.
insert
(
mcard
);
}
else
{
pcard
->
xyz_materials_previous_count_onfield
=
0
;
}
raise_single_event
(
pcard
,
0
,
EVENT_MOVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
...
...
@@ -4697,7 +4700,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
target
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pduel
->
write_buffer32
(
target
->
get_info_location
());
pduel
->
write_buffer32
(
target
->
current
.
reason
);
if
(
(
target
->
current
.
location
!=
LOCATION_MZONE
)
)
{
if
(
target
->
current
.
location
!=
LOCATION_MZONE
)
{
if
(
target
->
equiping_cards
.
size
())
{
destroy
(
&
target
->
equiping_cards
,
0
,
REASON_LOST_TARGET
+
REASON_RULE
,
PLAYER_NONE
);
for
(
auto
csit
=
target
->
equiping_cards
.
begin
();
csit
!=
target
->
equiping_cards
.
end
();)
{
...
...
@@ -4706,9 +4709,12 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
}
}
if
(
target
->
xyz_materials
.
size
())
{
target
->
xyz_materials_previous_count_onfield
=
target
->
xyz_materials
.
size
();
card_set
overlays
;
overlays
.
insert
(
target
->
xyz_materials
.
begin
(),
target
->
xyz_materials
.
end
());
send_to
(
&
overlays
,
0
,
REASON_LOST_OVERLAY
+
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
}
else
{
target
->
xyz_materials_previous_count_onfield
=
0
;
}
}
if
((
target
->
previous
.
location
==
LOCATION_SZONE
)
&&
target
->
equiping_target
)
...
...
scriptlib.h
View file @
675678a4
...
...
@@ -90,6 +90,7 @@ public:
static
int32
card_get_previous_race_onfield
(
lua_State
*
L
);
static
int32
card_get_previous_attack_onfield
(
lua_State
*
L
);
static
int32
card_get_previous_defense_onfield
(
lua_State
*
L
);
static
int32
card_get_previous_overlay_count_onfield
(
lua_State
*
L
);
static
int32
card_get_owner
(
lua_State
*
L
);
static
int32
card_get_controler
(
lua_State
*
L
);
static
int32
card_get_previous_controler
(
lua_State
*
L
);
...
...
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