[WOC] Implement Nettling Nuisance (#11076)

This commit is contained in:
Vivian Greenslade 2023-08-31 21:30:16 -02:30 committed by GitHub
parent f9708c663e
commit 09a9e8e5d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,94 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.token.NettlingNuisancePirateToken;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.abilities.Ability;
import mage.abilities.common.DealCombatDamageControlledTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.combat.GoadTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
/**
*
* @author Xanderhall
*/
public final class NettlingNuisance extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.FAERIE, "Faeries");
public NettlingNuisance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever one or more Faeries you control deal combat damage to a player, that player creates a 4/2 red Pirate creature token with "This creature can't block." The token is goaded for the rest of the game.
this.addAbility(new DealCombatDamageControlledTriggeredAbility(Zone.BATTLEFIELD, new NettlingNuisanceEffect(), filter, SetTargetPointer.PLAYER, false));
}
private NettlingNuisance(final NettlingNuisance card) {
super(card);
}
@Override
public NettlingNuisance copy() {
return new NettlingNuisance(this);
}
}
class NettlingNuisanceEffect extends OneShotEffect {
NettlingNuisanceEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "that player creates a 4/2 red Pirate creature token with \"This creature can't block.\" The token is goaded for the rest of the game. "
+ "<i>(It attacks each combat if able and attacks a player other than you if able.)</i>";
}
private NettlingNuisanceEffect(final NettlingNuisanceEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
if (player == null) {
return false;
}
Token token = new NettlingNuisancePirateToken();
token.putOntoBattlefield(1, game, source);
token.getLastAddedTokenIds().forEach(id -> game.addEffect(
new GoadTargetEffect().setDuration(Duration.EndOfGame).setTargetPointer(new FixedTarget(id, game)),
source
));
return true;
}
@Override
public NettlingNuisanceEffect copy() {
return new NettlingNuisanceEffect(this);
}
}

View file

@ -89,6 +89,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet {
cards.add(new SetCardInfo("Midnight Clock", 99, Rarity.RARE, mage.cards.m.MidnightClock.class));
cards.add(new SetCardInfo("Mind Stone", 148, Rarity.COMMON, mage.cards.m.MindStone.class));
cards.add(new SetCardInfo("Myriad Landscape", 164, Rarity.UNCOMMON, mage.cards.m.MyriadLandscape.class));
cards.add(new SetCardInfo("Nettling Nuisance", 15, Rarity.RARE, mage.cards.n.NettlingNuisance.class));
cards.add(new SetCardInfo("Nightmare Unmaking", 114, Rarity.RARE, mage.cards.n.NightmareUnmaking.class));
cards.add(new SetCardInfo("Nightveil Sprite", 100, Rarity.UNCOMMON, mage.cards.n.NightveilSprite.class));
cards.add(new SetCardInfo("Nymris, Oona's Trickster", 141, Rarity.RARE, mage.cards.n.NymrisOonasTrickster.class));

View file

@ -0,0 +1,33 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
/**
* @author Xanderhall
*/
public final class NettlingNuisancePirateToken extends TokenImpl {
public NettlingNuisancePirateToken() {
super("Pirate Token", "4/2 red Pirate creature token with \"This creature can't block.\"");
cardType.add(CardType.CREATURE);
subtype.add(SubType.PIRATE);
color.setRed(true);
power = new MageInt(4);
toughness = new MageInt(2);
this.addAbility(new SimpleStaticAbility(new CantBlockSourceEffect(Duration.EndOfGame)));
}
protected NettlingNuisancePirateToken(final NettlingNuisancePirateToken token) {
super(token);
}
public NettlingNuisancePirateToken copy() {
return new NettlingNuisancePirateToken(this);
}
}