* Desecrated Tomb - fixed that it did not produce bat tokens if a Zombie cards was cast from graveyard (fixes #5318).

This commit is contained in:
LevelX2 2018-09-27 17:26:22 +02:00
parent 8df97aa6f6
commit 226019be89
2 changed files with 52 additions and 5 deletions

View file

@ -10,6 +10,7 @@ import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.command.Commander;
import mage.game.events.ZoneChangeEvent;
import mage.game.events.ZoneChangeGroupEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.permanent.PermanentMeld;
@ -25,6 +26,12 @@ public final class ZonesHandler {
public static boolean cast(ZoneChangeInfo info, Game game) {
if (maybeRemoveFromSourceZone(info, game)) {
placeInDestinationZone(info, game);
// create a group zone change event if a card is moved to stack for casting (it's always only one card, but some effects check for group events (one or more xxx))
Set<Card> cards = new HashSet<>();
Card targetCard = getTargetCard(game, info.event.getTargetId());
cards.add(targetCard);
game.fireEvent(new ZoneChangeGroupEvent(cards, info.event.getSourceId(), info.event.getPlayerId(), info.event.getFromZone(), info.event.getToZone()));
// normal movement
game.fireEvent(info.event);
return true;
}