From a08bb0b2e80f5cd1476177ed1072d571429e728f Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 9 Aug 2024 15:44:23 +0200 Subject: [PATCH] feat: enemy_unit now has defeat_enemy_unit and maintain_health separate --- godot/AI/defeat_enemy_unit.tres | 1 - godot/AI/maintain_health.tres | 1 - godot/GameObjects/enemy_unit.tscn | 11 ++--------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/godot/AI/defeat_enemy_unit.tres b/godot/AI/defeat_enemy_unit.tres index 7f26067..a3a9c16 100644 --- a/godot/AI/defeat_enemy_unit.tres +++ b/godot/AI/defeat_enemy_unit.tres @@ -5,6 +5,5 @@ requirements_dict = { "is_target_enemy": true } desired_state_dict = { -"is_health_safe": true, "is_target_dead": true } diff --git a/godot/AI/maintain_health.tres b/godot/AI/maintain_health.tres index d8a7000..6126e85 100644 --- a/godot/AI/maintain_health.tres +++ b/godot/AI/maintain_health.tres @@ -5,6 +5,5 @@ requirements_dict = { "is_health_safe": false } desired_state_dict = { -"can_see_target": false, "is_health_safe": true } diff --git a/godot/GameObjects/enemy_unit.tscn b/godot/GameObjects/enemy_unit.tscn index d3a4831..f8f7e5f 100644 --- a/godot/GameObjects/enemy_unit.tscn +++ b/godot/GameObjects/enemy_unit.tscn @@ -1,16 +1,9 @@ [gd_scene load_steps=9 format=3 uid="uid://ba17jrcaduowj"] [ext_resource type="Goal" uid="uid://b4i4e34046n44" path="res://AI/defeat_enemy_unit.tres" id="1_b1qo1"] +[ext_resource type="Goal" uid="uid://btv8ultseri3q" path="res://AI/maintain_health.tres" id="1_jwvis"] [ext_resource type="AnimationLibrary" uid="uid://crkh5gahl2ci6" path="res://Animation/bean_characters.res" id="2_lrpu6"] -[sub_resource type="Goal" id="Goal_1c3rq"] -requirements_dict = { -"has_target": false -} -desired_state_dict = { -"is_health_safe": true -} - [sub_resource type="SphereShape3D" id="SphereShape3D_5pqvg"] radius = 15.6018 @@ -35,7 +28,7 @@ collision_layer = 6 collision_mask = 0 [node name="ActorWorldState" type="EnemyWorldState" parent="."] -editor_available_goals = [ExtResource("1_b1qo1"), SubResource("Goal_1c3rq")] +editor_available_goals = [ExtResource("1_jwvis"), ExtResource("1_b1qo1")] unique_name_in_owner = true [node name="Planner" type="Planner" parent="."]