Fixed some bugs. Fixed regression in 4th round bee rule

This commit is contained in:
Sch1nken 2024-03-30 12:23:53 +01:00
parent d5d4b8eed1
commit e7baa34859
2 changed files with 7 additions and 2 deletions

View file

@ -26,6 +26,8 @@ func get_targets(source_pos: Vector4i, map: HexGrid) -> Array[InsectTile]:
# TODO: Update movement selection
if source_pos.w > 0:
return []
var can_move: bool = map.can_hive_exist_without_tile(map.get_tile(source_pos))
var neighbours = map.get_neighbours(source_pos)
# Filter out other mosquitos
@ -37,8 +39,11 @@ func get_targets(source_pos: Vector4i, map: HexGrid) -> Array[InsectTile]:
if tile.resource.movement_behaviour is MovementBehaviourMosquito:
continue
if tile.resource.movement_behaviour.get_available_spaces(source_pos, map).size() > 0:
if tile.resource.action_behaviour != null:
possible_action_targets.push_back(tile)
elif tile.resource.movement_behaviour.get_available_spaces(source_pos, map).size() > 0:
if can_move:
possible_action_targets.push_back(tile)
#GameEvents.insect_tiles_selected_for_action.emit(source_pos, possible_action_targets)

View file

@ -134,7 +134,7 @@ func _on_turn_started(turn_num: int, map: HexGrid, _is_blacks_turn: bool) -> voi
can_be_selected = GameData.bees_placed.has(is_black)
#print(GameData.has_bee_been_placed)
if turn_num >= 7 and not GameData.bees_placed.has(is_black):
can_be_selected = true
can_be_selected = false
if can_be_selected:
tween_normal()