Commit 1e4ced1d authored by mercury233's avatar mercury233
parents 7cb7069f fa5440d1
...@@ -28,6 +28,8 @@ interpreter::interpreter(duel* pd): coroutines(256) { ...@@ -28,6 +28,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal(lua_state, "os"); lua_setglobal(lua_state, "os");
lua_pushnil(lua_state); lua_pushnil(lua_state);
lua_setglobal(lua_state, "package"); lua_setglobal(lua_state, "package");
lua_pushnil(lua_state);
lua_setglobal(lua_state, "debug");
luaL_getsubtable(lua_state, LUA_REGISTRYINDEX, "_LOADED"); luaL_getsubtable(lua_state, LUA_REGISTRYINDEX, "_LOADED");
lua_pushnil(lua_state); lua_pushnil(lua_state);
lua_setfield(lua_state, -2, "io"); lua_setfield(lua_state, -2, "io");
...@@ -35,6 +37,8 @@ interpreter::interpreter(duel* pd): coroutines(256) { ...@@ -35,6 +37,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setfield(lua_state, -2, "os"); lua_setfield(lua_state, -2, "os");
lua_pushnil(lua_state); lua_pushnil(lua_state);
lua_setfield(lua_state, -2, "package"); lua_setfield(lua_state, -2, "package");
lua_pushnil(lua_state);
lua_setfield(lua_state, -2, "debug");
lua_pop(lua_state, 1); lua_pop(lua_state, 1);
//open all libs //open all libs
scriptlib::open_cardlib(lua_state); scriptlib::open_cardlib(lua_state);
......
...@@ -3153,11 +3153,11 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3153,11 +3153,11 @@ int32 field::process_battle_command(uint16 step) {
if(core.attack_target) if(core.attack_target)
raise_single_event(core.attack_target, 0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 1); raise_single_event(core.attack_target, 0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 1);
raise_event((card*)0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 0); raise_event((card*)0, EVENT_DAMAGE_STEP_END, 0, 0, 0, 0, 0);
process_single_event();
process_instant_event();
core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE); core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE);
if(core.attack_target) if(core.attack_target)
core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE); core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE);
process_single_event();
process_instant_event();
pduel->write_buffer8(MSG_HINT); pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_EVENT); pduel->write_buffer8(HINT_EVENT);
pduel->write_buffer8(0); pduel->write_buffer8(0);
......
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