# Example: # # example_effect = { # treasury = 100 # add_adm_power = 50 # } # # # In a script file: # # effect = { # example_effect = yes # } # divorce_consort_effect = { #Foreign consort family expresses anger if = { limit = { OR = { NOT = { religion = catholic } NOT = { exists = PAP } } has_foreign_consort = yes } random_country = { limit = { is_origin_of_consort = ROOT } hidden_effect = { country_event = { id = consort_events.205 days = 1 } } tooltip = { add_opinion = { who = ROOT modifier = offended_by_divorce } add_casus_belli = { target = ROOT type = cb_insult months = 60 } } } } #Local consort family expresses anger if = { limit = { OR = { NOT = { religion = catholic } NOT = { exists = PAP } } has_foreign_consort = no any_owned_province = { has_province_modifier = domain_of_spouses_family } } every_owned_province = { limit = { has_province_modifier = domain_of_spouses_family } add_province_modifier = { name = angered_nobles duration = 7300 } } } #Set aside first wife and select another if = { limit = { NOT = { religion_group = christian } } custom_tooltip = divorce.a.tt hidden_effect = { if = { limit = { NOT = { any_country = { is_origin_of_consort = ROOT } } } remove_consort = yes country_event = { id = consort_events.206 } } } define_consort = { } } #Divorce if = { limit = { OR = { AND = { religion_group = christian NOT = { religion = catholic } } AND = { religion = catholic NOT = { exists = PAP } } } } custom_tooltip = divorce.b.tt hidden_effect = { if = { limit = { NOT = { any_country = { is_origin_of_consort = ROOT } } } remove_consort = yes country_event = { id = consort_events.206 } } } } #Papal dispensation if = { limit = { religion = catholic exists = PAP } #How much influence will you spend? country_event = { id = consort_events.201 } } #Prestige hit if = { limit = { OR = { NOT = { religion = catholic } NOT = { exists = PAP } } } add_prestige = -15 } } save_origin_of_consort_effect = { if = { # finds and saves foreign country as origin limit = { has_foreign_consort = yes any_country = { has_given_consort_to = ROOT } } random_country = { limit = { has_given_consort_to = ROOT } save_event_target_as = origin_of_consort } } if = { # finds and saves local province as origin limit = { has_foreign_consort = no any_owned_province = { has_province_modifier = domain_of_spouses_family } } random_owned_province = { limit = { has_province_modifier = domain_of_spouses_family } save_event_target_as = origin_of_consort } } if = { # finds and saves local province as origin limit = { has_foreign_consort = no has_ruler_flag = has_lowborn_consort any_owned_province = { has_province_modifier = home_of_consort } } random_owned_province = { limit = { has_province_modifier = home_of_consort } save_event_target_as = origin_of_consort } } if = { # if all else fails: use this consort_flag to set a triggered desc limit = { NOT = { has_saved_event_target = origin_of_consort } } set_consort_flag = home_province_lost } } add_stability_or_adm_power = { if = { limit = { stability = 3 } add_adm_power = 50 } if = { limit = { NOT = { stability = 3 } } add_stability = 1 } }
prostownik11