Added setting required target for flashback abilities. Needed because of wrong implementation of flashback but it prevents from accidental canceling targeting

This commit is contained in:
magenoxx 2012-08-09 12:02:45 +04:00
parent 66bc622d19
commit 557e8a7be5

View file

@ -40,6 +40,7 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.players.Player;
import mage.target.Target;
/**
*
@ -106,6 +107,9 @@ class FlashbackEffect extends OneShotEffect<FlashbackEffect> {
card.getSpellAbility().clear();
int amount = source.getManaCostsToPay().getX();
card.getSpellAbility().getManaCostsToPay().setX(amount);
for (Target target : card.getSpellAbility().getTargets()) {
target.setRequired(true);
}
return controller.cast(card.getSpellAbility(), game, true);
}
}