mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
Fixed that some cards doesn't trigger counter remove events;
This commit is contained in:
parent
2a2cfccad3
commit
07faf872ea
5 changed files with 31 additions and 29 deletions
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -18,8 +14,11 @@ import mage.players.Player;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public class RemoveCounterCost extends CostImpl {
|
||||
|
|
@ -102,10 +101,6 @@ public class RemoveCounterCost extends CostImpl {
|
|||
new StringBuilder("Remove how many counters from ").append(permanent.getIdName()).toString(), game);
|
||||
}
|
||||
permanent.removeCounters(counterName, numberOfCountersSelected, game);
|
||||
if (permanent.getCounters(game).getCount(counterName) == 0) {
|
||||
// this removes only the item with number = 0 from the collection
|
||||
permanent.getCounters(game).removeCounter(counterName);
|
||||
}
|
||||
countersRemoved += numberOfCountersSelected;
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(new StringBuilder(controller.getLogName())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue