@Override public boolean apply(Game game, Ability source) { return new DamageTargetEffect((Integer) getValue("damage")).apply(game, source); }
@Override public boolean apply(Game game, Ability source) { int amount = (Integer) getValue("damage"); return new DamageTargetEffect(amount).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { DynamicValue value = MultikickerCount.instance; int damage = value.calculate(game, source, this) * 2; return new DamageTargetEffect(damage).apply(game, source); }
@Override public boolean apply(Game game, Ability source) { return new DamageTargetEffect((Integer) getValue("damage")).apply(game, source); }
@Override public boolean apply(Game game, Ability source) { DelayedTriggeredAbility delayedAbility = new SearingBloodDelayedTriggeredAbility(source.getFirstTarget()); game.addDelayedTriggeredAbility(delayedAbility, source); return new DamageTargetEffect(2).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { int amount = 0; for (Cost cost : source.getCosts()) { if (cost instanceof SacrificeTargetCost && !((SacrificeTargetCost) cost).getPermanents().isEmpty()) { amount = ((SacrificeTargetCost) cost).getPermanents().get(0).getPower().getValue(); break; } } if (amount > 0) { return new DamageTargetEffect(amount).apply(game, source); } return true; } }
@Override public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanent(source.getFirstTarget()); if (creature == null) { return false; } Player player = game.getPlayer(creature.getControllerId()); if (player == null) { return false; } int damage = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LANDS_NONBASIC, player.getId(), game).size(); return new DamageTargetEffect(damage).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { Permanent perm = game.getPermanent(source.getSourceId()); int damage = CardUtil.addWithOverflowCheck(perm.getPower().getValue(), 2); DamageTargetEffect dmgEffect = new DamageTargetEffect(damage); return dmgEffect.apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { int damageToDeal = 2; outerloop: for (Cost cost : source.getCosts()) { if (cost instanceof DiscardCardCost) { for (Card card : ((DiscardCardCost) cost).getCards()) { if (card.getColor(game).isMulticolored()) { damageToDeal = 4; break outerloop; } } } } return new DamageTargetEffect(damageToDeal).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { Cost cost = new GenericManaCost(1); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { super.apply(game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int ElementalsInYourGraveyard = controller.getGraveyard().count(filter, game); new DamageTargetEffect(ElementalsInYourGraveyard).apply(game, source); new DamageSelfEffect(ElementalsInYourGraveyard).apply(game, source); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { return false; } int xValue = cost.getNumberRevealedCards(); return new DamageTargetEffect(xValue).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { return false; } int xValue = cost.getNumberRevealedCards(); return new DamageTargetEffect(xValue).apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card discardedCard = controller.discardOne(true, source, game); if (discardedCard != null && discardedCard.isCreature()) { int damage = discardedCard.getPower().getValue(); return new DamageTargetEffect(damage).apply(game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (controller.chooseUse(outcome, "Deal 2 damage to " + game.getPermanent(getTargetPointer().getFirst(game, source)).getName() + '?', source, game)) { new DamageTargetEffect(2).apply(game, source); } else { new DamageControllerEffect(1).apply(game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { while (controller.getLibrary().hasCards() && controller.isInGame()) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.moveCards(card, Zone.EXILED, source, game); if (!card.isLand()) { new DamageTargetEffect(card.getConvertedManaCost()).apply(game, source); break; } } } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); if (!player.choose(Outcome.LoseLife, typeChoice, game)) { return false; } FilterControlledPermanent filter = new FilterControlledPermanent(); filter.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice()))); return new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)).apply(game, source); } return false; } }
@Override public boolean apply(Game game, Ability source) { Permanent errantMinion = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (errantMinion == null) { return false; } Permanent enchantedCreature = game.getPermanentOrLKIBattlefield(errantMinion.getAttachedTo()); if (enchantedCreature == null) { return false; } Player controllerOfEnchantedCreature = game.getPlayer(enchantedCreature.getControllerId()); if (controllerOfEnchantedCreature != null) { int manaPaid = playerPaysXGenericMana(controllerOfEnchantedCreature, source, game); PreventDamageToTargetEffect effect = new PreventDamageToTargetEffect(Duration.OneUse, manaPaid); effect.setTargetPointer(new FixedTarget(controllerOfEnchantedCreature.getId())); game.addEffect(effect, source); DamageTargetEffect effect2 = new DamageTargetEffect(2); effect2.setTargetPointer(new FixedTarget(controllerOfEnchantedCreature.getId())); effect2.apply(game, source); return true; } return false; }