(final SpellAbility ability, final Player payer, final boolean effect)
| 1099 | } |
| 1100 | |
| 1101 | public Integer getMaxForNonManaX(final SpellAbility ability, final Player payer, final boolean effect) { |
| 1102 | Integer val = null; |
| 1103 | for (CostPart p : getCostParts()) { |
| 1104 | if (!p.getAmount().equals("X")) { |
| 1105 | continue; |
| 1106 | } |
| 1107 | |
| 1108 | val = ObjectUtils.min(val, p.getMaxAmountX(ability, payer, effect)); |
| 1109 | } |
| 1110 | // extra 0 check |
| 1111 | if (val != null && val <= 0 && hasManaCost() && getCostMana().getXMin() > 0) { |
| 1112 | val = null; |
| 1113 | } |
| 1114 | return val; |
| 1115 | } |
| 1116 | public static final Cost Zero = new Cost(0); |
| 1117 | } |
no test coverage detected