AI engine is working and I have a little BattleEngine going but the AI is working better than it should in systems.cpp. Need to find out why then make the BattleEngine avoid running entities that have END in action lists.

This commit is contained in:
Zed A. Shaw 2025-03-26 13:34:52 -04:00
parent da273cbee6
commit 47c6bfd531
13 changed files with 131 additions and 27 deletions

View file

@ -2,8 +2,20 @@
#include "goap.hpp"
#include "ai.hpp"
#include "config.hpp"
#include <functional>
#include "dinkyecs.hpp"
namespace combat {
struct BattleEngine {
std::unordered_map<DinkyECS::Entity, ai::EntityAI&> combatants;
void add_enemy(DinkyECS::Entity enemy_id, ai::EntityAI& enemy);
bool plan();
void fight(std::function<void(DinkyECS::Entity, ai::EntityAI &)> cb);
void dump();
};
struct RitualAI {
std::string script;
ai::State start;