diff --git a/assets/rituals.json b/assets/rituals.json index 7f2bfbd..d3ea4d7 100644 --- a/assets/rituals.json +++ b/assets/rituals.json @@ -1,65 +1,138 @@ { "profile": { - "does_damage": 0, - "has_spikes": 1, - "has_magick": 2, - "does_physical": 3, - "does_magick": 4, - "is_complete": 5 + "has_spikes": 0, + "has_magick": 1, + "shiny_bauble": 2, + "cursed_item": 3, + "$does_physical": 4, + "$does_magick": 5, + "$does_damage": 6, + "$user_cursed": 7, + "$does_healing": 8, + "$damage_boost": 9, + "$large_boost": 10, + "$is_complete": 11 }, "actions": [ { "name": "pierce_type", - "cost": 0, + "cost": 100, "needs": { - "is_complete": false, - "has_spikes": true + "has_spikes": true, + "$is_complete": false }, "effects": { - "does_physical": true, - "does_damage": true + "$does_physical": true, + "$does_damage": true } }, { "name": "magick_type", - "cost": 0, + "cost": 100, "needs": { - "is_complete": false, + "$is_complete": false, "has_magick": true }, "effects": { - "does_magick": true, - "does_damage": true + "$does_magick": true, + "$does_damage": true } }, { "name": "combined", "cost": 0, "needs": { - "does_damage": true + "$does_damage": true + }, + "effects": { + "$is_complete": true + } + }, + { + "name": "boost_magick", + "cost": 0, + "needs": { + "shiny_bauble": true, + "$does_magick": true, + "$does_damage": true, + "$is_complete": false, + "$user_cursed": false + }, + "effects": { + "$damage_boost": true + } + }, + { + "name": "boost_damage_large", + "cost": 0, + "needs": { + "$user_cursed": true, + "$is_complete": false, + "$does_damage": true + }, + "effects": { + "$large_boost": true + } + }, + { + "name": "curses_user", + "cost": 1000, + "needs": { + "$is_complete": false, + "cursed_item": true + }, + "effects": { + "$user_cursed": true + } + }, + { + "name": "heals_user", + "cost": 0, + "needs": { + "cursed_item": true, + "$does_damage": false }, "effects": { - "is_complete": true + "$does_healing": true, + "$is_complete": true } } ], "states": { "initial": { + "shiny_bauble": false, + "cursed_item": false, "has_spikes": false, "has_magick": false, - "does_damage": false, - "is_complete": false, - "does_magick": false, - "does_physical": false + "$user_cursed": false, + "$does_damage": false, + "$is_complete": false, + "$does_healing": false, + "$does_magick": false, + "$does_physical": false, + "$large_boost": false, + "$damage_boost": false }, "final": { - "does_magick": true, - "does_physical": true, - "does_damage": true, - "is_complete": true + "$user_cursed": true, + "$does_damage": true, + "$is_complete": true, + "$does_healing": true, + "$does_magick": true, + "$does_physical": true, + "$large_boost": true, + "$damage_boost": true } }, "scripts": { - "actions": ["pierce_type", "magick_type", "combined"] + "actions": [ + "boost_magick", + "pierce_type", + "magick_type", + "heals_user", + "curses_user", + "boost_damage_large", + "combined" + ] } } diff --git a/tests/combat.cpp b/tests/combat.cpp index 4bf6b92..b1365ec 100644 --- a/tests/combat.cpp +++ b/tests/combat.cpp @@ -50,7 +50,7 @@ TEST_CASE("prototype combat system ideas", "[combat]") { ritual.set_state("has_spikes", true); ritual.update(); - fmt::println("------------ TEST WILL DO PIERCE"); + fmt::println("\n\n------------ TEST WILL DO PIERCE"); ritual.dump(); REQUIRE(ritual.will_do("pierce_type")); @@ -58,10 +58,27 @@ TEST_CASE("prototype combat system ideas", "[combat]") { ritual.set_state("has_magick", true); ritual.set_state("has_spikes", true); ritual.update(); - fmt::println("------------ TEST WILL DO MAGICK TOO"); + 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(); + }