mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed a problem of Flashback and Buyback producing a loop.
This commit is contained in:
parent
5215a02181
commit
423c2bbf6c
2 changed files with 26 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue