Commit 6b6d7ea0 authored by Chen Bill's avatar Chen Bill Committed by GitHub

fix reason check in field::send_to(uint16 step (#580)

parent 6591f368
...@@ -3906,7 +3906,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -3906,7 +3906,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 | REASON_SUMMON | REASONS_PROCEDURE)) && !pcard->is_affect_by_effect(pcard->current.reason_effect)) || ((pcard->current.reason & REASON_EFFECT) && !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, send_activating)) || (dest == LOCATION_DECK && !pcard->is_capable_send_to_deck(core.reason_player, send_activating))
|| (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))
...@@ -3926,6 +3926,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -3926,6 +3926,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return FALSE; return FALSE;
} }
case 1: { case 1: {
// the entrance of release, destroy
for(auto& pcard : targets->container) { for(auto& pcard : targets->container) {
add_process(PROCESSOR_SENDTO_REPLACE, 0, nullptr, targets, 0, 0, 0, 0, pcard); add_process(PROCESSOR_SENDTO_REPLACE, 0, nullptr, targets, 0, 0, 0, 0, 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