diff options
Diffstat (limited to 'test/src/ch')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/HexScreen.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java b/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java index e60ebe2..3774856 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/HexScreen.java @@ -34,12 +34,18 @@ class Unit extends Piece super(texture); this.hardTarget = hardTarget; if (hardTarget) { - this.mp = 3; - } else { this.mp = 2; + } else { + this.mp = 1; } } + @Override public int roadMarchBonus() + { + if (hardTarget) return 2; + return 0; + } + @Override public int getAvailableMP() { return mp; @@ -50,7 +56,7 @@ class Unit extends Piece Terrain dst = ((Hex)to).terrain; if (dst == Terrain.HILL) return 3; if (!hardTarget) return 1; - if (orientation.belongsTo(((Hex)from).roads)) return 1; + if (((Hex)from).hasRoad(orientation)) return 1; if (dst.difficult()) return 2; return 1; } @@ -126,6 +132,11 @@ class Hex extends Tile this.roads = getRoad(k); } + @Override public boolean hasRoad(Orientation orientation) + { + return orientation.belongsTo(roads); + } + @Override public boolean blockLos(final Tile from, final Tile to, float d, float dt) { int h = terrain.elevation + terrain.height; |