Implemented Finale of Glory

This commit is contained in:
Evan Kranzler 2019-04-17 18:27:44 -04:00
parent 7fd99ee1fb
commit e6138d7e7f
3 changed files with 100 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.token.AngelVigilanceToken;
import mage.game.permanent.token.SoldierVigilanceToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FinaleOfGlory extends CardImpl {
public FinaleOfGlory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{W}{W}");
// Create X 2/2 white Soldier creature tokens with vigilance. If X is 10 or more, also create X 4/4 white Angel creature tokens with flying and vigilance.
this.getSpellAbility().addEffect(new FinaleOfGloryEffect());
}
private FinaleOfGlory(final FinaleOfGlory card) {
super(card);
}
@Override
public FinaleOfGlory copy() {
return new FinaleOfGlory(this);
}
}
class FinaleOfGloryEffect extends OneShotEffect {
FinaleOfGloryEffect() {
super(Outcome.Benefit);
staticText = "Create X 2/2 white Soldier creature tokens with vigilance. " +
"If X is 10 or more, also create X 4/4 white Angel creature tokens with flying and vigilance.";
}
private FinaleOfGloryEffect(final FinaleOfGloryEffect effect) {
super(effect);
}
@Override
public FinaleOfGloryEffect copy() {
return new FinaleOfGloryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int xValue = source.getManaCostsToPay().getX();
if (xValue == 0) {
return false;
}
new CreateTokenEffect(new SoldierVigilanceToken(), xValue).apply(game, source);
if (xValue >= 10) {
new CreateTokenEffect(new AngelVigilanceToken(), xValue).apply(game, source);
}
return true;
}
}

View file

@ -86,6 +86,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Evolution Sage", 159, Rarity.UNCOMMON, mage.cards.e.EvolutionSage.class));
cards.add(new SetCardInfo("Fblthp, the Lost", 50, Rarity.RARE, mage.cards.f.FblthpTheLost.class));
cards.add(new SetCardInfo("Feather, the Redeemed", 197, Rarity.RARE, mage.cards.f.FeatherTheRedeemed.class));
cards.add(new SetCardInfo("Finale of Glory", 12, Rarity.MYTHIC, mage.cards.f.FinaleOfGlory.class));
cards.add(new SetCardInfo("Finale of Revelation", 51, Rarity.MYTHIC, mage.cards.f.FinaleOfRevelation.class));
cards.add(new SetCardInfo("Firemind Vessel", 237, Rarity.UNCOMMON, mage.cards.f.FiremindVessel.class));
cards.add(new SetCardInfo("Flux Channeler", 52, Rarity.UNCOMMON, mage.cards.f.FluxChanneler.class));

View file

@ -0,0 +1,32 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.VigilanceAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class SoldierVigilanceToken extends TokenImpl {
public SoldierVigilanceToken() {
super("Soldier", "2/2 white Soldier creature token with vigilance");
cardType.add(CardType.CREATURE);
color.setWhite(true);
subtype.add(SubType.SOLDIER);
power = new MageInt(2);
toughness = new MageInt(2);
addAbility(VigilanceAbility.getInstance());
}
private SoldierVigilanceToken(final SoldierVigilanceToken token) {
super(token);
}
@Override
public SoldierVigilanceToken copy() {
return new SoldierVigilanceToken(this);
}
}