class_name StrategyPhase extends Node2D

@onready var player_controller: PlayerController = $PlayerController
@onready var combat_system: CombatSystem = $CombatSystem
@onready var combat_ui: CombatUI = $CombatUI

func _ready() -> void:
	player_controller.combat_requested.connect(_on_combat_requested)
	combat_ui.fight_confirmed.connect(_on_fight_confirmed)

func _on_combat_requested(attacker: Unit, defender: Unit) -> void:
	var proposal := combat_system.create_proposal(attacker, defender)
	combat_ui.show_proposal(proposal)

func _on_fight_confirmed(proposal: CombatProposal) -> void:
	combat_system.apply_proposal(proposal)
