mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
implemented Afterlife ability
This commit is contained in:
parent
4d9caa4ee1
commit
b5f383254c
7 changed files with 52 additions and 50 deletions
|
@ -6,7 +6,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.permanent.token.BeckonApparitionToken;
|
||||
import mage.game.permanent.token.WhiteBlackSpiritToken;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -22,7 +22,7 @@ public final class BeckonApparition extends CardImpl {
|
|||
// Exile target card from a graveyard. Create a 1/1 white and black Spirit creature token with flying.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard());
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeckonApparitionToken(), 1));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new WhiteBlackSpiritToken(), 1));
|
||||
}
|
||||
|
||||
public BeckonApparition(final BeckonApparition card) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -14,16 +13,18 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.TeysaEnvoyOfGhostsToken;
|
||||
import mage.game.permanent.token.WhiteBlackSpiritToken;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class TeysaEnvoyOfGhosts extends CardImpl {
|
||||
|
@ -60,7 +61,7 @@ class TeysaEnvoyOfGhostsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
public TeysaEnvoyOfGhostsTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroyTargetEffect());
|
||||
this.addEffect(new CreateTokenEffect(new TeysaEnvoyOfGhostsToken(), 1));
|
||||
this.addEffect(new CreateTokenEffect(new WhiteBlackSpiritToken(), 1));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
super("Ravnica Allegiance", "RNA", ExpansionSet.buildDate(2019, 1, 25), SetType.EXPANSION);
|
||||
this.blockName = "Guilds of Ravnica";
|
||||
this.hasBoosters = true;
|
||||
this.hasBasicLands = false; // this is temporary until the actual basics have been spoiled to prevent a test fail
|
||||
this.hasBasicLands = false; // this is temporary until the actual basics have been spoiled to prevent a test fail
|
||||
this.numBoosterSpecial = 1;
|
||||
this.numBoosterLands = 0;
|
||||
this.numBoosterCommon = 10;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.game.permanent.token.WhiteBlackSpiritToken;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
public class AfterlifeAbility extends DiesTriggeredAbility {
|
||||
private final int tokenCount;
|
||||
|
||||
public AfterlifeAbility(int tokenCount) {
|
||||
super(new CreateTokenEffect(new WhiteBlackSpiritToken(), tokenCount), false);
|
||||
this.tokenCount = tokenCount;
|
||||
}
|
||||
|
||||
public AfterlifeAbility(final AfterlifeAbility ability) {
|
||||
super(ability);
|
||||
this.tokenCount = ability.tokenCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Afterlife " + tokenCount + " <i>(When this creature dies, create "
|
||||
+ CardUtil.numberToText(tokenCount, "a")
|
||||
+ " white and black Spirit creature token"
|
||||
+ (tokenCount > 1 ? "s" : "")
|
||||
+ " with flying)</i>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AfterlifeAbility copy() {
|
||||
return new AfterlifeAbility(this);
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
|
||||
package mage.game.permanent.token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class BeckonApparitionToken extends TokenImpl {
|
||||
|
||||
public BeckonApparitionToken() {
|
||||
super("Spirit", "1/1 white and black Spirit creature token with flying");
|
||||
this.setOriginalExpansionSetCode("GTC");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.SPIRIT);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
public BeckonApparitionToken(final BeckonApparitionToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public BeckonApparitionToken copy() {
|
||||
return new BeckonApparitionToken(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
|
||||
|
||||
package mage.game.permanent.token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class TeysaEnvoyOfGhostsToken extends TokenImpl {
|
||||
public final class WhiteBlackSpiritToken extends TokenImpl {
|
||||
|
||||
public TeysaEnvoyOfGhostsToken() {
|
||||
public WhiteBlackSpiritToken() {
|
||||
super("Spirit", "1/1 white and black Spirit creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
|
@ -23,11 +23,11 @@ public final class TeysaEnvoyOfGhostsToken extends TokenImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public TeysaEnvoyOfGhostsToken(final TeysaEnvoyOfGhostsToken token) {
|
||||
public WhiteBlackSpiritToken(final WhiteBlackSpiritToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public TeysaEnvoyOfGhostsToken copy() {
|
||||
return new TeysaEnvoyOfGhostsToken(this);
|
||||
public WhiteBlackSpiritToken copy() {
|
||||
return new WhiteBlackSpiritToken(this);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
Afflict|number|
|
||||
Afterlife|number|
|
||||
Annihilator|number|
|
||||
Ascend|new|
|
||||
Assist|new|
|
||||
|
|
Loading…
Reference in a new issue