Message displayed only if twilight added/removed is greater than 0.

This commit is contained in:
marcins78@gmail.com
2011-09-14 11:26:51 +00:00
parent 98bbb068a7
commit 5c101d5329
2 changed files with 8 additions and 4 deletions

View File

@@ -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");
}
}
}

View File

@@ -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");
}
}
}