@Override public SacrificeSourceEffect copy() { return new SacrificeSourceEffect(this); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int result = controller.rollDice(game, 6); if (result == 1) { new SacrificeSourceEffect().apply(game, source); return new DamageEverythingEffect(3).apply(game, source); } } return false; }
@Override public boolean apply(Game game, Ability source) { sacrificed = super.apply(game, source); if (sacrificed) { new CreateTokenEffect(new MaritLageToken()).apply(game, source); } return sacrificed; }
@Override public boolean apply(Game game, Ability source) { sacrificed = super.apply(game, source); if (sacrificed) { Permanent toDestroy; for (UUID target : getTargetPointer().getTargets(game, source)) { toDestroy = game.getPermanent(target); if (toDestroy != null) { toDestroy.destroy(source.getId(), game, false); } } } return sacrificed; }
public VanishingSacrificeAbility() { super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); this.setRuleVisible(false); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (controller != null && permanent != null) { if (controller.flipCoin(source, game, true)) { return true; } else { new SacrificeSourceEffect().apply(game, source); return true; } } return false; }
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); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int result = controller.rollDice(game, 6); if (result == 6) { new SacrificeSourceEffect().apply(game, source); return (new CreateTokenEffect(new GiantChickenToken(), 1)).apply(game, source); } } return false; }
@Override public boolean apply(Game game, Ability source) { Permanent cunning = game.getPermanent(source.getSourceId()); if (cunning != null) { DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextCleanupDelayedTriggeredAbility( new SacrificeSourceEffect()); game.addDelayedTriggeredAbility(delayedAbility, source); return true; } return false; } }
public ImmortalCoilAbility() { super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); this.addEffect(new LoseGameEffect()); }
public SkitteringMonstrosity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.HORROR); this.power = new MageInt(5); this.toughness = new MageInt(5); // When you cast a creature spell, sacrifice Skittering Monstrosity. this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false)); }
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 FrostWalker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(4); this.toughness = new MageInt(1); // When Frost Walker becomes the target of a spell or ability, sacrifice it. this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); }
public StrawGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(2); this.toughness = new MageInt(3); // When an opponent casts a creature spell, sacrifice Straw Golem. this.addAbility(new SpellCastOpponentTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false)); }
public SkitteringHorror(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.HORROR); this.power = new MageInt(4); this.toughness = new MageInt(3); // When you cast a creature spell, sacrifice Skittering Horror. this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.FILTER_SPELL_A_CREATURE, false)); }
public MarduBlazebringer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); // When Mardu Blazebringer attacks or blocks, sacrifice it at end of combat. this.addAbility(new AttacksOrBlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())), false)); }
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)); }