mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fix log text with ProliferateEffect
Previously the number of counters would increase: (e.g. "Foo had 1 +1/+1 counter added. Bar had 2 +1/+1 counters added. ...3...")
This commit is contained in:
parent
f1f58fbab4
commit
ab2995d569
1 changed files with 6 additions and 10 deletions
|
@ -43,7 +43,6 @@ public class ProliferateEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
int numberOfCounters = 0;
|
||||
Counter newCounter = null;
|
||||
if (controller == null) {
|
||||
return false;
|
||||
|
@ -60,14 +59,12 @@ public class ProliferateEffect extends OneShotEffect {
|
|||
for (Counter counter : permanent.getCounters(game).values()) {
|
||||
newCounter = new Counter(counter.getName());
|
||||
permanent.addCounters(newCounter, source, game);
|
||||
numberOfCounters = numberOfCounters + 1;
|
||||
}
|
||||
if (newCounter != null) {
|
||||
game.informPlayers(permanent.getName()
|
||||
+ " had "
|
||||
+ numberOfCounters
|
||||
+ " " + newCounter.getName()
|
||||
+ " counter(s) added to it.");
|
||||
+ " had 1 "
|
||||
+ newCounter.getName()
|
||||
+ " counter added to it.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -77,13 +74,12 @@ public class ProliferateEffect extends OneShotEffect {
|
|||
for (Counter counter : player.getCounters().values()) {
|
||||
newCounter = new Counter(counter.getName());
|
||||
player.addCounters(newCounter, game);
|
||||
numberOfCounters = numberOfCounters + 1;
|
||||
}
|
||||
if (newCounter != null) {
|
||||
game.informPlayers(player.getName() + " had "
|
||||
+ numberOfCounters + " "
|
||||
game.informPlayers(player.getName()
|
||||
+ " had 1 "
|
||||
+ newCounter.getName()
|
||||
+ " counter(s) added to him or her.");
|
||||
+ " counter added to them.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue