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
|
|
@ -100,9 +100,10 @@ public class SpellStack extends ArrayDeque<StackObject> {
|
|||
}
|
||||
this.remove(stackObject);
|
||||
stackObject.counter(sourceId, game); // tries to move to graveyard
|
||||
game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName());
|
||||
if (!game.isSimulation())
|
||||
game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName());
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId()));
|
||||
} else {
|
||||
} else if (!game.isSimulation()) {
|
||||
game.informPlayers(counteredObjectName + " could not be countered by " + sourceObject.getLogName());
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue