Commit 257688b7 authored by Chen Bill's avatar Chen Bill

fix field::filter_inrange_cards()

parent 9b62088d
...@@ -1404,11 +1404,11 @@ void field::filter_inrange_cards(effect* peffect, card_set* cset) { ...@@ -1404,11 +1404,11 @@ void field::filter_inrange_cards(effect* peffect, card_set* cset) {
if(peffect->is_flag(EFFECT_FLAG_PLAYER_TARGET | EFFECT_FLAG_SPSUM_PARAM)) if(peffect->is_flag(EFFECT_FLAG_PLAYER_TARGET | EFFECT_FLAG_SPSUM_PARAM))
return; return;
uint8 self = peffect->get_handler_player(); uint8 self = peffect->get_handler_player();
if(self == PLAYER_NONE) if (!check_playerid(self))
return; return;
uint16 range = peffect->s_range; uint16 range = peffect->s_range;
std::vector<card_vector*> cvec; std::vector<card_vector*> cvec;
for(uint32 p = 0; p < 2; ++p) { for(int32 p = 0; p < 2; ++p) {
if(range & LOCATION_MZONE) if(range & LOCATION_MZONE)
cvec.push_back(&player[self].list_mzone); cvec.push_back(&player[self].list_mzone);
if(range & LOCATION_SZONE) if(range & LOCATION_SZONE)
...@@ -1428,7 +1428,7 @@ void field::filter_inrange_cards(effect* peffect, card_set* cset) { ...@@ -1428,7 +1428,7 @@ void field::filter_inrange_cards(effect* peffect, card_set* cset) {
} }
for(auto& cvit : cvec) { for(auto& cvit : cvec) {
for(auto& pcard : *cvit) { for(auto& pcard : *cvit) {
if(pcard && peffect->is_fit_target_function(pcard)) if (pcard && (!(pcard->current.location & LOCATION_ONFIELD) || !pcard->is_treated_as_not_on_field()) && peffect->is_fit_target_function(pcard))
cset->insert(pcard); cset->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