mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemented Elspeth, Sun's Nemesis
This commit is contained in:
parent
23324f2169
commit
3965061234
3 changed files with 120 additions and 0 deletions
56
Mage.Sets/src/mage/cards/e/ElspethSunsNemesis.java
Normal file
56
Mage.Sets/src/mage/cards/e/ElspethSunsNemesis.java
Normal file
|
@ -0,0 +1,56 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.keyword.EscapeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.permanent.token.HumanSoldierToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ElspethSunsNemesis extends CardImpl {
|
||||
|
||||
public ElspethSunsNemesis(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELSPETH);
|
||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
|
||||
|
||||
// −1: Up to two target creatures you control each get +2/+1 until end of turn.
|
||||
Ability ability = new LoyaltyAbility(new BoostTargetEffect(2, 1)
|
||||
.setText("up to two target creatures you control each get +2/+1 until end of turn"), -1);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(0, 2));
|
||||
this.addAbility(ability);
|
||||
|
||||
// −2: Create two 1/1 white Human Soldier creature tokens.
|
||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new HumanSoldierToken()), -2));
|
||||
|
||||
// −3: You gain 5 life.
|
||||
this.addAbility(new LoyaltyAbility(new GainLifeEffect(5), -3));
|
||||
|
||||
// Escape—{4}{W}{W}, Exile four other cards from your graveyard.
|
||||
this.addAbility(new EscapeAbility(this, "{4}{W}{W}", 4));
|
||||
}
|
||||
|
||||
private ElspethSunsNemesis(final ElspethSunsNemesis card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElspethSunsNemesis copy() {
|
||||
return new ElspethSunsNemesis(this);
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
this.ratioBoosterMythic = 8;
|
||||
this.maxCardNumberInBooster = 254;
|
||||
|
||||
cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class));
|
||||
cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 251, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
63
Mage/src/main/java/mage/abilities/keyword/EscapeAbility.java
Normal file
63
Mage/src/main/java/mage/abilities/keyword/EscapeAbility.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class EscapeAbility extends SpellAbility {
|
||||
|
||||
private static final FilterCard filter = new FilterCard();
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private final String manaCost;
|
||||
private final int exileCount;
|
||||
|
||||
public EscapeAbility(Card card, String manaCost, int exileCount) {
|
||||
super(new ManaCostsImpl(manaCost), card.getName() + " with escape");
|
||||
this.newId();
|
||||
this.zone = Zone.GRAVEYARD;
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
this.manaCost = manaCost;
|
||||
this.exileCount = exileCount;
|
||||
|
||||
Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard(exileCount, filter));
|
||||
cost.setText("");
|
||||
this.addCost(cost);
|
||||
}
|
||||
|
||||
private EscapeAbility(final EscapeAbility ability) {
|
||||
super(ability);
|
||||
this.manaCost = ability.manaCost;
|
||||
this.exileCount = ability.exileCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EscapeAbility copy() {
|
||||
return new EscapeAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Escape — " + this.manaCost + ", Exile " + CardUtil.numberToText(this.exileCount) +
|
||||
" other cards from your graveyard. <i>(You may cast this card from your graveyard for its escape cost.)</i>";
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue