Commit b1f9ca97 authored by mercury233's avatar mercury233
parents d0e43912 d47df216
...@@ -2165,6 +2165,8 @@ int32 scriptlib::card_is_able_to_hand(lua_State *L) { ...@@ -2165,6 +2165,8 @@ int32 scriptlib::card_is_able_to_hand(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 p = pcard->pduel->game_field->core.reason_player; uint32 p = pcard->pduel->game_field->core.reason_player;
if(lua_gettop(L) >= 2)
p = (uint32)lua_tointeger(L, 2);
if(pcard->is_capable_send_to_hand(p)) if(pcard->is_capable_send_to_hand(p))
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
......
...@@ -3794,7 +3794,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -3794,7 +3794,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
uint8 dest = pcard->sendto_param.location; uint8 dest = pcard->sendto_param.location;
if(!(reason & REASON_RULE) && if(!(reason & REASON_RULE) &&
(pcard->get_status(STATUS_SUMMONING | STATUS_SPSUMMON_STEP) (pcard->get_status(STATUS_SUMMONING | STATUS_SPSUMMON_STEP)
|| (!(pcard->current.reason & REASON_COST) && !pcard->is_affect_by_effect(pcard->current.reason_effect)) || (!(pcard->current.reason & (REASON_COST | REASON_SUMMON | REASON_MATERIAL)) && !pcard->is_affect_by_effect(pcard->current.reason_effect))
|| (dest == LOCATION_HAND && !pcard->is_capable_send_to_hand(core.reason_player)) || (dest == LOCATION_HAND && !pcard->is_capable_send_to_hand(core.reason_player))
|| (dest == LOCATION_DECK && !pcard->is_capable_send_to_deck(core.reason_player)) || (dest == LOCATION_DECK && !pcard->is_capable_send_to_deck(core.reason_player))
|| (dest == LOCATION_REMOVED && !pcard->is_removeable(core.reason_player, pcard->sendto_param.position, reason)) || (dest == LOCATION_REMOVED && !pcard->is_removeable(core.reason_player, pcard->sendto_param.position, reason))
......
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