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

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