Rituals are more or less sorted out in theory, and they helped find a cycle in the GOAP algorithm that I'm detecting/preventing.

This commit is contained in:
Zed A. Shaw 2025-03-16 13:34:38 -04:00
parent 8368d2e751
commit 49531ba148
9 changed files with 94 additions and 48 deletions

23
rituals.hpp Normal file
View file

@ -0,0 +1,23 @@
#pragma once
#include "ai.hpp"
struct RitualAI {
std::string script;
ai::State start;
ai::State original;
ai::State goal;
ai::ActionPlan plan;
RitualAI(std::string script, ai::State start, ai::State goal) :
script(script), start(start), original(start), goal(goal)
{
}
RitualAI() {};
void reset();
bool will_do(std::string name);
void set_state(std::string name, bool setting);
void update();
void dump();
};