Fixed that adding counters to players did not work correctly (e.g. Winding Constrictor).

This commit is contained in:
LevelX2 2017-01-07 23:53:47 +01:00
parent e04e69f947
commit a75e4f4fcb
2 changed files with 7 additions and 8 deletions

View file

@ -1856,7 +1856,7 @@ public abstract class PlayerImpl implements Player, Serializable {
int finalAmount = amount;
for (int i = 0; i < amount; i++) {
Counter eventCounter = counter.copy();
eventCounter.remove(amount - 1);
eventCounter.remove(eventCounter.getCount() - 1);
GameEvent event = GameEvent.getEvent(EventType.ADD_COUNTER, playerId, null, playerId, counter.getName(), 1);
if (!game.replaceEvent(event)) {
getCounters().addCounter(eventCounter);