[MID] Implemented Kessig Naturalist / Lord of the Ulvenwald

This commit is contained in:
Evan Kranzler 2021-09-04 09:44:25 -04:00
parent a1fc51c4a7
commit bc96527081
5 changed files with 188 additions and 1 deletions

View file

@ -0,0 +1,83 @@
package mage.cards.k;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.DayboundAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KessigNaturalist extends CardImpl {
public KessigNaturalist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.l.LordOfTheUlvenwald.class;
// Whenever Kessig Naturalist attacks, add {R} or {G}. Until end of turn, you don't lose this mana as steps and phases end.
this.addAbility(new AttacksTriggeredAbility(new KessigNaturalistEffect()));
// Daybound
this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance());
}
private KessigNaturalist(final KessigNaturalist card) {
super(card);
}
@Override
public KessigNaturalist copy() {
return new KessigNaturalist(this);
}
}
class KessigNaturalistEffect extends OneShotEffect {
KessigNaturalistEffect() {
super(Outcome.Benefit);
staticText = "add {R} or {G}. Until end of turn, you don't lose this mana as steps and phases end";
}
private KessigNaturalistEffect(final KessigNaturalistEffect effect) {
super(effect);
}
@Override
public KessigNaturalistEffect copy() {
return new KessigNaturalistEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Mana mana = player.chooseUse(
Outcome.Neutral, "Choose red or green", null,
"Red", "Green", source, game
) ? Mana.RedMana(1) : Mana.GreenMana(1);
player.getManaPool().addMana(mana, game, source, true);
return true;
}
}

View file

@ -0,0 +1,101 @@
package mage.cards.l;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.keyword.NightboundAbility;
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.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LordOfTheUlvenwald extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wolves and Werewolves");
static {
filter.add(Predicates.or(
SubType.WOLF.getPredicate(),
SubType.WEREWOLF.getPredicate()
));
}
public LordOfTheUlvenwald(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setRed(true);
this.color.setGreen(true);
this.nightCard = true;
this.transformable = true;
// Other Wolves and Werewolves you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
)));
// Whenever Lord of the Ulvenwald attacks, add {R} or {G}. Until end of turn, you don't lose this mana as steps and phases end.
this.addAbility(new AttacksTriggeredAbility(new LordOfTheUlvenwaldEffect()));
// Nightbound
this.addAbility(NightboundAbility.getInstance());
}
private LordOfTheUlvenwald(final LordOfTheUlvenwald card) {
super(card);
}
@Override
public LordOfTheUlvenwald copy() {
return new LordOfTheUlvenwald(this);
}
}
class LordOfTheUlvenwaldEffect extends OneShotEffect {
LordOfTheUlvenwaldEffect() {
super(Outcome.Benefit);
staticText = "add {R} or {G}. Until end of turn, you don't lose this mana as steps and phases end";
}
private LordOfTheUlvenwaldEffect(final LordOfTheUlvenwaldEffect effect) {
super(effect);
}
@Override
public LordOfTheUlvenwaldEffect copy() {
return new LordOfTheUlvenwaldEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Mana mana = player.chooseUse(
Outcome.Neutral, "Choose red or green", null,
"Red", "Green", source, game
) ? Mana.RedMana(1) : Mana.GreenMana(1);
player.getManaPool().addMana(mana, game, source, true);
return true;
}
}

View file

@ -22,6 +22,7 @@ public final class TavernSmasher extends CardImpl {
this.color.setRed(true);
this.nightCard = true;
this.transformable = true;
this.power = new MageInt(6);
this.toughness = new MageInt(5);

View file

@ -38,6 +38,7 @@ public final class VillageReavers extends CardImpl {
this.color.setRed(true);
this.nightCard = true;
this.transformable = true;
this.power = new MageInt(5);
this.toughness = new MageInt(4);

View file

@ -54,7 +54,8 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Jadar, Ghoulcaller of Nephalia", 108, Rarity.RARE, mage.cards.j.JadarGhoulcallerOfNephalia.class));
cards.add(new SetCardInfo("Join the Dance", 229, Rarity.UNCOMMON, mage.cards.j.JoinTheDance.class));
cards.add(new SetCardInfo("Lunar Frenzy", 147, Rarity.UNCOMMON, mage.cards.l.LunarFrenzy.class));
cards.add(new SetCardInfo("Kessig Naturalist", 231, Rarity.UNCOMMON, mage.cards.k.KessigNaturalist.class));
cards.add(new SetCardInfo("Lord of the Ulvenwald", 231, Rarity.UNCOMMON, mage.cards.l.LordOfTheUlvenwald.class));
cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Overgrown Farmland", 265, Rarity.RARE, mage.cards.o.OvergrownFarmland.class));
cards.add(new SetCardInfo("Pestilent Wolf", 192, Rarity.COMMON, mage.cards.p.PestilentWolf.class));