mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[WOE] Implement Elusive Otter (#11061)
This commit is contained in:
parent
8c0f2b9bf8
commit
fa778d352d
3 changed files with 67 additions and 3 deletions
58
Mage.Sets/src/mage/cards/e/ElusiveOtter.java
Normal file
58
Mage.Sets/src/mage/cards/e/ElusiveOtter.java
Normal file
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue