Removing Threat now only emits message if number of threats removed is >0.

This commit is contained in:
marcins78@gmail.com
2011-11-24 01:24:08 +00:00
parent 2cee5006a2
commit eec5f28fbb

View File

@@ -34,10 +34,11 @@ public class RemoveThreatsEffect extends AbstractEffect {
if (game.getModifiersQuerying().canRemoveThreat(game.getGameState(), _source)) {
int toRemove = Math.min(game.getGameState().getThreats(), _count);
if (_source != null)
game.getGameState().sendMessage(GameUtils.getCardLink(_source) + " removed " + toRemove + " threat" + ((toRemove > 1) ? "s" : ""));
game.getGameState().removeThreats(game.getGameState().getCurrentPlayerId(), toRemove);
if (toRemove > 0) {
if (_source != null)
game.getGameState().sendMessage(GameUtils.getCardLink(_source) + " removed " + toRemove + " threat" + ((toRemove > 1) ? "s" : ""));
game.getGameState().removeThreats(game.getGameState().getCurrentPlayerId(), toRemove);
}
return new FullEffectResult(null, _count == toRemove, _count == toRemove);
}