You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
#pragma once
|
|
#include "goap.hpp"
|
|
#include "ai.hpp"
|
|
#include "config.hpp"
|
|
|
|
namespace combat {
|
|
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() {};
|
|
|
|
bool will_do(std::string name);
|
|
void dump();
|
|
ai::Action pop();
|
|
};
|
|
|
|
struct RitualEngine {
|
|
Config $config;
|
|
ai::AIProfile $profile;
|
|
std::unordered_map<std::string, ai::Action> $actions;
|
|
std::unordered_map<std::string, ai::State> $states;
|
|
std::unordered_map<std::string, std::vector<ai::Action>> $scripts;
|
|
|
|
RitualEngine(std::string config_path);
|
|
|
|
ai::State load_state(std::string name);
|
|
ai::Action load_action(std::string name);
|
|
RitualAI start();
|
|
void reset(RitualAI& ritual);
|
|
void set_state(RitualAI& ritual, std::string name, bool setting);
|
|
void plan(RitualAI& ritual);
|
|
};
|
|
}
|
|
|