mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[40K] Implemented The Golden Throne
This commit is contained in:
parent
d10929e3aa
commit
973636f0ba
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/t/TheGoldenThrone.java
Normal file
89
Mage.Sets/src/mage/cards/t/TheGoldenThrone.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.mana.AddManaInAnyCombinationEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TheGoldenThrone extends CardImpl {
|
||||
|
||||
public TheGoldenThrone(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Arcane Life-support -- If you would lose the game, instead exile The Golden Throne and your life total becomes 1.
|
||||
this.addAbility(new SimpleStaticAbility(new TheGoldenThroneEffect()).withFlavorWord("Arcane Life-support"));
|
||||
|
||||
// A Thousand Souls Die Every Day -- {T}, Sacrifice a creature: Add three mana in any combination of colors.
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaInAnyCombinationEffect(3), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT));
|
||||
this.addAbility(ability.withFlavorWord("A Thousand Souls Die Every Day"));
|
||||
}
|
||||
|
||||
private TheGoldenThrone(final TheGoldenThrone card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheGoldenThrone copy() {
|
||||
return new TheGoldenThrone(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TheGoldenThroneEffect extends ReplacementEffectImpl {
|
||||
|
||||
public TheGoldenThroneEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "if you would lose the game, instead exile {this} and your life total becomes 1";
|
||||
}
|
||||
|
||||
public TheGoldenThroneEffect(final TheGoldenThroneEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheGoldenThroneEffect copy() {
|
||||
return new TheGoldenThroneEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player player = game.getPlayer(event.getPlayerId());
|
||||
if (player == null) {
|
||||
return true;
|
||||
}
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent != null) {
|
||||
player.moveCards(permanent, Zone.EXILED, source, game);
|
||||
}
|
||||
player.setLife(1, game, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LOSES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
|
@ -246,6 +246,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tervigon", 100, Rarity.RARE, mage.cards.t.Tervigon.class));
|
||||
cards.add(new SetCardInfo("The First Tyrannic War", 121, Rarity.RARE, mage.cards.t.TheFirstTyrannicWar.class));
|
||||
cards.add(new SetCardInfo("The Flesh Is Weak", 122, Rarity.RARE, mage.cards.t.TheFleshIsWeak.class));
|
||||
cards.add(new SetCardInfo("The Golden Throne", 157, Rarity.RARE, mage.cards.t.TheGoldenThrone.class));
|
||||
cards.add(new SetCardInfo("The Lost and the Damned", 129, Rarity.UNCOMMON, mage.cards.t.TheLostAndTheDamned.class));
|
||||
cards.add(new SetCardInfo("The Swarmlord", 4, Rarity.MYTHIC, mage.cards.t.TheSwarmlord.class));
|
||||
cards.add(new SetCardInfo("The War in Heaven", 69, Rarity.RARE, mage.cards.t.TheWarInHeaven.class));
|
||||
|
|
Loading…
Reference in a new issue