mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
* Breath of Fury - Fixed that the enchnatment was no longer properly moved (fixes #3722).
This commit is contained in:
parent
fbd90bb3e0
commit
acf28d8aff
7 changed files with 129 additions and 42 deletions
|
|
@ -57,12 +57,20 @@ public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||
// check it was previously on battlefield
|
||||
Permanent before = ((ZoneChangeEvent) event).getTarget();
|
||||
if (before == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(before instanceof PermanentToken) && !this.hasSourceObjectAbility(game, before, event)) {
|
||||
return false;
|
||||
}
|
||||
// check now it is in graveyard
|
||||
Zone after = game.getState().getZone(sourceId);
|
||||
return before != null && after != null && Zone.GRAVEYARD.match(after);
|
||||
if (before.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(source.getId())) {
|
||||
Zone after = game.getState().getZone(sourceId);
|
||||
return after != null && Zone.GRAVEYARD.match(after);
|
||||
} else {
|
||||
// Already moved to another zone, so guess it's ok
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.game.permanent;
|
||||
|
||||
import java.util.*;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.ObjectColor;
|
||||
|
|
@ -55,8 +56,6 @@ import mage.players.Player;
|
|||
import mage.util.GameLog;
|
||||
import mage.util.ThreadLocalStringBuilder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -990,8 +989,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
game.informPlayers(player.getLogName() + " sacrificed " + this.getLogName());
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(EventType.SACRIFICED_PERMANENT, objectId, sourceId, controllerId));
|
||||
game.checkStateAndTriggered();
|
||||
game.applyEffects();
|
||||
// game.checkStateAndTriggered();
|
||||
// game.applyEffects();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue