Fixed move penalty

This commit is contained in:
Sch1nken 2024-03-30 19:41:23 +01:00
parent e7baa34859
commit b42b1ae39f
3 changed files with 37 additions and 9 deletions

View file

@ -42,6 +42,19 @@ func get_targets(source_pos: Vector4i, map: HexGrid) -> Array[InsectTile]:
for neighbour in neighbours:
var tile = map.get_tile(neighbour)
if tile == null:
continue
print(tile.move_round_penalty)
if not tile.can_move():
continue
if not map.can_hive_exist_without_tile(tile):
continue
if tile != null:
if not tile.is_in_stack() and tile.can_move():
if can_move_through(source_pos, neighbour, map):