@Override public PaymentDecision visit(CostAddMana cost) { Integer c = cost.convertAmount(); if (c == null) { c = AbilityUtils.calculateAmount(source, cost.getAmount(), ability); } return PaymentDecision.number(c); }
@Override public PaymentDecision visit(CostFlipCoin cost) { Integer c = cost.convertAmount(); if (c == null) { final String sVar = ability.getSVar(cost.getAmount()); // Generalize cost if (sVar.equals("XChoice")) { return null; } c = AbilityUtils.calculateAmount(source, cost.getAmount(), ability); } return PaymentDecision.number(c); }
@Override public PaymentDecision visit(CostPayLife cost) { Integer c = cost.convertAmount(); if (c == null) { final String sVar = ability.getSVar(cost.getAmount()); // Generalize cost if (sVar.equals("XChoice")) { return null; } else { c = AbilityUtils.calculateAmount(source, cost.getAmount(), ability); } } if (!player.canPayLife(c)) { return null; } // activator.payLife(c, null); return PaymentDecision.number(c); }
@Override public PaymentDecision visit(CostUntap cost) { return PaymentDecision.number(0); }
@Override public PaymentDecision visit(CostPartMana cost) { return PaymentDecision.number(0); }