Commit a5ae897e authored by wind2009's avatar wind2009

erase outside the loop

parent 5ca7dd99
......@@ -4959,15 +4959,18 @@ int32_t field::change_position(uint16_t step, group * targets, effect * reason_e
move_to_field(pcard, pcard->current.controler, pcard->current.controler, LOCATION_SZONE, POS_FACEDOWN, FALSE, RETURN_TRAP_MONSTER_TO_SZONE);
raise_single_event(pcard, 0, EVENT_SSET, reason_effect, 0, reason_player, 0, 0);
ssets.insert(pcard);
targets->container.erase(pcard);
}
}
adjust_instant();
process_single_event();
if(flips.size())
raise_event(flips, EVENT_FLIP, reason_effect, 0, reason_player, 0, 0);
if(ssets.size())
if(ssets.size()) {
for(auto& pcard : ssets) {
targets->container.erase(pcard);
}
raise_event(ssets, EVENT_SSET, reason_effect, 0, reason_player, 0, 0);
}
if(pos_changed.size())
raise_event(pos_changed, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0);
process_instant_event();
......
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