Commit 902bed70 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-core

parents df9a1624 16d3d6f9
......@@ -707,14 +707,20 @@ int32 scriptlib::card_get_attack(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->get_attack());
int32 atk = pcard->get_attack();
if(atk < 0)
atk = 0;
lua_pushinteger(L, atk);
return 1;
}
int32 scriptlib::card_get_origin_attack(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->get_base_attack());
int32 atk = pcard->get_base_attack();
if(atk < 0)
atk = 0;
lua_pushinteger(L, atk);
return 1;
}
int32 scriptlib::card_get_text_attack(lua_State *L) {
......@@ -731,14 +737,20 @@ int32 scriptlib::card_get_defense(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->get_defense());
int32 def = pcard->get_defense();
if(def < 0)
def = 0;
lua_pushinteger(L, def);
return 1;
}
int32 scriptlib::card_get_origin_defense(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->get_base_defense());
int32 def = pcard->get_base_defense();
if(def < 0)
def = 0;
lua_pushinteger(L, def);
return 1;
}
int32 scriptlib::card_get_text_defense(lua_State *L) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment