diff --git a/Mage.Sets/src/mage/cards/e/ElusiveOtter.java b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java new file mode 100644 index 00000000000..0449e668a37 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java @@ -0,0 +1,58 @@ +package mage.cards.e; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesWithLessPowerEffect; +import mage.abilities.effects.common.counter.DistributeCountersEffect; +import mage.abilities.keyword.ProwessAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanentAmount; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class ElusiveOtter extends AdventureCard { + + public ElusiveOtter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{U}", "Grove's Bounty", "{X}{G}"); + + this.subtype.add(SubType.OTTER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Prowess + this.addAbility(new ProwessAbility()); + + // Creatures with power less than Elusive Otter's power can't block it. + this.addAbility(new SimpleStaticAbility(new CantBeBlockedByCreaturesWithLessPowerEffect())); + + // Grove's Bounty + // Distribute X +1/+1 counters among any number of target creatures you control. + this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect( + CounterType.P1P1, ManacostVariableValue.REGULAR, false, + "any number of target creatures you control" + )); + Target target = new TargetCreaturePermanentAmount(ManacostVariableValue.REGULAR, StaticFilters.FILTER_CONTROLLED_CREATURES); + target.setMinNumberOfTargets(0); + target.setMaxNumberOfTargets(Integer.MAX_VALUE); + this.getSpellCard().getSpellAbility().addTarget(target); + } + + private ElusiveOtter(final ElusiveOtter card) { + super(card); + } + + @Override + public ElusiveOtter copy() { + return new ElusiveOtter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 7897edf9087..bb251eb7127 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -77,6 +77,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Edgewall Pack", 126, Rarity.COMMON, mage.cards.e.EdgewallPack.class)); cards.add(new SetCardInfo("Eerie Interference", 12, Rarity.UNCOMMON, mage.cards.e.EerieInterference.class)); cards.add(new SetCardInfo("Ego Drain", 86, Rarity.UNCOMMON, mage.cards.e.EgoDrain.class)); + cards.add(new SetCardInfo("Elusive Otter", 225, Rarity.RARE, mage.cards.e.ElusiveOtter.class)); cards.add(new SetCardInfo("Elvish Archivist", 168, Rarity.RARE, mage.cards.e.ElvishArchivist.class)); cards.add(new SetCardInfo("Embereth Veteran", 127, Rarity.UNCOMMON, mage.cards.e.EmberethVeteran.class)); cards.add(new SetCardInfo("Eriette of the Charmed Apple", 202, Rarity.MYTHIC, mage.cards.e.ErietteOfTheCharmedApple.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java index adee1da92d2..adeaf5e7f2f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java @@ -5,13 +5,14 @@ import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.Mode; import mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; -import mage.util.CardUtil; import java.util.UUID; @@ -21,7 +22,7 @@ import java.util.UUID; public class DistributeCountersEffect extends OneShotEffect { private final CounterType counterType; - private final int amount; + private final DynamicValue amount; private final boolean removeAtEndOfTurn; private final String targetDescription; @@ -30,6 +31,10 @@ public class DistributeCountersEffect extends OneShotEffect { } public DistributeCountersEffect(CounterType counterType, int amount, boolean removeAtEndOfTurn, String targetDescription) { + this(counterType, StaticValue.get(amount), removeAtEndOfTurn, targetDescription); + } + + public DistributeCountersEffect(CounterType counterType, DynamicValue amount, boolean removeAtEndOfTurn, String targetDescription) { super(Outcome.BoostCreature); this.counterType = counterType; this.amount = amount; @@ -80,7 +85,7 @@ public class DistributeCountersEffect extends OneShotEffect { } String name = counterType.getName(); - String text = "distribute " + CardUtil.numberToText(amount) + ' ' + name + " counters among " + targetDescription; + String text = "distribute " + amount + ' ' + name + " counters among " + targetDescription; if (removeAtEndOfTurn) { text += " For each " + name + " counter you put on a creature this way, remove a " + name + " counter from that creature at the beginning of the next cleanup step.";