From 50fa28e81db28e9a6fd9f6884c38bffc49882737 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Fri, 29 Aug 2014 13:18:10 +0400 Subject: [PATCH] Fixed removing counters --- Mage/src/mage/counters/Counters.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage/src/mage/counters/Counters.java b/Mage/src/mage/counters/Counters.java index 06319dee22..d842c33541 100644 --- a/Mage/src/mage/counters/Counters.java +++ b/Mage/src/mage/counters/Counters.java @@ -89,6 +89,9 @@ public class Counters extends HashMap implements Serializable { public void removeCounter(String name, int amount) { if (this.containsKey(name)) { this.get(name).remove(amount); + if (this.get(name).getCount() == 0) { + this.remove(name); + } } }