mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fixed persist/undying triggering even when the dying has been replaced.
This commit is contained in:
@@ -1395,11 +1395,17 @@ public class GameAction {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean persist = (c.hasKeyword("Persist") && (c.getCounters(CounterType.M1M1) == 0)) && !c.isToken();
|
|
||||||
final boolean undying = (c.hasKeyword("Undying") && (c.getCounters(CounterType.P1P1) == 0)) && !c.isToken();
|
|
||||||
|
|
||||||
final Card newCard = this.moveToGraveyard(c);
|
final Card newCard = this.moveToGraveyard(c);
|
||||||
|
|
||||||
|
boolean persist = (c.hasKeyword("Persist") && c.getCounters(CounterType.M1M1) == 0) && !c.isToken();
|
||||||
|
boolean undying = (c.hasKeyword("Undying") && c.getCounters(CounterType.P1P1) == 0) && !c.isToken();
|
||||||
|
|
||||||
|
// don't trigger persist/undying if the dying has been replaced
|
||||||
|
if (newCard == null || !newCard.isInZone(ZoneType.Graveyard)) {
|
||||||
|
persist = false;
|
||||||
|
undying = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Destroy needs to be called with Last Known Information
|
// Destroy needs to be called with Last Known Information
|
||||||
c.executeTrigger(ZCTrigger.DESTROY);
|
c.executeTrigger(ZCTrigger.DESTROY);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user