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
13450162
Commit
13450162
authored
Dec 31, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.IsFusionSummonableCard
parent
5c25c803
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
1 deletion
+27
-1
card.cpp
card.cpp
+16
-0
card.h
card.h
+1
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+8
-1
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
13450162
...
...
@@ -2307,6 +2307,22 @@ int32 card::is_summonable_card() {
return
FALSE
;
return
!
is_affected_by_effect
(
EFFECT_UNSUMMONABLE_CARD
);
}
int32
card
::
is_fusion_summonable_card
()
{
if
(
!
(
data
.
type
&
TYPE_FUSION
))
return
FALSE
;
effect_set
eset
;
filter_effect
(
EFFECT_SPSUMMON_CONDITION
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
SUMMON_TYPE_FUSION
,
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
;
}
// check the condition of sp_summon procedure peffect
int32
card
::
is_spsummonable
(
effect
*
peffect
)
{
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
...
...
card.h
View file @
13450162
...
...
@@ -249,6 +249,7 @@ public:
int32
is_equipable
(
card
*
pcard
);
int32
is_summonable_card
();
int32
is_fusion_summonable_card
();
int32
is_spsummonable
(
effect
*
peffect
);
int32
is_summonable
(
effect
*
peffect
,
uint8
min_tribute
);
int32
is_can_be_summoned
(
uint8
playerid
,
uint8
ingore_count
,
effect
*
peffect
,
uint8
min_tribute
);
...
...
interpreter.cpp
View file @
13450162
...
...
@@ -151,6 +151,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsDisabled"
,
scriptlib
::
card_is_disabled
},
{
"IsDestructable"
,
scriptlib
::
card_is_destructable
},
{
"IsSummonableCard"
,
scriptlib
::
card_is_summonable
},
{
"IsFusionSummonableCard"
,
scriptlib
::
card_is_fusion_summonable_card
},
{
"IsSpecialSummonable"
,
scriptlib
::
card_is_special_summonable
},
{
"IsSynchroSummonable"
,
scriptlib
::
card_is_synchro_summonable
},
{
"IsXyzSummonable"
,
scriptlib
::
card_is_xyz_summonable
},
...
...
libcard.cpp
View file @
13450162
...
...
@@ -1350,10 +1350,17 @@ int32 scriptlib::card_is_destructable(lua_State *L) {
int32
scriptlib
::
card_is_summonable
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
pcard
->
is_summonable_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
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
pcard
->
is_fusion_summonable_card
());
return
1
;
}
int32
scriptlib
::
card_is_msetable
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
scriptlib.h
View file @
13450162
...
...
@@ -153,6 +153,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_fusion_summonable_card
(
lua_State
*
L
);
static
int32
card_is_msetable
(
lua_State
*
L
);
static
int32
card_is_ssetable
(
lua_State
*
L
);
static
int32
card_is_special_summonable
(
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