From 145415cadfc7ba0a0fa420266b86c0682055a028 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 3 Aug 2017 10:37:32 -0400 Subject: [PATCH] Fix bug #3775 and other cards with the same issue --- Mage.Sets/src/mage/cards/a/AcceleratedMutation.java | 4 ++-- Mage.Sets/src/mage/cards/a/AkroanHoplite.java | 5 +++-- Mage.Sets/src/mage/cards/a/AuriokBladewarden.java | 4 ++-- Mage.Sets/src/mage/cards/b/Berserk.java | 2 +- Mage.Sets/src/mage/cards/c/CustodyBattle.java | 2 +- Mage.Sets/src/mage/cards/d/DownhillCharge.java | 2 +- Mage.Sets/src/mage/cards/f/FeedingFrenzy.java | 2 +- Mage.Sets/src/mage/cards/g/GeneralTazri.java | 6 ++++-- Mage.Sets/src/mage/cards/g/GhoulsFeast.java | 4 ++-- Mage.Sets/src/mage/cards/g/GreatDefender.java | 2 +- Mage.Sets/src/mage/cards/h/HeartlashCinder.java | 10 +++++----- Mage.Sets/src/mage/cards/h/HellkiteIgniter.java | 11 ++++++----- Mage.Sets/src/mage/cards/j/JunkyoBell.java | 4 ++-- Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java | 2 +- Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java | 4 ++-- Mage.Sets/src/mage/cards/m/MagmaSliver.java | 2 +- Mage.Sets/src/mage/cards/o/OboroEnvoy.java | 4 ++-- Mage.Sets/src/mage/cards/r/RabbleRouser.java | 4 ++-- Mage.Sets/src/mage/cards/r/Rubblehulk.java | 6 +++--- Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java | 4 ++-- Mage.Sets/src/mage/cards/t/TearsOfRage.java | 8 +++++--- Mage.Sets/src/mage/cards/v/VileDeacon.java | 4 ++-- Mage.Sets/src/mage/cards/v/ViridianLorebearers.java | 8 +++++--- Mage.Sets/src/mage/cards/w/WildBeastmaster.java | 3 ++- 24 files changed, 58 insertions(+), 49 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AcceleratedMutation.java b/Mage.Sets/src/mage/cards/a/AcceleratedMutation.java index 0e7a5e097a..e5aa16f128 100644 --- a/Mage.Sets/src/mage/cards/a/AcceleratedMutation.java +++ b/Mage.Sets/src/mage/cards/a/AcceleratedMutation.java @@ -44,11 +44,11 @@ import mage.target.common.TargetCreaturePermanent; public class AcceleratedMutation extends CardImpl { public AcceleratedMutation(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{G}"); // Target creature gets +X/+X until end of turn, where X is the highest converted mana cost among permanents you control. DynamicValue amount = new HighestConvertedManaCostValue(); - this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/a/AkroanHoplite.java b/Mage.Sets/src/mage/cards/a/AkroanHoplite.java index 3df2d2beed..f89061cff5 100644 --- a/Mage.Sets/src/mage/cards/a/AkroanHoplite.java +++ b/Mage.Sets/src/mage/cards/a/AkroanHoplite.java @@ -50,13 +50,14 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class AkroanHoplite extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creatures you control"); + static { filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new AttackingPredicate()); } public AkroanHoplite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); @@ -64,7 +65,7 @@ public class AkroanHoplite extends CardImpl { this.toughness = new MageInt(2); // Whenever Akroan Hoplite attacks, it gets +X/+0 until end of turn, where X is the number of attacking creatures you control. - this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true), false)); } public AkroanHoplite(final AkroanHoplite card) { diff --git a/Mage.Sets/src/mage/cards/a/AuriokBladewarden.java b/Mage.Sets/src/mage/cards/a/AuriokBladewarden.java index fba7e4b0b4..96e2c019b6 100644 --- a/Mage.Sets/src/mage/cards/a/AuriokBladewarden.java +++ b/Mage.Sets/src/mage/cards/a/AuriokBladewarden.java @@ -49,7 +49,7 @@ import mage.target.common.TargetCreaturePermanent; public class AuriokBladewarden extends CardImpl { public AuriokBladewarden(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); @@ -57,7 +57,7 @@ public class AuriokBladewarden extends CardImpl { this.toughness = new MageInt(1); // {tap}: Target creature gets +X/+X until end of turn, where X is Auriok Bladewarden's power. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new SourcePermanentPowerCount(), new SourcePermanentPowerCount(), Duration.EndOfTurn, true), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/Berserk.java b/Mage.Sets/src/mage/cards/b/Berserk.java index 6940c476d3..f4f5de11c8 100644 --- a/Mage.Sets/src/mage/cards/b/Berserk.java +++ b/Mage.Sets/src/mage/cards/b/Berserk.java @@ -69,7 +69,7 @@ public class Berserk extends CardImpl { Effect effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); effect.setText("Target creature gains trample"); this.getSpellAbility().addEffect(effect); - effect = new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn); + effect = new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true); effect.setText("and gets +X/+0 until end of turn, where X is its power"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new BerserkDestroyEffect()); diff --git a/Mage.Sets/src/mage/cards/c/CustodyBattle.java b/Mage.Sets/src/mage/cards/c/CustodyBattle.java index 2f0411d0da..3e18d3775d 100644 --- a/Mage.Sets/src/mage/cards/c/CustodyBattle.java +++ b/Mage.Sets/src/mage/cards/c/CustodyBattle.java @@ -145,7 +145,7 @@ class CustodyBattleUnlessPaysEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (controller != null && sourcePermanent != null) { String message = "sacrifice a land?"; message = CardUtil.replaceSourceName(message, sourcePermanent.getLogName()); diff --git a/Mage.Sets/src/mage/cards/d/DownhillCharge.java b/Mage.Sets/src/mage/cards/d/DownhillCharge.java index 9b2de4e43e..e323e80bd2 100644 --- a/Mage.Sets/src/mage/cards/d/DownhillCharge.java +++ b/Mage.Sets/src/mage/cards/d/DownhillCharge.java @@ -62,7 +62,7 @@ public class DownhillCharge extends CardImpl { // You may sacrifice a Mountain rather than pay Downhill Charge's mana cost. this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)))); // Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control. - Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/f/FeedingFrenzy.java b/Mage.Sets/src/mage/cards/f/FeedingFrenzy.java index c268904a47..e873d14c81 100644 --- a/Mage.Sets/src/mage/cards/f/FeedingFrenzy.java +++ b/Mage.Sets/src/mage/cards/f/FeedingFrenzy.java @@ -58,7 +58,7 @@ public class FeedingFrenzy extends CardImpl { // Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield. DynamicValue x = new PermanentsOnBattlefieldCount(filter, -1); - Effect effect = new BoostTargetEffect(x, x, Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(x, x, Duration.EndOfTurn, true); effect.setText("Target creature gets -X/-X until end of turn, where X is the number of Zombies on the battlefield"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/g/GeneralTazri.java b/Mage.Sets/src/mage/cards/g/GeneralTazri.java index ae28c53cb9..5b97b82439 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralTazri.java +++ b/Mage.Sets/src/mage/cards/g/GeneralTazri.java @@ -61,7 +61,7 @@ public class GeneralTazri extends CardImpl { } public GeneralTazri(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Human"); this.subtype.add("Ally"); @@ -73,9 +73,11 @@ public class GeneralTazri extends CardImpl { new TargetCardInLibrary(filter), true, true), true)); // {W}{U}{B}{R}{G}: Ally creatures you control get +X/+X until end of turn, where X is the number of colors among those creatures. DynamicValue xValue = new GeneralTazriColorCount(); + BoostControlledEffect effect = new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(SubType.ALLY, "Ally creatures"), false); + effect.setLockedIn(true); this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, - new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(SubType.ALLY, "Ally creatures"), false), + effect, new ManaCostsImpl("{W}{U}{B}{R}{G}"))); } diff --git a/Mage.Sets/src/mage/cards/g/GhoulsFeast.java b/Mage.Sets/src/mage/cards/g/GhoulsFeast.java index 2253bf758d..bb6e64fd28 100644 --- a/Mage.Sets/src/mage/cards/g/GhoulsFeast.java +++ b/Mage.Sets/src/mage/cards/g/GhoulsFeast.java @@ -46,11 +46,11 @@ import mage.target.common.TargetCreaturePermanent; public class GhoulsFeast extends CardImpl { public GhoulsFeast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // Target creature gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature card")); - this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/g/GreatDefender.java b/Mage.Sets/src/mage/cards/g/GreatDefender.java index 9a0b10eaef..d7c8a83240 100644 --- a/Mage.Sets/src/mage/cards/g/GreatDefender.java +++ b/Mage.Sets/src/mage/cards/g/GreatDefender.java @@ -48,7 +48,7 @@ public class GreatDefender extends CardImpl { // Target creature gets +0/+X until end of turn, where X is its converted mana cost. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)); } public GreatDefender(final GreatDefender card) { diff --git a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java index 2a1e55b5af..9d1c891f1e 100644 --- a/Mage.Sets/src/mage/cards/h/HeartlashCinder.java +++ b/Mage.Sets/src/mage/cards/h/HeartlashCinder.java @@ -49,12 +49,12 @@ import mage.game.Game; /** * * @author jeffwadsworth - + * */ public class HeartlashCinder extends CardImpl { public HeartlashCinder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add("Elemental"); this.subtype.add("Warrior"); @@ -63,12 +63,12 @@ public class HeartlashCinder extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - + // Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control. - ContinuousEffect effect = new BoostSourceEffect(new ChromaHeartlashCinderCount(), new StaticValue(0), Duration.EndOfTurn); + ContinuousEffect effect = new BoostSourceEffect(new ChromaHeartlashCinderCount(), new StaticValue(0), Duration.EndOfTurn, true); effect.setText("Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control."); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false, true)); - + } public HeartlashCinder(final HeartlashCinder card) { diff --git a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java index 52315c8ca7..8850d97a1d 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteIgniter.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.h; import java.util.UUID; @@ -53,12 +52,13 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class HellkiteIgniter extends CardImpl { private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact you control"); + static { filter.add(new ControllerPredicate(TargetController.YOU)); } - public HellkiteIgniter (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); + public HellkiteIgniter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); this.subtype.add("Dragon"); this.power = new MageInt(5); @@ -72,11 +72,12 @@ public class HellkiteIgniter extends CardImpl { new BoostSourceEffect( new PermanentsOnBattlefieldCount(filter), new StaticValue(0), - Duration.EndOfTurn), + Duration.EndOfTurn, + true), new ManaCostsImpl("{1}{R}"))); } - public HellkiteIgniter (final HellkiteIgniter card) { + public HellkiteIgniter(final HellkiteIgniter card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/j/JunkyoBell.java b/Mage.Sets/src/mage/cards/j/JunkyoBell.java index 93b3648b11..acb490930e 100644 --- a/Mage.Sets/src/mage/cards/j/JunkyoBell.java +++ b/Mage.Sets/src/mage/cards/j/JunkyoBell.java @@ -54,12 +54,12 @@ import mage.target.targetpointer.FixedTarget; public class JunkyoBell extends CardImpl { public JunkyoBell(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // At the beginning of your upkeep, you may have target creature you control get +X/+X until end of turn, // where X is the number of creatures you control. If you do, sacrifice that creature at the beginning of the next end step. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); - Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn), TargetController.YOU, true); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true), TargetController.YOU, true); ability.addTarget(new TargetControlledCreaturePermanent()); ability.addEffect(new JunkyoBellSacrificeEffect()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java index ab3ce933b3..8295e2c6a2 100644 --- a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java +++ b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java @@ -71,7 +71,7 @@ public class KagemaroFirstToSuffer extends CardImpl { Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new BoostAllEffect(xMinusValue, xMinusValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false, - "All creatures get -X/-X until end of turn, where X is the number of cards in your hand"), + "All creatures get -X/-X until end of turn, where X is the number of cards in your hand", true), new ManaCostsImpl("{B}") ); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java b/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java index 0411df864a..f252e4953b 100644 --- a/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java +++ b/Mage.Sets/src/mage/cards/l/LysAlanaScarblade.java @@ -63,7 +63,7 @@ public class LysAlanaScarblade extends CardImpl { } public LysAlanaScarblade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add("Elf"); this.subtype.add("Assassin"); this.power = new MageInt(1); @@ -71,7 +71,7 @@ public class LysAlanaScarblade extends CardImpl { // {tap}, Discard an Elf card: Target creature gets -X/-X until end of turn, where X is the number of Elves you control. SignInversionDynamicValue count = new SignInversionDynamicValue(new PermanentsOnBattlefieldCount(filter1)); - Effect effect = new BoostTargetEffect(count, count, Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(count, count, Duration.EndOfTurn, true); effect.setText("target creature gets -X/-X until end of turn, where X is the number of Elves you control"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); ability.addCost(new DiscardCardCost(filter2)); diff --git a/Mage.Sets/src/mage/cards/m/MagmaSliver.java b/Mage.Sets/src/mage/cards/m/MagmaSliver.java index 655db5d5c6..21d2b0cf56 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaSliver.java +++ b/Mage.Sets/src/mage/cards/m/MagmaSliver.java @@ -62,7 +62,7 @@ public class MagmaSliver extends CardImpl { this.toughness = new MageInt(3); // All Slivers have "{tap}: Target Sliver creature gets +X/+0 until end of turn, where X is the number of Slivers on the battlefield." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), new StaticValue(0), Duration.EndOfTurn), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), new StaticValue(0), Duration.EndOfTurn, true), new TapSourceCost()); Target target = new TargetCreaturePermanent(new FilterCreaturePermanent(SubType.SLIVER, "Sliver creature")); ability.addTarget(target); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); diff --git a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java index 429870c2ec..b67493d0ae 100644 --- a/Mage.Sets/src/mage/cards/o/OboroEnvoy.java +++ b/Mage.Sets/src/mage/cards/o/OboroEnvoy.java @@ -55,7 +55,7 @@ import mage.target.common.TargetCreaturePermanent; public class OboroEnvoy extends CardImpl { public OboroEnvoy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add("Moonfolk"); this.subtype.add("Wizard"); this.power = new MageInt(1); @@ -64,7 +64,7 @@ public class OboroEnvoy extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // {2}, Return a land you control to its owner's hand: Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand. - Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(-0), Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(new SignInversionDynamicValue(new CardsInControllerHandCount()), new StaticValue(-0), Duration.EndOfTurn, true); effect.setText("Target creature gets -X/-0 until end of turn, where X is the number of cards in your hand"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); diff --git a/Mage.Sets/src/mage/cards/r/RabbleRouser.java b/Mage.Sets/src/mage/cards/r/RabbleRouser.java index 81f75c9be3..8efaddbc87 100644 --- a/Mage.Sets/src/mage/cards/r/RabbleRouser.java +++ b/Mage.Sets/src/mage/cards/r/RabbleRouser.java @@ -52,7 +52,7 @@ import mage.filter.common.FilterAttackingCreature; public class RabbleRouser extends CardImpl { public RabbleRouser(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add("Goblin"); this.subtype.add("Shaman"); @@ -66,7 +66,7 @@ public class RabbleRouser extends CardImpl { DynamicValue amount = new SourcePermanentPowerCount(); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(amount, new StaticValue(0), Duration.EndOfTurn, new FilterAttackingCreature(), false, - "Attacking creatures get +X/+0 until end of turn, where X is {this}'s power"), + "Attacking creatures get +X/+0 until end of turn, where X is {this}'s power", true), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/Rubblehulk.java b/Mage.Sets/src/mage/cards/r/Rubblehulk.java index 6700a99918..4db81fba0d 100644 --- a/Mage.Sets/src/mage/cards/r/Rubblehulk.java +++ b/Mage.Sets/src/mage/cards/r/Rubblehulk.java @@ -52,19 +52,19 @@ public class Rubblehulk extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control"); public Rubblehulk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{G}"); this.subtype.add("Elemental"); this.power = new MageInt(0); this.toughness = new MageInt(0); DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filter); - + // Rubblehulk's power and toughness are each equal to the number of lands you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(controlledLands, Duration.EndOfGame))); // Bloodrush - 1{R}{G}, Discard Rubblehulk: Target attacking creature gets +X/+X until end of turn, where X is the number of lands you control. - this.addAbility(new BloodrushAbility("{1}{R}{G}", new BoostTargetEffect(controlledLands,controlledLands, Duration.EndOfTurn))); + this.addAbility(new BloodrushAbility("{1}{R}{G}", new BoostTargetEffect(controlledLands, controlledLands, Duration.EndOfTurn, true))); } public Rubblehulk(final Rubblehulk card) { diff --git a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java index ef792bbfae..2e21c6236e 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanSpellblade.java @@ -49,7 +49,7 @@ import mage.constants.Zone; public class SokenzanSpellblade extends CardImpl { public SokenzanSpellblade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); this.subtype.add("Ogre"); this.subtype.add("Samurai"); this.subtype.add("Shaman"); @@ -60,7 +60,7 @@ public class SokenzanSpellblade extends CardImpl { // Bushido 1 this.addAbility(new BushidoAbility(1)); // {1}{R}: Sokenzan Spellblade gets +X/+0 until end of turn, where X is the number of cards in your hand. - Effect effect = new BoostSourceEffect(new CardsInControllerHandCount(), new StaticValue(0), Duration.EndOfTurn); + Effect effect = new BoostSourceEffect(new CardsInControllerHandCount(), new StaticValue(0), Duration.EndOfTurn, true); effect.setText("{this} gets +X/+0 until end of turn, where X is the number of cards in your hand"); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{R}") diff --git a/Mage.Sets/src/mage/cards/t/TearsOfRage.java b/Mage.Sets/src/mage/cards/t/TearsOfRage.java index b89d4c3cab..abc5f15e0d 100644 --- a/Mage.Sets/src/mage/cards/t/TearsOfRage.java +++ b/Mage.Sets/src/mage/cards/t/TearsOfRage.java @@ -55,14 +55,16 @@ import mage.target.targetpointer.FixedTargets; public class TearsOfRage extends CardImpl { public TearsOfRage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{R}"); // Cast Tears of Rage only during the declare attackers step. this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_ATTACKERS)); // Attacking creatures you control get +X/+0 until end of turn, where X is the number of attacking creatures. Sacrifice those creatures at the beginning of the next end step. - getSpellAbility().addEffect(new BoostControlledEffect(new AttackingCreatureCount("the number of attacking creatures"), new StaticValue(0), - Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false)); + BoostControlledEffect effect = new BoostControlledEffect(new AttackingCreatureCount("the number of attacking creatures"), new StaticValue(0), + Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false); + effect.setLockedIn(true); + getSpellAbility().addEffect(effect); getSpellAbility().addEffect(new TearsOfRageEffect()); } diff --git a/Mage.Sets/src/mage/cards/v/VileDeacon.java b/Mage.Sets/src/mage/cards/v/VileDeacon.java index 5d6a65e2fd..2af177f601 100644 --- a/Mage.Sets/src/mage/cards/v/VileDeacon.java +++ b/Mage.Sets/src/mage/cards/v/VileDeacon.java @@ -54,7 +54,7 @@ public class VileDeacon extends CardImpl { } public VileDeacon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add("Human"); this.subtype.add("Cleric"); this.power = new MageInt(2); @@ -62,7 +62,7 @@ public class VileDeacon extends CardImpl { // Whenever Vile Deacon attacks, it gets +X/+X until end of turn, where X is the number of Clerics on the battlefield. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter); - Effect effect = new BoostSourceEffect(amount, amount, Duration.EndOfTurn); + Effect effect = new BoostSourceEffect(amount, amount, Duration.EndOfTurn, true); effect.setText("it gets +X/+X until end of turn, where X is the number of Clerics on the battlefield"); this.addAbility(new AttacksTriggeredAbility(effect, false)); } diff --git a/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java b/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java index 6ed37968a2..76ed22f7b7 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java +++ b/Mage.Sets/src/mage/cards/v/ViridianLorebearers.java @@ -53,11 +53,13 @@ import mage.target.common.TargetCreaturePermanent; public class ViridianLorebearers extends CardImpl { private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifacts your opponents control"); - static{ + + static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); } + public ViridianLorebearers(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add("Elf"); this.subtype.add("Shaman"); @@ -65,7 +67,7 @@ public class ViridianLorebearers extends CardImpl { this.toughness = new MageInt(3); // {3}{G}, {tap}: Target creature gets +X/+X until end of turn, where X is the number of artifacts your opponents control. - Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+X until end of turn, where X is the number of artifacts your opponents control"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{G}")); ability.addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/w/WildBeastmaster.java b/Mage.Sets/src/mage/cards/w/WildBeastmaster.java index 0a1f925708..fbd440079a 100644 --- a/Mage.Sets/src/mage/cards/w/WildBeastmaster.java +++ b/Mage.Sets/src/mage/cards/w/WildBeastmaster.java @@ -57,8 +57,9 @@ public class WildBeastmaster extends CardImpl { // Whenever Wild Beastmaster attacks, each other creature you control gets +X/+X until end of turn, where X is Wild Beastmaster's power. SourcePermanentPowerCount creaturePower = new SourcePermanentPowerCount(); - Effect effect = new BoostControlledEffect(creaturePower, creaturePower, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, true); + BoostControlledEffect effect = new BoostControlledEffect(creaturePower, creaturePower, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, true); effect.setText(EFFECT_TEXT); + effect.setLockedIn(true); this.addAbility(new AttacksTriggeredAbility(effect, false)); }