diff --git a/forge-game/src/main/java/forge/game/CardTraitBase.java b/forge-game/src/main/java/forge/game/CardTraitBase.java index 761710e9781..38864c7cfa3 100644 --- a/forge-game/src/main/java/forge/game/CardTraitBase.java +++ b/forge-game/src/main/java/forge/game/CardTraitBase.java @@ -144,11 +144,10 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView, public KeywordInterface getKeyword() { return this.keyword; } - public void setKeyword(final KeywordInterface kw) { this.keyword = kw; } - + /** *

* isSecondary. diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index 88c35aff18d..9afed2cad46 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -478,12 +478,17 @@ public class GameAction { } } - // 400.7a Effects from static abilities that give a permanent spell on the stack an ability - // that allows it to be cast for an alternative cost continue to apply to the permanent that spell becomes. - if (zoneFrom.is(ZoneType.Stack) && toBattlefield && c.getCastSA() != null && !c.getCastSA().isIntrinsic() && c.getCastSA().getKeyword() != null) { - KeywordInterface ki = c.getCastSA().getKeyword(); - ki.setHostCard(copied); - copied.addChangedCardKeywordsInternal(ImmutableList.of(ki), null, false, copied.getTimestamp(), 0, true); + if (zoneFrom.is(ZoneType.Stack) && toBattlefield) { + // 400.7a Effects from static abilities that give a permanent spell on the stack an ability + // that allows it to be cast for an alternative cost continue to apply to the permanent that spell becomes. + if (c.getCastSA() != null && !c.getCastSA().isIntrinsic() && c.getCastSA().getKeyword() != null) { + KeywordInterface ki = c.getCastSA().getKeyword(); + ki.setHostCard(copied); + copied.addChangedCardKeywordsInternal(ImmutableList.of(ki), null, false, copied.getTimestamp(), 0, true); + } + + // 607.2q linked ability can find cards exiled as cost while it was a spell + copied.addExiledCards(c.getExiledCards()); } } @@ -580,12 +585,10 @@ public class GameAction { // 400.7g try adding keyword back into card if it doesn't already have it if (zoneTo.is(ZoneType.Stack) && cause != null && cause.isSpell() && !cause.isIntrinsic() && c.equals(cause.getHostCard())) { - if (cause.getKeyword() != null) { - if (!copied.getKeywords().contains(cause.getKeyword())) { - copied.addChangedCardKeywordsInternal(ImmutableList.of(cause.getKeyword()), null, false, game.getNextTimestamp(), 0, false); - // update Keyword Cache - copied.updateKeywords(); - } + if (cause.getKeyword() != null && !copied.getKeywords().contains(cause.getKeyword())) { + copied.addChangedCardKeywordsInternal(ImmutableList.of(cause.getKeyword()), null, false, game.getNextTimestamp(), 0, false); + // update Keyword Cache + copied.updateKeywords(); } } diff --git a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java index 354ed3b8835..dc80ac97a5c 100644 --- a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java +++ b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java @@ -911,8 +911,8 @@ public abstract class SpellAbilityEffect { if (cause.isReplacementAbility() && exilingSource.isLKI()) { exilingSource = exilingSource.getGame().getCardState(exilingSource); } - // only want this on permanents - if (exilingSource.isImmutable() || exilingSource.isInPlay()) { + // avoid storing this on "inactive" cards + if (exilingSource.isImmutable() || exilingSource.isInPlay() || exilingSource.isInZone(ZoneType.Stack)) { // make sure it gets updated exilingSource.removeExiledCard(movedCard); exilingSource.addExiledCard(movedCard);