###################################
# DYNASTIC CYCLE DECISION EVENTS
###################################

namespace = tgp_dynastic_cycle_decision_event

# Retire from all Titles
tgp_dynastic_cycle_decision_event.0101 = {
	type = character_event
	title = tgp_dynastic_cycle_decision_event.0101.t
	desc = tgp_dynastic_cycle_decision_event.0101.desc
	theme = dynasty
	left_portrait = {
		character = root
		animation = happy_teacher
	}
	right_portrait = {
		character = scope:new_player
		animation = personality_bold
	}
	option = {
		name = tgp_dynastic_cycle_decision_event.0101.a
		tgp_renounce_estate_effect = yes
	}
	after = {
		hidden_effect = {
			if = {
				limit = {
					employer != scope:new_player
				}
				set_employer = scope:new_player
			}
		}
	}
}

# Inform Movements of a new Favored Movement - from decision
tgp_dynastic_cycle_decision_event.0111 = {	
	type = letter_event
	opening = tgp_dynastic_cycle_decision_event.0111.opening
	desc = {
		desc = tgp_dynastic_cycle_decision_event.0111.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:former_favored_movement
				}
				desc = tgp_dynastic_cycle_decision_event.0111.desc_former
			}
			desc = tgp_dynastic_cycle_decision_event.0111.desc
		}
		desc = tgp_dynastic_cycle_decision_event.0111.desc_outro
	}
	sender = scope:hegemon

	immediate = {
		show_as_tooltip = {
			scope:new_favored_movement = {
				make_movement_favored_effect = yes
				switch = {
					trigger = participant_group_type
					pro_hegemon_movement = {
						if = {
							limit = {
								situation:dynastic_cycle = {
									situation_top_has_catalyst = catalyst_movement_gained_power_pro_hegemon
								}
							}
							trigger_situation_catalyst = catalyst_movement_gained_power_pro_hegemon
						}
					}
					advancement_movement = {
						if = {
							limit = {
								situation:dynastic_cycle = {
									situation_top_has_catalyst = catalyst_movement_gained_power_advancement
								}
							}
							trigger_situation_catalyst = catalyst_movement_gained_power_advancement
						}
					}
					expansion_movement = {
						if = {
							limit = {
								situation:dynastic_cycle = {
									situation_top_has_catalyst = catalyst_movement_gained_power_expansion
								}
							}
							trigger_situation_catalyst = catalyst_movement_gained_power_expansion
						}
					}
					conservative_movement = {
						if = {
							limit = {
								situation:dynastic_cycle = {
									situation_top_has_catalyst = catalyst_movement_gained_power_conservative
								}
							}
							trigger_situation_catalyst = catalyst_movement_gained_power_conservative
						}
					}
				}
			}
		}
	}
	option = {
		name = {
			trigger = {
				scope:new_favored_movement ?= top_participant_group:dynastic_cycle
			}
			text = tgp_dynastic_cycle_decision_event.0111.a_new
		}
		name = {
			trigger = {
				scope:former_favored_movement ?= top_participant_group:dynastic_cycle
			}
			text = tgp_dynastic_cycle_decision_event.0111.a_former
		}
		name = tgp_dynastic_cycle_decision_event.0111.a_other
	}
}
