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
d1b7e3d2
Commit
d1b7e3d2
authored
Aug 26, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a84c4f81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+2
-0
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+25
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+2
-0
No files found.
ocgcore/interpreter.cpp
View file @
d1b7e3d2
...
@@ -262,6 +262,8 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -262,6 +262,8 @@ static const struct luaL_Reg cardlib[] = {
static
const
struct
luaL_Reg
effectlib
[]
=
{
static
const
struct
luaL_Reg
effectlib
[]
=
{
//222DIY
//222DIY
{
"SetOwner"
,
scriptlib
::
effect_set_owner
},
{
"SetOwner"
,
scriptlib
::
effect_set_owner
},
{
"GetRange"
,
scriptlib
::
effect_get_range
},
{
"GetCountLimit"
,
scriptlib
::
effect_get_count_limit
},
{
"CreateEffect"
,
scriptlib
::
effect_new
},
{
"CreateEffect"
,
scriptlib
::
effect_new
},
{
"GlobalEffect"
,
scriptlib
::
effect_newex
},
{
"GlobalEffect"
,
scriptlib
::
effect_newex
},
...
...
ocgcore/libeffect.cpp
View file @
d1b7e3d2
...
@@ -20,6 +20,31 @@ int32 scriptlib::effect_set_owner(lua_State *L) {
...
@@ -20,6 +20,31 @@ int32 scriptlib::effect_set_owner(lua_State *L) {
peffect
->
owner
=
pcard
;
peffect
->
owner
=
pcard
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
effect_get_range
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
if
(
peffect
)
{
lua_pushinteger
(
L
,
peffect
->
range
);
return
1
;
}
return
0
;
}
int32
scriptlib
::
effect_get_count_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
args
=
0
;
if
(
peffect
&&
(
peffect
->
flag
[
0
]
&
EFFECT_FLAG_COUNT_LIMIT
))
{
args
=
args
+
1
;
lua_pushinteger
(
L
,
peffect
->
count_limit_max
);
if
(
peffect
->
count_code
)
{
args
=
args
+
1
;
lua_pushinteger
(
L
,
peffect
->
count_code
);
}
}
return
args
;
}
int32
scriptlib
::
effect_new
(
lua_State
*
L
)
{
int32
scriptlib
::
effect_new
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.h
View file @
d1b7e3d2
...
@@ -23,6 +23,8 @@ public:
...
@@ -23,6 +23,8 @@ public:
static
int32
card_is_link_below
(
lua_State
*
L
);
static
int32
card_is_link_below
(
lua_State
*
L
);
static
int32
card_is_link_above
(
lua_State
*
L
);
static
int32
card_is_link_above
(
lua_State
*
L
);
static
int32
effect_set_owner
(
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
);
static
int32
duel_select_field
(
lua_State
*
L
);
static
int32
duel_select_field
(
lua_State
*
L
);
static
int32
duel_get_master_rule
(
lua_State
*
L
);
static
int32
duel_get_master_rule
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
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