mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[SNC] Implemented Urabrask, Heretic Praetor
This commit is contained in:
parent
83ae254083
commit
f81c104eab
2 changed files with 110 additions and 0 deletions
109
Mage.Sets/src/mage/cards/u/UrabraskHereticPraetor.java
Normal file
109
Mage.Sets/src/mage/cards/u/UrabraskHereticPraetor.java
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
package mage.cards.u;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class UrabraskHereticPraetor extends CardImpl {
|
||||||
|
|
||||||
|
public UrabraskHereticPraetor(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.PHYREXIAN);
|
||||||
|
this.subtype.add(SubType.PRAETOR);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Haste
|
||||||
|
this.addAbility(HasteAbility.getInstance());
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, exile the top card of your library. You may play it this turn.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
new ExileTopXMayPlayUntilEndOfTurnEffect(1, false),
|
||||||
|
TargetController.YOU, false
|
||||||
|
));
|
||||||
|
|
||||||
|
// At the beginning of each opponent's upkeep, the next time they would draw a card this turn, instead they exile the top card of their library. They may play it this turn.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
new UrabraskHereticPraetorEffect(), TargetController.OPPONENT, false
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
private UrabraskHereticPraetor(final UrabraskHereticPraetor card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UrabraskHereticPraetor copy() {
|
||||||
|
return new UrabraskHereticPraetor(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UrabraskHereticPraetorEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
|
UrabraskHereticPraetorEffect() {
|
||||||
|
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||||
|
staticText = "the next time they would draw a card this turn, " +
|
||||||
|
"instead they exile the top card of their library. They may play it this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
private UrabraskHereticPraetorEffect(final UrabraskHereticPraetorEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DRAW_CARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
return game.isActivePlayer(event.getPlayerId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
|
if (player == null) {
|
||||||
|
discard();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = player.getLibrary().getFromTop(game);
|
||||||
|
if (card != null) {
|
||||||
|
player.moveCards(card, Zone.EXILED, source, game);
|
||||||
|
CardUtil.makeCardPlayable(
|
||||||
|
game, source, card, Duration.EndOfTurn,
|
||||||
|
false, player.getId(), null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
discard();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UrabraskHereticPraetorEffect copy() {
|
||||||
|
return new UrabraskHereticPraetorEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -63,6 +63,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Strangle", 125, Rarity.COMMON, mage.cards.s.Strangle.class));
|
cards.add(new SetCardInfo("Strangle", 125, Rarity.COMMON, mage.cards.s.Strangle.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 266, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Swamp", 266, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Tramway Station", 258, Rarity.COMMON, mage.cards.t.TramwayStation.class));
|
cards.add(new SetCardInfo("Tramway Station", 258, Rarity.COMMON, mage.cards.t.TramwayStation.class));
|
||||||
|
cards.add(new SetCardInfo("Urabrask, Heretic Praetor", 129, Rarity.MYTHIC, mage.cards.u.UrabraskHereticPraetor.class));
|
||||||
cards.add(new SetCardInfo("Vivien on the Hunt", 347, Rarity.MYTHIC, mage.cards.v.VivienOnTheHunt.class));
|
cards.add(new SetCardInfo("Vivien on the Hunt", 347, Rarity.MYTHIC, mage.cards.v.VivienOnTheHunt.class));
|
||||||
cards.add(new SetCardInfo("Waterfront District", 259, Rarity.COMMON, mage.cards.w.WaterfrontDistrict.class));
|
cards.add(new SetCardInfo("Waterfront District", 259, Rarity.COMMON, mage.cards.w.WaterfrontDistrict.class));
|
||||||
cards.add(new SetCardInfo("Xander's Lounge", 260, Rarity.RARE, mage.cards.x.XandersLounge.class));
|
cards.add(new SetCardInfo("Xander's Lounge", 260, Rarity.RARE, mage.cards.x.XandersLounge.class));
|
||||||
|
|
Loading…
Reference in a new issue