#pragma once #include "rituals.hpp" #include "config.hpp" #include "dinkyecs.hpp" #include #include "components.hpp" namespace combat { struct Combatant { DinkyECS::Entity entity; ai::EntityAI &ai; components::Combat &combat; }; enum class BattleAction { ATTACK, BLOCK, ESCAPE }; struct BattleResult { Combatant &state; BattleAction action; }; struct BattleEngine { std::unordered_map combatants; std::vector pending_actions; void add_enemy(Combatant ba); bool plan(); std::optional next(); void dump(); void set(DinkyECS::Entity entity, std::string state, bool setting); void set_all(std::string state, bool setting); void queue(DinkyECS::Entity entity, BattleAction action); }; }