From 5c101d5329a77a7975232528e0605b99b6a1aaff Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 14 Sep 2011 11:26:51 +0000 Subject: [PATCH] Message displayed only if twilight added/removed is greater than 0. --- .../lotro/cards/effects/PayPlayOnTwilightCostEffect.java | 6 ++++-- .../gempukku/lotro/cards/effects/PayTwilightCostEffect.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayPlayOnTwilightCostEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayPlayOnTwilightCostEffect.java index 2ccffbc96..1a082d083 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayPlayOnTwilightCostEffect.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayPlayOnTwilightCostEffect.java @@ -34,10 +34,12 @@ public class PayPlayOnTwilightCostEffect extends UnrespondableEffect { String currentPlayerId = game.getGameState().getCurrentPlayerId(); if (currentPlayerId.equals(_physicalCard.getOwner())) { game.getGameState().addTwilight(twilightCost); - game.getGameState().sendMessage(_physicalCard.getOwner() + " adds " + twilightCost + " to twilight pool"); + if (twilightCost > 0) + game.getGameState().sendMessage(_physicalCard.getOwner() + " adds " + twilightCost + " to twilight pool"); } else { game.getGameState().removeTwilight(twilightCost); - game.getGameState().sendMessage(_physicalCard.getOwner() + " removes " + twilightCost + " from twilight pool"); + if (twilightCost > 0) + game.getGameState().sendMessage(_physicalCard.getOwner() + " removes " + twilightCost + " from twilight pool"); } } } diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayTwilightCostEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayTwilightCostEffect.java index adeb3c4e5..5abacff75 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayTwilightCostEffect.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/PayTwilightCostEffect.java @@ -36,10 +36,12 @@ public class PayTwilightCostEffect extends UnrespondableEffect { String currentPlayerId = game.getGameState().getCurrentPlayerId(); if (currentPlayerId.equals(_physicalCard.getOwner())) { game.getGameState().addTwilight(twilightCost); - game.getGameState().sendMessage(_physicalCard.getOwner() + " adds " + twilightCost + " to twilight pool"); + if (twilightCost > 0) + game.getGameState().sendMessage(_physicalCard.getOwner() + " adds " + twilightCost + " to twilight pool"); } else { game.getGameState().removeTwilight(twilightCost); - game.getGameState().sendMessage(_physicalCard.getOwner() + " removes " + twilightCost + " from twilight pool"); + if (twilightCost > 0) + game.getGameState().sendMessage(_physicalCard.getOwner() + " removes " + twilightCost + " from twilight pool"); } } }