Fixed a problem of Flashback and Buyback producing a loop.

This commit is contained in:
LevelX2 2016-09-24 03:13:59 +02:00
parent 5215a02181
commit 423c2bbf6c
2 changed files with 26 additions and 1 deletions

View file

@ -186,7 +186,7 @@ class BuybackEffect extends ReplacementEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getFromZone() == Zone.STACK
if (zEvent.getFromZone() == Zone.STACK && zEvent.getToZone() == Zone.GRAVEYARD
&& source.getSourceId().equals(event.getSourceId())) { // if spell fizzled, the sourceId is null
return true;
}