mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Merge pull request #5740 from kahnyoudiggit/patch-1
Fix log text with ProliferateEffect
This commit is contained in:
commit
39813fbf9b
1 changed files with 6 additions and 10 deletions
|
|
@ -43,7 +43,6 @@ public class ProliferateEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
int numberOfCounters = 0;
|
|
||||||
Counter newCounter = null;
|
Counter newCounter = null;
|
||||||
if (controller == null) {
|
if (controller == null) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -60,14 +59,12 @@ public class ProliferateEffect extends OneShotEffect {
|
||||||
for (Counter counter : permanent.getCounters(game).values()) {
|
for (Counter counter : permanent.getCounters(game).values()) {
|
||||||
newCounter = new Counter(counter.getName());
|
newCounter = new Counter(counter.getName());
|
||||||
permanent.addCounters(newCounter, source, game);
|
permanent.addCounters(newCounter, source, game);
|
||||||
numberOfCounters = numberOfCounters + 1;
|
|
||||||
}
|
}
|
||||||
if (newCounter != null) {
|
if (newCounter != null) {
|
||||||
game.informPlayers(permanent.getName()
|
game.informPlayers(permanent.getName()
|
||||||
+ " had "
|
+ " had 1 "
|
||||||
+ numberOfCounters
|
+ newCounter.getName()
|
||||||
+ " " + newCounter.getName()
|
+ " counter added to it.");
|
||||||
+ " counter(s) added to it.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -77,13 +74,12 @@ public class ProliferateEffect extends OneShotEffect {
|
||||||
for (Counter counter : player.getCounters().values()) {
|
for (Counter counter : player.getCounters().values()) {
|
||||||
newCounter = new Counter(counter.getName());
|
newCounter = new Counter(counter.getName());
|
||||||
player.addCounters(newCounter, game);
|
player.addCounters(newCounter, game);
|
||||||
numberOfCounters = numberOfCounters + 1;
|
|
||||||
}
|
}
|
||||||
if (newCounter != null) {
|
if (newCounter != null) {
|
||||||
game.informPlayers(player.getName() + " had "
|
game.informPlayers(player.getName()
|
||||||
+ numberOfCounters + " "
|
+ " had 1 "
|
||||||
+ newCounter.getName()
|
+ newCounter.getName()
|
||||||
+ " counter(s) added to him or her.");
|
+ " counter added to them.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue