[FIN] Implement The Emperor of Palamecia / The Lord Master of Hell

This commit is contained in:
theelk801 2025-05-18 20:38:18 -04:00
parent 95146840f2
commit 61b2cfddb5
3 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,72 @@
package mage.cards.t;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.mana.ConditionalColoredManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheEmperorOfPalamecia extends CardImpl {
private final ConditionalManaBuilder manaBuilder
= new ConditionalSpellManaBuilder(StaticFilters.FILTER_SPELLS_NON_CREATURE);
private static final Condition condition = new SourceHasCounterCondition(CounterType.P1P1, 3);
public TheEmperorOfPalamecia(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.NOBLE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.secondSideCardClazz = mage.cards.t.TheLordMasterOfHell.class;
// {T}: Add {U} or {R}. Spend this mana only to cast a noncreature spell.
this.addAbility(new ConditionalColoredManaAbility(new TapSourceCost(), Mana.BlueMana(1), manaBuilder));
this.addAbility(new ConditionalColoredManaAbility(new TapSourceCost(), Mana.RedMana(1), manaBuilder));
// Whenever you cast a noncreature spell, if at least four mana was spent to cast it, put a +1/+1 counter on The Emperor of Palamecia. Then if it has three or more +1/+1 counters on it, transform it.
this.addAbility(new TransformAbility());
Ability ability = new SpellCastControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_NONCREATURE_SPELL_FOUR_MANA_SPENT, false
);
ability.addEffect(new ConditionalOneShotEffect(
new TransformSourceEffect(), condition,
"Then if it has three or more +1/+1 counters on it, transform it"
));
this.addAbility(ability);
}
private TheEmperorOfPalamecia(final TheEmperorOfPalamecia card) {
super(card);
}
@Override
public TheEmperorOfPalamecia copy() {
return new TheEmperorOfPalamecia(this);
}
}

View file

@ -0,0 +1,65 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheLordMasterOfHell extends CardImpl {
private static final FilterCard filter = new FilterCard("noncreature, nonland cards in your graveyard");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter.add(Predicates.not(CardType.LAND.getPredicate()));
}
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter);
private static final Hint hint = new ValueHint("Noncreature, nonland cards in your graveyard", xValue);
public TheLordMasterOfHell(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.DEMON);
this.subtype.add(SubType.NOBLE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.nightCard = true;
this.color.setBlue(true);
this.color.setRed(true);
// Starfall -- Whenever The Lord Master of Hell attacks, it deals X damage to each opponent, where X is the number of noncreature, nonland cards in your graveyard.
this.addAbility(new AttacksTriggeredAbility(new DamagePlayersEffect(
xValue, TargetController.OPPONENT
).setText("it deals X damage to each opponent, where X is " +
"the number of noncreature, nonland cards in your graveyard"))
.withFlavorWord("Starfall").addHint(hint));
}
private TheLordMasterOfHell(final TheLordMasterOfHell card) {
super(card);
}
@Override
public TheLordMasterOfHell copy() {
return new TheLordMasterOfHell(this);
}
}

View file

@ -292,6 +292,10 @@ public final class FinalFantasy extends ExpansionSet {
cards.add(new SetCardInfo("Terra, Magical Adept", 323, Rarity.MYTHIC, mage.cards.t.TerraMagicalAdept.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Terra, Magical Adept", 511, Rarity.MYTHIC, mage.cards.t.TerraMagicalAdept.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Crystal's Chosen", 14, Rarity.UNCOMMON, mage.cards.t.TheCrystalsChosen.class));
cards.add(new SetCardInfo("The Emperor of Palamecia", 219, Rarity.UNCOMMON, mage.cards.t.TheEmperorOfPalamecia.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Emperor of Palamecia", 484, Rarity.UNCOMMON, mage.cards.t.TheEmperorOfPalamecia.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Lord Master of Hell", 219, Rarity.UNCOMMON, mage.cards.t.TheLordMasterOfHell.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Lord Master of Hell", 484, Rarity.UNCOMMON, mage.cards.t.TheLordMasterOfHell.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Prima Vista", 64, Rarity.UNCOMMON, mage.cards.t.ThePrimaVista.class));
cards.add(new SetCardInfo("Tifa Lockhart", 206, Rarity.RARE, mage.cards.t.TifaLockhart.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Tifa Lockhart", 391, Rarity.RARE, mage.cards.t.TifaLockhart.class, NON_FULL_USE_VARIOUS));