mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Small fix to ManaOptions.
This commit is contained in:
parent
b4636b2ce1
commit
4f6fb64811
1 changed files with 4 additions and 4 deletions
|
@ -225,15 +225,15 @@ public class ManaOptions extends ArrayList<Mana> {
|
|||
if (isEmpty()) {
|
||||
this.add(new Mana());
|
||||
}
|
||||
boolean addAny = false;
|
||||
if (addMana.getAny() == 1 && addMana.count() == 1) {
|
||||
addAny = true; // only replace to any will be repeated
|
||||
boolean repeatable = false;
|
||||
if (addMana.getAny() == 1 && addMana.count() == 1 && onlyManaCosts) {
|
||||
repeatable = true; // only replace to any with mana costs only will be repeated if able
|
||||
}
|
||||
for (Mana mana: this) {
|
||||
while (mana.includesMana(cost)) {
|
||||
mana.subtract(cost);
|
||||
mana.add(addMana);
|
||||
if (!addAny) {
|
||||
if (!repeatable) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue