diff options
| -rw-r--r-- | go/ui/hoverable.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/go/ui/hoverable.go b/go/ui/hoverable.go index 75c04fe8..af50d890 100644 --- a/go/ui/hoverable.go +++ b/go/ui/hoverable.go @@ -1,7 +1,6 @@ package ui import ( - "golang.org/x/exp/slices" "muhq.space/muhqs-game/go/game" ) @@ -103,21 +102,11 @@ func (h *hoverPermInfo) init(mv *MapView, c *Collection) { } if unit, ok := obj.(*game.Unit); ok { - reachableRange := unit.Attack.MaxRange() + unit.Movement.Range movable := unit.MoveRangeTiles() for _, t := range movable { mv.AddHighlightTile(t, HighlightMovementColor) } - // TODO: only show actually reachable tiles - attackable := game.TilesInRange(mv.gameState.Map(), perm, reachableRange) - for _, t := range attackable { - if slices.Contains(movable, t) { - continue - } - mv.AddHighlightTile(t, HighlightAttackColor) - } - h.reset = func() { mv.ClearTileHighlights() } |
