[gd_scene load_steps=38 format=3 uid="uid://bc054js8ep2b"]

[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_ugrra"]
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_i2plx"]
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="2_swk2c"]
[ext_resource type="Script" uid="uid://tk6ytw246ubg" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_tum7w"]
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_3noop"]
[ext_resource type="Script" uid="uid://pfxrvd1fofnj" path="res://Scripts/Components/Actors/FourWayAnimationHandler.cs" id="5_yr00f"]
[ext_resource type="Script" uid="uid://ghq0lmohdvqf" path="res://Scripts/Components/Actors/ActorAi.cs" id="6_23xma"]
[ext_resource type="Script" uid="uid://dsu7k7ds0cnba" path="res://Scripts/Components/Actors/EnemyNavigationMovement.cs" id="7_2f0xw"]
[ext_resource type="Script" uid="uid://c4qmuxjhheahr" path="res://Scripts/Components/ProximityPlayerDetection.cs" id="8_m5ma3"]
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="9_fyr27"]
[ext_resource type="PackedScene" uid="uid://cj63k0dmk7tl1" path="res://Scenes/Weapons/enemy_weapon_base.tscn" id="10_yktta"]
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="11_kuimj"]
[ext_resource type="Script" uid="uid://2cijskgyt2xb" path="res://Scripts/Components/Actors/DamageReceiverActorModule.cs" id="12_fu5g7"]
[ext_resource type="Script" uid="uid://m0ag88kn0c40" path="res://Scripts/Components/Actors/DeathAnimationHandler.cs" id="13_e2vvk"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="13_hwppe"]
[ext_resource type="Resource" uid="uid://dk2rbf88a5irh" path="res://Resources/Bullets/Explosion_Harmless.tres" id="14_881we"]
[ext_resource type="Script" uid="uid://7g3luecewcp5" path="res://Scripts/Components/Actors/ActorDefeatScriptHandler.cs" id="15_17yce"]
[ext_resource type="PackedScene" uid="uid://cm564ue740cpx" path="res://Scenes/Actors/DeadFairyGuard.tscn" id="15_gsthm"]
[ext_resource type="Script" uid="uid://dwbh55rqi0x5e" path="res://Scripts/Components/Actors/EnemyDropModule.cs" id="16_76vwd"]
[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="17_gsthm"]
[ext_resource type="Resource" uid="uid://ct1fa2huvy34n" path="res://Resources/Items/Ammo1.tres" id="18_hwppe"]
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="19_swk2c"]
[ext_resource type="Resource" uid="uid://clr1gln7nxa1o" path="res://Resources/Items/Power_Pickup.tres" id="20_evv7k"]
[ext_resource type="Resource" uid="uid://dhbltvgsa3g88" path="res://Resources/Items/Spider_Bomb_Pickup.tres" id="21_y1chq"]

[sub_resource type="CircleShape2D" id="CircleShape2D_2b36v"]
radius = 5.0

[sub_resource type="CircleShape2D" id="CircleShape2D_sthwe"]
radius = 85.0529

[sub_resource type="Resource" id="Resource_swk2c"]
script = ExtResource("13_hwppe")
DamageType = 2
Attribute = 2
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="Resource" id="Resource_evv7k"]
script = ExtResource("13_hwppe")
DamageType = 3
Attribute = 2
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="Resource" id="Resource_y1chq"]
script = ExtResource("13_hwppe")
DamageType = 4
Attribute = 2
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="Resource" id="Resource_yrg2w"]
script = ExtResource("13_hwppe")
DamageType = 0
Attribute = 0
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="Resource" id="Resource_i6q2w"]
script = ExtResource("13_hwppe")
DamageType = 5
Attribute = 2
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="Resource" id="Resource_ry6ip"]
script = ExtResource("13_hwppe")
DamageType = 1
Attribute = 0
metadata/_custom_type_script = "uid://ddsqqfx1usc3j"

[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
radius = 5.09902

[sub_resource type="Resource" id="Resource_lh4qp"]
script = ExtResource("17_gsthm")
Item = ExtResource("18_hwppe")
Chance = 40.0
metadata/_custom_type_script = "uid://cq65aed620ijo"

[sub_resource type="Resource" id="Resource_fmqd5"]
script = ExtResource("17_gsthm")
Item = ExtResource("19_swk2c")
Chance = 20.0
metadata/_custom_type_script = "uid://cq65aed620ijo"

[sub_resource type="Resource" id="Resource_gry1a"]
script = ExtResource("17_gsthm")
Item = ExtResource("20_evv7k")
Chance = 20.0
metadata/_custom_type_script = "uid://cq65aed620ijo"

[sub_resource type="Resource" id="Resource_6b6qx"]
script = ExtResource("17_gsthm")
Item = ExtResource("21_y1chq")
Chance = 10.0
metadata/_custom_type_script = "uid://cq65aed620ijo"

[node name="FairyGuard" type="CharacterBody2D"]
collision_layer = 16
collision_mask = 113
script = ExtResource("1_ugrra")
EnemyData = ExtResource("2_swk2c")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("2_i2plx")
animation = &"down"

[node name="MovementProvider" type="Node2D" parent="."]
script = ExtResource("3_tum7w")

[node name="InputProvider" type="Node2D" parent="MovementProvider"]
script = ExtResource("4_3noop")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource("CircleShape2D_2b36v")

[node name="AnimationHandler" type="Node2D" parent="." node_paths=PackedStringArray("_animatedSprite")]
script = ExtResource("5_yr00f")
_animatedSprite = NodePath("../AnimatedSprite2D")

[node name="ActorAi" type="Node2D" parent="."]
script = ExtResource("6_23xma")
Ai = 0

[node name="NavigationMovementProvider" type="Node2D" parent="." node_paths=PackedStringArray("EquippedWeapon", "_playerDetection")]
script = ExtResource("7_2f0xw")
_navigationEnabled = true
CollisionMask = 81
EquippedWeapon = NodePath("../EnemyWeapon")
_playerDetection = NodePath("../PlayerDetection")

[node name="PlayerDetection" type="Area2D" parent="."]
visible = false
collision_layer = 0
collision_mask = 2
script = ExtResource("8_m5ma3")

[node name="PlayerDetectionArea" type="CollisionShape2D" parent="PlayerDetection"]
shape = SubResource("CircleShape2D_sthwe")

[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
target_desired_distance = 64.0
path_max_distance = 800.0
path_postprocessing = 1
avoidance_enabled = true
debug_path_custom_color = Color(1, 0, 0, 1)

[node name="HealthProvider" type="Node2D" parent="."]
script = ExtResource("9_fyr27")
ResourceName = "Health"
_maxResource = 3.0

[node name="EnemyWeapon" parent="." instance=ExtResource("10_yktta")]
WeaponData = ExtResource("11_kuimj")

[node name="DamageReceiver" type="Node2D" parent="." node_paths=PackedStringArray("HealthProvider")]
visible = false
script = ExtResource("12_fu5g7")
HealthProvider = NodePath("../HealthProvider")
BulletGroup = 2
DamageResistances = Array[ExtResource("13_hwppe")]([SubResource("Resource_swk2c"), SubResource("Resource_evv7k"), SubResource("Resource_y1chq"), SubResource("Resource_yrg2w"), SubResource("Resource_i6q2w"), SubResource("Resource_ry6ip")])

[node name="Area2D" type="Area2D" parent="DamageReceiver"]
collision_layer = 16
collision_mask = 8

[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver/Area2D"]
shape = SubResource("CircleShape2D_0tkae")

[node name="DeathAnimation" type="Node2D" parent="."]
script = ExtResource("13_e2vvk")
ExplosionData = ExtResource("14_881we")
DebrisScene = ExtResource("15_gsthm")

[node name="DefeatScriptHandler" type="Node2D" parent="."]
script = ExtResource("15_17yce")

[node name="LootDrops" type="Node2D" parent="."]
script = ExtResource("16_76vwd")
LootDrops = Array[ExtResource("17_gsthm")]([SubResource("Resource_lh4qp"), SubResource("Resource_fmqd5"), SubResource("Resource_gry1a"), SubResource("Resource_6b6qx")])

[connection signal="area_entered" from="PlayerDetection" to="PlayerDetection" method="_on_area_entered"]
[connection signal="area_exited" from="PlayerDetection" to="PlayerDetection" method="_on_area_exited"]
[connection signal="velocity_computed" from="NavigationAgent2D" to="NavigationMovementProvider" method="_on_navigation_agent_2d_velocity_computed"]
[connection signal="area_entered" from="DamageReceiver/Area2D" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
