Gave up on trying to get the GOAP algorithm to correctly apply the cost structure to competing choices, and instead I take the resulting action list and simply find the next best one based on cost.
This commit is contained in:
parent
52f45e1d45
commit
c014e65c13
11 changed files with 43 additions and 30 deletions
|
@ -120,6 +120,6 @@
|
|||
"collect_items",
|
||||
"use_healing"],
|
||||
"Enemy::actions":
|
||||
["find_enemy", "kill_enemy", "run_away", "use_healing"]
|
||||
["find_enemy", "run_away", "kill_enemy", "use_healing"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
"foreground": [205, 164, 246],
|
||||
"background": [30, 20, 75]
|
||||
},
|
||||
{"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 20, "dead": false},
|
||||
{"_type": "Combat", "hp": 200, "max_hp": 200, "damage": 20, "dead": false},
|
||||
{"_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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue