####TRAIT GROUP TRIGGERS####
#If you make changes, update the "Trait group triggers CK2" spreadsheet

#Agreeable
#has_benevolent_trait_trigger		Has a benevolent trait.
#is_benevolent_trigger				Has a benevolent trait and not any evil traits.
#has_pleasant_trait_trigger			Has a pleasant personality trait. 
#has_pleasant_personality_trigger	Has a pleasant personality trait and not any unpleasant personality traits.
#has_pious_trait_trigger			Has a piety trait.
#is_pious_trigger					Has a piety trait and not any impious traits.
#has_virtue_trigger					Has a virtue trait.

#Disagreeable
#has_evil_trait_trigger				Has an evil trait.
#is_evil_trigger					Has an evil trait and not any benevolent traits.
#has_unpleasant_trait_trigger		Has an unpleasant personality trait. 
#has_unpleasant_personality_trigger	Has an  upleasant personality trait and not any pleasant personality traits.
#has_impious_trait_trigger			Has an impious trait.
#is_impious_trigger					Has a impious trait and not any piety traits.
#has_vice_trigger					Has a vice trait.

#Attractiveness
#has_attractive_trait_trigger		Has a sex appeal trait.
#is_attractive_trigger				Has a sex appeal trait and not any traits with negative sex appeal.
#has_unattractive_trait_trigger		Has a negative sex appeal trait.
#is_unattractive_trigger			Has a negative sex appeal trait and not any traits with sex appeal.

#Health/congential
#is_smart_trigger					Has a smart trait.
#is_dumb_trigger					Has a dumb trait.
#is_strong_trigger					Has a strogn trait.
#is_weak_trigger					Has a weak trait.
#character_disease_trigger			Has a disease trait.
#has_symptom_trigger				Has a symptom trait.
#has_injury_trigger					Has an injury trait.
#is_maimed_trigger					Has a maimed trait
#has_severe_disability_trigger		Has a severe disability, which makes the characters life really hard.
#has_medium_disability_trigger		Has a medium disability, which limits the character to some extent but they can mostly live a full life.
#has_minor_disability_trigger		Has a minor disability, which does not limit the character in a physical sense, but is a source of ridicule and trauma.
#has_disability_trigger				Has a severe or light disability.
#has_mental_disorder_trigger		Has a mentral disorder trait.
#has_fertile_trait_trigger			Has a fertile trait.
#is_fertile_trigger					Has a fertile trait and not any infertile traits.
#has_infertile_trait_trigger		Has an infertile trait.
#is_infertile_trigger				Has an infertile trait and not any fertile traits, OR is celibate OR is eunuch.

#Diplomacy
#has_education_diplomacy_trigger	Has a diplomacy education trait.
#has_lifestyle_diplomacy_trigger	Has a diplomacy lifestyle trait.
#child_personality_diplomacy_triggerHas a child trait with diplomacy bonus.

#Martial
#has_education_martial_trigger		Has a martial education trait.
#has_lifestyle_martial_trigger		Has a martial lifestyle trait.
#child_personality_martial_trigger	Has a child trait with martial bonus.

#Stewardship
#has_education_stewardship_trigger	Has a stewardship education trait.
#has_lifestyle_stewardship_trigger	Has a stewardship  lifestyle trait.
#child_personality_stewardship_trigger	Has a child trait with stewardship bonus.

#Intrigue
#has_education_intrigue_trigger		Has a intrigue education trait.
#has_lifestyle_intrigue_trigger		Has a intrigue lifestyle trait.
#child_personality_intrigue_trigger	Has a child trait with intrigue bonus.

#Learning
#has_education_learning_trigger		Has a learning education trait.
#has_lifestyle_learning_trigger		Has a learning lifestyle trait.
#child_personality_learning_trigger	Has a child trait with learning bonus.
#is_learned_trigger					Has a scholarly trait, learning-oriented trait.


##AGREEABLE###

has_benevolent_trait_trigger = {
	OR = {
		trait = just
		trait = kind
		trait = charitable
		trait = patient
		trait = affectionate
	}
}

is_benevolent_trigger = {
	has_benevolent_trait_trigger = yes
	has_evil_trait_trigger = no
}

has_pleasant_trait_trigger = {
	OR = {
		trait = honest
		trait = gregarious
		trait = trusting
		trait = affectionate
		trait = playful
		trait = socializer
		trait = charitable
		trait = patient
		trait = kind
	}
}

has_pleasant_personality_trigger = {
	has_pleasant_trait_trigger = yes
	has_unpleasant_trait_trigger = no
}

has_pious_trait_trigger = {
	OR = {
		trait = theologian
		trait = celibate
		trait = chaste
		trait = humble
		trait = content
		trait = on_pilgrimage
		trait = pilgrim
		trait = monk
		trait = nun
		trait = hajjaj
		trait = on_hajj
		trait = ashari
		trait = shieldmaiden
		trait = zealous
	}
}

is_pious_trigger = {
	has_pious_trait_trigger = yes
	has_impious_trait_trigger = no
}

has_virtue_trigger = {
	OR = {
		trait = chaste
		trait = temperate
		trait = charitable
		trait = diligent
		trait = patient
		trait = kind
		trait = humble
	}
}


##DISAGREEABLE##

has_evil_trait_trigger = {
	OR = {
		trait = arbitrary
		trait = cruel
		trait = impaler
	}
}

is_evil_trigger = {
	has_evil_trait_trigger = yes
	has_benevolent_trait_trigger = no
}

has_unpleasant_trait_trigger = {
	OR = {
		trait = deceitful
		trait = shy
		trait = paranoid
		trait = cruel
		trait = stubborn
		trait = haughty
		trait = brooding
		trait = impaler
		trait = greedy
		trait = wroth
		trait = envious
	}
}

has_unpleasant_personality_trigger = {
	has_unpleasant_trait_trigger = yes
	has_pleasant_trait_trigger = no
}

has_impious_trait_trigger = {
	OR = {
		trait = cynical
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
		trait = hedonist
		trait = lustful
	}
}

is_impious_trigger = {
	has_impious_trait_trigger = yes
	has_pious_trait_trigger = no
}

has_vice_trigger = {
	OR = {
		trait = lustful
		trait = gluttonous
		trait = greedy
		trait = slothful
		trait = wroth
		trait = envious
		trait = proud
	}
}


##ATTRACTIVENESS##

has_attractive_trait_trigger = {
	OR = {
		trait = fair
		trait = just
		trait = brave
		trait = gregarious
		trait = seducer
		trait = seductress
		trait = robust
		trait = strong
		trait = socializer
	}
}

is_attractive_trigger = {
	has_attractive_trait_trigger = yes
	has_unattractive_trait_trigger = no
}

has_unattractive_trait_trigger = {
	OR = {
		trait = ugly
		trait = feeble
		trait = dwarf
		trait = clubfooted
		trait = harelip
		trait = hunchback
		trait = lisp
		trait = weak
		trait = lunatic
		trait = possessed
		trait = has_aztec_disease
		trait = syphilitic
		trait = leper
		trait = maimed
		trait = drunkard
		trait = gluttonous
		trait = craven
		trait = arbitrary
		trait = cruel
		trait = stubborn
		trait = eunuch
		trait = blinded
		trait = horse
		trait = one_eyed
		trait = one_handed
		trait = one_legged
		trait = disfigured
		trait = mangled
		trait = severely_injured
		trait = flu
		trait = dysentery
		trait = food_poisoning
		trait = rabies
		trait = infection
		trait = rash
		trait = vomiting
		trait = diarrhea
		trait = cough
	}
}

is_unattractive_trigger = {
	has_unattractive_trait_trigger = yes
	has_attractive_trait_trigger = no
}


##HEALTH/CONGENTIAL##

is_smart_trigger = {
	OR = {
		trait = genius
		trait = quick
		trait = shrewd
	}
}

is_dumb_trigger = {
	OR = {
		trait = dull
		trait = slow
		trait = imbecile 
	}
}

is_strong_trigger = {
	OR = {
		trait = strong
		trait = robust
	}
}

is_weak_trigger = {
	OR = {
		trait = weak
		trait = feeble
	}
}

character_disease_trigger = {
	OR = {
		trait = has_tuberculosis
		trait = has_typhoid_fever
		trait = has_typhus
		trait = has_bubonic_plague
		trait = has_measles
		trait = has_small_pox
		trait = has_aztec_disease
		trait = syphilitic
		trait = flu
		trait = dysentery
		trait = gout
		trait = food_poisoning
		trait = rabies
		trait = cancer
		trait = pneumonic
	}
}

has_disease_trigger = {
	OR = {
		trait = has_tuberculosis
		trait = has_typhoid_fever
		trait = has_typhus
		trait = has_bubonic_plague
		trait = has_measles
		trait = has_small_pox
		trait = has_aztec_disease
		trait = syphilitic
		trait = flu
		trait = dysentery
		trait = gout
		trait = food_poisoning
		trait = rabies
		trait = cancer
		trait = pneumonic
		trait = dancing_plague
		trait = scurvy
		trait = ill
		trait = leper
		trait = lovers_pox
	}
}

has_symptom_trigger = {
	OR = {
		trait = infection
		trait = malaise
		trait = fatigue
		trait = abdominal_pain
		trait = headache
		trait = rash
		trait = cramps
		trait = chest_pain
		trait = vomiting
		trait = diarrhea
		trait = fever
		trait = cough
	}
}

has_injury_trigger = {
	OR = {
		trait = wounded
		trait = severely_injured
	}
}

is_maimed_trigger = {
	OR = {
		trait = maimed
		trait = one_eyed
		trait = one_handed 
		trait = one_legged 
		trait = disfigured 
		trait = mangled
	}
}

has_severe_disability_trigger = {
	OR = {
		trait = infirm
		trait = mangled
		trait = inbred
		trait = blinded
		trait = incapable
		trait = maimed
	}
}

has_medium_disability_trigger = {
	OR = {
		trait = one_legged
		trait = one_handed
		trait = one_eyed
		trait = clubfooted
		trait = hunchback
		trait = dwarf
	}
}

has_minor_disability_trigger = {
	OR = {
		trait = disfigured
		trait = eunuch
		trait = harelip
		trait = stutter
		trait = lisp
	}
}

has_disability_trigger = {
	OR = {
		has_severe_disability_trigger = yes
		has_medium_disability_trigger = yes
		has_minor_disability_trigger = yes
	}
}

has_mental_disorder_trigger = {
	OR = {
		trait = stressed
		trait = depressed
		trait = lunatic
		trait = possessed
		trait = drunkard
	}
}

has_fertile_trait_trigger = {
	OR = {
		trait = underhanded_rogue
		trait = charismatic_negotiator
		trait = grey_eminence
		trait = thrifty_clerk
		trait = fortune_builder
		trait = midas_touched
		trait = strong
		trait = hedonist
		trait = lustful
		trait = dancing_plague
	}
}

is_fertile_trigger = {
	has_fertile_trait_trigger = yes
	has_infertile_trait_trigger = no
}

has_infertile_trait_trigger = {
	OR = {
		trait = homosexual
		trait = eunuch
		trait = scholarly_theologian
		trait = mastermind_theologian
		trait = stressed
		trait = depressed
		trait = ill
		trait = pneumonic
		trait = leper
		trait = syphilitic
		trait = has_aztec_disease
		trait = infirm
		trait = incapable
		trait = inbred
		trait = weak
		trait = celibate
		trait = chaste
		trait = mangled
		trait = severely_injured
		trait = dysentery
		trait = food_poisoning
		trait = cancer
	}
}

is_infertile_trigger = {
	OR = {
		AND = {
			has_infertile_trait_trigger = yes
			has_fertile_trait_trigger = no
		}
		trait = eunuch
		trait = celibate
	}
}


##DIPLOMACY##

has_education_diplomacy_trigger = {
	OR = {
		trait = naive_appeaser
		trait = underhanded_rogue
		trait = charismatic_negotiator
		trait = grey_eminence
	}
}

has_lifestyle_diplomacy_trigger = {
	OR = {
		trait = socializer
		trait = gamer
		trait = hedonist
	}
}

child_personality_diplomacy_trigger = {
	OR = {
		trait = affectionate
		trait = playful
	}
}


##MARTIAL##

has_education_martial_trigger = {
	OR = {
		trait = misguided_warrior
		trait = tough_soldier
		trait = skilled_tactician
		trait = brilliant_strategist
	}
}

has_lifestyle_martial_trigger = {
	OR = {
		trait = duelist
		trait = hunter
		trait = strategist
	}
}

child_personality_martial_trigger = {
	OR = {
		trait = haughty
		trait = rowdy
	}
}


##STEWARDSHIP##

has_education_stewardship_trigger = {
	OR = {
		trait = indulgent_wastrel
		trait = thrifty_clerk
		trait = fortune_builder
		trait = midas_touched
	}
}

has_lifestyle_stewardship_trigger = {
	OR = {
		trait = administrator
		trait = architect
		trait = gardener
	}
}

child_personality_stewardship_trigger = {
	OR = {
		trait = conscientious
		trait = fussy
		trait = curious
	}
}


##INTRIGUE##

has_education_intrigue_trigger = {
	OR = {
		trait = amateurish_plotter
		trait = flamboyant_schemer
		trait = intricate_webweaver
		trait = elusive_shadow
	}
}

has_lifestyle_intrigue_trigger = {
	OR = {
		trait = schemer
		trait = impaler
		trait = seducer
		trait = seductress
	}
}

child_personality_intrigue_trigger = {
	OR = {
		trait = willful
		trait = brooding
		trait = indolent
	}
}


##LEARNING##

has_education_learning_trigger = {
	OR = {
		trait = detached_priest
		trait = martial_cleric
		trait = scholarly_theologian
		trait = mastermind_theologian
	}
}

has_lifestyle_learning_trigger = {
	OR = {
		trait = scholar
		trait = theologian
		trait = mystic
		trait = faqih
	}
}

child_personality_learning_trigger = {
	OR = {
		trait = timid
		trait = idolizer
	}
}

is_learned_trigger = {
	OR = {
		trait = erudite
		trait = scholar
		trait = scholarly_theologian
		trait = mastermind_theologian
		trait = physician
		trait = faqih
	}
}


####MERC LEADER/COUNCIL JOB####

#Used with character interaction to replace merc leader. DO NOT REMOVE
can_be_mercenary_leader_potential_trigger = {
	prisoner = no
	is_ruler = no
	is_adult = yes
	
	NOR = { 
		trait = incapable
		is_inaccessible_trigger = yes
		trait = monk
	}
	same_realm = FROM
	OR = {
		is_female = no
		OR = {
			trait = martial_lady
			trait = martial_lady_tengri
			trait = martial_lady_pagan
			martial = 12
		}
	}
	OR = {
		is_female = no
		AND = {
			is_feminist_trigger = yes
			FROM = { is_feminist_trigger = yes }
		}
		AND = {
			religion = norse_pagan
			FROM = { religion = norse_pagan }
		}
		AND = {
			religion = norse_pagan_reformed
			FROM = { religion = norse_pagan_reformed }
		}
		AND = {
			religion = german_pagan
			FROM = { religion = german_pagan_reformed }
		}
		AND = {
			religion = german_pagan_reformed
			FROM = { religion = german_pagan_reformed }
		}
		AND = {
			religion_group = zoroastrian_group
			culture_group = iranian
			any_dynasty_member = { higher_tier_than = BARON }
			FROM = { religion_group = zoroastrian_group }
			FROM = { culture_group = iranian }
		}
		FROM = {
			OR = {
				has_law = true_cognatic_succession 
				has_law = enatic_cognatic_succession
				has_law = enatic_succession
			}
		}
	}
}

#Used with character interaction to replace merc leader. DO NOT REMOVE
can_be_mercenary_leader_allow_trigger = {
	is_adult = yes
	liege = { character = FROM }
	custom_tooltip = {
		text = mercenary_martial_education_tooltip
		hidden_tooltip = {
			OR = {
				trait = misguided_warrior
				trait = tough_soldier
				trait = skilled_tactician
				trait = brilliant_strategist
			}
		}
	}
}

#Used with character interaction to replace merc leader. DO NOT REMOVE
replace_mercenary_captain_potential_trigger = {
	is_ruler = yes
	mercenary = yes
	primary_title = {
		has_title_flag = ze_dyn_merc
		band_creator = {
			character = FROM
		}
	}
}

#Used with character interaction to replace merc leader. DO NOT REMOVE
replace_mercenary_captain_allow_trigger = {
	primary_title = {
		NOT = { has_raised_standing_troops = yes }
		band_creator = {
			character = FROM
		}
	}
}

#Used with character interaction to swap council job. DO NOT REMOVE
change_council_job_potential_trigger = {
	liege = {
		character = FROM
		primary_title = { NOT = { has_law = council_privileges_1 } }
	}
	NAND = {
		has_job_title = job_spiritual
		liege = { religion_group = muslim }
		religion = FROM
	}
	OR = {
		AND = {
			OR = {
				has_minor_title = title_councilmember_king
				has_minor_title = title_councilmember_emperor
			}
			OR = {
				can_be_chancellor_trigger = yes
				can_be_marshal_trigger = yes
				can_be_treasurer_trigger = yes
				can_be_spymaster_trigger = yes
				AND = {
					can_be_spiritual_trigger = yes
					ROOT = { NOT = { religion_group = muslim } }
				}
			}
		}
		AND = {
			OR = {
				has_job_title = job_chancellor
				has_job_title = job_marshal
				has_job_title = job_treasurer
				has_job_title = job_spymaster
				has_job_title = job_spiritual
			}
			liege = {
				OR = {
					job_chancellor = {
						NOT = { character = ROOT }
						can_swap_job_title = ROOT
					}
					job_marshal = {
						NOT = { character = ROOT }
						can_swap_job_title = ROOT
					}
					job_treasurer = {
						NOT = { character = ROOT }
						can_swap_job_title = ROOT
					}
					job_spymaster = {
						NOT = { character = ROOT }
						can_swap_job_title = ROOT
					}
					job_spiritual = {
						NOT = { character = ROOT }
						can_swap_job_title = ROOT
					}
				}
			}
		}
	}
}

can_be_chancellor_trigger = {
	is_adult = yes
	prisoner = no
	liege = { num_of_baron_titles = 1 }
	NOT = { trait = incapable }
	NOT = { has_character_modifier = resigned_in_anger }
	NOT = { has_character_modifier = planning_claimant_adventure }
	OR = {
		is_female = no
		NOT = { liege = { is_married = ROOT } }
		liege = { ai = no }
	}
	OR = {
		is_female = no
		has_character_flag = special_chancellor
		AND = {
			is_feminist_trigger = yes
			liege = { is_feminist_trigger = yes }
		}
		AND = {
			OR = {
				trait = nun
				trait = desert_mother
				trait = perfecti
				is_landed = yes
				liege = { dynasty = ROOT }
				liege = { is_close_relative = ROOT }
			}
			liege = {
				primary_title = {
					OR = {
						has_law = female_council_law_2
						has_law = female_council_law_3
					}
				}
			}
		}
		OR = {
			liege = {
				primary_title = {
					has_law = female_council_law_4
				}
			}
			has_game_rule = {
				name = gender
				value = all
			}
			has_game_rule = {
				name = gender
				value = plus
			}
		}
	}
	OR = {
		NOT = { religion = waldensian }
		is_theocracy = no
		is_ruler = no
	}
	OR = {
		NOT = { religion = bogomilist }
		NOR = {
			trait = perfecti
			is_theocracy = yes
		}
		liege = {
			religion = bogomilist
			OR = {
				has_law = bogomilist_church_2
				has_law = bogomilist_church_3
				has_law = bogomilist_church_4
			}
		}
	}		
	independent = no
}

can_be_marshal_trigger = {
	is_adult = yes
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = desert_father }
	NOT = { has_character_modifier = resigned_in_anger }
	NOT = { trait = desert_mother }
	NOT = { trait = pf_neutral }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = planning_claimant_adventure }
	OR = {
		NOT = { religion = hindu }
		trait = kshatriya
	}
	OR = {
		ai = no
		controls_religion = no
		has_called_crusade = no
	}
	OR = {
		is_female = no
		NOT = { liege = { is_married = ROOT } }
		liege = { ai = no }
	}
	OR = {
		is_female = no
		trait = martial_lady
		trait = martial_lady_tengri
		trait = martial_lady_pagan
		AND = {
			is_female = yes
			has_global_flag = gender_equality
		}
	}
	OR = {
		is_female = no
		has_character_flag = special_marshal
		AND = {
			is_feminist_trigger = yes
			liege = { is_feminist_trigger = yes }
		}
		AND = {
			OR = {
				religion = norse_pagan
				religion = norse_pagan_reformed
				religion = german_pagan
				religion = german_pagan_reformed
			}
			liege = { religion = ROOT }
		}
		AND = {
			religion_group = zoroastrian_group
			culture_group = iranian
			any_dynasty_member = { higher_tier_than = baron }
			liege = {
				religion_group = ROOT
				culture_group = ROOT
			}
		}
		AND = {
			OR = {
				is_landed = yes
				liege = { dynasty = ROOT }
				liege = { is_close_relative = ROOT }
			}
			liege = {
				primary_title = {
					has_law = female_council_law_3
				}
			}
		}
		OR = {
			liege = {
				primary_title = {
					has_law = female_council_law_4
				}
			}
			has_game_rule = {
				name = gender
				value = all
			}
			has_game_rule = {
				name = gender
				value = plus
			}
		}
	}
	OR = {
		NOT = { religion = bogomilist }
		NOR = {
			trait = perfecti
			is_theocracy = yes
		}
		liege = {
			religion = bogomilist
			OR = {
				has_law = bogomilist_church_2
				has_law = bogomilist_church_3
				has_law = bogomilist_church_4
			}
		}
	}
	independent = no
}

can_be_treasurer_trigger = {
	is_adult = yes
	prisoner = no
	liege = { num_of_baron_titles = 1 }
	NOT = { trait = incapable }
	NOT = { trait = desert_father }
	NOT = { trait = desert_mother }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = resigned_in_anger }
	NOT = { has_character_modifier = planning_claimant_adventure }
	OR = {
		is_female = no
		NOT = { liege = { is_married = ROOT } }
		liege = { ai = no }
	}
	OR = {
		is_female = no
		has_character_flag = special_treasurer
		liege = { is_close_relative = ROOT }
		liege = { is_married = ROOT }
		AND = {
			is_feminist_trigger = yes
			liege = { is_feminist_trigger = yes }
		}
		AND = {
			OR = {
				liege = { dynasty = ROOT }
				trait = nun
				trait = desert_mother
				trait = perfecti
				is_ruler = yes
			}
			liege = {
				primary_title = {
					OR = {
						has_law = female_council_law_2
						has_law = female_council_law_3
					}
				}
			}
		}
		OR = {
			liege = {
				primary_title = {
					has_law = female_council_law_4
				}
			}
			has_game_rule = {
				name = gender
				value = all
			}
			has_game_rule = {
				name = gender
				value = plus
			}
		}
	}
	OR = {
		NOT = { religion = waldensian }
		is_theocracy = no
		is_ruler = no
	}
	OR = {
		NOT = { religion = bogomilist }
		NOR = {
			trait = perfecti
			is_theocracy = yes
		}
		liege = {
			religion = bogomilist
			OR = {
				has_law = bogomilist_church_2
				has_law = bogomilist_church_3
				has_law = bogomilist_church_4
			}
		}
	}
	
	independent = no
}

can_be_spymaster_trigger = {
	is_adult = yes
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = desert_father }
	NOT = { trait = desert_mother }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = planning_claimant_adventure }
	OR = {
		is_female = no
		NOT = { liege = { is_married = ROOT } }
		liege = { ai = no }
	}
	OR = {
		is_female = no
		has_character_flag = special_spymaster
		liege = { is_child_of = ROOT }
		liege = { is_married = ROOT }
		AND = {
			religion_group = pagan_group
			liege = { religion_group = pagan_group }
		}
		AND = {
			is_feminist_trigger = yes
			liege = { is_feminist_trigger = yes }
		}
		AND = {
			OR = {
				trait = nun
				is_landed = yes
				liege = { dynasty = ROOT }
				liege = { is_close_relative = ROOT }
			}
			liege = {
				primary_title = {
					OR = {
						has_law = female_council_law_1
						has_law = female_council_law_2
						has_law = female_council_law_3
					}
				}
			}
		}
		OR = {
			liege = {
				primary_title = {
					has_law = female_council_law_4
				}
			}
			has_game_rule = {
				name = gender
				value = all
			}
			has_game_rule = {
				name = gender
				value = plus
			}
		}
	}
	OR = {
		intrigue = 10
		trait = amateurish_plotter
		trait = flamboyant_schemer
		trait = intricate_webweaver
		trait = elusive_shadow
	}
	OR = {
		NOT = { religion = bogomilist }
		NOR = {
			trait = perfecti
			is_theocracy = yes
		}
		liege = {
			religion = bogomilist
			OR = {
				has_law = bogomilist_church_2
				has_law = bogomilist_church_3
				has_law = bogomilist_church_4
			}
		}
	}
	independent = no
	NOT = { has_character_modifier = resigned_in_anger }
}

can_be_spiritual_trigger = {
	independent = no
	prisoner = no
	liege = { num_of_baron_titles = 1 }
	liege = { religion = ROOT }
	NOT = { trait = incapable }
	NOT = { has_character_modifier = planning_claimant_adventure }
	NOT = { has_character_modifier = resigned_in_anger }

	OR = {
		is_female = no
		NOT = { liege = { is_married = ROOT } }
		liege = { ai = no }
	}
	OR = {
		AND = {
			is_adult = yes
			OR = {
				NOT = { religion = hindu }
				trait = brahmin
			}
			OR = {
				is_female = no
				religion_allows_female_temple_holders = yes
			}
		}
		has_character_flag = special_spiritual
	}
	OR = {
		is_theocracy = yes
		trait = monk
		trait = nun
		liege = { religion_group = muslim }
		AND = {
			clan = yes
			liege = { is_nomadic = yes }
		}
		AND = {
			religion = lollard
			liege = { religion = lollard }
		}
		AND = {
			is_ruler = no
			has_autocephaly = no
			OR = {
				trait = detached_priest
				trait = martial_cleric
				trait = scholarly_theologian
				trait = mastermind_theologian
			}
		}
		AND = {
			religion = miaphysite
			liege = { religion = miaphysite }
			OR = {
				trait = desert_father
				trait = desert_mother
			}
		}
		AND = {
			religion = monophysite
			liege = { religion = monophysite }
			OR = {
				trait = desert_father
				trait = desert_mother
			}
		}
		AND = {
			religion = cathar
			liege = { religion = cathar }
			trait = perfecti
		}
		AND = {
			religion = bogomilist
			liege = { religion = bogomilist }
			trait = perfecti
		}
	}		
	OR = {
		NOT = { religion_group = muslim }
		NOT = { liege = { religion_group = muslim } }
		trait = detached_priest
		trait = martial_cleric
		trait = scholarly_theologian
		trait = mastermind_theologian
		trait = druze_uqqal
		trait = druze_ajawid
	}
	OR = {
		NOT = { religion = bogomilist }
		NOR = {
			trait = perfecti
			is_theocracy = yes
		}
		liege = {
			religion = bogomilist
			OR = {
				has_law = bogomilist_church_3
				has_law = bogomilist_church_4
			}
		}
	}
}

can_be_council_advisor_trigger = {
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { is_inaccessible_trigger = yes }
	NOT = { has_character_modifier = resigned_in_anger }
	OR = {
		is_female = no
		AND = {
			is_feminist_trigger = yes
			liege = { is_feminist_trigger = yes }
		}
		AND = {
			is_landed = yes
			liege = {
				primary_title = {
					OR = {
						has_law = female_council_law_1
						has_law = female_council_law_2
						has_law = female_council_law_3
					}
				}
			}
		}
		OR = {
			liege = {
				primary_title = {
					has_law = female_council_law_4
				}
			}
			has_game_rule = {
				name = gender
				value = all
			}
			has_game_rule = {
				name = gender
				value = plus
			}
		}
	}
	is_adult = yes
}

###REAPER'S DUE####

can_be_maimed_trigger = {
	OR = {
		AND = {
			NOT = { has_dlc = "Reapers" }
			NOT = { trait = maimed }
		}
		AND = {
			has_dlc = "Reapers"
			NOT = {
				trait = one_eyed
				trait = one_handed 
				trait = one_legged 
				trait = disfigured 
				trait = mangled
			}
		}
	}
}

physician_bad_trigger = { 
	OR = {
		has_severe_disability_trigger = yes
		has_mental_disorder_trigger = yes
	}
}

physician_good_trigger = { 
	OR = {
		is_learned_trigger = yes
		religion_group = jewish_group
	}
}

is_inaccessible_trigger = {
	custom_tooltip = {
		text = is_inaccessible_tooltip
		hidden_tooltip = {
			OR = {
				trait = in_hiding
				trait = on_hajj
				trait = on_pilgrimage
				has_character_modifier = in_seclusion
			}
		}
	}
}

prefers_men_trigger = {
	OR = {
		AND = {
			is_female = yes
			NOT = { trait = homosexual }
		}
		AND = {
			is_female = no
			trait = homosexual
		}
	}
}

root_attraction_trigger = {
	#Returns yes when root is attracted the scoped character, based on sex
	OR = {
		AND = {
			is_female = yes
			ROOT = { prefers_men_trigger = no }
		}
		AND = {
			is_female = no
			ROOT = { prefers_men_trigger = yes }
		}
	}
}

is_unimportant_trigger = {
	NOR = {
		is_married = yes
		is_landed = yes
		has_job_title = yes
		has_minor_title = yes
		AND = {
			NOT = { dynasty = none }
			num_of_dynasty_members = 2
		}
		any_lover = { ai = no }
		any_close_relative = { ai = no }
		any_friend = { ai = no }
		any_rival = { ai = no }
		any_consort = { ai = no }
		num_of_claims = 1
		has_character_flag = eternal_life_mystic
		trait = horse
		has_character_modifier = in_seclusion
		immortal = yes
	}
}

sad_example_trigger = {
	age = 30
	is_married = no
	NOT = { num_of_children = 1 }
}

has_epidemic_disease_trigger = {
	OR = {
		trait = has_tuberculosis
		trait = has_typhoid_fever
		trait = has_typhus
		trait = has_bubonic_plague
		trait = has_measles
		trait = has_small_pox
		trait = has_aztec_disease
	}
}

developing_epidemic_disease_trigger = {
	OR = {
		has_character_flag = got_tuberculosis
		has_character_flag = got_typhoid_fever
		has_character_flag = got_typhus
		has_character_flag = got_bubonic_plague
		has_character_flag = got_measles
		has_character_flag = got_small_pox
		has_character_flag = got_aztec_disease
	}
}

can_be_prophet_of_doom_trigger = {
	is_adult = yes
	is_married = no
	trait = zealous
	is_landed = no
	
	OR = {
		trait = ambitious
		trait = misguided_warrior
		trait = elusive_shadow
		trait = lunatic
		trait = possessed
		trait = paranoid
		trait = stubborn
	}
	NOR = {
		trait = content
		trait = cynical
		trait = temperate
		is_main_spouse = yes
		is_landed = yes
		is_close_relative = ROOT
	}
	ai = yes
}

death_murder_trigger = {
	OR = {
		death_murder_unknown_trigger = yes
		death_murder_known_trigger = yes
	}
	
}

death_murder_unknown_trigger = {
	OR = {
		death_reason = death_murder_unknown
		death_reason = death_murder_unknown_poison
		death_reason = death_murder_unknown_fall
		death_reason = death_murder_unknown_arrow
		death_reason = death_murder_unknown_beheading
		death_reason = death_murder_unknown_snakes
		death_reason = death_murder_unknown_strangle

	}	
}

death_murder_known_trigger = {
	OR = {
		death_reason = death_murder
		death_reason = death_murder_poison
		death_reason = death_murder_fall
		death_reason = death_murder_drowning
		death_reason = death_murder_butchered
		death_reason = death_murder_arrow
		death_reason = death_murder_beheading
		death_reason = death_murder_snakes
		death_reason = death_murder_strangle
	}	
}

death_execution_trigger = {
	OR = {
		death_reason = death_execution
		death_reason = death_execution_crushing
		death_reason = death_execution_ash
		death_reason = death_execution_burning
		death_reason = death_execution_hdq
		death_reason = death_execution_bear
		death_reason = death_execution_lion
		death_reason = death_execution_snake_pit
		death_reason = death_execution_disembowelment
		death_reason = death_execution_boiling
		death_reason = death_execution_sawing
		death_reason = death_execution_hunt
		death_reason = death_execution_live_burial
		death_reason = death_execution_hanging
		death_reason = death_execution_immurement
		death_reason = death_execution_beheading
		death_reason = death_execution_wine
		death_reason = death_execution_poison
		death_reason = death_execution_flaying
		death_reason = death_execution_impaling
		death_reason = death_execution_tiger
		death_reason = death_execution_elephants
		death_reason = death_execution_bamboo
		death_reason = death_execution_stoning
		death_reason = death_execution_crucifixion
		death_reason = death_execution_blood_eagle
		death_reason = death_execution_scaphism
		death_reason = death_execution_drowning_pit
		death_reason = death_execution_garrotting
		death_reason = death_execution_horses
		death_reason = death_execution_back_breaking
		death_reason = death_execution_wheel
		death_reason = death_execution_boar
		death_reason = death_execution_eaten
		death_reason = death_execution_aztec_sacrifice
	}	
}

death_sacrificed_trigger = {
	OR = {
		death_reason = death_sacrificed
		death_reason = death_sacrificed_norse
		death_reason = death_sacrificed_ancestors
	}	
}

death_accident_trigger = {
	OR = {
		death_reason = death_accident
		death_reason = death_accident_bear
		death_reason = death_accident_boar
		death_reason = death_accident_drowning
		death_reason = death_accident_arrow
		death_reason = death_accident_tiger
		death_reason = death_accident_snakes
		death_reason = death_accident_fall
	}
}

death_suicide_trigger = {
	OR = {
		death_reason = death_suicide
		death_reason = death_suicide_fall
		death_reason = death_suicide_hanging
		death_reason = death_suicide_poison
	}
}

block_general_event_trigger = {
	OR = {	
		trait = incapable
		is_adult = no
		prisoner = yes
		is_inaccessible_trigger = yes
		is_alive = no
		NOT = { always = yes }
	}
}

gender_equality_trigger = {
	OR = {
		religion = cathar
		religion = messalian
		AND = {
			is_landed = yes
			primary_title = { has_law = female_council_law_4 }
		}
		AND = {
			is_landed = no
			liege = { primary_title = { has_law = female_council_law_4 } }
		}
		has_game_rule = {
			name = gender
			value = all
		}
		has_game_rule = {
			name = gender
			value = plus
		}
	}
}

has_crusade_trait_trigger = {
	OR = {
		AND = {
			OR = {
				religion = celtic_pagan
				religion = celtic_pagan_reformed
				religion = egyptian_pagan
			}
			trait = holy_crusader
		}
		AND = {
			OR = {
				religion = norse_pagan
				religion = norse_pagan_reformed
			}
			trait = valhalla_bound
		}
		AND = {
			OR = {
				religion = tengri_pagan
				religion = tengri_pagan_reformed
			}
			trait = tengri_warrior
		}
		AND = {
			OR = {
				religion = baltic_pagan
				religion = baltic_pagan_reformed
			}
			trait = romuvas_own
		}
		AND = {
			OR = {
				religion = finnish_pagan
				religion = finnish_pagan_reformed
			}
			trait = ukkos_shield
		}
		AND = {
			OR = {
				religion = aztec
			}
			trait = eagle_warrior
		}
		AND = {
			OR = {
				religion = slavic_pagan
				religion = slavic_pagan_reformed
			}
			trait = peruns_chosen
		}
		AND = {
			OR = {
				religion = west_african_pagan
				religion = west_african_pagan_reformed
			}
			trait = nyames_shield
		}
		AND = {
			OR = {
				religion = zun_pagan
				religion = zun_pagan_reformed
			}
			trait = sun_warrior
		}
		AND = {
			religion = hellenic_pagan
			trait = ares_own
		}
		AND = {
			religion_group = muslim
			trait = mujahid
		}
		AND = {
			religion_group = christian
			trait = crusader
		}
		AND = {
			religion_group = zoroastrian_group
			trait = gondi_shahansha
		}
		AND = {
			religion_group = jewish_group
			trait = shaddai
		}
	}
}

has_minor_deity_trigger = {
	OR = {
		has_character_modifier = follower_of_perun
		has_character_modifier = follower_of_veles
		has_character_modifier = follower_of_jarilo
		has_character_modifier = follower_of_morana
		has_character_modifier = follower_of_yemoja
		has_character_modifier = follower_of_ekwensu
		has_character_modifier = follower_of_orunmila
		has_character_modifier = follower_of_shango
		has_character_modifier = follower_of_ukko
		has_character_modifier = follower_of_akka
		has_character_modifier = follower_of_taipo_and_mielikki 
		has_character_modifier = follower_of_lempo
		has_character_modifier = follower_of_dievas
		has_character_modifier = follower_of_velnias
		has_character_modifier = follower_of_perkunas
		has_character_modifier = follower_of_zemyna
	}
}

#Has same education as prev?
has_prev_education_trigger = {
	OR = {
		AND = {
			has_education_martial_trigger = yes
			PREV = { has_education_martial_trigger = yes }
		}
		AND = {
			has_education_diplomacy_trigger = yes
			PREV = { has_education_diplomacy_trigger = yes }
		}
		AND = {
			has_education_stewardship_trigger = yes
			PREV = { has_education_stewardship_trigger = yes }
		}
		AND = {
			has_education_intrigue_trigger = yes
			PREV = { has_education_intrigue_trigger = yes }
		}
		AND = {
			has_education_learning_trigger = yes
			PREV = { has_education_learning_trigger = yes }
		}
	}
}

