diff --git a/core/src/com/redstrate/watersymbol/screens/GameScreen.java b/core/src/com/redstrate/watersymbol/screens/GameScreen.java index c88f2a4..f0d1132 100644 --- a/core/src/com/redstrate/watersymbol/screens/GameScreen.java +++ b/core/src/com/redstrate/watersymbol/screens/GameScreen.java @@ -194,12 +194,14 @@ public class GameScreen implements Screen { for(Unit unit : units) { if(unit.positionX == x && unit.positionY == y) { - if(unit.team != currentUnit.team) { - actions.add(new AttackAction(currentUnit, unit)); - } else { - // you can't trade with yourself! - if(unit != currentUnit) { - actions.add(new TradeAction()); + if(isAdjacent(currentUnit, unit)) { + if (unit.team != currentUnit.team) { + actions.add(new AttackAction(currentUnit, unit)); + } else { + // you can't trade with yourself! + if (unit != currentUnit) { + actions.add(new TradeAction()); + } } } }