* Conditional Mana- Fixed that conditional mana was not emptied at end of phase step.

This commit is contained in:
LevelX2 2014-10-29 08:57:33 +01:00
parent d078763be1
commit b3c1b97ada

View file

@ -34,6 +34,7 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.abilities.mana.conditional.ManaCondition;
import mage.constants.ManaType;
import mage.filter.Filter;
import mage.filter.FilterMana;
import mage.game.Game;
@ -153,4 +154,50 @@ public class ConditionalMana extends Mana implements Serializable {
public void setManaProducerId(UUID manaProducerId) {
this.manaProducerId = manaProducerId;
}
public void clear(ManaType manaType) {
switch(manaType) {
case BLACK:
black = 0;
break;
case BLUE:
blue = 0;
break;
case GREEN:
green = 0;
break;
case RED:
red = 0;
break;
case WHITE:
white = 0;
break;
case COLORLESS:
colorless = 0;
break;
}
}
public void add(ManaType manaType, int amount) {
switch(manaType) {
case BLACK:
black += amount;
break;
case BLUE:
blue += amount;;
break;
case GREEN:
green += amount;;
break;
case RED:
red += amount;;
break;
case WHITE:
white += amount;;
break;
case COLORLESS:
colorless += amount;;
break;
}
}
}