﻿namespace = abdicate_event

abdicate_event.1 = {
	title = abdicate_event.1.title
	hidden = yes
	
	trigger = {
		has_trait = abdicator_trait
	}
	
	option = {
		name = ciphersaid.a.1
		remove_trait = abdicator_trait
	}
}

abdicate_event.2 = {
	title = abdicate_event.2.title
	hidden = yes

	trigger = {
		has_trait = excommunicated
	}

	option = {
		name = abdrenown.a.1
		dynasty = {
			add_dynasty_prestige = {
				value = abdicate_event_renown_value multiply = -1
			}
		}
	}

}

abdicate_event.3 = {
	title = abdicate_event.3.title
	desc = abdicate_event.3.desc

	type = character_event
	theme = crown
	left_portrait = {
		character = scope:exrulah
		animation = throne_room_curtsey_1
	}
	right_portrait = {
		character = scope:nurulah
		animation = frontend_center_idle
	}

	root = {
		capital_barony = {
			save_scope_as = thecapital
		}
		random_neighboring_and_across_water_realm_same_rank_owner = {
			save_scope_as = randomcapital
		}
	}	

	option = {
		name = abdicate_event.3.a
		appoint_court_position = {
			recipient = scope:exrulah
			court_position = hosted_abdicator_court_position
		}
		scope:exrulah ={
			add_opinion = {
				target = ROOT
				modifier = kept_promise
			}
		}
		if = {
			limit = {
				has_trait = generous
			}
			add_stress = -20
		}
	}

	option = {
		name = abdicate_event.3.c
		scope:exrulah = { 
			select_and_move_to_pool_effect = yes 
		}
		add_prestige = { 
			value = kickhostedabdicator_prestige_value
			multiply = -0.5
		}
		scope:nurulah = {
			add_character_modifier = {
				modifier = refused_paid_abdie_mod
				weeks = 24
			}
		}
		scope:exrulah = {
			add_opinion = {
				target = ROOT
				modifier = declined_guardianship_opinion
			}
		}
		remove_short_term_gold = {
			value = medium_gold_value
		}
	}

	option = {
		name = abdicate_event.3.b
		scope:exrulah = { 
			select_and_move_to_pool_effect = yes 
		}
		scope:nurulah = {
			add_character_modifier = {
				modifier = refused_abdie_mod
				weeks = 24
			}
		}
		add_prestige = { 
			value = kickhostedabdicator_prestige_value
			multiply = -1
		}
		if = {
			limit = {
				has_trait = arbitrary
			}
			add_stress = -20
		}
		scope:exrulah ={
			add_opinion = {
				target = ROOT
				modifier = abandoned_me_opinion
			}
		}
	}

	option = {
		name = abdicate_event.3.d
		hard_imprison_character_effect = {
			TARGET = scope:exrulah
			IMPRISONER = root
		}
		scope:exrulah ={ 
			add_opinion = {
				target = root
				modifier = abducted_me_opinion
			}
			add_opinion = {
				target = root
				modifier = abandoned_me_opinion
			}
		}
		scope:nurulah = {
			add_tyranny = 10
			add_character_modifier = {
				modifier = arrested_abdie_mod
				months = 6
			}
		}
		trigger = {
			has_trait = sadistic
		}
	}

}