* Fixed a bug that conditional colorless mana was not removed from mana pool if mana pool was emptied.

This commit is contained in:
LevelX2 2016-01-13 17:54:48 +01:00
parent 3d0e998eb4
commit 6396adaf9d
3 changed files with 13 additions and 1 deletions

View file

@ -149,6 +149,9 @@ public class ConditionalMana extends Mana implements Serializable {
if (filter.isRed()) {
red = 0;
}
if (filter.isColorless()) {
colorless = 0;
}
if (filter.isGeneric()) {
generic = 0;
}
@ -187,9 +190,12 @@ public class ConditionalMana extends Mana implements Serializable {
case WHITE:
white = 0;
break;
case COLORLESS:
case GENERIC:
generic = 0;
break;
case COLORLESS:
colorless = 0;
break;
}
}
@ -215,6 +221,9 @@ public class ConditionalMana extends Mana implements Serializable {
;
break;
case COLORLESS:
colorless += amount;
;
case GENERIC:
generic += amount;
;
break;

View file

@ -11,6 +11,7 @@ public enum ManaType {
GREEN("green"),
RED("red"),
WHITE("white"),
GENERIC("generic"),
COLORLESS("colorless");
private final String text;