Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
9c44ee39
Commit
9c44ee39
authored
Aug 28, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e65a73ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+45
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/interpreter.cpp
View file @
9c44ee39
...
...
@@ -22,6 +22,7 @@ static const struct luaL_Reg cardlib[] = {
{
"SetEntityCode"
,
scriptlib
::
card_set_entity_code
},
{
"IsLinkBelow"
,
scriptlib
::
card_is_link_below
},
{
"IsLinkAbove"
,
scriptlib
::
card_is_link_above
},
{
"SetCardData"
,
scriptlib
::
card_set_card_data
},
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
...
...
ocgcore/libcard.cpp
View file @
9c44ee39
...
...
@@ -79,6 +79,51 @@ int32 scriptlib::card_is_link_above(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
get_link
()
>=
lnk
);
return
1
;
}
int32
scriptlib
::
card_set_card_data
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
stype
=
lua_tointeger
(
L
,
2
);
switch
(
stype
)
{
case
ASSUME_CODE
:
pcard
->
data
.
code
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_TYPE
:
pcard
->
data
.
type
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_LEVEL
:
pcard
->
data
.
level
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_RANK
:
pcard
->
data
.
level
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_ATTRIBUTE
:
pcard
->
data
.
attribute
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_RACE
:
pcard
->
data
.
race
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_ATTACK
:
pcard
->
data
.
attack
=
lua_tointeger
(
L
,
3
);
break
;
case
ASSUME_DEFENSE
:
pcard
->
data
.
defense
=
lua_tointeger
(
L
,
3
);
break
;
case
9
:
pcard
->
data
.
alias
=
lua_tointeger
(
L
,
3
);
break
;
case
10
:
pcard
->
data
.
lscale
=
lua_tointeger
(
L
,
3
);
break
;
case
11
:
pcard
->
data
.
rscale
=
lua_tointeger
(
L
,
3
);
break
;
case
12
:
pcard
->
data
.
link_marker
=
lua_tointeger
(
L
,
3
);
break
;
}
return
0
;
}
int32
scriptlib
::
card_get_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.h
View file @
9c44ee39
...
...
@@ -22,6 +22,7 @@ public:
static
int32
card_filter_effect
(
lua_State
*
L
);
static
int32
card_is_link_below
(
lua_State
*
L
);
static
int32
card_is_link_above
(
lua_State
*
L
);
static
int32
card_set_card_data
(
lua_State
*
L
);
static
int32
effect_set_owner
(
lua_State
*
L
);
static
int32
effect_get_range
(
lua_State
*
L
);
static
int32
effect_get_count_limit
(
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