diff --git a/forge-game/src/main/java/forge/game/cost/Cost.java b/forge-game/src/main/java/forge/game/cost/Cost.java index f6ed2f55c67..d696a6b1c3e 100644 --- a/forge-game/src/main/java/forge/game/cost/Cost.java +++ b/forge-game/src/main/java/forge/game/cost/Cost.java @@ -243,7 +243,7 @@ public class Cost implements Serializable { } else { CostPart cp = parseCostPart(part, tapCost, untapCost); if (null != cp ) - if (cp instanceof CostPartMana ) { + if (cp instanceof CostPartMana) { parsedMana = (CostPartMana) cp; } else { this.costParts.add(cp); diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index d83cb74157a..db947d0c9aa 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -47,19 +47,22 @@ public class CostAdjustment { Cost result = cost.copy(); boolean isStateChangeToFaceDown = false; - if (sa.isSpell() && sa.isCastFaceDown()) { - // Turn face down to apply cost modifiers correctly - host.turnFaceDownNoUpdate(); - isStateChangeToFaceDown = true; - } // isSpell - // Commander Tax there - if (sa.isSpell() && host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) { - int n = player.getCommanderCast(host) * 2; - if (n > 0) { - result.add(new Cost(ManaCost.get(n), false)); + if (sa.isSpell()) { + if (sa.isCastFaceDown()) { + // Turn face down to apply cost modifiers correctly + host.turnFaceDownNoUpdate(); + isStateChangeToFaceDown = true; } - } + + // Commander Tax there + if (host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) { + int n = player.getCommanderCast(host) * 2; + if (n > 0) { + result.add(new Cost(ManaCost.get(n), false)); + } + } + } // isSpell CardCollection cardsOnBattlefield = new CardCollection(game.getCardsIn(ZoneType.Battlefield)); cardsOnBattlefield.addAll(game.getCardsIn(ZoneType.Stack)); diff --git a/forge-gui/res/cardsfolder/s/shifting_shadow.txt b/forge-gui/res/cardsfolder/s/shifting_shadow.txt index 822637a534e..c4a0e7b163f 100644 --- a/forge-gui/res/cardsfolder/s/shifting_shadow.txt +++ b/forge-gui/res/cardsfolder/s/shifting_shadow.txt @@ -5,7 +5,7 @@ K:Enchant creature A:SP$ Attach | Cost$ 2 R | ValidTgts$ Creature | AILogic$ Pump | SubAbility$ RememberSelf | SpellDescription$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order." SVar:RememberSelf:DB$ Pump | Defined$ Creature.EnchantedBy | ImprintCards$ Self S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach,DBCleanup -T:Mode$ ChangesZone | Affected$ Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowRememberSelf | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order. SVar:ShadowRememberSelf:DB$ Pump | ImprintCards$ OriginalHost | SubAbility$ ShadowDestroyEnchanted SVar:ShadowDestroyEnchanted:DB$ Destroy | Defined$ Self | SubAbility$ ShadowRevealCards