Commit ea67cf7e authored by DailyShana's avatar DailyShana

update Duel.ReturnToField

parent d3a9bf14
...@@ -638,13 +638,16 @@ int32 scriptlib::duel_return_to_field(lua_State *L) { ...@@ -638,13 +638,16 @@ int32 scriptlib::duel_return_to_field(lua_State *L) {
if(!(pcard->current.reason & REASON_TEMPORARY)) if(!(pcard->current.reason & REASON_TEMPORARY))
return 0; return 0;
int32 pos = pcard->previous.position; int32 pos = pcard->previous.position;
if(lua_gettop(L) > 1) if(lua_gettop(L) >= 2)
pos = lua_tointeger(L, 2); pos = lua_tointeger(L, 2);
uint32 zone = 0xff;
if(lua_gettop(L) >= 3)
zone = lua_tointeger(L, 3);
duel* pduel = pcard->pduel; duel* pduel = pcard->pduel;
pcard->enable_field_effect(false); pcard->enable_field_effect(false);
pduel->game_field->adjust_instant(); pduel->game_field->adjust_instant();
pduel->game_field->refresh_location_info_instant(); pduel->game_field->refresh_location_info_instant();
pduel->game_field->move_to_field(pcard, pcard->previous.controler, pcard->previous.controler, pcard->previous.location, pos, TRUE, 1); pduel->game_field->move_to_field(pcard, pcard->previous.controler, pcard->previous.controler, pcard->previous.location, pos, TRUE, 1, 0, zone);
pduel->game_field->core.subunits.back().type = PROCESSOR_MOVETOFIELD_S; pduel->game_field->core.subunits.back().type = PROCESSOR_MOVETOFIELD_S;
return lua_yield(L, 0); return lua_yield(L, 0);
} }
......
...@@ -3891,10 +3891,6 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret, ...@@ -3891,10 +3891,6 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
} }
if(ct <= 0) if(ct <= 0)
return TRUE; return TRUE;
if(ret && is_location_useable(playerid, location, target->previous.sequence)) {
returns.bvalue[2] = target->previous.sequence;
return FALSE;
}
if(move_player == playerid) { if(move_player == playerid) {
if(location == LOCATION_SZONE) if(location == LOCATION_SZONE)
flag = ((flag & 0xff) << 8) | 0xffff00ff; flag = ((flag & 0xff) << 8) | 0xffff00ff;
......
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