Move the ritual stuff to the combat namespace.

master
Zed A. Shaw 3 weeks ago
parent 49531ba148
commit 1d2968f826
  1. 2
      rituals.cpp
  2. 2
      rituals.hpp
  3. 2
      tests/ai.cpp
  4. 1
      tests/rituals.cpp

@ -1,6 +1,7 @@
#include "rituals.hpp"
#include "ai_debug.hpp"
namespace combat {
void RitualAI::reset() {
start = original;
}
@ -21,3 +22,4 @@ void RitualAI::update() {
void RitualAI::dump() {
ai::dump_script(script, start, plan.script);
}
}

@ -1,6 +1,7 @@
#pragma once
#include "ai.hpp"
namespace combat {
struct RitualAI {
std::string script;
ai::State start;
@ -21,3 +22,4 @@ struct RitualAI {
void update();
void dump();
};
}

@ -217,7 +217,7 @@ TEST_CASE("confirm that cycles are avoided/detected", "[ai]") {
auto start = ai::load_state("initial");
auto goal = ai::load_state("final");
RitualAI ritual("actions", start, goal);
combat::RitualAI ritual("actions", start, goal);
ritual.reset();
ritual.set_state("has_magick", true);
ritual.set_state("cursed_item", true);

@ -2,6 +2,7 @@
#include <iostream>
#include "rituals.hpp"
using namespace combat;
TEST_CASE("prototype combat system ideas", "[combat]") {
ai::reset();

Loading…
Cancel
Save