Commit 4e1021b9 authored by DailyShana's avatar DailyShana

activation disabled cards are not treated as cards on field

parent 456ffa23
...@@ -1005,7 +1005,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui ...@@ -1005,7 +1005,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
if(location & LOCATION_SZONE) { if(location & LOCATION_SZONE) {
for(uint32 i = 0; i < 8; ++i) { for(uint32 i = 0; i < 8; ++i) {
pcard = player[self].list_szone[i]; pcard = player[self].list_szone[i];
if(pcard && pcard != pexception && pduel->lua->check_matching(pcard, findex, extraargs) if(pcard && !pcard->is_status(STATUS_ACTIVATE_DISABLED) && pcard != pexception && pduel->lua->check_matching(pcard, findex, extraargs)
&& (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { && (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) {
if(pret) { if(pret) {
*pret = pcard; *pret = pcard;
......
...@@ -450,7 +450,7 @@ int32 scriptlib::card_get_location(lua_State *L) { ...@@ -450,7 +450,7 @@ int32 scriptlib::card_get_location(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
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);
if(pcard->is_status(STATUS_SUMMONING) || pcard->is_status(STATUS_SUMMON_DISABLED)) if(pcard->get_status(STATUS_SUMMONING | STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED))
lua_pushinteger(L, 0); lua_pushinteger(L, 0);
else else
lua_pushinteger(L, pcard->current.location); lua_pushinteger(L, pcard->current.location);
...@@ -1676,7 +1676,7 @@ int32 scriptlib::card_is_onfield(lua_State *L) { ...@@ -1676,7 +1676,7 @@ int32 scriptlib::card_is_onfield(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
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);
if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED)) if((pcard->current.location & LOCATION_ONFIELD) && !pcard->get_status(STATUS_SUMMONING | STATUS_SUMMON_DISABLED | STATUS_ACTIVATE_DISABLED))
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
...@@ -1692,6 +1692,11 @@ int32 scriptlib::card_is_location(lua_State *L) { ...@@ -1692,6 +1692,11 @@ int32 scriptlib::card_is_location(lua_State *L) {
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
} else if(pcard->current.location == LOCATION_SZONE){
if((loc & LOCATION_SZONE) && !pcard->is_status(STATUS_ACTIVATE_DISABLED))
lua_pushboolean(L, 1);
else
lua_pushboolean(L, 0);
} else } else
lua_pushboolean(L, pcard->current.location & loc); lua_pushboolean(L, pcard->current.location & loc);
return 1; return 1;
......
...@@ -3221,7 +3221,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -3221,7 +3221,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
destroying.insert(pcard); destroying.insert(pcard);
} }
if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED)) { if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED) && !pcard->is_status(STATUS_ACTIVATE_DISABLED)) {
raise_single_event(pcard, 0, EVENT_LEAVE_FIELD_P, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_LEAVE_FIELD_P, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
leave_p.insert(pcard); leave_p.insert(pcard);
} }
......
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