diff --git a/Mage.Sets/src/mage/cards/d/DauntlessBodyguard.java b/Mage.Sets/src/mage/cards/d/DauntlessBodyguard.java index 36cc9ca06d..3be2f7d4c0 100644 --- a/Mage.Sets/src/mage/cards/d/DauntlessBodyguard.java +++ b/Mage.Sets/src/mage/cards/d/DauntlessBodyguard.java @@ -42,9 +42,9 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; @@ -68,7 +68,7 @@ public final class DauntlessBodyguard extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // As Dauntless Bodyguard enters the battlefield, choose another creature you control. + // As Dauntless Bodyguard enters the battlefield, choose another creature you control. this.addAbility(new AsEntersBattlefieldAbility(new DauntlessBodyguardChooseCreatureEffect())); // Sacrifice Dauntless Bodyguard: The chosen creature gains indestructible until end of turn. @@ -147,12 +147,14 @@ class DauntlessBodyguardGainAbilityEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - MageObjectReference mor; Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePermanent == null) { return false; } - mor = (MageObjectReference) game.getState().getValue(sourcePermanent.getId() + "_chosenCreature"); + MageObjectReference mor = (MageObjectReference) game.getState().getValue(sourcePermanent.getId() + "_chosenCreature"); + if (mor == null) { + return false; + } Permanent chosenPermanent = mor.getPermanent(game); if (chosenPermanent != null) { ContinuousEffect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/f/FoodChain.java b/Mage.Sets/src/mage/cards/f/FoodChain.java index 3f4533b506..fe853d6f82 100644 --- a/Mage.Sets/src/mage/cards/f/FoodChain.java +++ b/Mage.Sets/src/mage/cards/f/FoodChain.java @@ -44,7 +44,7 @@ import mage.choices.ChoiceColor; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; @@ -59,7 +59,8 @@ public final class FoodChain extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); // Exile a creature you control: Add X mana of any one color, where X is the exiled creature's converted mana cost plus one. Spend this mana only to cast creature spells. - Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(), new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature you control"), true))); + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(), + new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_A_CREATURE, true))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WillKenrith.java b/Mage.Sets/src/mage/cards/w/WillKenrith.java index 6131ffb0b2..e215a801a3 100644 --- a/Mage.Sets/src/mage/cards/w/WillKenrith.java +++ b/Mage.Sets/src/mage/cards/w/WillKenrith.java @@ -40,13 +40,13 @@ import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect; import mage.abilities.keyword.PartnerWithAbility; -import mage.constants.SubType; -import mage.constants.SuperType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -71,9 +71,7 @@ public final class WillKenrith extends CardImpl { // +2: Until your next turn, up to two target creatures each have base power and toughness 0/3 and lose all abilities. Ability ability = new LoyaltyAbility( new SetPowerToughnessTargetEffect(0, 3, Duration.UntilYourNextTurn) - .setText("until your next turn, up to two target creatures each have base power and toughness 0/3"), - 2 - ); + .setText("until your next turn, up to two target creatures each have base power and toughness 0/3"), 2); ability.addEffect(new LoseAllAbilitiesTargetEffect(Duration.UntilYourNextTurn) .setText("and lose all abilities") ); diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index d8d7e36ce5..13f3ca095d 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -795,6 +795,7 @@ public interface Player extends MageItem, Copyable { * @param withName * @return */ + @Deprecated boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName); /**