|
|
|
@ -49,7 +49,7 @@ TEST_CASE("RitualEngine basic tests", "[rituals]") { |
|
|
|
|
ritual.dump(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_CASE("rituals can be finalized for the end result", "[rituals-finalize]") { |
|
|
|
|
TEST_CASE("rituals can be finalized for the end result", "[rituals]") { |
|
|
|
|
RitualEngine re("assets/rituals.json"); |
|
|
|
|
auto plan = re.start(); |
|
|
|
|
|
|
|
|
@ -64,3 +64,23 @@ TEST_CASE("rituals can be finalized for the end result", "[rituals-finalize]") { |
|
|
|
|
auto action = re.finalize(plan); |
|
|
|
|
action.dump(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CASE("the ritual belt works", "[rituals-belt]") { |
|
|
|
|
RitualBelt the_belt; |
|
|
|
|
RitualEngine re("assets/rituals.json"); |
|
|
|
|
auto plan = re.start(); |
|
|
|
|
|
|
|
|
|
re.set_state(plan, "has_magick", true); |
|
|
|
|
re.plan(plan); |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
auto action = re.finalize(plan); |
|
|
|
|
the_belt.equipped.push_back(action); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
auto action = the_belt.equipped.at(0); |
|
|
|
|
action.dump(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|