[MID] Implemented Arlinn, the Pack's Hope / Arlinn, the Moon's Fury

This commit is contained in:
Evan Kranzler 2021-09-11 18:47:55 -04:00
parent c58a4f2eb2
commit 6200f96d93
3 changed files with 225 additions and 0 deletions

View file

@ -0,0 +1,119 @@
package mage.cards.a;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.mana.BasicManaEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.NightboundAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArlinnTheMoonsFury extends CardImpl {
public ArlinnTheMoonsFury(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ARLINN);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
this.color.setRed(true);
this.color.setGreen(true);
this.transformable = true;
this.nightCard = true;
// Nightbound
this.addAbility(NightboundAbility.getInstance());
// +2: Add {R}{G}.
this.addAbility(new LoyaltyAbility(new BasicManaEffect(new Mana(
0, 0, 0, 1, 1, 0, 0, 0
)), 2));
// 0: Until end of turn, Arlinn, the Moon's Fury becomes a 5/5 Werewolf creature with trample, indestructible, and haste.
this.addAbility(new LoyaltyAbility(new ArlinnTheMoonsFuryEffect(), 0));
}
private ArlinnTheMoonsFury(final ArlinnTheMoonsFury card) {
super(card);
}
@Override
public ArlinnTheMoonsFury copy() {
return new ArlinnTheMoonsFury(this);
}
}
class ArlinnTheMoonsFuryEffect extends ContinuousEffectImpl {
ArlinnTheMoonsFuryEffect() {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, {this} becomes a 5/5 Werewolf creature with trample, indestructible, and haste";
}
private ArlinnTheMoonsFuryEffect(final ArlinnTheMoonsFuryEffect effect) {
super(effect);
}
@Override
public ArlinnTheMoonsFuryEffect copy() {
return new ArlinnTheMoonsFuryEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (permanent == null) {
discard();
return false;
}
switch (layer) {
case TypeChangingEffects_4:
permanent.removeAllCardTypes(game);
permanent.addCardType(game, CardType.CREATURE);
permanent.removeAllCreatureTypes(game);
permanent.addSubType(game, SubType.WEREWOLF);
return true;
case AbilityAddingRemovingEffects_6:
permanent.addAbility(TrampleAbility.getInstance(), source.getSourceId(), game);
permanent.addAbility(IndestructibleAbility.getInstance(), source.getSourceId(), game);
permanent.addAbility(HasteAbility.getInstance(), source.getSourceId(), game);
return true;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(5);
permanent.getToughness().setValue(5);
return true;
}
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean hasLayer(Layer layer) {
switch (layer) {
case TypeChangingEffects_4:
case AbilityAddingRemovingEffects_6:
case PTChangingEffects_7:
return true;
}
return false;
}
}

View file

@ -0,0 +1,104 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
import mage.abilities.keyword.DayboundAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.game.events.EntersTheBattlefieldEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.WolfToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArlinnThePacksHope extends CardImpl {
private static final FilterCard filter = new FilterCreatureCard("creature spells");
public ArlinnThePacksHope(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ARLINN);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
this.transformable = true;
this.secondSideCardClazz = mage.cards.a.ArlinnTheMoonsFury.class;
// Daybound
this.addAbility(DayboundAbility.getInstance());
// +1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.
Ability ability = new LoyaltyAbility(new CastAsThoughItHadFlashAllEffect(
Duration.UntilYourNextTurn, filter
).setText("until your next turn, you may cast creature spells as though they had flash"), 1);
ability.addEffect(new ArlinnThePacksHopeEffect());
this.addAbility(ability);
// 3: Create two 2/2 green Wolf creature tokens.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfToken(), 2), -3));
}
private ArlinnThePacksHope(final ArlinnThePacksHope card) {
super(card);
}
@Override
public ArlinnThePacksHope copy() {
return new ArlinnThePacksHope(this);
}
}
class ArlinnThePacksHopeEffect extends ReplacementEffectImpl {
ArlinnThePacksHopeEffect() {
super(Duration.UntilYourNextTurn, Outcome.BoostCreature);
this.staticText = ", and each creature you control enters the battlefield with an additional +1/+1 counter on it";
}
private ArlinnThePacksHopeEffect(ArlinnThePacksHopeEffect effect) {
super(effect);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
return permanent != null && permanent.isControlledBy(source.getControllerId()) && permanent.isCreature(game);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
if (target != null) {
target.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game, event.getAppliedEffects());
}
return false;
}
@Override
public ArlinnThePacksHopeEffect copy() {
return new ArlinnThePacksHopeEffect(this);
}
}

View file

@ -38,6 +38,8 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Arcane Infusion", 210, Rarity.UNCOMMON, mage.cards.a.ArcaneInfusion.class));
cards.add(new SetCardInfo("Archive Haunt", 68, Rarity.UNCOMMON, mage.cards.a.ArchiveHaunt.class));
cards.add(new SetCardInfo("Ardent Elementalist", 128, Rarity.COMMON, mage.cards.a.ArdentElementalist.class));
cards.add(new SetCardInfo("Arlinn, the Moon's Fury", 211, Rarity.MYTHIC, mage.cards.a.ArlinnTheMoonsFury.class));
cards.add(new SetCardInfo("Arlinn, the Pack's Hope", 211, Rarity.MYTHIC, mage.cards.a.ArlinnThePacksHope.class));
cards.add(new SetCardInfo("Arrogant Outlaw", 84, Rarity.COMMON, mage.cards.a.ArrogantOutlaw.class));
cards.add(new SetCardInfo("Augur of Autumn", 168, Rarity.RARE, mage.cards.a.AugurOfAutumn.class));
cards.add(new SetCardInfo("Awoken Demon", 100, Rarity.COMMON, mage.cards.a.AwokenDemon.class));