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
11772de2
Commit
11772de2
authored
Sep 27, 2022
by
Chrono-Genex
Committed by
GitHub
Sep 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.IsSpecialSummonableCard (#472)
parent
4369eee6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
0 deletions
+29
-0
card.cpp
card.cpp
+19
-0
card.h
card.h
+1
-0
libcard.cpp
libcard.cpp
+8
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
11772de2
...
...
@@ -2997,6 +2997,25 @@ int32 card::is_summonable_card() {
|
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
|
TYPE_TOKEN
|
TYPE_TRAPMONSTER
));
}
int32
card
::
is_spsummonable_card
()
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
)
&&
(
current
.
location
&
(
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_SZONE
)))
return
FALSE
;
effect_set
eset
;
filter_effect
(
EFFECT_SPSUMMON_CONDITION
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
SUMMON_TYPE_SPECIAL
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
if
(
!
eset
[
i
]
->
check_value_condition
(
5
))
return
FALSE
;
}
return
TRUE
;
}
int32
card
::
is_fusion_summonable_card
(
uint32
summon_type
)
{
if
(
!
(
data
.
type
&
TYPE_FUSION
))
return
FALSE
;
...
...
card.h
View file @
11772de2
...
...
@@ -338,6 +338,7 @@ public:
int32
check_cost_condition
(
int32
ecode
,
int32
playerid
);
int32
check_cost_condition
(
int32
ecode
,
int32
playerid
,
int32
sumtype
);
int32
is_summonable_card
();
int32
is_spsummonable_card
();
int32
is_fusion_summonable_card
(
uint32
summon_type
);
int32
is_spsummonable
(
effect
*
proc
,
material_info
info
=
null_info
);
int32
is_summonable
(
effect
*
proc
,
uint8
min_tribute
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
);
...
...
libcard.cpp
View file @
11772de2
...
...
@@ -2024,6 +2024,13 @@ int32 scriptlib::card_is_summonable(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
is_summonable_card
());
return
1
;
}
int32
scriptlib
::
card_is_special_summonable_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
pcard
->
is_spsummonable_card
());
return
1
;
}
int32
scriptlib
::
card_is_fusion_summonable_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -3413,6 +3420,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsDisabled"
,
scriptlib
::
card_is_disabled
},
{
"IsDestructable"
,
scriptlib
::
card_is_destructable
},
{
"IsSummonableCard"
,
scriptlib
::
card_is_summonable
},
{
"IsSpecialSummonableCard"
,
scriptlib
::
card_is_special_summonable_card
},
{
"IsFusionSummonableCard"
,
scriptlib
::
card_is_fusion_summonable_card
},
{
"IsSpecialSummonable"
,
scriptlib
::
card_is_special_summonable
},
{
"IsSynchroSummonable"
,
scriptlib
::
card_is_synchro_summonable
},
...
...
scriptlib.h
View file @
11772de2
...
...
@@ -196,6 +196,7 @@ public:
static
int32
card_is_disabled
(
lua_State
*
L
);
static
int32
card_is_destructable
(
lua_State
*
L
);
static
int32
card_is_summonable
(
lua_State
*
L
);
static
int32
card_is_special_summonable_card
(
lua_State
*
L
);
static
int32
card_is_fusion_summonable_card
(
lua_State
*
L
);
static
int32
card_is_msetable
(
lua_State
*
L
);
static
int32
card_is_ssetable
(
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