@Override public boolean testPay(Mana testMana) { return testMana.count() > 0; }
@Override public boolean testPay(Mana testMana) { return testMana.count() > 0; }
@Override public int getAmount() { return payment.count() / multiplier; }
protected boolean isColorlessPaid(int mana) { return this.payment.count() >= mana; }
@Override public List<Mana> getNetMana(Game game, Ability source) { List<Mana> netMana = new ArrayList<>(); for (String colorChoice : ChoiceColor.getBaseColors()) { Mana mana = computeMana(colorChoice, game, source); if (mana.count() > 0) { netMana.add(mana); } } return netMana; }
@Override public ColorlessManaCost getUnpaid() { ColorlessManaCost unpaid = new ColorlessManaCost(mana - this.payment.count()); if (sourceFilter != null) { unpaid.setSourceFilter(sourceFilter); } return unpaid; }
@Override public GenericManaCost getUnpaid() { GenericManaCost unpaid = new GenericManaCost(mana - this.payment.count()); if (sourceFilter != null) { unpaid.setSourceFilter(sourceFilter); } return unpaid; }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); mana.setToMana(Mana.ColorlessMana(mana.count())); return false; }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); mana.setToMana(Mana.ColorlessMana(mana.count())); return false; }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); mana.setToMana(Mana.ColorlessMana(mana.count())); return false; }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); mana.setToMana(Mana.BlackMana(mana.count())); return false; }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); mana.setToMana(Mana.BlueMana(mana.count())); return false; }
protected void assignColorless(Ability ability, Game game, ManaPool pool, int mana, Cost costToPay) { int conditionalCount = pool.getConditionalCount(ability, game, null, costToPay); while (mana > payment.count() && (pool.count() > 0 || conditionalCount > 0)) { if (pool.pay(ManaType.COLORLESS, ability, sourceFilter, game, costToPay, usedManaToPay)) { this.payment.increaseColorless(); } break; } }
@Override public boolean applies(GameEvent event, Ability source, Game game) { MageObject mageObject = game.getObject(event.getSourceId()); ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); return mageObject != null && mageObject.isLand() && mana.count() > 1; } }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); new AddManaOfAnyColorEffect(mana.count()).apply(game,source); mana.setToMana(new Mana(0,0,0,0,0,0,0,0)); 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) { UUID targetId = source.getFirstTarget(); if (targetId != null) { StackObject stackObject = game.getStack().getStackObject(targetId); if (stackObject != null) { return stackObject.getStackAbility().getManaCostsToPay().getPayment().count() == 0; } } 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 checkTrigger(GameEvent event, Game game) { if (game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && spell.getStackAbility().getManaCostsToPay().getPayment().count() == 0) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } return true; } } return false; }