@Override public UnearthAbility copy() { return new UnearthAbility(this); }
public UnearthAbility(ManaCosts costs) { super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(false, true, true), costs); this.timing = TimingRule.SORCERY; this.addEffect(new CreateDelayedTriggeredAbilityEffect(new UnearthDelayedTriggeredAbility())); this.addEffect(new UnearthLeavesBattlefieldEffect()); }
@Override public String getRule() { StringBuilder sb = new StringBuilder("Unearth ").append(this.getManaCosts().getText()); sb.append(" <i>(").append(this.getManaCosts().getText()); sb.append(": Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.)"); return sb.toString(); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { for (UUID cardId : controller.getGraveyard()) { Card card = game.getCard(cardId); if (card != null && card.isCreature()) { UnearthAbility ability = new UnearthAbility(new ManaCostsImpl("{2}{B}")); ability.setSourceId(cardId); ability.setControllerId(card.getOwnerId()); game.getState().addOtherAbility(card, ability); } } return true; } return false; }
public EtheriumAbomination (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{B}"); this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{U}{B}"))); }
public DregscapeZombie(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); // Unearth {B} ({B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) this.addAbility(new UnearthAbility(new ManaCostsImpl("{B}"))); }
public KathariScreecher (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // Unearth {2}{U} ({2}{U}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{U}"))); }
public FireFieldOgre(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.MUTANT); this.power = new MageInt(4); this.toughness = new MageInt(2); this.addAbility(FirstStrikeAbility.getInstance()); this.addAbility(new UnearthAbility(new ManaCostsImpl("{U}{B}{R}"))); }
public ShamblingRemains(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); // Shambling Remains can't block. this.addAbility(new CantBlockAbility()); // Unearth {B}{R} this.addAbility(new UnearthAbility(new ManaCostsImpl("{B}{R}"))); }
public BrackwaterElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); // When Brackwater Elemental attacks or blocks, sacrifice it at the beginning of the next end step. this.addAbility(new AttacksOrBlocksTriggeredAbility(new BrackwaterElementalSacrificeEffect(), false)); // Unearth {2}{U} this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{U}"))); }
public ScourgeDevil(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Scourge Devil enters the battlefield, creatures you control get +1/+0 until end of turn. this.addAbility(new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn))); // Unearth {2}{R} this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{R}"))); }
public KederektLeviathan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}"); this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(5); this.toughness = new MageInt(5); // When Kederekt Leviathan enters the battlefield, return all other nonland permanents to their owners' hands. this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter))); // Unearth {6}{U} this.addAbility(new UnearthAbility(new ManaCostsImpl("{6}{U}"))); }
public CorpseConnoisseur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Corpse Connoisseur enters the battlefield, you may search your library for a creature card and put that card into your graveyard. If you do, shuffle your library. this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInGraveyard(), true)); // Unearth {3}{B} this.addAbility(new UnearthAbility(new ManaCostsImpl("{3}{B}"))); }
public RottingRats (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.RAT); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Rotting Rats enters the battlefield, each player discards a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect())); // Unearth {1}{B} ({1}{B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{B}"))); }
public SedraxisSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}{R}"); this.subtype.add(SubType.SPECTER); this.power = new MageInt(3); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever Sedraxis Specter deals combat damage to a player, that player discards a card. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1), false, true)); // Unearth {1}{B} this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{B}"))); }
public VisceraDragger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{B}"))); }
public UndeadLeotau(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.CAT); this.power = new MageInt(3); this.toughness = new MageInt(4); // {R}: Undead Leotau gets +1/-1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(+1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); // Unearth {2}{B} this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{B}"))); }
public HellsThunder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(FlyingAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect())); this.addAbility(new UnearthAbility(new ManaCostsImpl("{4}{R}"))); }
public GrixisSlavedriver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new LeavesBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken()), false)); this.addAbility(new UnearthAbility(new ManaCostsImpl("{3}{B}"))); }
public HellsparkElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(1); // Trample, haste this.addAbility(TrampleAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); // At the beginning of the end step, sacrifice Hellspark Elemental. this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect())); // Unearth {1}{R}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{R}"))); }