#include #include #include "rituals.hpp" TEST_CASE("prototype combat system ideas", "[combat]") { ai::reset(); ai::init("assets/rituals.json"); auto start = ai::load_state("initial"); auto goal = ai::load_state("final"); RitualAI ritual("actions", start, goal); ritual.set_state("has_spikes", true); ritual.update(); fmt::println("\n\n------------ TEST WILL DO PIERCE"); ritual.dump(); REQUIRE(ritual.will_do("pierce_type")); ritual.reset(); ritual.set_state("has_magick", true); ritual.set_state("has_spikes", true); ritual.update(); fmt::println("\n\n------------ TEST WILL DO MAGICK TOO"); ritual.dump(); REQUIRE(ritual.will_do("magick_type")); ritual.plan.script.pop_front(); REQUIRE(ritual.will_do("pierce_type")); ritual.reset(); ritual.set_state("has_magick", true); ritual.set_state("has_spikes", true); ritual.set_state("shiny_bauble", true); ritual.update(); fmt::println("\n\n------------ TEST WILL DO DAMAGE BOOST"); ritual.dump(); ritual.reset(); ritual.set_state("has_magick", true); ritual.set_state("cursed_item", true); ritual.set_state("shiny_bauble", true); ritual.update(); fmt::println("\n\n------------ TEST WILL DO LARGE DAMAGE BOOST"); ritual.dump(); }