summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-04-22 11:13:12 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-04-22 11:13:12 +0200
commit366c2fdda57bf6b8dac4980c7de51d189296630c (patch)
tree3a1e68cd262ff6fd0f25c3665f860b2b8f107924
parent2909874fec33a83a70310d9aabe201c2d0d858b1 (diff)
downloadRustAndDust-366c2fdda57bf6b8dac4980c7de51d189296630c.zip
RustAndDust-366c2fdda57bf6b8dac4980c7de51d189296630c.tar.gz
Unit: do not substract road march bonus to a 0 cost move
-rw-r--r--core/src/ch/asynk/rustanddust/game/Unit.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Unit.java b/core/src/ch/asynk/rustanddust/game/Unit.java
index 836ac93..a55c7b3 100644
--- a/core/src/ch/asynk/rustanddust/game/Unit.java
+++ b/core/src/ch/asynk/rustanddust/game/Unit.java
@@ -296,7 +296,7 @@ public class Unit extends HeadedPawn
public void move()
{
int cost = move.cost;
- if (move.roadMarch) {
+ if ((cost > 0) && move.roadMarch) {
cost -= getRoadMarchBonus();
if (cost < 1) cost = 1;
}