public EvokeAbility(Card card, String manaString) { super(Zone.ALL, null); name = EVOKE_KEYWORD; this.addEvokeCost(manaString); Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceEffect()), EvokedCondition.instance, "Sacrifice {this} when it enters the battlefield and was evoked."); ability.setRuleVisible(false); addSubAbility(ability); }
public EndangeredArmodon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); this.subtype.add(SubType.ELEPHANT); this.power = new MageInt(4); this.toughness = new MageInt(5); // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( filter, new SacrificeSourceEffect())); }
public TarPitWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); this.subtype.add(SubType.CYCLOPS); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(4); // When Tar Pit Warrior becomes the target of a spell or ability, sacrifice it. this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); }
public CrumblingColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(7); this.toughness = new MageInt(4); this.addAbility(TrampleAbility.getInstance()); this.addAbility(new AttacksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())), false)); }
public VeilApparitionToken() { super("Illusion", "3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."); cardType.add(CardType.CREATURE); subtype.add(SubType.ILLUSION); power = new MageInt(3); toughness = new MageInt(3); Ability ability = new BeginningOfUpkeepTriggeredAbility(new DoUnlessControllerPaysEffect(new SacrificeSourceEffect(), new ManaCostsImpl("{1}{U}")), TargetController.YOU, false); this.addAbility(ability); }
public EnergyField(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // Prevent all damage that would be dealt to you by sources you don't control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EnergyFieldEffect())); // When a card is put into your graveyard from anywhere, sacrifice Energy Field. this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( new SacrificeSourceEffect(), false, TargetController.YOU)); }
public PhantasmalBear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.BEAR); this.subtype.add(SubType.ILLUSION); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Phantasmal Bear becomes the target of a spell or ability, sacrifice it. this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); }
@Override public boolean apply(Game game, Ability source) { ActivationInfo activationInfo = ActivationInfo.getInstance(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); activationInfo.addActivation(game); if (activationInfo.getActivationCounter() >= 4) { DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()); game.addDelayedTriggeredAbility(delayedAbility, source); } return true; }
@Override public boolean apply(Game game, Ability source) { ActivationInfo activationInfo = ActivationInfo.getInstance(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); activationInfo.addActivation(game); if (activationInfo.getActivationCounter() == 4) { DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()); game.addDelayedTriggeredAbility(delayedAbility, source); } return true; }
public PhantasmalAbomination(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); this.subtype.add(SubType.ILLUSION); this.power = new MageInt(5); this.toughness = new MageInt(5); this.addAbility(DefenderAbility.getInstance()); this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); }
public BarbarianOutcast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.HUMAN, SubType.BARBARIAN, SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); // When you control no Swamps, sacrifice Barbarian Outcast. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( new FilterLandPermanent(SubType.SWAMP, "no Swamps"), ComparisonType.EQUAL_TO, 0, new SacrificeSourceEffect())); }
public SpiritualAsylum(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // Creatures and lands you control have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter))); // When a creature you control attacks, sacrifice Spiritual Asylum. AttacksCreatureYouControlTriggeredAbility ability = new AttacksCreatureYouControlTriggeredAbility(new SacrificeSourceEffect()); ability.setOnce(true); this.addAbility(ability); }
public Groundbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(1); // Trample this.addAbility(TrampleAbility.getInstance()); // Haste this.addAbility(HasteAbility.getInstance()); // At the beginning of the end step, sacrifice Groundbreaker. this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false)); }
public CallToTheGrave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}"); // At the beginning of each player's upkeep, that player sacrifices a non-Zombie creature. Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(filter, 1, "that player "), TargetController.ANY, false); this.addAbility(ability); // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); }
public SparkElementalToken() { super("Spark Elemental", "3/1 red Elemental creature token named Spark Elemental with trample, haste, and \"At the beginning of the end step, sacrifice Spark Elemental.\""); this.setOriginalExpansionSetCode("FUT"); cardType.add(CardType.CREATURE); color.setRed(true); subtype.add(SubType.ELEMENTAL); power = new MageInt(3); toughness = new MageInt(1); this.addAbility(TrampleAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false)); }
public WhisperingSpecter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.SPECTER); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(FlyingAbility.getInstance()); this.addAbility(InfectAbility.getInstance()); Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true, true); ability.addEffect(new WhisperingSpecterEffect()); this.addAbility(ability); }
public IcyPrison(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}"); // When Icy Prison enters the battlefield, exile target creature. Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false); ability1.addTarget(new TargetCreaturePermanent()); this.addAbility(ability1); // At the beginning of your upkeep, sacrifice Icy Prison unless any player pays {3}. this.addAbility(new BeginningOfUpkeepTriggeredAbility( new DoUnlessAnyPlayerPaysEffect(new SacrificeSourceEffect(), new GenericManaCost(3)), TargetController.YOU, false)); // When Icy Prison leaves the battlefield, return the exiled card to the battlefield under its owner's control. this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, false, true), false)); }
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 BloodSpeaker (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.OGRE, SubType.SHAMAN); this.power = new MageInt(3); this.toughness = new MageInt(2); // At the beginning of your upkeep, you may sacrifice Blood Speaker. If you do, search your library for a Demon card, reveal that card, and put it into your hand. Then shuffle your library. Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, true); ability.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true, "If you do, search your library for ")); this.addAbility(ability); // Whenever a Demon enters the battlefield under your control, return Blood Speaker from your graveyard to your hand. this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, false)); }
public GoblinCannon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {2}: Goblin Cannon deals 1 damage to any target. Sacrifice Goblin Cannon. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); ability.addTarget(new TargetAnyTarget()); ability.addEffect(new SacrificeSourceEffect()); this.addAbility(ability); }