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
b755234b
Commit
b755234b
authored
Dec 29, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.IsOriginalSetCard
parent
6a708742
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
0 deletions
+22
-0
card.cpp
card.cpp
+11
-0
card.h
card.h
+1
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+8
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
b755234b
...
@@ -303,6 +303,17 @@ int32 card::is_set_card(uint32 set_code) {
...
@@ -303,6 +303,17 @@ int32 card::is_set_card(uint32 set_code) {
}
}
return
FALSE
;
return
FALSE
;
}
}
int32
card
::
is_origin_set_card
(
uint32
set_code
)
{
uint64
setcode
=
data
.
setcode
;
uint32
settype
=
set_code
&
0xfff
;
uint32
setsubtype
=
set_code
&
0xf000
;
while
(
setcode
)
{
if
((
setcode
&
0xfff
)
==
settype
&&
(
setcode
&
0xf000
&
setsubtype
)
==
setsubtype
)
return
TRUE
;
setcode
=
setcode
>>
16
;
}
return
FALSE
;
}
int32
card
::
is_pre_set_card
(
uint32
set_code
)
{
int32
card
::
is_pre_set_card
(
uint32
set_code
)
{
uint32
code
=
previous
.
code
;
uint32
code
=
previous
.
code
;
uint64
setcode
;
uint64
setcode
;
...
...
card.h
View file @
b755234b
...
@@ -166,6 +166,7 @@ public:
...
@@ -166,6 +166,7 @@ public:
uint32
get_code
();
uint32
get_code
();
uint32
get_another_code
();
uint32
get_another_code
();
int32
is_set_card
(
uint32
set_code
);
int32
is_set_card
(
uint32
set_code
);
int32
is_origin_set_card
(
uint32
set_code
);
int32
is_pre_set_card
(
uint32
set_code
);
int32
is_pre_set_card
(
uint32
set_code
);
int32
is_fusion_set_card
(
uint32
set_code
);
int32
is_fusion_set_card
(
uint32
set_code
);
uint32
get_type
();
uint32
get_type
();
...
...
interpreter.cpp
View file @
b755234b
...
@@ -22,6 +22,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -22,6 +22,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetFusionCode"
,
scriptlib
::
card_get_fusion_code
},
{
"GetFusionCode"
,
scriptlib
::
card_get_fusion_code
},
{
"IsFusionCode"
,
scriptlib
::
card_is_fusion_code
},
{
"IsFusionCode"
,
scriptlib
::
card_is_fusion_code
},
{
"IsSetCard"
,
scriptlib
::
card_is_set_card
},
{
"IsSetCard"
,
scriptlib
::
card_is_set_card
},
{
"IsOriginalSetCard"
,
scriptlib
::
card_is_origin_set_card
},
{
"IsPreviousSetCard"
,
scriptlib
::
card_is_pre_set_card
},
{
"IsPreviousSetCard"
,
scriptlib
::
card_is_pre_set_card
},
{
"IsFusionSetCard"
,
scriptlib
::
card_is_fusion_set_card
},
{
"IsFusionSetCard"
,
scriptlib
::
card_is_fusion_set_card
},
{
"GetType"
,
scriptlib
::
card_get_type
},
{
"GetType"
,
scriptlib
::
card_get_type
},
...
...
libcard.cpp
View file @
b755234b
...
@@ -116,6 +116,14 @@ int32 scriptlib::card_is_set_card(lua_State *L) {
...
@@ -116,6 +116,14 @@ int32 scriptlib::card_is_set_card(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
is_set_card
(
set_code
));
lua_pushboolean
(
L
,
pcard
->
is_set_card
(
set_code
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_origin_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_origin_set_card
(
set_code
));
return
1
;
}
int32
scriptlib
::
card_is_pre_set_card
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_pre_set_card
(
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 @
b755234b
...
@@ -24,6 +24,7 @@ public:
...
@@ -24,6 +24,7 @@ public:
static
int32
card_get_fusion_code
(
lua_State
*
L
);
static
int32
card_get_fusion_code
(
lua_State
*
L
);
static
int32
card_is_fusion_code
(
lua_State
*
L
);
static
int32
card_is_fusion_code
(
lua_State
*
L
);
static
int32
card_is_set_card
(
lua_State
*
L
);
static
int32
card_is_set_card
(
lua_State
*
L
);
static
int32
card_is_origin_set_card
(
lua_State
*
L
);
static
int32
card_is_pre_set_card
(
lua_State
*
L
);
static
int32
card_is_pre_set_card
(
lua_State
*
L
);
static
int32
card_is_fusion_set_card
(
lua_State
*
L
);
static
int32
card_is_fusion_set_card
(
lua_State
*
L
);
static
int32
card_get_type
(
lua_State
*
L
);
static
int32
card_get_type
(
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