[MID] Implemented Jadar, Ghoulcaller of Nephalia

This commit is contained in:
Evan Kranzler 2021-09-02 20:39:10 -04:00
parent 972cbbd4b2
commit 250f425909
4 changed files with 127 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.DecayedAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.permanent.token.ZombieDecayedToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JadarGhoulcallerOfNephalia extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("if you control no creatures with decayed");
static {
filter.add(new AbilityPredicate(DecayedAbility.class));
}
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0);
public JadarGhoulcallerOfNephalia(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// At the beginning of your end step, if you control no creatures with decayed, create a 2/2 black Zombie creature token with decayed.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieDecayedToken()),
TargetController.YOU, condition, false
));
}
private JadarGhoulcallerOfNephalia(final JadarGhoulcallerOfNephalia card) {
super(card);
}
@Override
public JadarGhoulcallerOfNephalia copy() {
return new JadarGhoulcallerOfNephalia(this);
}
}

View file

@ -39,6 +39,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class));
cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class));
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("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));

View file

@ -0,0 +1,37 @@
package mage.abilities.keyword;
import mage.abilities.StaticAbility;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.constants.Duration;
import mage.constants.Zone;
/**
* @author TheElk801
*/
public class DecayedAbility extends StaticAbility {
public DecayedAbility() {
super(Zone.BATTLEFIELD, new CantBlockSourceEffect(Duration.WhileOnBattlefield));
this.addSubAbility(new AttacksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())
)));
}
private DecayedAbility(final DecayedAbility ability) {
super(ability);
}
@Override
public DecayedAbility copy() {
return new DecayedAbility(this);
}
@Override
public String getRule() {
return "decayed";
}
}

View file

@ -0,0 +1,31 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.DecayedAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class ZombieDecayedToken extends TokenImpl {
public ZombieDecayedToken() {
super("Zombie", "2/2 black Zombie creature token with decayed");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.ZOMBIE);
power = new MageInt(2);
toughness = new MageInt(2);
this.addAbility(new DecayedAbility());
}
public ZombieDecayedToken(final ZombieDecayedToken token) {
super(token);
}
@Override
public ZombieDecayedToken copy() {
return new ZombieDecayedToken(this);
}
}