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
List
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
xiaoye
ygopro-core
Commits
f12dcc3f
Commit
f12dcc3f
authored
May 16, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
4eabbe4b
d6cdaf55
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
0 deletions
+91
-0
card.cpp
card.cpp
+40
-0
card.h
card.h
+2
-0
effect.h
effect.h
+2
-0
interpreter.cpp
interpreter.cpp
+19
-0
libcard.cpp
libcard.cpp
+26
-0
scriptlib.h
scriptlib.h
+2
-0
No files found.
card.cpp
View file @
f12dcc3f
...
@@ -1048,6 +1048,26 @@ uint32 card::get_link_attribute(uint8 playerid) {
...
@@ -1048,6 +1048,26 @@ uint32 card::get_link_attribute(uint8 playerid) {
}
}
return
attribute
;
return
attribute
;
}
}
uint32
card
::
get_grave_attribute
(
uint8
playerid
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
0
;
if
(
current
.
is_location
(
LOCATION_GRAVE
))
return
get_attribute
();
uint32
attribute
=
data
.
attribute
;
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
EFFECT_CHANGE_GRAVE_ATTRIBUTE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
attribute
=
eset
[
i
]
->
get_value
(
this
);
else
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
2
))
attribute
=
eset
[
i
]
->
get_value
(
this
);
}
}
return
attribute
;
}
uint32
card
::
get_race
()
{
uint32
card
::
get_race
()
{
if
(
assume_type
==
ASSUME_RACE
)
if
(
assume_type
==
ASSUME_RACE
)
return
assume_value
;
return
assume_value
;
...
@@ -1086,6 +1106,26 @@ uint32 card::get_link_race(uint8 playerid) {
...
@@ -1086,6 +1106,26 @@ uint32 card::get_link_race(uint8 playerid) {
}
}
return
race
;
return
race
;
}
}
uint32
card
::
get_grave_race
(
uint8
playerid
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
0
;
if
(
current
.
is_location
(
LOCATION_GRAVE
))
return
get_race
();
uint32
race
=
data
.
race
;
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
EFFECT_CHANGE_GRAVE_RACE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
race
=
eset
[
i
]
->
get_value
(
this
);
else
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
2
))
race
=
eset
[
i
]
->
get_value
(
this
);
}
}
return
race
;
}
uint32
card
::
get_lscale
()
{
uint32
card
::
get_lscale
()
{
if
(
!
current
.
is_location
(
LOCATION_PZONE
))
if
(
!
current
.
is_location
(
LOCATION_PZONE
))
return
data
.
lscale
;
return
data
.
lscale
;
...
...
card.h
View file @
f12dcc3f
...
@@ -225,8 +225,10 @@ public:
...
@@ -225,8 +225,10 @@ public:
uint32
get_attribute
();
uint32
get_attribute
();
uint32
get_fusion_attribute
(
uint8
playerid
);
uint32
get_fusion_attribute
(
uint8
playerid
);
uint32
get_link_attribute
(
uint8
playerid
);
uint32
get_link_attribute
(
uint8
playerid
);
uint32
get_grave_attribute
(
uint8
playerid
);
uint32
get_race
();
uint32
get_race
();
uint32
get_link_race
(
uint8
playerid
);
uint32
get_link_race
(
uint8
playerid
);
uint32
get_grave_race
(
uint8
playerid
);
uint32
get_lscale
();
uint32
get_lscale
();
uint32
get_rscale
();
uint32
get_rscale
();
uint32
get_link_marker
();
uint32
get_link_marker
();
...
...
effect.h
View file @
f12dcc3f
...
@@ -454,6 +454,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -454,6 +454,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_SET_BATTLE_ATTACK 362
#define EFFECT_SET_BATTLE_ATTACK 362
#define EFFECT_SET_BATTLE_DEFENSE 363
#define EFFECT_SET_BATTLE_DEFENSE 363
#define EFFECT_OVERLAY_RITUAL_MATERIAL 364
#define EFFECT_OVERLAY_RITUAL_MATERIAL 364
#define EFFECT_CHANGE_GRAVE_ATTRIBUTE 365
#define EFFECT_CHANGE_GRAVE_RACE 366
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
interpreter.cpp
View file @
f12dcc3f
...
@@ -47,6 +47,8 @@ interpreter::~interpreter() {
...
@@ -47,6 +47,8 @@ interpreter::~interpreter() {
}
}
int32
interpreter
::
register_card
(
card
*
pcard
)
{
int32
interpreter
::
register_card
(
card
*
pcard
)
{
//create a card in by userdata
//create a card in by userdata
luaL_checkstack
(
lua_state
,
1
,
NULL
);
luaL_checkstack
(
current_state
,
1
,
NULL
);
card
**
ppcard
=
(
card
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
card
*
));
card
**
ppcard
=
(
card
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
card
*
));
*
ppcard
=
pcard
;
*
ppcard
=
pcard
;
pcard
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
pcard
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
...
@@ -74,6 +76,7 @@ void interpreter::register_effect(effect *peffect) {
...
@@ -74,6 +76,7 @@ void interpreter::register_effect(effect *peffect) {
if
(
!
peffect
)
if
(
!
peffect
)
return
;
return
;
//create a effect in by userdata
//create a effect in by userdata
luaL_checkstack
(
lua_state
,
3
,
NULL
);
effect
**
ppeffect
=
(
effect
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
effect
*
));
effect
**
ppeffect
=
(
effect
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
effect
*
));
*
ppeffect
=
peffect
;
*
ppeffect
=
peffect
;
peffect
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
peffect
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
...
@@ -103,6 +106,7 @@ void interpreter::register_group(group *pgroup) {
...
@@ -103,6 +106,7 @@ void interpreter::register_group(group *pgroup) {
if
(
!
pgroup
)
if
(
!
pgroup
)
return
;
return
;
//create a group in by userdata
//create a group in by userdata
luaL_checkstack
(
lua_state
,
3
,
NULL
);
group
**
ppgroup
=
(
group
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
group
*
));
group
**
ppgroup
=
(
group
**
)
lua_newuserdata
(
lua_state
,
sizeof
(
group
*
));
*
ppgroup
=
pgroup
;
*
ppgroup
=
pgroup
;
pgroup
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
pgroup
->
ref_handle
=
luaL_ref
(
lua_state
,
LUA_REGISTRYINDEX
);
...
@@ -138,9 +142,11 @@ int32 interpreter::load_script(const char* script_name) {
...
@@ -138,9 +142,11 @@ int32 interpreter::load_script(const char* script_name) {
int32
interpreter
::
load_card_script
(
uint32
code
)
{
int32
interpreter
::
load_card_script
(
uint32
code
)
{
char
class_name
[
20
];
char
class_name
[
20
];
sprintf
(
class_name
,
"c%d"
,
code
);
sprintf
(
class_name
,
"c%d"
,
code
);
luaL_checkstack
(
current_state
,
1
,
NULL
);
lua_getglobal
(
current_state
,
class_name
);
lua_getglobal
(
current_state
,
class_name
);
//if script is not loaded, create and load it
//if script is not loaded, create and load it
if
(
lua_isnil
(
current_state
,
-
1
))
{
if
(
lua_isnil
(
current_state
,
-
1
))
{
luaL_checkstack
(
current_state
,
5
,
NULL
);
lua_pop
(
current_state
,
1
);
lua_pop
(
current_state
,
1
);
//create a table & set metatable
//create a table & set metatable
lua_createtable
(
current_state
,
0
,
0
);
lua_createtable
(
current_state
,
0
,
0
);
...
@@ -174,6 +180,7 @@ void interpreter::add_param(ptr param, int32 type, bool front) {
...
@@ -174,6 +180,7 @@ void interpreter::add_param(ptr param, int32 type, bool front) {
void
interpreter
::
push_param
(
lua_State
*
L
,
bool
is_coroutine
)
{
void
interpreter
::
push_param
(
lua_State
*
L
,
bool
is_coroutine
)
{
int32
pushed
=
0
;
int32
pushed
=
0
;
for
(
const
auto
&
it
:
params
)
{
for
(
const
auto
&
it
:
params
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
uint32
type
=
it
.
second
;
uint32
type
=
it
.
second
;
switch
(
type
)
{
switch
(
type
)
{
case
PARAM_TYPE_INT
:
case
PARAM_TYPE_INT
:
...
@@ -283,6 +290,7 @@ int32 interpreter::call_card_function(card* pcard, const char* f, uint32 param_c
...
@@ -283,6 +290,7 @@ int32 interpreter::call_card_function(card* pcard, const char* f, uint32 param_c
return
OPERATION_FAIL
;
return
OPERATION_FAIL
;
}
}
card2value
(
current_state
,
pcard
);
card2value
(
current_state
,
pcard
);
luaL_checkstack
(
current_state
,
1
,
NULL
);
lua_getfield
(
current_state
,
-
1
,
f
);
lua_getfield
(
current_state
,
-
1
,
f
);
if
(
!
lua_isfunction
(
current_state
,
-
1
))
{
if
(
!
lua_isfunction
(
current_state
,
-
1
))
{
sprintf
(
pduel
->
strbuffer
,
"
\"
CallCardFunction
\"
(c%d.%s): attempt to call an error function"
,
pcard
->
data
.
code
,
f
);
sprintf
(
pduel
->
strbuffer
,
"
\"
CallCardFunction
\"
(c%d.%s): attempt to call an error function"
,
pcard
->
data
.
code
,
f
);
...
@@ -323,6 +331,7 @@ int32 interpreter::call_code_function(uint32 code, const char* f, uint32 param_c
...
@@ -323,6 +331,7 @@ int32 interpreter::call_code_function(uint32 code, const char* f, uint32 param_c
return
OPERATION_FAIL
;
return
OPERATION_FAIL
;
}
}
load_card_script
(
code
);
load_card_script
(
code
);
luaL_checkstack
(
current_state
,
1
,
NULL
);
lua_getfield
(
current_state
,
-
1
,
f
);
lua_getfield
(
current_state
,
-
1
,
f
);
if
(
!
lua_isfunction
(
current_state
,
-
1
))
{
if
(
!
lua_isfunction
(
current_state
,
-
1
))
{
sprintf
(
pduel
->
strbuffer
,
"
\"
CallCodeFunction
\"
: attempt to call an error function"
);
sprintf
(
pduel
->
strbuffer
,
"
\"
CallCodeFunction
\"
: attempt to call an error function"
);
...
@@ -386,6 +395,7 @@ int32 interpreter::check_matching(card* pcard, int32 findex, int32 extraargs) {
...
@@ -386,6 +395,7 @@ int32 interpreter::check_matching(card* pcard, int32 findex, int32 extraargs) {
return
TRUE
;
return
TRUE
;
no_action
++
;
no_action
++
;
call_depth
++
;
call_depth
++
;
luaL_checkstack
(
current_state
,
1
+
extraargs
,
NULL
);
lua_pushvalue
(
current_state
,
findex
);
lua_pushvalue
(
current_state
,
findex
);
interpreter
::
card2value
(
current_state
,
pcard
);
interpreter
::
card2value
(
current_state
,
pcard
);
for
(
int32
i
=
0
;
i
<
extraargs
;
++
i
)
for
(
int32
i
=
0
;
i
<
extraargs
;
++
i
)
...
@@ -417,6 +427,7 @@ int32 interpreter::get_operation_value(card* pcard, int32 findex, int32 extraarg
...
@@ -417,6 +427,7 @@ int32 interpreter::get_operation_value(card* pcard, int32 findex, int32 extraarg
return
0
;
return
0
;
no_action
++
;
no_action
++
;
call_depth
++
;
call_depth
++
;
luaL_checkstack
(
current_state
,
1
+
extraargs
,
NULL
);
lua_pushvalue
(
current_state
,
findex
);
lua_pushvalue
(
current_state
,
findex
);
interpreter
::
card2value
(
current_state
,
pcard
);
interpreter
::
card2value
(
current_state
,
pcard
);
for
(
int32
i
=
0
;
i
<
extraargs
;
++
i
)
for
(
int32
i
=
0
;
i
<
extraargs
;
++
i
)
...
@@ -579,6 +590,7 @@ int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_va
...
@@ -579,6 +590,7 @@ int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_va
}
}
}
}
int32
interpreter
::
clone_function_ref
(
int32
func_ref
)
{
int32
interpreter
::
clone_function_ref
(
int32
func_ref
)
{
luaL_checkstack
(
current_state
,
1
,
NULL
);
lua_rawgeti
(
current_state
,
LUA_REGISTRYINDEX
,
func_ref
);
lua_rawgeti
(
current_state
,
LUA_REGISTRYINDEX
,
func_ref
);
int32
ref
=
luaL_ref
(
current_state
,
LUA_REGISTRYINDEX
);
int32
ref
=
luaL_ref
(
current_state
,
LUA_REGISTRYINDEX
);
return
ref
;
return
ref
;
...
@@ -586,6 +598,7 @@ int32 interpreter::clone_function_ref(int32 func_ref) {
...
@@ -586,6 +598,7 @@ int32 interpreter::clone_function_ref(int32 func_ref) {
void
*
interpreter
::
get_ref_object
(
int32
ref_handler
)
{
void
*
interpreter
::
get_ref_object
(
int32
ref_handler
)
{
if
(
ref_handler
==
0
)
if
(
ref_handler
==
0
)
return
nullptr
;
return
nullptr
;
luaL_checkstack
(
current_state
,
1
,
NULL
);
lua_rawgeti
(
current_state
,
LUA_REGISTRYINDEX
,
ref_handler
);
lua_rawgeti
(
current_state
,
LUA_REGISTRYINDEX
,
ref_handler
);
void
*
p
=
*
(
void
**
)
lua_touserdata
(
current_state
,
-
1
);
void
*
p
=
*
(
void
**
)
lua_touserdata
(
current_state
,
-
1
);
lua_pop
(
current_state
,
1
);
lua_pop
(
current_state
,
1
);
...
@@ -593,30 +606,35 @@ void* interpreter::get_ref_object(int32 ref_handler) {
...
@@ -593,30 +606,35 @@ void* interpreter::get_ref_object(int32 ref_handler) {
}
}
//Convert a pointer to a lua value, +1 -0
//Convert a pointer to a lua value, +1 -0
void
interpreter
::
card2value
(
lua_State
*
L
,
card
*
pcard
)
{
void
interpreter
::
card2value
(
lua_State
*
L
,
card
*
pcard
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
if
(
!
pcard
||
pcard
->
ref_handle
==
0
)
if
(
!
pcard
||
pcard
->
ref_handle
==
0
)
lua_pushnil
(
L
);
lua_pushnil
(
L
);
else
else
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
pcard
->
ref_handle
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
pcard
->
ref_handle
);
}
}
void
interpreter
::
group2value
(
lua_State
*
L
,
group
*
pgroup
)
{
void
interpreter
::
group2value
(
lua_State
*
L
,
group
*
pgroup
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
if
(
!
pgroup
||
pgroup
->
ref_handle
==
0
)
if
(
!
pgroup
||
pgroup
->
ref_handle
==
0
)
lua_pushnil
(
L
);
lua_pushnil
(
L
);
else
else
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
pgroup
->
ref_handle
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
pgroup
->
ref_handle
);
}
}
void
interpreter
::
effect2value
(
lua_State
*
L
,
effect
*
peffect
)
{
void
interpreter
::
effect2value
(
lua_State
*
L
,
effect
*
peffect
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
if
(
!
peffect
||
peffect
->
ref_handle
==
0
)
if
(
!
peffect
||
peffect
->
ref_handle
==
0
)
lua_pushnil
(
L
);
lua_pushnil
(
L
);
else
else
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
peffect
->
ref_handle
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
peffect
->
ref_handle
);
}
}
void
interpreter
::
function2value
(
lua_State
*
L
,
int32
func_ref
)
{
void
interpreter
::
function2value
(
lua_State
*
L
,
int32
func_ref
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
if
(
!
func_ref
)
if
(
!
func_ref
)
lua_pushnil
(
L
);
lua_pushnil
(
L
);
else
else
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
func_ref
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
func_ref
);
}
}
int32
interpreter
::
get_function_handle
(
lua_State
*
L
,
int32
index
)
{
int32
interpreter
::
get_function_handle
(
lua_State
*
L
,
int32
index
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
lua_pushvalue
(
L
,
index
);
lua_pushvalue
(
L
,
index
);
int32
ref
=
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
int32
ref
=
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
return
ref
;
return
ref
;
...
@@ -626,6 +644,7 @@ void interpreter::set_duel_info(lua_State* L, duel* pduel) {
...
@@ -626,6 +644,7 @@ void interpreter::set_duel_info(lua_State* L, duel* pduel) {
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
}
}
duel
*
interpreter
::
get_duel_info
(
lua_State
*
L
)
{
duel
*
interpreter
::
get_duel_info
(
lua_State
*
L
)
{
luaL_checkstack
(
L
,
1
,
NULL
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
3
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
3
);
duel
*
pduel
=
(
duel
*
)
lua_topointer
(
L
,
-
1
);
duel
*
pduel
=
(
duel
*
)
lua_topointer
(
L
,
-
1
);
lua_pop
(
L
,
1
);
lua_pop
(
L
,
1
);
...
...
libcard.cpp
View file @
f12dcc3f
...
@@ -563,6 +563,18 @@ int32 scriptlib::card_get_link_attribute(lua_State *L) {
...
@@ -563,6 +563,18 @@ int32 scriptlib::card_get_link_attribute(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
get_link_attribute
(
playerid
));
lua_pushinteger
(
L
,
pcard
->
get_link_attribute
(
playerid
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_attribute_in_grave
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
playerid
=
PLAYER_NONE
;
if
(
lua_gettop
(
L
)
>
1
&&
!
lua_isnil
(
L
,
2
))
playerid
=
(
int32
)
lua_tointeger
(
L
,
2
);
else
playerid
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
lua_pushinteger
(
L
,
pcard
->
get_grave_attribute
(
playerid
));
return
1
;
}
int32
scriptlib
::
card_get_race
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_race
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -592,6 +604,18 @@ int32 scriptlib::card_get_link_race(lua_State *L) {
...
@@ -592,6 +604,18 @@ int32 scriptlib::card_get_link_race(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
get_link_race
(
playerid
));
lua_pushinteger
(
L
,
pcard
->
get_link_race
(
playerid
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_race_in_grave
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
playerid
=
PLAYER_NONE
;
if
(
lua_gettop
(
L
)
>
1
&&
!
lua_isnil
(
L
,
2
))
playerid
=
(
int32
)
lua_tointeger
(
L
,
2
);
else
playerid
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
lua_pushinteger
(
L
,
pcard
->
get_grave_race
(
playerid
));
return
1
;
}
int32
scriptlib
::
card_get_attack
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_attack
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -3246,9 +3270,11 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3246,9 +3270,11 @@ static const struct luaL_Reg cardlib[] = {
{
"GetOriginalAttribute"
,
scriptlib
::
card_get_origin_attribute
},
{
"GetOriginalAttribute"
,
scriptlib
::
card_get_origin_attribute
},
{
"GetFusionAttribute"
,
scriptlib
::
card_get_fusion_attribute
},
{
"GetFusionAttribute"
,
scriptlib
::
card_get_fusion_attribute
},
{
"GetLinkAttribute"
,
scriptlib
::
card_get_link_attribute
},
{
"GetLinkAttribute"
,
scriptlib
::
card_get_link_attribute
},
{
"GetAttributeInGrave"
,
scriptlib
::
card_get_attribute_in_grave
},
{
"GetRace"
,
scriptlib
::
card_get_race
},
{
"GetRace"
,
scriptlib
::
card_get_race
},
{
"GetOriginalRace"
,
scriptlib
::
card_get_origin_race
},
{
"GetOriginalRace"
,
scriptlib
::
card_get_origin_race
},
{
"GetLinkRace"
,
scriptlib
::
card_get_link_race
},
{
"GetLinkRace"
,
scriptlib
::
card_get_link_race
},
{
"GetRaceInGrave"
,
scriptlib
::
card_get_race_in_grave
},
{
"GetAttack"
,
scriptlib
::
card_get_attack
},
{
"GetAttack"
,
scriptlib
::
card_get_attack
},
{
"GetBaseAttack"
,
scriptlib
::
card_get_origin_attack
},
{
"GetBaseAttack"
,
scriptlib
::
card_get_origin_attack
},
{
"GetTextAttack"
,
scriptlib
::
card_get_text_attack
},
{
"GetTextAttack"
,
scriptlib
::
card_get_text_attack
},
...
...
scriptlib.h
View file @
f12dcc3f
...
@@ -66,9 +66,11 @@ public:
...
@@ -66,9 +66,11 @@ public:
static
int32
card_get_origin_attribute
(
lua_State
*
L
);
static
int32
card_get_origin_attribute
(
lua_State
*
L
);
static
int32
card_get_fusion_attribute
(
lua_State
*
L
);
static
int32
card_get_fusion_attribute
(
lua_State
*
L
);
static
int32
card_get_link_attribute
(
lua_State
*
L
);
static
int32
card_get_link_attribute
(
lua_State
*
L
);
static
int32
card_get_attribute_in_grave
(
lua_State
*
L
);
static
int32
card_get_race
(
lua_State
*
L
);
static
int32
card_get_race
(
lua_State
*
L
);
static
int32
card_get_origin_race
(
lua_State
*
L
);
static
int32
card_get_origin_race
(
lua_State
*
L
);
static
int32
card_get_link_race
(
lua_State
*
L
);
static
int32
card_get_link_race
(
lua_State
*
L
);
static
int32
card_get_race_in_grave
(
lua_State
*
L
);
static
int32
card_get_attack
(
lua_State
*
L
);
static
int32
card_get_attack
(
lua_State
*
L
);
static
int32
card_get_origin_attack
(
lua_State
*
L
);
static
int32
card_get_origin_attack
(
lua_State
*
L
);
static
int32
card_get_text_attack
(
lua_State
*
L
);
static
int32
card_get_text_attack
(
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