Commit 16318155 authored by DailyShana's avatar DailyShana

fix

parent 01fc03a6
...@@ -3984,12 +3984,14 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -3984,12 +3984,14 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
} }
for(auto cit = param->targets->container.begin(); cit != param->targets->container.end(); ++cit) { for(auto cit = param->targets->container.begin(); cit != param->targets->container.end(); ++cit) {
card* pcard = *cit; card* pcard = *cit;
if(!(pcard->data.type & TYPE_TOKEN))
pcard->enable_field_effect(true);
uint8 nloc = pcard->current.location; uint8 nloc = pcard->current.location;
if(nloc == LOCATION_HAND) if(nloc == LOCATION_HAND)
pcard->reset(RESET_TOHAND, RESET_EVENT); pcard->reset(RESET_TOHAND, RESET_EVENT);
else if(nloc == LOCATION_DECK || nloc == LOCATION_EXTRA) if(nloc == LOCATION_DECK || nloc == LOCATION_EXTRA)
pcard->reset(RESET_TODECK, RESET_EVENT); pcard->reset(RESET_TODECK, RESET_EVENT);
else if(nloc == LOCATION_GRAVE) if(nloc == LOCATION_GRAVE)
pcard->reset(RESET_TOGRAVE, RESET_EVENT); pcard->reset(RESET_TOGRAVE, RESET_EVENT);
if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) { if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) {
if(pcard->current.reason & REASON_TEMPORARY) if(pcard->current.reason & REASON_TEMPORARY)
...@@ -4036,15 +4038,15 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -4036,15 +4038,15 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
} }
} }
pcard->clear_card_target(); pcard->clear_card_target();
if(!(pcard->data.type & TYPE_TOKEN)) {
pcard->enable_field_effect(true);
if(nloc == LOCATION_HAND) { if(nloc == LOCATION_HAND) {
tohand.insert(pcard); tohand.insert(pcard);
raise_single_event(pcard, 0, EVENT_TO_HAND, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_TO_HAND, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
} else if(nloc == LOCATION_DECK || nloc == LOCATION_EXTRA) { }
if(nloc == LOCATION_DECK || nloc == LOCATION_EXTRA) {
todeck.insert(pcard); todeck.insert(pcard);
raise_single_event(pcard, 0, EVENT_TO_DECK, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_TO_DECK, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
} else if(nloc == LOCATION_GRAVE) { }
if(nloc == LOCATION_GRAVE) {
if(pcard->current.reason & REASON_RETURN) { if(pcard->current.reason & REASON_RETURN) {
retgrave.insert(pcard); retgrave.insert(pcard);
raise_single_event(pcard, 0, EVENT_RETURN_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_RETURN_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
...@@ -4053,7 +4055,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -4053,7 +4055,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
raise_single_event(pcard, 0, EVENT_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
} }
} }
}
if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) { if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) {
remove.insert(pcard); remove.insert(pcard);
raise_single_event(pcard, 0, EVENT_REMOVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0); raise_single_event(pcard, 0, EVENT_REMOVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 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