Improved the code so it uses ai::EntityAI and it now will find healing when it gets low. Has a bug where it stalls when finding healing and gets into combat.

This commit is contained in:
Zed A. Shaw 2025-09-07 23:56:24 -04:00
parent 7207d53885
commit 0afaa20c1d
4 changed files with 31 additions and 29 deletions

View file

@ -23,6 +23,7 @@
"enemy_found": false
},
"effects": {
"in_combat": true,
"enemy_found": true
}
},
@ -67,7 +68,7 @@
},
{
"name": "find_healing",
"cost": 5,
"cost": 2,
"needs": {
"have_healing": false,
"in_combat": false,
@ -79,11 +80,10 @@
},
{
"name": "use_healing",
"cost": 0,
"cost": 1,
"needs": {
"have_item": true,
"have_healing": true,
"in_combat": false,
"health_good": false
},
"effects": {
@ -132,6 +132,7 @@
["find_enemy",
"kill_enemy",
"collect_items",
"find_healing",
"use_healing"],
"Enemy::actions":
["find_enemy", "run_away", "kill_enemy", "use_healing"]