diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Factory.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Factory.java b/core/src/ch/asynk/tankontank/game/Factory.java index 3f1e80a..ac4d671 100644 --- a/core/src/ch/asynk/tankontank/game/Factory.java +++ b/core/src/ch/asynk/tankontank/game/Factory.java @@ -73,6 +73,7 @@ public class Factory implements Board.TileBuilder, Disposable u = new Unit(Army.GE, ut, 3, 11, 1, pawnAtlas, "ge-tiger", "head"); break; case GE_WESPE: + ut = Unit.UnitType.ARTILLERY; u = new Unit(Army.GE, ut, 5, 8, 1, pawnAtlas, "ge-wespe", "head"); break; case US_AT_GUN: @@ -90,6 +91,7 @@ public class Factory implements Board.TileBuilder, Disposable u = new Unit(Army.US, utHq, 3, 10, 2, pawnAtlas, "us-pershing-hq", "head"); break; case US_PRIEST: + ut = Unit.UnitType.ARTILLERY; u = new Unit(Army.US, ut, 5, 8, 1, pawnAtlas, "us-priest", "head"); break; case US_SHERMAN: diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index b559489..6798aed 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -17,7 +17,8 @@ public class Unit extends HeadedPawn HARD_TARGET, HARD_TARGET_HQ, INFANTRY, - AT_GUN + AT_GUN, + ARTILLERY } public int rng; @@ -138,6 +139,12 @@ public class Unit extends HeadedPawn } @Override + public boolean canAssistAttackWithoutLos() + { + return (type == UnitType.ARTILLERY); + } + + @Override public boolean canAttack(Pawn other) { return isEnemy(other); |