mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
* Proliferate - Fixed that in some cases permanents that had counters before could be choosen tp proliferate.
This commit is contained in:
parent
77def0a112
commit
c71b3ea7e8
2 changed files with 50 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
|
|||
this.put(name, new Counter(name));
|
||||
}
|
||||
this.get(name).add();
|
||||
}
|
||||
}
|
||||
|
||||
public void addCounter(String name, int amount) {
|
||||
if (!this.containsKey(name)) {
|
||||
|
|
@ -76,7 +76,11 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
|
|||
|
||||
public void removeCounter(String name) {
|
||||
if (this.containsKey(name)) {
|
||||
this.get(name).remove();
|
||||
Counter counter = this.get(name);
|
||||
counter.remove();
|
||||
if (counter.getCount() == 0) {
|
||||
this.remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue