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
e0f00fd5
Commit
e0f00fd5
authored
Dec 17, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add IsFusionCode
parent
6e1886a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
effect.h
effect.h
+1
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+23
-0
No files found.
effect.h
View file @
e0f00fd5
...
...
@@ -402,6 +402,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_DISABLE_CHAIN_FIELD 337
#define EFFECT_DISCARD_COST_CHANGE 338
#define EFFECT_HAND_SYNCHRO 339
#define EFFECT_ADD_FUSION_CODE 340
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
interpreter.cpp
View file @
e0f00fd5
...
...
@@ -19,6 +19,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
{
"GetOriginalCodeRule"
,
scriptlib
::
card_get_origin_code_rule
},
{
"IsFusionCode"
,
scriptlib
::
card_is_fusion_code
},
{
"IsSetCard"
,
scriptlib
::
card_is_set_card
},
{
"IsPreviousSetCard"
,
scriptlib
::
card_is_pre_set_card
},
{
"GetType"
,
scriptlib
::
card_get_type
},
...
...
libcard.cpp
View file @
e0f00fd5
...
...
@@ -61,6 +61,29 @@ int32 scriptlib::card_get_origin_code_rule(lua_State *L) {
}
return
1
;
}
int32
scriptlib
::
card_is_fusion_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
tcode
=
lua_tointeger
(
L
,
2
);
uint32
code1
=
pcard
->
get_code
();
uint32
code2
=
pcard
->
get_another_code
();
uint32
result
=
FALSE
;
if
(
code1
==
tcode
||
(
code2
&&
code2
==
tcode
))
{
result
=
TRUE
;
}
else
{
effect_set
eset
;
pcard
->
filter_effect
(
EFFECT_ADD_FUSION_CODE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
tcode
==
eset
[
i
]
->
get_value
(
pcard
))
{
result
=
TRUE
;
break
;
}
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
}
int32
scriptlib
::
card_is_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
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