(Cost source, int amt, final SpellAbility sa)
| 964 | } |
| 965 | |
| 966 | public void mergeTo(Cost source, int amt, final SpellAbility sa) { |
| 967 | // multiply to create the full cost |
| 968 | if (amt > 1) { |
| 969 | // to double itself we need to work on a copy |
| 970 | Cost sourceCpy = source.copy(); |
| 971 | for (int i = 1; i < amt; ++i) { |
| 972 | // in theory setAmount could be used instead but it depends on the cost complexity (probably not worth trying to determine that first) |
| 973 | source.add(sourceCpy); |
| 974 | } |
| 975 | } |
| 976 | // combine costs (these shouldn't mix together) |
| 977 | this.add(source, false, sa); |
| 978 | } |
| 979 | |
| 980 | public Cost add(Cost cost1) { |
| 981 | return add(cost1, true); |
no test coverage detected