Enemies and now using the GOAP AI to decide when to attack the player, but it's very rough right now. I need to sort out how to store the AI states and use them in the System.

This commit is contained in:
Zed A. Shaw 2025-03-14 11:14:25 -04:00
parent 77f2e94515
commit ad71631809
13 changed files with 61 additions and 30 deletions

1
ai.cpp
View file

@ -18,6 +18,7 @@ namespace ai {
Action config_action(AIProfile& profile, nlohmann::json& config) {
check(config.contains("name"), "config_action: action config missing name");
check(config.contains("cost"), "config_action: action config missing cost");
check(config["cost"] < STATE_MAX, "config_action: action cost is greater than STATE_MAX");
Action result(config["name"], config["cost"]);