diff --git a/Mage.Sets/src/mage/cards/t/ThunderousMight.java b/Mage.Sets/src/mage/cards/t/ThunderousMight.java index 7b78decae4a..31dd1b480ca 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderousMight.java +++ b/Mage.Sets/src/mage/cards/t/ThunderousMight.java @@ -32,7 +32,6 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; @@ -53,10 +52,9 @@ import mage.target.common.TargetCreaturePermanent; public class ThunderousMight extends CardImpl { public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add("Aura"); - // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); @@ -65,8 +63,9 @@ public class ThunderousMight extends CardImpl { this.addAbility(ability); // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. - Effect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn); + BoostEnchantedEffect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn); effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red"); + effect.setLockedIn(true); this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index 41d5d5dda20..ffbaa136f68 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java @@ -47,6 +47,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { private DynamicValue power; private DynamicValue toughness; + private boolean lockedIn = false; public BoostEnchantedEffect(int power, int toughness) { this(power, toughness, Duration.WhileOnBattlefield); @@ -81,6 +82,10 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { @Override public void init(Ability source, Game game) { super.init(source, game); + if (lockedIn) { + power = new StaticValue(power.calculate(game, source, this)); + toughness = new StaticValue(toughness.calculate(game, source, this)); + } if (affectedObjectsSet) { // Added boosts of activated or triggered abilities exist independent from the source they are created by // so a continuous effect for the permanent itself with the attachment is created @@ -113,6 +118,10 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { return true; } + public void setLockedIn(boolean lockedIn) { + this.lockedIn = lockedIn; + } + private void setText() { StringBuilder sb = new StringBuilder(); sb.append("Enchanted creature gets ");