extends Node

const ROLE_TANK: int = 0
const ROLE_DAMAGE: int = 1
const ROLE_HEALER: int = 2

const SCENE_MAIN_MENU: String = "res://scenes/menu/main_menu.tscn"
const SCENE_LOBBY: String = "res://scenes/menu/lobby.tscn"
const SCENE_WORLD: String = "res://scenes/world/world.tscn"
const SCENE_DUNGEON: String = "res://scenes/dungeon/dungeon.tscn"
const SCENE_OPTIONS: String = "res://scenes/menu/options_menu.tscn"

var current_scene: String = SCENE_MAIN_MENU
var paused: bool = false
var run_seed: int = 0
var dungeon_seed: int = 0
var dungeon_red: bool = false
var current_wave: int = 1
var portal_return_position: Vector3 = Vector3.ZERO

func reset_run() -> void:
  run_seed = randi()
  current_wave = 1
  dungeon_seed = 0
  dungeon_red = false
  paused = false
  Stats.clear_all()

func change_scene(path: String) -> void:
  current_scene = path
  EventBus.scene_change_requested.emit(path)
  get_tree().change_scene_to_file(path)

func set_paused(value: bool) -> void:
  paused = value
  get_tree().paused = value
