From 5952c5e33a9eb2e104ef5dae21e83188609289c5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 4 Apr 2017 16:23:10 +0200 Subject: [PATCH] * Fixed a bug that mana pool was carried over to next game (e.g. using Savage Ventmaw). --- Mage/src/main/java/mage/players/ManaPool.java | 5 ++++- Mage/src/main/java/mage/players/PlayerImpl.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index ca0dbfbd5ac..0df36cae431 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -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 it = manaItems.iterator(); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index e22021f7294..92b406257bf 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -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 } /**