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
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
MyCard
ygopro-core
Commits
6410407c
Commit
6410407c
authored
Apr 30, 2019
by
nekrozar
Committed by
nanahira
Apr 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Card.IsCanBeFusionMaterial (#195)
parent
4a9317bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
card.cpp
card.cpp
+5
-3
card.h
card.h
+1
-1
libcard.cpp
libcard.cpp
+4
-1
No files found.
card.cpp
View file @
6410407c
...
@@ -3606,14 +3606,16 @@ int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) {
...
@@ -3606,14 +3606,16 @@ int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
is_can_be_fusion_material
(
card
*
fcard
)
{
int32
card
::
is_can_be_fusion_material
(
card
*
fcard
,
uint32
summon_type
)
{
if
(
is_status
(
STATUS_FORBIDDEN
))
if
(
is_status
(
STATUS_FORBIDDEN
))
return
FALSE
;
return
FALSE
;
effect_set
eset
;
effect_set
eset
;
filter_effect
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
,
&
eset
);
filter_effect
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
get_value
(
fcard
))
pduel
->
lua
->
add_param
(
summon_type
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
get_value
(
fcard
,
1
))
return
FALSE
;
return
FALSE
;
}
eset
.
clear
();
eset
.
clear
();
filter_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
,
&
eset
);
filter_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
,
&
eset
);
if
(
eset
.
size
())
{
if
(
eset
.
size
())
{
...
...
card.h
View file @
6410407c
...
@@ -342,7 +342,7 @@ public:
...
@@ -342,7 +342,7 @@ public:
int32
is_control_can_be_changed
(
int32
ignore_mzone
,
uint32
zone
);
int32
is_control_can_be_changed
(
int32
ignore_mzone
,
uint32
zone
);
int32
is_capable_be_battle_target
(
card
*
pcard
);
int32
is_capable_be_battle_target
(
card
*
pcard
);
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_can_be_fusion_material
(
card
*
fcard
);
int32
is_can_be_fusion_material
(
card
*
fcard
,
uint32
summon_type
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
int32
is_can_be_ritual_material
(
card
*
scard
);
int32
is_can_be_ritual_material
(
card
*
scard
);
int32
is_can_be_xyz_material
(
card
*
scard
);
int32
is_can_be_xyz_material
(
card
*
scard
);
...
...
libcard.cpp
View file @
6410407c
...
@@ -2627,7 +2627,10 @@ int32 scriptlib::card_is_can_be_fusion_material(lua_State *L) {
...
@@ -2627,7 +2627,10 @@ int32 scriptlib::card_is_can_be_fusion_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
fcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
fcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
}
}
lua_pushboolean
(
L
,
pcard
->
is_can_be_fusion_material
(
fcard
));
uint32
summon_type
=
SUMMON_TYPE_FUSION
;
if
(
lua_gettop
(
L
)
>=
3
)
summon_type
=
lua_tointeger
(
L
,
3
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_fusion_material
(
fcard
,
summon_type
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_can_be_synchro_material
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_can_be_synchro_material
(
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