Commit c5fac431 authored by Koishi_Mint's avatar Koishi_Mint Committed by nanahira

update effect_is_activatable (#152)

parent ba75473a
......@@ -504,9 +504,13 @@ int32 scriptlib::effect_is_activatable(lua_State *L) {
uint32 playerid = lua_tointeger(L, 2);
effect* peffect = *(effect**) lua_touserdata(L, 1);
uint32 neglect_loc = 0;
if(lua_gettop(L) > 2)
uint32 neglect_target = 0;
if(lua_gettop(L) > 2) {
neglect_loc = lua_toboolean(L, 3);
lua_pushboolean(L, peffect->is_activateable(playerid, peffect->pduel->game_field->nil_event, 0, 0, 0, neglect_loc));
if (lua_gettop(L) > 3)
neglect_target = lua_toboolean(L, 4);
}
lua_pushboolean(L, peffect->is_activateable(playerid, peffect->pduel->game_field->nil_event, 0, 0, neglect_target, neglect_loc));
return 1;
}
int32 scriptlib::effect_is_activated(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