Fixed that no event was send for removing counters from players.

This commit is contained in:
LevelX2 2016-04-15 18:01:38 +02:00
parent 162ac957c6
commit 22dbb1ef38
8 changed files with 49 additions and 30 deletions

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common;
import mage.abilities.Ability;
@ -62,12 +61,11 @@ public class RemoveAllCountersSourceEffect extends OneShotEffect {
@java.lang.Override
public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if(sourcePermanent != null) {
if (sourcePermanent != null) {
int count = sourcePermanent.getCounters().getCount(counterType);
sourcePermanent.getCounters().removeCounter(counterType, count);
sourcePermanent.removeCounters(counterType.getName(), count, game);
return true;
}
return false;
}
}