[gd_scene format=3 uid="uid://dy1icabu2ssbw"]

[ext_resource type="Script" path="res://systems/ability_system.gd" id="ability_system"]
[ext_resource type="Script" path="res://systems/aggro/aggro_decay.gd" id="aggro_decay"]
[ext_resource type="Script" path="res://systems/aggro/aggro_events.gd" id="aggro_events"]
[ext_resource type="Script" path="res://systems/aggro/aggro_system.gd" id="aggro_system"]
[ext_resource type="Script" path="res://systems/aggro/aggro_tracker.gd" id="aggro_tracker"]
[ext_resource type="Script" path="res://systems/attack_system.gd" id="attack_system"]
[ext_resource type="Script" path="res://systems/cooldown_system.gd" id="cooldown_system"]
[ext_resource type="Script" path="res://systems/damage_system.gd" id="damage_system"]
[ext_resource type="Script" path="res://systems/health_system.gd" id="health_system"]
[ext_resource type="Script" path="res://systems/heal_system.gd" id="heal_system"]
[ext_resource type="Script" path="res://systems/role_system.gd" id="role_system"]
[ext_resource type="Script" path="res://systems/targeting_system.gd" id="targeting_system"]
[ext_resource type="Script" path="res://systems/portal_system.gd" id="portal_system"]
[ext_resource type="Script" path="res://systems/aura_system.gd" id="aura_system"]
[ext_resource type="Script" path="res://systems/buff_system.gd" id="buff_system"]
[ext_resource type="Script" path="res://systems/debuff_system.gd" id="debuff_system"]
[ext_resource type="Script" path="res://systems/element_system.gd" id="element_system"]
[ext_resource type="Script" path="res://systems/hud_system.gd" id="hud_system"]
[ext_resource type="Script" path="res://systems/nameplate_system.gd" id="nameplate_system"]
[ext_resource type="Script" path="res://systems/ai_system.gd" id="ai_system"]
[ext_resource type="Script" path="res://systems/respawn_system.gd" id="respawn_system"]
[ext_resource type="Script" path="res://systems/shield_system.gd" id="shield_system"]
[ext_resource type="Script" path="res://systems/spawn_system.gd" id="spawn_system"]
[ext_resource type="Script" path="res://systems/wave_system.gd" id="wave_system"]
[ext_resource type="Script" path="res://systems/xp_system.gd" id="xp_system"]
[ext_resource type="Script" path="res://systems/invasion_system.gd" id="invasion_system"]
[ext_resource type="Script" path="res://systems/audio_system.gd" id="audio_system"]
[ext_resource type="Script" path="res://scenes/world/world_manager.gd" id="world_manager"]
[ext_resource type="PackedScene" path="res://scenes/menu/game_over_overlay.tscn" id="game_over_overlay"]
[ext_resource type="PackedScene" path="res://scenes/hud/hud.tscn" id="hud"]
[ext_resource type="PackedScene" path="res://scenes/tavern/tavern.tscn" id="tavern"]
[ext_resource type="PackedScene" uid="uid://cdnkbt1f0db7e" path="res://scenes/player/player.tscn" id="player"]
[ext_resource type="Script" path="res://scenes/world/portal_spawner.gd" id="portal_spawner"]
[ext_resource type="Resource" uid="uid://cgxtn7dfs40bh" path="res://scenes/player/role/tank/set.tres" id="tank_set"]
[ext_resource type="Resource" uid="uid://beodknb6i1pm4" path="res://scenes/player/role/damage/set.tres" id="damage_set"]
[ext_resource type="Resource" uid="uid://kcwuhnqy34mj" path="res://scenes/player/role/healer/set.tres" id="healer_set"]

[sub_resource type="NavigationMesh" id="NavigationMesh_1"]
vertices = PackedVector3Array(-49.5, 0.5, -49.5, -49.5, 0.5, 49.5, 49.5, 0.5, 49.5, 49.5, 0.5, -49.5)
polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)]

[sub_resource type="Gradient" id="Gradient_1"]
colors = PackedColorArray(0.15, 0.35, 0.05, 1, 0.3, 0.55, 0.1, 1)

[sub_resource type="FastNoiseLite" id="FastNoiseLite_1"]
frequency = 0.05

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_1"]
noise = SubResource("FastNoiseLite_1")
color_ramp = SubResource("Gradient_1")
seamless = true

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ground"]
albedo_texture = SubResource("NoiseTexture2D_1")
uv1_scale = Vector3(15, 15, 1)

[sub_resource type="PlaneMesh" id="PlaneMesh_1"]
material = SubResource("StandardMaterial3D_ground")
size = Vector2(100, 100)

[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_1"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tavern"]
albedo_color = Color(0.45, 0.3, 0.15, 1)

[sub_resource type="BoxMesh" id="BoxMesh_tavern"]
material = SubResource("StandardMaterial3D_tavern")
size = Vector3(5, 3, 5)

[sub_resource type="BoxShape3D" id="BoxShape3D_tavern"]
size = Vector3(5, 3, 5)

[node name="World" type="Node3D"]

[node name="Systems" type="Node" parent="."]

[node name="HealthSystem" type="Node" parent="Systems"]
script = ExtResource("health_system")

[node name="DamageSystem" type="Node" parent="Systems"]
script = ExtResource("damage_system")

[node name="HealSystem" type="Node" parent="Systems"]
script = ExtResource("heal_system")

[node name="ShieldSystem" type="Node" parent="Systems"]
script = ExtResource("shield_system")

[node name="RoleSystem" type="Node" parent="Systems"]
script = ExtResource("role_system")
tank_set = ExtResource("tank_set")
damage_set = ExtResource("damage_set")
healer_set = ExtResource("healer_set")

[node name="AbilitySystem" type="Node" parent="Systems"]
script = ExtResource("ability_system")

[node name="AttackSystem" type="Node" parent="Systems"]
script = ExtResource("attack_system")

[node name="CooldownSystem" type="Node" parent="Systems"]
script = ExtResource("cooldown_system")

[node name="TargetingSystem" type="Node" parent="Systems"]
script = ExtResource("targeting_system")

[node name="AggroSystem" type="Node" parent="Systems"]
script = ExtResource("aggro_system")

[node name="AggroTracker" type="Node" parent="Systems/AggroSystem"]
script = ExtResource("aggro_tracker")

[node name="AggroDecay" type="Node" parent="Systems/AggroSystem"]
script = ExtResource("aggro_decay")

[node name="AggroEvents" type="Node" parent="Systems/AggroSystem"]
script = ExtResource("aggro_events")

[node name="AISystem" type="Node" parent="Systems"]
script = ExtResource("ai_system")

[node name="RespawnSystem" type="Node" parent="Systems"]
script = ExtResource("respawn_system")

[node name="SpawnSystem" type="Node" parent="Systems"]
script = ExtResource("spawn_system")

[node name="PortalSystem" type="Node" parent="Systems"]
script = ExtResource("portal_system")

[node name="AuraSystem" type="Node" parent="Systems"]
script = ExtResource("aura_system")

[node name="BuffSystem" type="Node" parent="Systems"]
script = ExtResource("buff_system")

[node name="DebuffSystem" type="Node" parent="Systems"]
script = ExtResource("debuff_system")

[node name="ElementSystem" type="Node" parent="Systems"]
script = ExtResource("element_system")

[node name="HudSystem" type="Node" parent="Systems"]
script = ExtResource("hud_system")

[node name="NameplateSystem" type="Node" parent="Systems"]
script = ExtResource("nameplate_system")

[node name="WaveSystem" type="Node" parent="Systems"]
script = ExtResource("wave_system")

[node name="XpSystem" type="Node" parent="Systems"]
script = ExtResource("xp_system")

[node name="InvasionSystem" type="Node" parent="Systems"]
script = ExtResource("invasion_system")

[node name="AudioSystem" type="Node" parent="Systems"]
script = ExtResource("audio_system")

[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0027503967, 0.014227867, 0.023231506)
navigation_mesh = SubResource("NavigationMesh_1")

[node name="Boden" type="MeshInstance3D" parent="NavigationRegion3D"]
mesh = SubResource("PlaneMesh_1")

[node name="BodenCollision" type="StaticBody3D" parent="."]

[node name="CollisionShape3D" type="CollisionShape3D" parent="BodenCollision"]
shape = SubResource("WorldBoundaryShape3D_1")

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707, 0.707, 0, -0.707, 0.707, 0, 10, 0)
shadow_enabled = true

[node name="Tavern" parent="." instance=ExtResource("tavern")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)

[node name="Player" parent="." instance=ExtResource("player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -5)

[node name="HUD" parent="." instance=ExtResource("hud")]

[node name="PortalSpawner" type="Node" parent="."]
script = ExtResource("portal_spawner")

[node name="WorldManager" type="Node" parent="."]
script = ExtResource("world_manager")

[node name="GameOverOverlay" parent="." instance=ExtResource("game_over_overlay")]
