mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Implemented Extravagant Spirit
This commit is contained in:
parent
5751b07d7f
commit
955ec5064c
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/e/ExtravagantSpirit.java
Normal file
76
Mage.Sets/src/mage/cards/e/ExtravagantSpirit.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ExtravagantSpirit extends CardImpl {
|
||||
|
||||
public ExtravagantSpirit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// At the beginning of your upkeep, sacrifice Extravagant Spirit unless you pay {1} for each card in your hand.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ExtravagantSpiritEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public ExtravagantSpirit(final ExtravagantSpirit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtravagantSpirit copy() {
|
||||
return new ExtravagantSpirit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ExtravagantSpiritEffect extends OneShotEffect {
|
||||
|
||||
public ExtravagantSpiritEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "sacrifice {this} unless you pay {1} for each card in your hand";
|
||||
}
|
||||
|
||||
public ExtravagantSpiritEffect(final ExtravagantSpiritEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtravagantSpiritEffect copy() {
|
||||
return new ExtravagantSpiritEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
return new SacrificeSourceUnlessPaysEffect(
|
||||
new GenericManaCost(player.getHand().size())
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -119,6 +119,7 @@ public final class MercadianMasques extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Energy Flux", 78, Rarity.UNCOMMON, mage.cards.e.EnergyFlux.class));
|
||||
cards.add(new SetCardInfo("Enslaved Horror", 134, Rarity.UNCOMMON, mage.cards.e.EnslavedHorror.class));
|
||||
cards.add(new SetCardInfo("Extortion", 135, Rarity.RARE, mage.cards.e.Extortion.class));
|
||||
cards.add(new SetCardInfo("Extravagant Spirit", 79, Rarity.RARE, mage.cards.e.ExtravagantSpirit.class));
|
||||
cards.add(new SetCardInfo("Eye of Ramos", 294, Rarity.RARE, mage.cards.e.EyeOfRamos.class));
|
||||
cards.add(new SetCardInfo("False Demise", 80, Rarity.UNCOMMON, mage.cards.f.FalseDemise.class));
|
||||
cards.add(new SetCardInfo("Ferocity", 245, Rarity.COMMON, mage.cards.f.Ferocity.class));
|
||||
|
|
Loading…
Reference in a new issue