forked from External/mage
[LTC] Implement Lord of the Nazgul
This commit is contained in:
parent
a6e23f9704
commit
394bd7552e
3 changed files with 114 additions and 0 deletions
81
Mage.Sets/src/mage/cards/l/LordOfTheNazgul.java
Normal file
81
Mage.Sets/src/mage/cards/l/LordOfTheNazgul.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessAllEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.RingBearerPredicate;
|
||||
import mage.game.permanent.token.WraithToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class LordOfTheNazgul extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterWraith = new FilterControlledCreaturePermanent("Wraiths you control");
|
||||
private static final FilterPermanent filterRingBearer = new FilterPermanent("Ring-bearers");
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filterWraith, ComparisonType.MORE_THAN, 8);
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Number of Wraiths you control", new PermanentsOnBattlefieldCount(filterWraith)
|
||||
);
|
||||
|
||||
static {
|
||||
filterWraith.add(SubType.WRAITH.getPredicate());
|
||||
filterRingBearer.add(RingBearerPredicate.instance);
|
||||
}
|
||||
|
||||
public LordOfTheNazgul(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.WRAITH, SubType.NOBLE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Wraiths you control have protection from Ring-bearers.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
|
||||
new ProtectionAbility(filterRingBearer), Duration.WhileOnBattlefield, filterWraith
|
||||
)));
|
||||
|
||||
// Whenever you cast an instant or sorcery spell, create a 3/3 black Wraith creature token with menace. Then if
|
||||
// you control nine or more Wraiths, Wraiths you control have base power and toughness 9/9 until end of turn.
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new WraithToken()),
|
||||
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false
|
||||
);
|
||||
ability.addEffect(new ConditionalContinuousEffect(
|
||||
new SetBasePowerToughnessAllEffect(9, 9, Duration.EndOfTurn, filterWraith, true),
|
||||
condition, "Then if you control nine or more Wraiths, Wraiths you control have base power and toughness 9/9 until end of turn"
|
||||
));
|
||||
this.addAbility(ability.addHint(hint));
|
||||
}
|
||||
|
||||
private LordOfTheNazgul(final LordOfTheNazgul card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LordOfTheNazgul copy() {
|
||||
return new LordOfTheNazgul(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -151,6 +151,8 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lignify", 252, Rarity.COMMON, mage.cards.l.Lignify.class));
|
||||
cards.add(new SetCardInfo("Living Death", 203, Rarity.RARE, mage.cards.l.LivingDeath.class));
|
||||
cards.add(new SetCardInfo("Lonely Sandbar", 319, Rarity.UNCOMMON, mage.cards.l.LonelySandbar.class));
|
||||
cards.add(new SetCardInfo("Lord of the Nazgul", 60, Rarity.RARE, mage.cards.l.LordOfTheNazgul.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Lord of the Nazgul", 142, Rarity.RARE, mage.cards.l.LordOfTheNazgul.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Lossarnach Captain", 16, Rarity.RARE, mage.cards.l.LossarnachCaptain.class));
|
||||
cards.add(new SetCardInfo("Marshal's Anthem", 172, Rarity.RARE, mage.cards.m.MarshalsAnthem.class));
|
||||
cards.add(new SetCardInfo("Mentor of the Meek", 173, Rarity.RARE, mage.cards.m.MentorOfTheMeek.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class WraithToken extends TokenImpl {
|
||||
|
||||
public WraithToken() {
|
||||
super("Wraith Token", "3/3 black Wraith creature token with menace");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.WRAITH);
|
||||
addAbility(new MenaceAbility());
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(3);
|
||||
}
|
||||
|
||||
public WraithToken(final WraithToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WraithToken copy() {
|
||||
return new WraithToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue