Commit 353fec7c authored by Momobako's avatar Momobako

update_core

parent 54355d54
......@@ -749,5 +749,5 @@ int32 effect::in_range(const chain& ch) {
void effect::set_activate_location() {
card* phandler = get_handler();
active_location = phandler->current.location;
//active_sequence = phandler->current.sequence;
active_sequence = phandler->current.sequence;
}
......@@ -51,7 +51,8 @@ public:
uint32 hint_timing[2];
uint32 card_type;
uint32 active_type;
uint32 active_location;
uint16 active_location;
uint16 active_sequence;
card* active_handler;
uint16 status;
uint32 label;
......
......@@ -315,6 +315,7 @@ static const struct luaL_Reg effectlib[] = {
{ "IsActivatable", scriptlib::effect_is_activatable },
{ "IsActivated", scriptlib::effect_is_activated },
{ "GetActivateLocation", scriptlib::effect_get_activate_location },
{ "GetActivateSequence", scriptlib::effect_get_activate_sequence },
{ NULL, NULL }
};
......
......@@ -516,11 +516,17 @@ int32 scriptlib::effect_is_activated(lua_State * L) {
lua_pushboolean(L, (peffect->type & 0x7f0));
return 1;
}
int32 scriptlib::effect_get_activate_location(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_EFFECT, 1);
effect* peffect = *(effect**) lua_touserdata(L, 1);
lua_pushinteger(L, peffect->active_location);
return 1;
}
\ No newline at end of file
}
int32 scriptlib::effect_get_activate_sequence(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_EFFECT, 1);
effect* peffect = *(effect**) lua_touserdata(L, 1);
lua_pushinteger(L, peffect->active_sequence);
return 1;
}
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