mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Fixed a bug that conditional colorless mana was not removed from mana pool if mana pool was emptied.
This commit is contained in:
parent
3d0e998eb4
commit
6396adaf9d
3 changed files with 13 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ public enum ManaType {
|
|||
GREEN("green"),
|
||||
RED("red"),
|
||||
WHITE("white"),
|
||||
GENERIC("generic"),
|
||||
COLORLESS("colorless");
|
||||
|
||||
private final String text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue