forked from External/mage
added optimization for simulations - don't construct Strings for messages that will never be used
This commit is contained in:
parent
9f834bc6f7
commit
a878d4879b
67 changed files with 313 additions and 205 deletions
|
|
@ -95,7 +95,8 @@ public class AddCountersTargetEffect extends OneShotEffect {
|
|||
permanent.addCounters(newCounter, game);
|
||||
int numberAdded = permanent.getCounters().getCount(counter.getName()) - before;
|
||||
affectedTargets ++;
|
||||
game.informPlayers(sourceObject.getLogName() +": "+ controller.getName()+ " puts " +
|
||||
if (!game.isSimulation())
|
||||
game.informPlayers(sourceObject.getLogName() +": "+ controller.getName()+ " puts " +
|
||||
numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName());
|
||||
}
|
||||
} else {
|
||||
|
|
@ -105,7 +106,8 @@ public class AddCountersTargetEffect extends OneShotEffect {
|
|||
newCounter.add(amount.calculate(game, source, this));
|
||||
player.addCounters(newCounter, game);
|
||||
affectedTargets ++;
|
||||
game.informPlayers(new StringBuilder(sourceObject.getLogName()).append(": ")
|
||||
if (!game.isSimulation())
|
||||
game.informPlayers(new StringBuilder(sourceObject.getLogName()).append(": ")
|
||||
.append(controller.getName()).append(" puts ")
|
||||
.append(counter.getCount()).append(" ").append(counter.getName().toLowerCase())
|
||||
.append(" counter on ").append(player.getName()).toString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue