* Fury Charm - Fixed that Suspended Cards could not be cast, if last counter was removed with Fury Charm.

This commit is contained in:
LevelX2 2013-09-01 11:15:31 +02:00
parent 5d12d7f1bf
commit 277f9363fd
4 changed files with 10 additions and 9 deletions

View file

@ -150,12 +150,12 @@ class FuryCharmRemoveCounterEffect extends OneShotEffect<FuryCharmRemoveCounterE
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (permanent != null) { if (permanent != null) {
permanent.getCounters().removeCounter(CounterType.TIME, 2); permanent.removeCounters(CounterType.TIME.getName(), 2, game);
return true; return true;
} }
Card card = game.getCard(this.getTargetPointer().getFirst(game, source)); Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
if (card != null) { if (card != null) {
card.getCounters().removeCounter(CounterType.TIME, 2); card.removeCounters(CounterType.TIME.getName(), 2, game);
return true; return true;
} }
return false; return false;

View file

@ -50,7 +50,8 @@ public class RemoveCounterSourceEffect extends OneShotEffect<RemoveCounterSource
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("remove ").append(Integer.toString(counter.getCount())).append(" ").append(counter.getName()).append(" counters from {this}"); sb.append("remove ").append(Integer.toString(counter.getCount())).append(" ").append(counter.getName()).append(" counters from {this}");
staticText = sb.toString(); staticText = sb.toString();
} else } else {
staticText = "remove a " + counter.getName() + " counter from {this}"; staticText = "remove a " + counter.getName() + " counter from {this}";
}
} }
} }

View file

@ -611,10 +611,10 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
@Override @Override
public void removeCounters(String name, int amount, Game game) { public void removeCounters(String name, int amount, Game game) {
counters.removeCounter(name, amount);
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, ownerId);
event.setData(name);
for (int i = 0; i < amount; i++) { for (int i = 0; i < amount; i++) {
counters.removeCounter(name, 1);
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, ownerId);
event.setData(name);
game.fireEvent(event); game.fireEvent(event);
} }
} }

View file

@ -237,10 +237,10 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
@Override @Override
public void removeCounters(String name, int amount, Game game) { public void removeCounters(String name, int amount, Game game) {
counters.removeCounter(name, amount);
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, controllerId);
event.setData(name);
for (int i = 0; i < amount; i++) { for (int i = 0; i < amount; i++) {
counters.removeCounter(name, 1);
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, controllerId);
event.setData(name);
game.fireEvent(event); game.fireEvent(event);
} }
} }