On Action
on_character_death
root = country, scope:target = character who dies
FranceCountryeffect
MughalFormable Countryeffect
OrthodoxyReligioneffectFleury's MinistryStatic ModifiereffectMinister FleuryStatic ModifiereffectBetrothedStatic Modifiereffectchi_captured_emperor_originVariableeffectchinese_treasure_voyage_runningVariableeffectfavored_heirVariableeffectfavored_in_countryVariableeffecthome_countryVariableeffecthostage_character_countryVariableeffectDefinitionin_game/common/on_action/character_death_pulses.txt:2
3on_actions = {
}
9effect = {
11if = {
17if = {
18limit = {
19scope:target.var:home_country ?= {
20NOT = {
20this = root
}
}
}
23remove_relation = {
24type = relation_type:support_heir
25first = this
26second = scope:target.var:home_country
}
}
}
30if = {
36scope:target.var:favored_in_country ?= {
37remove_list_variable = {
38name = supported_heirs
39target = scope:target
}
41if = {
}
}
}
50if = {
}
60if = {
}
70if = {
71limit = {
}
}
83if = {
87scope:target ?= {
89save_scope_as = origin_country
90if = {
91limit = {
92has_trust = {
92modifier = trust_offered_hostage
92target = root
}
}
94remove_trust_equilibrium = {
94modifier = trust_offered_hostage
94target = root
}
}
96if = {
97limit = {
98has_opinion = {
98modifier = opinion_offered_hostage
98target = root
}
}
100remove_opinion = {
100modifier = opinion_offered_hostage
100target = root
}
}
}
}
104root ?= {
105if = {
106limit = {
107has_trust = {
107modifier = trust_offered_hostage
107target = scope:origin_country
}
}
109remove_trust_equilibrium = {
109modifier = trust_offered_hostage
109target = scope:origin_country
}
}
111if = {
112limit = {
113has_opinion = {
113modifier = opinion_offered_hostage
113target = scope:origin_country
}
}
115remove_opinion = {
115modifier = opinion_offered_hostage
115target = scope:origin_country
}
}
}
}
119if = {
120limit = {
124location:agra.owner ?= root
125current_year > 1590
126current_year < 1650
127ruler ?= scope:target.first_spouse
}
129scope:target = {
130save_scope_as = target_character
}
}
137if = {
138limit = {
139scope:target = {
}
}
145scope:target = {
145save_scope_as = chinese_expedition_expedition_leader
}
}
}
152if = {
}
160if = {
}
166if = {
167limit = {
168scope:target = {
}
}
}
182if = {
187every_key_in_variable_map = {
188variable = pentarchy
194save_scope_as = target_pentarchy_seat
195if = {
196limit = {
197OR = {
198NOT = {
198exists = scope:target_patriarch
}
}
}
}
205scope:target_patriarch ?= {
}
209remove_from_variable_map = {
210name = pentarchy
211key = scope:target_pentarchy_seat
}
213add_to_variable_map = {
214name = pentarchy
215key = scope:target_pentarchy_seat
216value = scope:target_patriarch
}
}
}
}
}
}