* Fixed a bug that mana pool was carried over to next game (e.g. using Savage Ventmaw).

This commit is contained in:
LevelX2 2017-04-04 16:23:10 +02:00
parent 269189f87e
commit 5952c5e33a
2 changed files with 5 additions and 1 deletions

View file

@ -37,7 +37,6 @@ import java.util.UUID;
import mage.ConditionalMana;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.ActivatedAbility;
import mage.abilities.costs.Cost;
import mage.constants.Duration;
import mage.constants.ManaType;
@ -206,6 +205,10 @@ public class ManaPool implements Serializable {
doNotEmptyManaTypes.add(manaType);
}
public void init() {
manaItems.clear();
}
public int emptyPool(Game game) {
int total = 0;
Iterator<ManaPoolItem> it = manaItems.iterator();

View file

@ -422,6 +422,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.castSourceIdWithAlternateMana = null;
this.castSourceIdManaCosts = null;
this.castSourceIdCosts = null;
this.getManaPool().init(); // needed to remove mana that not empties on step change from previous game if left
}
/**