diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-02 15:40:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 15:40:00 +0100 |
commit | 4c8da86c3bede8834f381fa63edaa3e140131f69 (patch) | |
tree | ff3433a63e91b9239eb7226e75054314182d6c1f /src/openvic-simulation/politics/Rebel.hpp | |
parent | 66b80459c9d49895de902432bce11176b1270878 (diff) | |
parent | 5f64f983d0cead266a28791be42162c443fd2a75 (diff) |
Merge pull request #112 from OpenVicProject/script-framework
Added framework for loading all Conditions and Effects
Diffstat (limited to 'src/openvic-simulation/politics/Rebel.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Rebel.hpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/openvic-simulation/politics/Rebel.hpp b/src/openvic-simulation/politics/Rebel.hpp index f7e8795..f098fe0 100644 --- a/src/openvic-simulation/politics/Rebel.hpp +++ b/src/openvic-simulation/politics/Rebel.hpp @@ -5,6 +5,8 @@ #include "openvic-simulation/misc/Modifier.hpp" #include "openvic-simulation/politics/Government.hpp" #include "openvic-simulation/politics/Ideology.hpp" +#include "openvic-simulation/scripts/ConditionalWeight.hpp" +#include "openvic-simulation/scripts/EffectScript.hpp" #include "openvic-simulation/types/IdentifierRegistry.hpp" #include "openvic-simulation/types/OrderedContainers.hpp" @@ -51,15 +53,28 @@ namespace OpenVic { const bool PROPERTY_CUSTOM_PREFIX(smart, is); const bool PROPERTY_CUSTOM_NAME(unit_transfer, will_transfer_units); const fixed_point_t PROPERTY(occupation_mult); + ConditionalWeight PROPERTY(will_rise); + ConditionalWeight PROPERTY(spawn_chance); + ConditionalWeight PROPERTY(movement_evaluation); + ConditionScript PROPERTY(siege_won_trigger); + EffectScript PROPERTY(siege_won_effect); + ConditionScript PROPERTY(demands_enforced_trigger); + EffectScript PROPERTY(demands_enforced_effect); RebelType( std::string_view new_identifier, RebelType::icon_t icon, RebelType::area_t area, bool break_alliance_on_win, RebelType::government_map_t&& desired_governments, RebelType::defection_t defection, RebelType::independence_t independence, uint16_t defect_delay, Ideology const* ideology, bool allow_all_cultures, bool allow_all_culture_groups, bool allow_all_religions, bool allow_all_ideologies, bool resilient, - bool reinforcing, bool general, bool smart, bool unit_transfer, fixed_point_t occupation_mult + bool reinforcing, bool general, bool smart, bool unit_transfer, fixed_point_t occupation_mult, + ConditionalWeight&& new_will_rise, ConditionalWeight&& new_spawn_chance, + ConditionalWeight&& new_movement_evaluation, ConditionScript&& new_siege_won_trigger, + EffectScript&& new_siege_won_effect, ConditionScript&& new_demands_enforced_trigger, + EffectScript&& new_demands_enforced_effect ); + bool parse_scripts(GameManager& game_manager); + public: RebelType(RebelType&&) = default; }; @@ -74,10 +89,15 @@ namespace OpenVic { RebelType::government_map_t&& desired_governments, RebelType::defection_t defection, RebelType::independence_t independence, uint16_t defect_delay, Ideology const* ideology, bool allow_all_cultures, bool allow_all_culture_groups, bool allow_all_religions, bool allow_all_ideologies, bool resilient, - bool reinforcing, bool general, bool smart, bool unit_transfer, fixed_point_t occupation_mult + bool reinforcing, bool general, bool smart, bool unit_transfer, fixed_point_t occupation_mult, + ConditionalWeight&& will_rise, ConditionalWeight&& spawn_chance, ConditionalWeight&& movement_evaluation, + ConditionScript&& siege_won_trigger, EffectScript&& siege_won_effect, ConditionScript&& demands_enforced_trigger, + EffectScript&& demands_enforced_effect ); bool load_rebels_file(IdeologyManager const& ideology_manager, GovernmentTypeManager const& government_type_manager, ast::NodeCPtr root); bool generate_modifiers(ModifierManager& modifier_manager) const; + + bool parse_scripts(GameManager& game_manager); }; }
\ No newline at end of file |