### maimed trait gains for Reapers
## Written by: Markus
# RIP.11500 - RIP.11999
namespace = RIP

# Gain one eyed
character_event = {
	id = RIP.11501
	desc = EVTDESC_RIP_11501
	picture = GFX_evt_doctor_tending_to_sick

	only_playable = yes
	is_triggered_only = yes
	ai = no
	hide_from = yes
	
	option = {
		name = EVTOPTA_RIP_11501
		tooltip = {
			add_trait = one_eyed
		}
	}
}

# Gain one handed
character_event = {
	id = RIP.11502
	desc = EVTDESC_RIP_11502
	picture = GFX_evt_doctor_tending_to_sick

	only_playable = yes
	is_triggered_only = yes
	ai = no
	hide_from = yes
	
	option = {
		name = EVTOPTA_RIP_11502
		tooltip = {
			add_trait = one_handed
		}
	}
}

# Gain one legged
character_event = {
	id = RIP.11503
	desc = EVTDESC_RIP_11503
	picture = GFX_evt_doctor_tending_to_sick

	only_playable = yes
	is_triggered_only = yes
	ai = no
	hide_from = yes
	
	option = {
		name = EVTOPTA_RIP_11503
		tooltip = {
			add_trait = one_legged
		}
	}
}

# Gain disfigured
character_event = {
	id = RIP.11504
	desc = EVTDESC_RIP_11504
	picture = GFX_evt_doctor_tending_to_sick

	only_playable = yes
	is_triggered_only = yes
	ai = no
	hide_from = yes
	
	option = {
		name = EVTOPTA_RIP_11504
		tooltip = {
			add_trait = disfigured
		}
	}
}

# Gain mangled
character_event = {
	id = RIP.11505
	desc = EVTDESC_RIP_11505
	picture = GFX_evt_doctor_tending_to_sick

	only_playable = yes
	is_triggered_only = yes
	ai = no
	hide_from = yes
	
	option = {
		name = EVTOPTA_RIP_11505
		tooltip = {
			add_trait = mangled
		}
	}
}

# Parrots flock to your banner
narrative_event = {
	id = RIP.11506
	title = EVTTITLE_RIP_11506
	desc = EVTDESC_RIP_11506
	picture = GFX_evt_lunatic

	only_playable = yes
	ai = no

	trigger = {
		trait = one_eyed
		trait = one_handed
		trait = one_legged
		NOT = { has_character_modifier = pet_parrot }
	}

	mean_time_to_happen = {
		months = 24
	}
	
	option = {
		name = EVTOPTA_RIP_11506
		hidden_tooltip = {
			character_event = { id = RIP.11507 }
		}
	}
}

# Parrots flock to your banner
character_event = {
	id = RIP.11507
	desc = EVTDESC_RIP_11507
	picture = GFX_evt_lunatic

	only_playable = yes
	is_triggered_only = yes
	ai = no

	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_RIP_11507
		add_character_modifier = {
			name = pet_parrot
			duration = -1
		}
	}
}

# Crazy cannibal eat character and gain traits
character_event = {
	id = RIP.11510
	picture = GFX_evt_impalement
	desc = EVTDESC_RIP_11510
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_RIP_11510
		
		### Congenital traits
		if = {
			limit = {
				FROM = {
					trait = genius
				}
				NOT = { trait = genius }
			}
			if = {
				limit = {
					trait = imbecile
				}
				remove_trait = imbecile
			}
			if = {
				limit = {
					trait = slow
				}
				remove_trait = slow
			}
			if = {
				limit = {
					trait = dull
				}
				remove_trait = dull
			}
			if = {
				limit = {
					trait = quick
				}
				remove_trait = quick
			}
			add_trait = genius
		}
		if = {
			limit = {
				FROM = {
					trait = quick
				}
				NOT = { trait = genius }
				NOT = { trait = quick }
			}
			if = {
				limit = {
					trait = imbecile
				}
				remove_trait = imbecile
			}
			if = {
				limit = {
					trait = slow
				}
				remove_trait = slow
			}
			if = {
				limit = {
					trait = dull
				}
				remove_trait = dull
			}
			add_trait = quick
		}
		if = {
			limit = {
				FROM = {
					trait = strong
				}
				NOT = { trait = strong }
			}
			if = {
				limit = {
					trait = weak
				}
				remove_trait = weak
			}
			if = {
				limit = {
					trait = feeble
				}
				remove_trait = feeble
			}
			add_trait = strong
		}
		if = {
			limit = {
				FROM = {
					trait = fair
				}
				NOT = { trait = fair }
			}
			if = {
				limit = {
					trait = ugly
				}
				remove_trait = ugly
			}
			add_trait = fair
		}
		
		### Personality traits - Sins and virtues
		if = {
			limit = {
				FROM = {
					trait = chaste
				}
				NOT = { trait = chaste }
			}
			add_trait = chaste
		}
		if = {
			limit = {
				FROM = {
					trait = lustful
				}
				NOT = { trait = lustful }
			}
			add_trait = lustful
		}
		if = {
			limit = {
				FROM = {
					trait = temperate
				}
				NOT = { trait = temperate }
			}
			add_trait = temperate
		}
		if = {
			limit = {
				FROM = {
					trait = gluttonous
				}
				NOT = { trait = gluttonous }
			}
			add_trait = gluttonous
		}
		if = {
			limit = {
				FROM = {
					trait = charitable
				}
				NOT = { trait = charitable }
			}
			add_trait = charitable
		}
		if = {
			limit = {
				FROM = {
					trait = greedy
				}
				NOT = { trait = greedy }
			}
			add_trait = greedy
		}
		if = {
			limit = {
				FROM = {
					trait = diligent
				}
				NOT = { trait = diligent }
			}
			add_trait = diligent
		}
		if = {
			limit = {
				FROM = {
					trait = slothful
				}
				NOT = { trait = slothful }
			}
			add_trait = slothful
		}
		if = {
			limit = {
				FROM = {
					trait = patient
				}
				NOT = { trait = patient }
			}
			add_trait = patient
		}
		if = {
			limit = {
				FROM = {
					trait = wroth
				}
				NOT = { trait = wroth }
			}
			add_trait = wroth
		}
		if = {
			limit = {
				FROM = {
					trait = kind
				}
				NOT = { trait = kind }
			}
			add_trait = kind
		}
		if = {
			limit = {
				FROM = {
					trait = envious
				}
				NOT = { trait = envious }
			}
			add_trait = envious
		}
		if = {
			limit = {
				FROM = {
					trait = humble
				}
				NOT = { trait = humble }
			}
			add_trait = humble
		}
		if = {
			limit = {
				FROM = {
					trait = proud
				}
				NOT = { trait = proud }
			}
			add_trait = proud
		}
		
		### Personality traits - Other
		if = {
			limit = {
				FROM = {
					trait = deceitful
				}
				NOT = { trait = deceitful }
			}
			add_trait = deceitful
		}
		if = {
			limit = {
				FROM = {
					trait = honest
				}
				NOT = { trait = honest }
			}
			add_trait = honest
		}
		if = {
			limit = {
				FROM = {
					trait = craven
				}
				NOR = { trait = craven trait = berserker }
			}
			add_trait = craven
		}
		if = {
			limit = {
				FROM = {
					trait = brave
				}
				NOT = { trait = brave }
			}
			add_trait = brave
		}
		if = {
			limit = {
				FROM = {
					trait = shy
				}
				NOT = { trait = shy }
			}
			add_trait = shy
		}
		if = {
			limit = {
				FROM = {
					trait = gregarious
				}
				NOT = { trait = gregarious }
			}
			add_trait = gregarious
		}
		if = {
			limit = {
				FROM = {
					trait = ambitious
				}
				NOT = { trait = ambitious }
			}
			add_trait = ambitious
		}
		if = {
			limit = {
				FROM = {
					trait = content
				}
				NOT = { trait = content }
			}
			add_trait = content
		}
		if = {
			limit = {
				FROM = {
					trait = arbitrary
				}
				NOT = { trait = arbitrary }
			}
			add_trait = arbitrary
		}
		if = {
			limit = {
				FROM = {
					trait = just
				}
				NOT = { trait = just }
			}
			add_trait = just
		}
		if = {
			limit = {
				FROM = {
					trait = cynical
				}
				NOT = { trait = cynical }
			}
			add_trait = cynical
		}
		if = {
			limit = {
				FROM = {
					trait = zealous
				}
				NOT = { trait = zealous }
			}
			add_trait = zealous
		}
		if = {
			limit = {
				FROM = {
					trait = paranoid
				}
				NOT = { trait = paranoid }
			}
			add_trait = paranoid
		}
		if = {
			limit = {
				FROM = {
					trait = trusting
				}
				NOT = { trait = trusting }
			}
			add_trait = trusting
		}
		if = {
			limit = {
				FROM = {
					trait = cruel
				}
				NOT = { trait = cruel }
			}
			add_trait = cruel
		}
		if = {
			limit = {
				FROM = {
					trait = erudite
				}
				NOT = { trait = erudite }
			}
			add_trait = erudite
		}
		if = {
			limit = {
				FROM = {
					trait = stubborn
				}
				NOT = { trait = stubborn }
			}
			add_trait = stubborn
		}
		
		### Other traits
		if = {
			limit = {
				FROM = {
					immortal = yes
				}
				immortal = no
			}
			add_trait = immortal
			if = {
				limit = { trait = incapable }
				remove_trait = incapable
			}
            if = { 
                limit = { 
                 	is_female = no 
                  	has_dlc = "Holy Fury"
                }
                create_bloodline = {
                    type = immortal_bloodline_01
                }       
            }
            if = { 
                limit = { 
                  	is_female = yes 
                  	has_dlc = "Holy Fury"
                }
                create_bloodline = {
                    type = immortal_bloodline_01
                    inheritance = matrilineal
                }       
            }
		}
		### Controls religion
		if = {
			limit = { 
				has_character_flag = pope_eater	
				NOT = { trait = sympathy_christendom }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_christendom
		}
		if = {
			limit = { 
				has_character_flag = caliph_eater	
				NOT = { trait = sympathy_islam }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_islam
		}
		if = {
			limit = { 
				has_character_flag = fylkir_feast	
				NOT = { trait = sympathy_pagans }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_pagans
		}
		if = {
			limit = { 
				has_character_flag = fire_eater	
				NOT = { trait = sympathy_zoroastrianism }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_zoroastrianism
		}
		if = {
			limit = { 
				has_character_flag = non_kosher	
				NOT = { trait = sympathy_judaism }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_judaism
		}
		if = {
			limit = { 
				has_character_flag = dont_even_exist	
				NOT = { trait = sympathy_indian }
			}
			if = {
				limit = {
					trait = zealous
				}
				remove_trait = zealous
			}
			add_trait = sympathy_indian
		}
		clr_character_flag = pope_eater
		clr_character_flag = caliph_eater
		clr_character_flag = fylkir_feast
		clr_character_flag = fire_eater
		clr_character_flag = non_kosher
		clr_character_flag = dont_even_exist
	}
}

# Crazy cannibal eat close relative of player
character_event = {
	id = RIP.11511
	picture = GFX_evt_impalement
	desc = EVTDESC_RIP_11511
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_RIP_11511
		add_rival = FROMFROM
		opinion = {
			who = FROMFROM
			modifier = opinion_killed_close_kin
			months = 60
		}
	}
}