mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Fury Charm - Fixed that Suspended Cards could not be cast, if last counter was removed with Fury Charm.
This commit is contained in:
parent
5d12d7f1bf
commit
277f9363fd
4 changed files with 10 additions and 9 deletions
|
@ -150,12 +150,12 @@ class FuryCharmRemoveCounterEffect extends OneShotEffect<FuryCharmRemoveCounterE
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
permanent.getCounters().removeCounter(CounterType.TIME, 2);
|
||||
permanent.removeCounters(CounterType.TIME.getName(), 2, game);
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
|
||||
if (card != null) {
|
||||
card.getCounters().removeCounter(CounterType.TIME, 2);
|
||||
card.removeCounters(CounterType.TIME.getName(), 2, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -50,7 +50,8 @@ public class RemoveCounterSourceEffect extends OneShotEffect<RemoveCounterSource
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("remove ").append(Integer.toString(counter.getCount())).append(" ").append(counter.getName()).append(" counters from {this}");
|
||||
staticText = sb.toString();
|
||||
} else
|
||||
} else {
|
||||
staticText = "remove a " + counter.getName() + " counter from {this}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -611,10 +611,10 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
|
||||
@Override
|
||||
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++) {
|
||||
counters.removeCounter(name, 1);
|
||||
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, ownerId);
|
||||
event.setData(name);
|
||||
game.fireEvent(event);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,10 +237,10 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
|||
|
||||
@Override
|
||||
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++) {
|
||||
counters.removeCounter(name, 1);
|
||||
GameEvent event = GameEvent.getEvent(GameEvent.EventType.COUNTER_REMOVED, objectId, controllerId);
|
||||
event.setData(name);
|
||||
game.fireEvent(event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue