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
a026c151
Commit
a026c151
authored
May 20, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.CheckFusionSubstitute
parent
c07c2961
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
0 deletions
+20
-0
card.cpp
card.cpp
+10
-0
card.h
card.h
+1
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+7
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
a026c151
...
@@ -1982,6 +1982,16 @@ void card::fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf)
...
@@ -1982,6 +1982,16 @@ void card::fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf)
peffect
=
ecit
->
second
;
peffect
=
ecit
->
second
;
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_FUSION
,
0
,
peffect
,
fusion_m
,
playerid
+
(
chkf
<<
16
),
(
ptr
)
cg
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_FUSION
,
0
,
peffect
,
fusion_m
,
playerid
+
(
chkf
<<
16
),
(
ptr
)
cg
);
}
}
int32
card
::
check_fusion_substitute
(
card
*
fcard
)
{
effect_set
eset
;
filter_effect
(
EFFECT_FUSION_SUBSTITUTE
,
&
eset
);
if
(
eset
.
size
()
==
0
)
return
FALSE
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
!
eset
[
i
]
->
value
||
eset
[
i
]
->
get_value
(
fcard
))
return
TRUE
;
return
FALSE
;
}
int32
card
::
is_equipable
(
card
*
pcard
)
{
int32
card
::
is_equipable
(
card
*
pcard
)
{
effect_set
eset
;
effect_set
eset
;
if
(
this
==
pcard
||
pcard
->
current
.
location
!=
LOCATION_MZONE
)
if
(
this
==
pcard
||
pcard
->
current
.
location
!=
LOCATION_MZONE
)
...
...
card.h
View file @
a026c151
...
@@ -235,6 +235,7 @@ public:
...
@@ -235,6 +235,7 @@ public:
effect
*
check_control_effect
();
effect
*
check_control_effect
();
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
int32
check_fusion_substitute
(
card
*
fcard
);
int32
is_equipable
(
card
*
pcard
);
int32
is_equipable
(
card
*
pcard
);
int32
is_summonable
();
int32
is_summonable
();
...
...
interpreter.cpp
View file @
a026c151
...
@@ -204,6 +204,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -204,6 +204,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsCanBeRitualMaterial"
,
scriptlib
::
card_is_can_be_ritual_material
},
{
"IsCanBeRitualMaterial"
,
scriptlib
::
card_is_can_be_ritual_material
},
{
"IsCanBeXyzMaterial"
,
scriptlib
::
card_is_can_be_xyz_material
},
{
"IsCanBeXyzMaterial"
,
scriptlib
::
card_is_can_be_xyz_material
},
{
"CheckFusionMaterial"
,
scriptlib
::
card_check_fusion_material
},
{
"CheckFusionMaterial"
,
scriptlib
::
card_check_fusion_material
},
{
"CheckFusionSubstitute"
,
scriptlib
::
card_check_fusion_substitute
},
{
"IsImmuneToEffect"
,
scriptlib
::
card_is_immune_to_effect
},
{
"IsImmuneToEffect"
,
scriptlib
::
card_is_immune_to_effect
},
{
"IsCanBeEffectTarget"
,
scriptlib
::
card_is_can_be_effect_target
},
{
"IsCanBeEffectTarget"
,
scriptlib
::
card_is_can_be_effect_target
},
{
"IsCanBeBattleTarget"
,
scriptlib
::
card_is_can_be_battle_target
},
{
"IsCanBeBattleTarget"
,
scriptlib
::
card_is_can_be_battle_target
},
...
...
libcard.cpp
View file @
a026c151
...
@@ -2028,6 +2028,13 @@ int32 scriptlib::card_check_fusion_material(lua_State *L) {
...
@@ -2028,6 +2028,13 @@ int32 scriptlib::card_check_fusion_material(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
fusion_check
(
pgroup
,
cg
,
chkf
));
lua_pushboolean
(
L
,
pcard
->
fusion_check
(
pgroup
,
cg
,
chkf
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_check_fusion_substitute
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
fcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
check_fusion_substitute
(
fcard
));
return
1
;
}
int32
scriptlib
::
card_is_immune_to_effect
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_immune_to_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
scriptlib.h
View file @
a026c151
...
@@ -206,6 +206,7 @@ public:
...
@@ -206,6 +206,7 @@ public:
static
int32
card_is_can_be_ritual_material
(
lua_State
*
L
);
static
int32
card_is_can_be_ritual_material
(
lua_State
*
L
);
static
int32
card_is_can_be_xyz_material
(
lua_State
*
L
);
static
int32
card_is_can_be_xyz_material
(
lua_State
*
L
);
static
int32
card_check_fusion_material
(
lua_State
*
L
);
static
int32
card_check_fusion_material
(
lua_State
*
L
);
static
int32
card_check_fusion_substitute
(
lua_State
*
L
);
static
int32
card_is_immune_to_effect
(
lua_State
*
L
);
static
int32
card_is_immune_to_effect
(
lua_State
*
L
);
static
int32
card_is_can_be_effect_target
(
lua_State
*
L
);
static
int32
card_is_can_be_effect_target
(
lua_State
*
L
);
static
int32
card_is_can_be_battle_target
(
lua_State
*
L
);
static
int32
card_is_can_be_battle_target
(
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