mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Fix missing trigger due to ETB with old state
This commit is contained in:
@@ -24,12 +24,16 @@ public class StaticAbilityPanharmonicon {
|
|||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
CardCollectionView cardList = null;
|
CardCollectionView cardList = null;
|
||||||
// currently only used for leave the battlefield trigger
|
// if LTB look back
|
||||||
|
if (t.getMode() == TriggerType.ChangesZone && "Battlefield".equals(t.getParam("Origin"))) {
|
||||||
if (runParams.containsKey(AbilityKey.LastStateBattlefield)) {
|
if (runParams.containsKey(AbilityKey.LastStateBattlefield)) {
|
||||||
cardList = (CardCollectionView) runParams.get(AbilityKey.LastStateBattlefield);
|
cardList = (CardCollectionView) runParams.get(AbilityKey.LastStateBattlefield);
|
||||||
}
|
}
|
||||||
if (cardList == null) {
|
if (cardList == null) {
|
||||||
cardList = t.getMode() == TriggerType.ChangesZone && "Battlefield".equals(t.getParam("Origin")) ? game.getLastStateBattlefield() : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES);
|
cardList = game.getLastStateBattlefield();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cardList = game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks only the battlefield, as those effects only work from there
|
// Checks only the battlefield, as those effects only work from there
|
||||||
|
|||||||
Reference in New Issue
Block a user