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
c9e54f3b
Commit
c9e54f3b
authored
Oct 25, 2015
by
独孤朲
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from DailyShana/patch-1
fix
parents
fe720055
b95de7ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
card.cpp
card.cpp
+6
-3
card.h
card.h
+1
-1
libcard.cpp
libcard.cpp
+8
-3
No files found.
card.cpp
View file @
c9e54f3b
...
...
@@ -2481,13 +2481,16 @@ int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) {
}
return
TRUE
;
}
int32
card
::
is_can_be_fusion_material
(
uint8
ignore_mon
)
{
int32
card
::
is_can_be_fusion_material
(
card
*
fcard
,
uint8
ignore_mon
)
{
if
(
!
ignore_mon
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
))
return
FALSE
;
effect_set
eset
;
filter_effect
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
eset
[
i
]
->
get_value
(
fcard
))
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
)
{
...
...
card.h
View file @
c9e54f3b
...
...
@@ -254,7 +254,7 @@ public:
int32
is_control_can_be_changed
();
int32
is_capable_be_battle_target
(
card
*
pcard
);
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_can_be_fusion_material
(
uint8
ignore_mon
=
FALSE
);
int32
is_can_be_fusion_material
(
card
*
fcard
,
uint8
ignore_mon
=
FALSE
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
int32
is_can_be_ritual_material
(
card
*
scard
);
int32
is_can_be_xyz_material
(
card
*
scard
);
...
...
libcard.cpp
View file @
c9e54f3b
...
...
@@ -1857,10 +1857,15 @@ int32 scriptlib::card_is_can_be_fusion_material(lua_State *L) {
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
fcard
=
0
;
uint32
ign
=
FALSE
;
if
(
lua_gettop
(
L
)
>=
2
)
ign
=
lua_toboolean
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_fusion_material
(
ign
));
if
(
lua_gettop
(
L
)
>=
2
)
{
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
fcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
}
if
(
lua_gettop
(
L
)
>=
3
)
ign
=
lua_toboolean
(
L
,
3
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_fusion_material
(
fcard
,
ign
));
return
1
;
}
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