Fix GameStates starting with frozen stack if RE executes (#6213)

* Fix GameStates starting with frozen stack if RE executes

* Fix NPE when facedown
This commit is contained in:
tool4ever
2024-09-29 22:18:35 +02:00
committed by GitHub
parent ea070a85aa
commit a949a988a5
2 changed files with 4 additions and 2 deletions

View File

@@ -627,6 +627,7 @@ public abstract class GameState {
} }
game.getStack().setResolving(false); game.getStack().setResolving(false);
game.getStack().unfreezeStack();
// Advance to a certain phase, activating all triggered abilities // Advance to a certain phase, activating all triggered abilities
if (advPhase != null) { if (advPhase != null) {

View File

@@ -2482,8 +2482,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
sbLong.append(" (").append(inst.getReminderText()).append(")"); sbLong.append(" (").append(inst.getReminderText()).append(")");
} else if (keyword.equals("Gift")) { } else if (keyword.equals("Gift")) {
sbLong.append(keyword); sbLong.append(keyword);
if (inst.getHostCard() != null && inst.getHostCard().getFirstSpellAbility().hasAdditionalAbility("GiftAbility")) { Trigger trig = inst.getTriggers().stream().findFirst().orElse(null);
sbLong.append(" ").append(inst.getHostCard().getFirstSpellAbility().getAdditionalAbility("GiftAbility").getParam("GiftDescription")); if (trig != null && trig.getCardState().getFirstSpellAbility().hasAdditionalAbility("GiftAbility")) {
sbLong.append(" ").append(trig.getCardState().getFirstSpellAbility().getAdditionalAbility("GiftAbility").getParam("GiftDescription"));
} }
sbLong.append("\r\n"); sbLong.append("\r\n");
} else if (keyword.startsWith("Starting intensity")) { } else if (keyword.startsWith("Starting intensity")) {