diff --git a/assets/ai.json b/assets/ai.json index 6679d2e..eb3e6bd 100644 --- a/assets/ai.json +++ b/assets/ai.json @@ -65,6 +65,18 @@ "no_more_items": true } }, + { + "name": "find_healing", + "cost": 5, + "needs": { + "have_healing": false, + "in_combat": false, + "health_good": false + }, + "effects": { + "health_good": true + } + }, { "name": "use_healing", "cost": 0, diff --git a/assets/enemies.json b/assets/enemies.json index c477614..5fbd8a1 100644 --- a/assets/enemies.json +++ b/assets/enemies.json @@ -22,7 +22,7 @@ {"_type": "Collision", "has": true}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, - {"_type": "Personality", "hearing_distance": 5, "tough": false}, + {"_type": "Personality", "hearing_distance": 5, "tough": true}, {"_type": "Animation", "easing": 1, "ease_rate": 0.2, "scale": 0.1, "simple": true, "frames": 10, "speed": 0.3, "stationary": false}, {"_type": "Sprite", "name": "gold_savior", "width": 256, "height": 256, "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sound", "attack": "Sword_Hit_2", "death": "Humanoid_Death_1"} @@ -70,7 +70,7 @@ {"_type": "Collision", "has": true}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, - {"_type": "Personality", "hearing_distance": 5, "tough": false}, + {"_type": "Personality", "hearing_distance": 5, "tough": true}, {"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 1, "speed": 1.0, "stationary": false}, {"_type": "Sprite", "name": "rat_with_sword", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sound", "attack": "Small_Rat", "death": "Creature_Death_1"} diff --git a/autowalker.cpp b/autowalker.cpp index 1611e18..6a0378e 100644 --- a/autowalker.cpp +++ b/autowalker.cpp @@ -209,8 +209,8 @@ void Autowalker::handle_player_walk(ai::State& start, ai::State& goal) { } else if(action.name == "use_healing") { status(L"USING HEALING"); player_use_healing(); - } else if(action.name == "collect_items") { - status(L"COLLECTING ITEMS"); + } else if(action.name == "collect_items" || action.name == "find_healing") { + status(action.name == "collection_items" ? L"COLLECTING ITEMS" : L"FIND HEALING"); auto paths = path_to_items();