extends Node

signal entity_registered(entity: Node)
signal entity_deregistered(entity: Node)

signal damage_requested(attacker: Node, target: Node, amount: float, element: int)
signal heal_requested(healer: Node, target: Node, amount: float)
signal damage_dealt(attacker: Node, target: Node, amount: float)
signal entity_died(entity: Node)
signal entity_respawned(entity: Node)
signal health_changed(entity: Node, current: float, max: float)
signal shield_changed(entity: Node, current: float, max: float)
signal shield_broken(entity: Node)

signal ability_use_requested(player: Node, ability_index: int)
signal ability_used(player: Node, ability_index: int, ability: Resource)
signal cooldown_tick(entity: Node, cds: PackedFloat32Array, max_cds: PackedFloat32Array, gcd: float)
signal role_changed(player: Node, role: int)
signal target_changed(player: Node, target: Node)

signal effect_applied(target: Node, effect: Resource, source: Node)
signal effect_expired(target: Node, effect: Resource)
signal element_applied(target: Node, element: int)
signal buff_changed(entity: Node, stat: StringName, value: float)

signal enemy_detected(enemy: Node, player: Node)
signal enemy_lost(enemy: Node, player: Node)
signal enemy_engaged(enemy: Node, target: Node)

signal gate_destroyed(gate: Node)
signal portal_spawned(portal: Node)
signal portal_entered(portal: Node, player: Node)
signal dungeon_cleared(seed: int)
signal boss_defeated(boss: Node)

signal loot_dropped(items: Array, position: Vector3)
signal item_picked_up(player: Node, item: Resource)
signal inventory_changed(player: Node)
signal item_crafted(player: Node, item: Resource)
signal building_placed(building: Node)
signal building_removed(building: Node)

signal wave_started(wave_number: int)
signal wave_timer_tick(seconds_remaining: float)
signal wave_ended(wave_number: int, success: bool)
signal invasion_started()
signal invasion_ended(success: bool)
signal village_damaged(current: float, max: float)
signal village_destroyed()
signal game_over()
signal run_started(wave_number: int)

signal xp_gained(player: Node, amount: float)
signal level_up(player: Node, new_level: int)

signal dialog_opened(player: Node, npc: Node)
signal dialog_closed(player: Node)
signal chat_message(peer_id: int, sender_name: String, text: String)

signal scene_change_requested(scene_path: String)
