mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
* Fixed a bug that mana pool was carried over to next game (e.g. using Savage Ventmaw).
This commit is contained in:
parent
269189f87e
commit
5952c5e33a
2 changed files with 5 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue