mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
* Loyal Cathar - Fixed that dies triggered ability also triggered for the night side card.
This commit is contained in:
parent
a7211a30d0
commit
fd8a18129b
8 changed files with 56 additions and 38 deletions
|
|
@ -67,7 +67,6 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ManaEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
|
|
|
|||
|
|
@ -105,16 +105,16 @@ public class TriggeredAbilities extends ConcurrentHashMap<String, TriggeredAbili
|
|||
}
|
||||
}
|
||||
|
||||
private MageObject getMageObject(GameEvent event, Game game, TriggeredAbility ability) {
|
||||
MageObject object = game.getPermanent(ability.getSourceId());
|
||||
if (object == null) {
|
||||
object = game.getLastKnownInformation(ability.getSourceId(), event.getZone());
|
||||
if (object == null) {
|
||||
object = game.getObject(ability.getSourceId());
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
// private MageObject getMageObject(GameEvent event, Game game, TriggeredAbility ability) {
|
||||
// MageObject object = game.getPermanent(ability.getSourceId());
|
||||
// if (object == null) {
|
||||
// object = game.getLastKnownInformation(ability.getSourceId(), event.getZone());
|
||||
// if (object == null) {
|
||||
// object = game.getObject(ability.getSourceId());
|
||||
// }
|
||||
// }
|
||||
// return object;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Adds a by sourceId gained triggered ability
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (super.checkTrigger(event, game)) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getTarget().canTransform()) {
|
||||
if (!zEvent.getTarget().getAbilities().contains(this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (Effect effect: getEffects()) {
|
||||
effect.setValue("diedPermanent", zEvent.getTarget());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,8 +208,9 @@ public class Spell implements StackObject, Card {
|
|||
return result;
|
||||
}
|
||||
//20091005 - 608.2b
|
||||
if (!game.isSimulation())
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(getName() + " has been fizzled.");
|
||||
}
|
||||
counter(null, game);
|
||||
return false;
|
||||
} else if (this.getCardType().contains(CardType.ENCHANTMENT) && this.getSubtype().contains("Aura")) {
|
||||
|
|
@ -250,8 +251,9 @@ public class Spell implements StackObject, Card {
|
|||
return result;
|
||||
} else {
|
||||
//20091005 - 608.2b
|
||||
if (!game.isSimulation())
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(getName() + " has been fizzled.");
|
||||
}
|
||||
counter(null, game);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue