namespace = Plus

#reserved: Plus.730 to Plus.749

#######################################
# DISHONORABLE EVENTS
#######################################

# known murderer is excommunicated
character_event = {
	id = Plus.730 #formerly 1000182391
	desc = "EVTDESC_Plus_730"
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	only_rulers = yes
	religion_group = christian
	has_character_flag = filthy_murderer

	trigger = {
		is_ruler = yes
		OR = {
			higher_tier_than = baron
			is_patrician = yes
		}
		OR = {
			religion = catholic
			religion = orthodox
		}
		NOR = {
			trait = excommunicated
			had_character_flag = {
				flag = filthy_murderer
				days = 1825
			}
			rightful_religious_head_scope = {
				opinion = { who = ROOT value = 0 }
			}
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.25
			rightful_religious_head_scope = { NOT = { opinion = { who = ROOT value = -25 } } }
		}
		modifier = {
			factor = 1.25
			rightful_religious_head_scope = { NOT = { opinion = { who = ROOT value = -50 } } }
		}
		modifier = {
			factor = 1.25
			rightful_religious_head_scope = { NOT = { opinion = { who = ROOT value = -75 } } }
		}
		modifier = {
			factor = 1.25
			rightful_religious_head_scope = { NOT = { opinion = { who = ROOT value = -100 } } }
		}
		modifier = {
			factor = 0.75
			piety = 200
		}
		modifier = {
			factor = 0.75
			piety = 100
		}
		modifier = {
			factor = 2.0
			NOT = { piety = 0 }
		}
		modifier = {
			factor = 2.0
			NOT = { piety = -100 }
		}
		modifier = {
			factor = 2.0
			NOT = { piety = -200 }
		}
		modifier = {
			factor = 1.1
			trait = dishonorable2
		}
		modifier = {
			factor = 1.25
			trait = dishonorable3
		}
		modifier = {
			factor = 1.5
			trait = dishonorable4
		}
		modifier = {
			factor = 1.75
			trait = dishonorable5
		}
		modifier = {
			factor = 2.0
			trait = dishonorable6
		}
		modifier = {
			factor = 2.5
			trait = dishonorable7
		}
		modifier = {
			factor = 3.0
			trait = dishonorable8
		}
		modifier = {
			factor = 5.0
			trait = dishonorable9
		}
		modifier = {
			factor = 10.0
			trait = dishonorable10
		}
	}

	option = {
		name = "CURSES"
		piety = -50
		add_trait = excommunicated
		clr_character_flag = filthy_murderer
	}
}

# known murderer goes nuts
character_event = {
	id = Plus.731 #formerly 1000182392
	desc = "EVTDESC_Plus_731"
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	has_character_flag = filthy_murderer
	prisoner = no

	trigger = {
		NOT = {
			had_character_flag = {
				flag = filthy_murderer
				days = 1825
			}
		}
		NOR = {
			trait = lunatic
			trait = cruel
			trait = impaler
			trait = possessed
			trait = depressed
			trait = paranoid
			trait = incapable
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			trait = arbitrary
		}
		modifier = {
			factor = 0.5
			trait = deceitful
		}
		modifier = {
			factor = 0.5
			trait = envious
		}
		modifier = {
			factor = 0.5
			trait = wroth
		}
		modifier = {
			factor = 2.0
			trait = stressed
		}
		modifier = {
			factor = 2.0
			trait = kind
		}
		modifier = {
			factor = 2.0
			trait = charitable
		}
		modifier = {
			factor = 2.0
			trait = just
		}
		modifier = {
			factor = 2.0
			trait = honest
		}
		modifier = {
			factor = 1.1
			trait = dishonorable2
		}
		modifier = {
			factor = 1.25
			trait = dishonorable3
		}
		modifier = {
			factor = 1.5
			trait = dishonorable4
		}
		modifier = {
			factor = 1.75
			trait = dishonorable5
		}
		modifier = {
			factor = 2.0
			trait = dishonorable6
		}
		modifier = {
			factor = 2.5
			trait = dishonorable7
		}
		modifier = {
			factor = 3.0
			trait = dishonorable8
		}
		modifier = {
			factor = 5.0
			trait = dishonorable9
		}
		modifier = {
			factor = 10.0
			trait = dishonorable10
		}
	}

	option = {
		name = "EVTOPTA_Plus_731" #The guilt weighs heavily on me
		trigger = {
			trait = stressed
			OR = {
				trait = kind
				trait = charitable
				trait = just
				trait = honest
			}
			NOR = {
				AND = {
					trait = kind
					trait = charitable
				}
				AND = {
					trait = kind
					trait = just
				}
				AND = {
					trait = charitable
					trait = just
				}
				AND = {
					trait = honest
					trait = just
				}
				AND = {
					trait = honest
					trait = charitable
				}
				AND = {
					trait = honest
					trait = kind
				}
			}
		}
		remove_trait = stressed
		add_trait = depressed
	}
	option = {
		name = "EVTOPTB_Plus_731" #I'm handling it just fine
		trigger = {
			OR = {
				AND = {
					trait = kind
					trait = charitable
				}
				AND = {
					trait = kind
					trait = just
				}
				AND = {
					trait = charitable
					trait = just
				}
				AND = {
					trait = honest
					trait = just
				}
				AND = {
					trait = honest
					trait = charitable
				}
				AND = {
					trait = honest
					trait = kind
				}
			}
		}
		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		add_trait = lunatic
	}
	option = {
		name = "EVTOPTA_Plus_731" #The guilt weighs heavily on me
		trigger = {
			NOT = { trait = stressed }
			OR = {
				trait = kind
				trait = charitable
				trait = just
				trait = honest
			}
			NOR = {
				AND = {
					trait = kind
					trait = charitable
				}
				AND = {
					trait = kind
					trait = just
				}
				AND = {
					trait = charitable
					trait = just
				}
				AND = {
					trait = honest
					trait = just
				}
				AND = {
					trait = honest
					trait = charitable
				}
				AND = {
					trait = honest
					trait = kind
				}
			}
		}
		add_trait = stressed
	}
	option = {
		name = "EVTOPTD_Plus_731" #I have no regrets
		trigger = {
			NOR = {
				trait = kind
				trait = charitable
				trait = just
				trait = honest
			}
		}
		add_trait = cruel
		random = {
			chance = 50
			add_trait = arbitrary
			hidden_tooltip = {
				character_event = {
					id = 38266 #Notify Arbitrary
				}
			}
		}
	}
}

# paranoid murderer kills a courtier
character_event = {
	id = Plus.732 #formerly 1000182393
	desc = "EVTDESC_Plus_732"
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	has_character_flag = filthy_murderer

	trigger = {
		trait = paranoid
		NOR = {
			trait = lunatic
			trait = possessed
			trait = incapable
		}
		any_courtier = {
			is_adult = yes
			at_location = ROOT
			prisoner = no
			NOT = { trait = incapable }
			NOT = { has_job_title = job_spymaster }
			NOT = { is_close_relative = ROOT }
		}
		NOT = {
			had_character_flag = {
				flag = filthy_murderer
				days = 1825
			}
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			trait = arbitrary
		}
		modifier = {
			factor = 0.5
			trait = deceitful
		}
		modifier = {
			factor = 0.5
			trait = envious
		}
		modifier = {
			factor = 0.5
			trait = wroth
		}
		modifier = {
			factor = 2.0
			trait = stressed
		}
		modifier = {
			factor = 2.0
			trait = kind
		}
		modifier = {
			factor = 2.0
			trait = charitable
		}
		modifier = {
			factor = 2.0
			trait = just
		}
		modifier = {
			factor = 2.0
			trait = honest
		}
		modifier = {
			factor = 1.1
			trait = dishonorable2
		}
		modifier = {
			factor = 1.25
			trait = dishonorable3
		}
		modifier = {
			factor = 1.5
			trait = dishonorable4
		}
		modifier = {
			factor = 1.75
			trait = dishonorable5
		}
		modifier = {
			factor = 2.0
			trait = dishonorable6
		}
		modifier = {
			factor = 2.5
			trait = dishonorable7
		}
		modifier = {
			factor = 3.0
			trait = dishonorable8
		}
		modifier = {
			factor = 5.0
			trait = dishonorable9
		}
		modifier = {
			factor = 10.0
			trait = dishonorable10
		}
	}

	option = {
		name = "EVTOPTA_Plus_733"
		tooltip_info = paranoid
		random_courtier = {
			limit = {
				is_adult = yes
				at_location = ROOT
				prisoner = no
				NOT = { trait = incapable }
				NOT = { has_job_title = job_spymaster }
				NOT = { is_close_relative = ROOT }
			}
			death = { death_reason = death_murder_unknown }
		}
		add_trait = lunatic
	}
}

