@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, 1); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, 1); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, 1); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, 2); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, 1); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, new DomainValue(2).calculate(game, source, this)); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Ability spellAbility = abilityToModify; if (spellAbility != null) { Integer amount = (Integer) game.getState().getValue(abilityToModify.getSourceId() + "_castCount"); if (amount != null && amount > 0) { CardUtil.reduceCost(spellAbility, amount); return true; } } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { int reductionAmount = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); CardUtil.reduceCost(abilityToModify, reductionAmount); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game)); } return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { int reductionAmount = player.getGraveyard().count(filter, game); CardUtil.reduceCost(abilityToModify, reductionAmount); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { DynamicValue reductionAmount = new YouGainLifeCount(); CardUtil.reduceCost(abilityToModify, reductionAmount.calculate(game, source, this)); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game)); } return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { int totalCMC = 0; for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { totalCMC += permanent.getConvertedManaCost(); } CardUtil.reduceCost(abilityToModify, totalCMC); return true; }
@Override public void adjustCosts(Ability ability, Game game) { if (ability instanceof EquipAbility) { Permanent targetCreature = game.getPermanent(ability.getTargets().getFirstTarget()); if (targetCreature != null && targetCreature.getColor(game).isColorless()) { CardUtil.reduceCost(ability, 2); } } }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { int reductionAmount = game.getBattlefield().count(StaticFilters.FILTER_PERMANENT_CREATURE, source.getSourceId(), source.getControllerId(), game); CardUtil.reduceCost(abilityToModify, reductionAmount); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { int reductionAmount = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); CardUtil.reduceCost(abilityToModify, reductionAmount); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { int totalPower = 0; for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { if (permanent.isCreature()) { totalPower += permanent.getPower().getValue(); } } CardUtil.reduceCost(abilityToModify, totalPower); return true; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(abilityToModify.getControllerId()); if (controller != null) { Mana mana = abilityToModify.getManaCostsToPay().getMana(); if (mana.count() > 1 && mana.getGeneric() > 0) { CardUtil.reduceCost(abilityToModify, 1); } return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(abilityToModify.getControllerId()); if (controller != null) { Mana mana = abilityToModify.getManaCostsToPay().getMana(); if (mana.count() > 1 && mana.getGeneric() > 0) { CardUtil.reduceCost(abilityToModify, 1); } return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Permanent toOffer = offeredPermanent.getPermanent(game); if (toOffer != null) { toOffer.sacrifice(source.getSourceId(), game); CardUtil.reduceCost((SpellAbility) abilityToModify, toOffer.getSpellAbility().getManaCosts()); } game.getState().setValue("offering_" + source.getSourceId(), null); game.getState().setValue("offering_ok_" + source.getSourceId(), null); this.discard(); return true; }