﻿# used in the heir events

first_spouse_reputation_comment = {
	type = character
	
	text = {
		trigger = {
			exists = var:has_bad_rep_cannibal
		}
		localization_key = lmf_spouse_rep_cannibal
	}
	text = {
		trigger = {
			exists = var:has_bad_rep_incestuous
			is_close_family_of = primary_spouse
		}
		localization_key = lmf_spouse_rep_incestuous_ruler
	}
	text = {
		trigger = {
			exists = var:has_bad_rep_incestuous
			NOT = { is_close_family_of = primary_spouse }
		}
		localization_key = lmf_spouse_rep_incestuous_other
	}
	text = {
		trigger = {
			exists = var:has_bad_rep_sodomite
		}
		localization_key = lmf_spouse_rep_sodomite
	}
	text = {
		trigger = {
			exists = var:has_bad_rep_witch
		}
		localization_key = lmf_spouse_rep_witch
	}
	text = {
		trigger = {
			exists = var:has_murderer_rep
		}
		localization_key = lmf_spouse_rep_murderer
	}
	text = {
		trigger = {
			exists = var:has_adulterer_rep
		}
		localization_key = lmf_spouse_rep_adulterer
	}
	text = {
		trigger = {
			exists = var:has_religion_rep
		}
		localization_key = lmf_spouse_rep_religion
	}
	text = {
		trigger = {
			exists = var:has_bastard_rep_illegitimate
		}
		localization_key = lmf_spouse_rep_illegitimate
	}
	text = {
		trigger = {
			exists = var:has_bastard_rep_disputed
		}
		localization_key = lmf_spouse_rep_disputed
	}
	text = {
		trigger = {
			exists = var:has_faithculture_rep_faith
		}
		localization_key = lmf_spouse_rep_faith
	}
	text = {
		trigger = {
			exists = var:has_faithculture_rep_culture
		}
		localization_key = lmf_spouse_rep_culture
	}
	text = {
		localization_key = lmf_spouse_rep_fallback1
		fallback = yes
	}
}

second_spouse_reputation_comment = {
	type = character
	
	text = {
		trigger = {
			exists = var:has_murderer_rep
			exists = var:has_bad_rep
		}
		localization_key = lmf_spouse_rep_murderer
	}
	text = {
		trigger = {
			exists = var:has_adulterer_rep
			OR = {
				exists = var:has_murderer_rep
				exists = var:has_bad_rep
			}
		}
		localization_key = lmf_spouse_rep_adulterer
	}
	text = {
		trigger = {
			exists = var:has_religion_rep
			OR = {
				exists = var:has_murderer_rep
				exists = var:has_bad_rep
				exists = var:has_adulterer_rep
			}
		}
		localization_key = lmf_spouse_rep_religion
	}
	text = {
		trigger = {
			exists = var:has_bastard_rep_illegitimate
			OR = {
				exists = var:has_murderer_rep
				exists = var:has_bad_rep
				exists = var:has_adulterer_rep
				exists = var:has_religion_rep
			}
		}
		localization_key = lmf_spouse_rep_illegitimate
	}
	text = {
		trigger = {
			exists = var:has_bastard_rep_disputed
			OR = {
				exists = var:has_murderer_rep
				exists = var:has_bad_rep
				exists = var:has_adulterer_rep
				exists = var:has_religion_rep
			}
		}
		localization_key = lmf_spouse_rep_disputed
	}
	text = {
		trigger = {
			exists = var:has_faithculture_rep_faith
		}
		localization_key = lmf_spouse_rep_faith
	}
	text = {
		trigger = {
			exists = var:has_faithculture_rep_culture
		}
		localization_key = lmf_spouse_rep_culture
	}
	text = {
		localization_key = lmf_spouse_rep_fallback2
		fallback = yes
	}
}

first_spouse_remarkable_comment = {
	type = character
	
	text = {
		trigger = {
			exists = var:is_pregnant
		}
		localization_key = lmf_spouse_rem_pregnant
	}
	text = {
		trigger = {
			exists = var:is_leper
		}
		localization_key = lmf_spouse_rem_leper
	}
	text = {
		trigger = {
			exists = var:is_albino
		}
		localization_key = lmf_spouse_rem_albino
	}
	text = {
		trigger = {
			exists = var:is_giant
		}
		localization_key = lmf_spouse_rem_giant
	}
	text = {
		trigger = {
			exists = var:is_dwarf
		}
		localization_key = lmf_spouse_rem_dwarf
	}
	text = {
		trigger = {
			exists = var:is_inbred
		}
		localization_key = lmf_spouse_rem_inbred
	}
	text = {
		trigger = {
			exists = var:is_disfigured
		}
		localization_key = lmf_spouse_rem_disfigured
	}
	text = {
		trigger = {
			exists = var:is_old
		}
		localization_key = lmf_spouse_rem_old
	}
	text = {
		trigger = {
			exists = var:is_ugly
			is_female = yes
		}
		localization_key = lmf_spouse_rem_ugly_female
	}
	text = {
		trigger = {
			exists = var:is_ugly
			is_male = yes
		}
		localization_key = lmf_spouse_rem_ugly_male
	}
	text = {
		trigger = {
			exists = var:is_fat
		}
		localization_key = lmf_spouse_rem_fat
	}
	text = {
		trigger = {
			exists = var:is_beautiful
			is_female = yes
		}
		localization_key = lmf_spouse_rem_beautiful_female
	}
	text = {
		trigger = {
			exists = var:is_beautiful
			is_male = yes
		}
		localization_key = lmf_spouse_rem_beautiful_male
	}
	text = {
		trigger = {
			exists = var:is_pretty
			is_female = yes
		}
		localization_key = lmf_spouse_rem_pretty_female
	}
	text = {
		trigger = {
			exists = var:is_pretty
			is_male = yes
		}
		localization_key = lmf_spouse_rem_pretty_male
	}
	text = {
		trigger = {
			exists = var:is_weak
		}
		localization_key = lmf_spouse_rem_weak
	}
	text = {
		trigger = {
			exists = var:is_strong
		}
		localization_key = lmf_spouse_rem_strong
	}
	text = {
		localization_key = lmf_spouse_rem_fallback1
		fallback = yes
	}
}

second_spouse_remarkable_comment = {
	type = character
	
	text = {
		trigger = {
			exists = var:is_leper
			exists = var:is_pregnant
		}
		localization_key = lmf_spouse_rem_leper
	}
	text = {
		trigger = {
			exists = var:is_albino
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
			}
		}
		localization_key = lmf_spouse_rem_albino
	}
	text = {
		trigger = {
			exists = var:is_giant
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
			}
		}
		localization_key = lmf_spouse_rem_giant
	}
	text = {
		trigger = {
			exists = var:is_dwarf
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
			}
		}
		localization_key = lmf_spouse_rem_dwarf
	}
	text = {
		trigger = {
			exists = var:is_inbred
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
			}
		}
		localization_key = lmf_spouse_rem_inbred
	}
	text = {
		trigger = {
			exists = var:is_disfigured
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
			}
		}
		localization_key = lmf_spouse_rem_disfigured
	}
	text = {
		trigger = {
			exists = var:is_old
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
			}
		}
		localization_key = lmf_spouse_rem_old
	}
	text = {
		trigger = {
			exists = var:is_ugly
			is_female = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
			}
		}
		localization_key = lmf_spouse_rem_ugly_female
	}
	text = {
		trigger = {
			exists = var:is_ugly
			is_male = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
			}
		}
		localization_key = lmf_spouse_rem_ugly_male
	}
	text = {
		trigger = {
			exists = var:is_fat
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
			}
		}
		localization_key = lmf_spouse_rem_fat
	}
	text = {
		trigger = {
			exists = var:is_beautiful
			is_female = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
			}
		}
		localization_key = lmf_spouse_rem_beautiful_female
	}
	text = {
		trigger = {
			exists = var:is_beautiful
			is_male = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
			}
		}
		localization_key = lmf_spouse_rem_beautiful_male
	}
	text = {
		trigger = {
			exists = var:is_pretty
			is_female = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
			}
		}
		localization_key = lmf_spouse_rem_pretty_female
	}
	text = {
		trigger = {
			exists = var:is_pretty
			is_male = yes
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
			}
		}
		localization_key = lmf_spouse_rem_pretty_male
	}
	text = {
		trigger = {
			exists = var:is_weak
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
				exists = var:is_beautiful
			}
		}
		localization_key = lmf_spouse_rem_weak
	}
	text = {
		trigger = {
			exists = var:is_strong
			OR = {
				exists = var:is_leper
				exists = var:is_pregnant
				exists = var:is_albino
				exists = var:is_giant
				exists = var:is_dwarf
				exists = var:is_inbred
				exists = var:is_disfigured
				exists = var:is_old
				exists = var:is_ugly
				exists = var:is_fat
				exists = var:is_beautiful
			}
		}
		localization_key = lmf_spouse_rem_strong
	}
	text = {
		localization_key = lmf_spouse_rem_fallback2
		fallback = yes
	}
}

random_spouse_remarkable_comment = {
	type = character
	
	random_valid = yes
	
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback1
	}
	text = {
		trigger = {
			is_female = yes
		}
		localization_key = lmf_spouse_rem_fallback2
	}
	text = {
		trigger = {
			is_male = yes
			NOT = { has_trait = giant }
		}
		localization_key = lmf_spouse_rem_fallback3
	}
	text = {
		trigger = {
			primary_spouse = {
				any_former_spouse = {
					even_if_dead = yes
				}
			}
		}
		localization_key = lmf_spouse_rem_fallback4
	}
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback5
	}
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback6
	}
	text = {
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
			prowess >=10
		}
		localization_key = lmf_spouse_rem_fallback7
	}
	text = {
		trigger = {
			OR = {
				has_trait = strong
				has_trait = physique_good
			}
		}
		localization_key = lmf_spouse_rem_fallback8
	}
	text = {
		trigger = {
			is_male = yes
		}
		localization_key = lmf_spouse_rem_fallback9
	}
}

first_random_spouse_remarkable_comment = {
	type = character
	
	random_valid = yes
	
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback1
	}
	text = {
		trigger = {
			is_male = yes
			NOT = { has_trait = giant }
		}
		localization_key = lmf_spouse_rem_fallback3
	}
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback5
	}
	text = {
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
			prowess >=10
		}
		localization_key = lmf_spouse_rem_fallback7
	}
	text = {
		trigger = {
			OR = {
				has_trait = strong
				has_trait = physique_good
			}
		}
		localization_key = lmf_spouse_rem_fallback8
	}
}

second_random_spouse_remarkable_comment = {
	type = character
	
	random_valid = yes
	
	text = {
		trigger = {
			is_female = yes
		}
		localization_key = lmf_spouse_rem_fallback2
	}
	text = {
		trigger = {
			primary_spouse = {
				any_former_spouse = {
					even_if_dead = yes
				}
			}
		}
		localization_key = lmf_spouse_rem_fallback4
	}
	text = {
		trigger = {
		}
		localization_key = lmf_spouse_rem_fallback6
	}
	text = {
		trigger = {
			is_male = yes
		}
		localization_key = lmf_spouse_rem_fallback9
	}
}

spouse_court_introduction = {
	type = character
	
	random_valid = yes
	
	text = {
		trigger = {
			var:spouse_court = flag:good
			has_personality_dominant_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_dominant
	}
	text = {
		trigger = {
			var:spouse_court = flag:good
			has_personality_benevolent_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_benevolent
	}
	text = {
		trigger = {
			var:spouse_court = flag:good
			has_personality_levelheaded_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_levelheaded
	}
	text = {
		trigger = {
			var:spouse_court = flag:good
			has_trait = gregarious
			has_trait_introverted_trigger = no
		}
		weight_multiplier = {
			base = 5
		}
		localization_key = lmf_spouse_court_gregarious
	}
	text = {
		trigger = {
			var:spouse_court = flag:good
			has_trait = diligent
			has_trait_emotional_trigger = no
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_diligent
	}
	text = {
		trigger = {
			var:spouse_court = flag:good
			OR = {
				has_trait = intellect_good_2
				has_trait = intellect_good_3
				has_trait = shrewd
			}
		}
		weight_multiplier = {
			base = 10
			modifier = {
				add = 20
				has_trait = intellect_good_3
			}
			modifier = {
				add = -5
				NOT = { has_trait = intellect_good }
			}
		}
		localization_key = lmf_spouse_court_smart
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			OR = {
				has_trait = lunatic
				has_trait = possessed
			}
		}
		weight_multiplier = {
			base = 20
			modifier = {
				add = -10
				NOT = { has_trait = lunatic }
			}
		}
		localization_key = lmf_spouse_court_lunatic
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			has_personality_malicious_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_malicious
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			OR = {
				has_trait = wrathful
				has_trait = impatient
				has_trait = sadistic
				has_trait = vengeful
			}
			has_trait_levelheaded_trigger = no
		}
		weight_multiplier = {
			base = 10
			modifier = {
				add = 20
				calc_true_if = {
					amount > 1
					has_trait = wrathful
					has_trait = impatient
					has_trait = sadistic
					has_trait = vengeful
				}
			}
		}
		localization_key = lmf_spouse_court_temper
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			has_trait = arrogant
			has_trait_benevolent_trigger = no
		}
		weight_multiplier = {
			base = 10
			modifier = {
				add = -5
				has_dynasty = no
			}
			modifier = {
				add = -5
				is_playable_character = yes
				highest_held_title_tier < scope:second.highest_held_title_tier
			}
			modifier = {
				add = 10
				is_playable_character = yes
				highest_held_title_tier > scope:second.highest_held_title_tier
			}
		}
		localization_key = lmf_spouse_court_arrogant
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			has_trait = drunkard
		}
		weight_multiplier = {
			base = 5
		}
		localization_key = lmf_spouse_court_drunkard
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			OR = {
				has_trait = intellect_bad_2
				has_trait = intellect_bad_3
			}
		}
		weight_multiplier = {
			base = 10
			modifier = {
				add = 10
				has_trait = intellect_bad_3
			}
		}
		localization_key = lmf_spouse_court_dumb
	}
	text = {
		trigger = {
			var:spouse_court = flag:bad
			has_trait = dull
		}
		weight_multiplier = {
			base = 5
		}
		localization_key = lmf_spouse_court_dull
	}
	text = {
		trigger = {
			var:spouse_court = flag:neutral
			has_personality_submissive_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_submissive
	}
	text = {
		trigger = {
			var:spouse_court = flag:neutral
			has_personality_introverted_trigger = yes
		}
		weight_multiplier = {
			base = 10
		}
		localization_key = lmf_spouse_court_introverted
	}
	text = {
		trigger = {
			var:spouse_court = flag:neutral
			has_trait = depressed
		}
		weight_multiplier = {
			base = 20
		}
		localization_key = lmf_spouse_court_depressed
	}
	text = {
		trigger = { var:spouse_court = flag:fallthrough }
		localization_key = lmf_spouse_court_fallthrough
	}
}

