Fixed Vampire Hexmage

This commit is contained in:
Plopman 2013-01-10 17:53:29 +01:00
parent 0074e48645
commit 62bd9b8b3d

View file

@ -27,6 +27,7 @@
*/ */
package mage.sets.zendikar; package mage.sets.zendikar;
import java.util.Iterator;
import java.util.UUID; import java.util.UUID;
import mage.Constants.CardType; import mage.Constants.CardType;
@ -40,6 +41,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.Counter;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -100,10 +102,8 @@ class VampireHexmageEffect extends OneShotEffect<VampireHexmageEffect> {
Permanent permanent = game.getPermanent(target.getFirstTarget()); Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) { if (permanent != null) {
String[] counterNames = permanent.getCounters().keySet().toArray(new String[0]); for(Counter counter : permanent.getCounters().values()){
permanent.removeCounters(counter, game);
for (String counterName : counterNames) {
permanent.getCounters().remove(counterName);
} }
return true; return true;