####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  unpleasant 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 strong 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 mental 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.
#has_negative_congenital_trigger	Has a negative congenital trait

#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.

#has_any_lifestyle_trait			Has any of the above lifestyle traits.

#Religion
#has_crusade_trait_trigger			Has a crusade type trait.
#has_secret_religion_trait_trigger	Has a secret religion 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
		is_ascetic_trigger = yes
		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
		trait = cannibal_trait
		trait = impaler
	}
}

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 = 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_minor_disease_trigger = {
	OR = {
		trait = malaise
		trait = fatigue
		trait = abdominal_pain
		trait = headache
		trait = rash
		trait = cramps
		trait = chest_pain
		trait = vomiting
		trait = diarrhea
		trait = fever
		trait = cough
		trait = ill
		trait = lovers_pox
		trait = flu
	}
}

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 = {
	custom_tooltip = {
		text = has_martial_education_tt
		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
	}
}


has_any_lifestyle_trait = {
	OR = {
		has_lifestyle_diplomacy_trigger = yes
		has_lifestyle_martial_trigger = yes
		has_lifestyle_stewardship_trigger = yes
		has_lifestyle_intrigue_trigger = yes
		has_lifestyle_learning_trigger = yes
	}
}


##RELIGION##

has_crusade_trait_trigger = {
	OR = {
		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
				religion = aztec_reformed
			}
			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_secret_religion_trait_trigger = {
	custom_tooltip = {
		text = no_secret_religion
		has_secret_religion = yes
	}
}

####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
		is_ascetic_trigger = yes
	}
	same_realm = FROM
	OR = {
		is_female = no
		AND = {
			religion = cathar
			FROM = {
				religion = cathar
			}
		}
		AND = {
			religion = messalian
			FROM = {
				religion = messalian
			}
		}
		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 }
	NOT = {
		AND = {
			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 = {
	OR = {
		AND = {
			OR = {
				is_female = no
				trait = horse # So we can have female glitterhoofs! :D
				AND = {
					religion = cathar
					liege = { religion = cathar }
				}
				AND = {
					religion = messalian
					liege = { religion = messalian }
				}
				AND = {
					liege = {
						primary_title = {
							OR = {
								has_law = status_of_women_2
								has_law = status_of_women_3
							}
						}
					}
					OR = {
						liege = {
							OR = {
								dynasty = ROOT
								is_close_relative = ROOT
								any_spouse = { character = ROOT }
								any_consort = { character = ROOT }
							}
						}
						is_landed = yes
						trait = nun
						
					}
				}
				OR = {
					liege = { primary_title = { has_law = status_of_women_4 } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
			is_adult = yes
		}
		has_character_flag = special_chancellor
	}
	
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_modifier = resigned_in_anger }
}

can_be_marshal_trigger = {
	OR = {
		AND = {
			OR = {
				is_female = no
				trait = horse # So we can have female glitterhoofs! :D
				OR = {
					AND = {
						religion = cathar
						liege = { religion = cathar }
					}
					AND = {
						religion = messalian
						liege = { religion = messalian }
					}
				}
				AND = {
					liege = {
						primary_title = {
							OR = {
								has_law = status_of_women_3
							}
						}
					}
					OR = {
						liege = {
							OR = {
								dynasty = ROOT
								is_close_relative = ROOT
								any_spouse = { character = ROOT }
								any_consort = { character = ROOT }
							}
						}
						is_landed = yes
						
					}
				}
				OR = {
					liege = { primary_title = { has_law = status_of_women_4 } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
			OR = {
				NOT = { religion = hindu }
				trait = kshatriya
			}
			is_adult = yes
		}
		has_character_flag = special_marshal
	}
	
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = resigned_in_anger }
}

can_be_treasurer_trigger = {
	OR = {
		AND = {
			OR = {
				is_female = no
				trait = horse # So we can have female glitterhoofs! :D
				AND = {
					religion = cathar
					liege = { religion = cathar }
				}
				AND = {
					religion = messalian
					liege = { religion = messalian }
				}
				AND = {
					liege = {
						primary_title = {
							OR = {
								has_law = status_of_women_2
								has_law = status_of_women_3
							}
						}
					}
					OR = {
						liege = {
							OR = {
								dynasty = ROOT
								is_close_relative = ROOT
								any_spouse = { character = ROOT }
								any_consort = { character = ROOT }
							}
						}
						is_landed = yes
						trait = nun
						
					}
				}
				OR = {
					liege = { primary_title = { has_law = status_of_women_4 } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
			is_adult = yes
		}
		has_character_flag = special_treasurer
	}
	
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = resigned_in_anger }
}

can_be_spymaster_trigger = {
	OR = {
		AND = {
			OR = {
				is_female = no
				trait = horse # So we can have female glitterhoofs! :D
				liege = { 
					OR = {
						mother = { character = ROOT }
						any_spouse = { character = ROOT }
					}
				}
				AND = {
					religion_group = pagan_group
					liege = {
						religion_group = pagan_group
					}
				}
				AND = {
					religion = cathar
					liege = { religion = cathar }
				}
				AND = {
					religion = messalian
					liege = { religion = messalian }
				}
				AND = {
					liege = {
						primary_title = {
							OR = {
								has_law = status_of_women_1
								has_law = status_of_women_2
								has_law = status_of_women_3
							}
						}
					}
					OR = {
						liege = {
							OR = {
								dynasty = ROOT
								is_close_relative = ROOT
								any_spouse = { character = ROOT }
								any_consort = { character = ROOT }
							}
						}
						is_landed = yes
						trait = nun
						
					}
				}
				OR = {
					liege = { primary_title = { has_law = status_of_women_4 } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
			is_adult = yes
		}
		has_character_flag = special_spymaster
	}
	
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_flag = guru }
	NOT = { has_character_modifier = resigned_in_anger }
}

can_be_spiritual_trigger = {
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_modifier = resigned_in_anger }

	liege = {
		religion = ROOT
	}
	OR = {
		AND = {
			is_adult = yes
			OR = {
				is_female = no
				religion_allows_female_temple_holders = yes
			}
			OR = {
				NOT = { religion = hindu }
				trait = brahmin
				is_ascetic_trigger = yes
			}
		}
		has_character_flag = special_spiritual
	}
	
	OR = {
		is_theocracy = yes
		AND = {
			liege = { is_tribal = yes }
			is_ruler = no
		}
		liege = { religion_group = muslim }
		AND = {
			clan = yes
			liege = {
				is_nomadic = yes
			}
		}
		AND = {
			has_autocephaly = no
			is_ruler = no
		}
		AND = {
			has_autocephaly = yes
			is_ruler = no
			NOT = {
				any_vassal = { is_theocracy = yes }
			}
		}
	}
	
	OR = {
		NOT = { religion_group = muslim }
		NOT = { liege = { religion_group = muslim } }
		trait = detached_priest
		trait = martial_cleric
		trait = scholarly_theologian
		trait = mastermind_theologian
		has_character_flag = special_spiritual
	}
}

can_be_councilmember_king_trigger = {
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_modifier = resigned_in_anger }
	AND = {
		OR = {
			is_female = no
			AND = {
				OR = {
					religion = cathar
					religion = messalian
				}
				liege = { religion = ROOT }
			}
			AND = {
				liege = {
					primary_title = {
						OR = {
							has_law = status_of_women_1
							has_law = status_of_women_2
							has_law = status_of_women_3
						}
					}
				}
				is_landed = yes
			}
			OR = {
				liege = { primary_title = { has_law = status_of_women_4 } }
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		is_adult = yes
	}
}

can_be_councilmember_emperor_trigger = {
	independent = no
	prisoner = no
	NOT = { trait = incapable }
	NOT = { trait = in_hiding }
	NOT = { has_character_modifier = resigned_in_anger }
	OR = {
		AND = {
			OR = {
				is_female = no
				AND = {
					religion = cathar
					liege = { religion = cathar }
				}
				AND = {
					religion = messalian
					liege = { religion = messalian }
				}
				AND = {
					liege = {
						primary_title = {
							OR = {
								has_law = status_of_women_1
								has_law = status_of_women_2
								has_law = status_of_women_3
							}
						}
					}
					is_landed = yes
				}
				OR = {
					liege = { primary_title = { has_law = status_of_women_4 } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
			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 = { #Remember to write this "is_inaccessible_trigger = no" when scripting, or the tooltip will be messed up (it reads "Is NOT in Hiding, in Seclusion, or out traveling")
	custom_tooltip = {
		text = is_inaccessible_tooltip
		hidden_tooltip = {
			OR = {
				trait = in_hiding
				trait = on_hajj
				trait = on_pilgrimage
				trait = on_indian_pilgrimage
				trait = kow_tow_travels
				has_character_modifier = in_seclusion
				has_character_modifier = in_meditation
				has_character_modifier = doing_penance
				has_character_modifier = out_traveling
			}
		}
	}
}

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 to 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 }
		}
	}
}

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

attacted_to_prev_trigger = {
	OR = {
		AND = {
			PREV = { is_female = yes }
			prefers_men_trigger = no
		}
		AND = {
			PREV = { is_female = no }
			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_reason = death_murder_unknown_hashashin
		death_reason = death_murder_unknown_fear
		death_reason = death_murder_unknown_lightning
		death_reason = death_murder_unknown_combustion
		death_reason = death_murder_unknown_crows
		death_reason = death_murder_unknown_possessed_fall
	}	
}

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_reason = death_murder_hashashin
	}	
}

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_reason = death_executed_by_chinese_emperor
	}	
}

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 = {	
		is_adult = no
		trait = incapable
		prisoner = yes
		is_inaccessible_trigger = yes
		hidden_trigger = { is_alive = no }
	}
}

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


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 }
		}
	}
}

useless_character_trigger = {
	OR = {
		NOT = { health = 2.5 }
		trait = lunatic
		trait = maimed
		trait = infirm
		trait = incapable
		trait = mangled
		trait = severely_injured
		trait = imbecile
		trait = inbred
	}
}

#True religion triggers
true_religion_catholic_trigger = {
	true_religion = catholic
}

true_religion_cathar_trigger = {
	true_religion = cathar
}

true_religion_fraticelli_trigger = {
	true_religion = fraticelli
}

true_religion_waldensian_trigger = {
	true_religion = waldensian
}

true_religion_lollard_trigger = {
	true_religion = lollard
}

true_religion_orthodox_trigger = {
	true_religion = orthodox
}

true_religion_bogomilist_trigger = {
	true_religion = bogomilist
}

true_religion_monothelite_trigger = {
	true_religion = monothelite
}

true_religion_iconoclast_trigger = {
	true_religion = iconoclast
}

true_religion_paulician_trigger = {
	true_religion = paulician
}

true_religion_miaphysite_trigger = {
	true_religion = miaphysite
}

true_religion_monophysite_trigger = {
	true_religion = monophysite
}

true_religion_nestorian_trigger = {
	true_religion = nestorian
}

true_religion_messalian_trigger = {
	true_religion = messalian
}

true_religion_sunni_trigger = {
	true_religion = sunni
}

true_religion_zikri_trigger = {
	true_religion = zikri
}

true_religion_yazidi_trigger = {
	true_religion = yazidi
}

true_religion_shiite_trigger = {
	true_religion = shiite
}

true_religion_druze_trigger = {
	true_religion = druze
}

true_religion_hurufi_trigger = {
	true_religion = hurufi
}

true_religion_ibadi_trigger = {
	true_religion = ibadi
}

true_religion_kharijite_trigger = {
	true_religion = kharijite
}

true_religion_jewish_trigger = {
	true_religion = jewish
}

true_religion_samaritan_trigger = {
	true_religion = samaritan
}

true_religion_karaite_trigger = {
	religion = karaite
}

true_religion_zoroastrian_trigger = {
	true_religion = zoroastrian
}

true_religion_mazdaki_trigger = {
	true_religion = mazdaki
}

true_religion_manichean_trigger = {
	true_religion = manichean
}

true_religion_khurmazta_trigger = {
	true_religion = khurmazta
}

true_religion_bon_trigger = {
	true_religion = bon
}

true_religion_taoist_trigger = {
	true_religion = taoist
}

true_religion_hindu_trigger = {
	true_religion = hindu
}

true_religion_buddhist_trigger = {
	true_religion = buddhist
}

true_religion_jain_trigger = {
	true_religion = jain
}

true_religion_norse_pagan_trigger = {
	true_religion = norse_pagan
}

true_religion_norse_pagan_reformed_trigger = {
	true_religion = norse_pagan_reformed
}

true_religion_baltic_pagan_trigger = {
	true_religion = baltic_pagan
}

true_religion_baltic_pagan_reformed_trigger = {
	true_religion = baltic_pagan_reformed
}

true_religion_finnish_pagan_trigger = {
	true_religion = finnish_pagan
}

true_religion_finnish_pagan_reformed_trigger = {
	true_religion = finnish_pagan_reformed
}

true_religion_slavic_pagan_trigger = {
	true_religion = slavic_pagan
}

true_religion_slavic_pagan_reformed_trigger = {
	true_religion = slavic_pagan_reformed
}

true_religion_tengri_pagan_trigger = {
	true_religion = tengri_pagan
}

true_religion_tengri_pagan_reformed_trigger = {
	true_religion = tengri_pagan_reformed
}

true_religion_aztec_trigger = {
	true_religion = aztec
}

true_religion_aztec_reformed_trigger = {
	true_religion = aztec_reformed
}

true_religion_west_african_pagan_trigger = {
	true_religion = west_african_pagan
}

true_religion_west_african_pagan_reformed_trigger = {
	true_religion = west_african_pagan_reformed
}

true_religion_zun_pagan_trigger = {
	true_religion = zun_pagan
}

true_religion_zun_pagan_reformed_trigger = {
	true_religion = zun_pagan_reformed
}

true_religion_hellenic_pagan_trigger = {
	true_religion = hellenic_pagan
}

true_religion_pagan_trigger = {
	true_religion = pagan
}

true_religion_group_christian_trigger = {
	true_religion_group = christian
}

true_religion_group_muslim_trigger = {
	true_religion_group = muslim
}

true_religion_group_jewish_group_trigger = {
	true_religion_group = jewish_group
}

true_religion_group_zoroastrian_group_trigger = {
	true_religion_group = zoroastrian_group
}

true_religion_group_indian_group_trigger = {
	true_religion_group = indian_group
}

true_religion_group_pagan_group_trigger = {
	true_religion_group = pagan_group
}

relationship_with_root_trigger = {
	OR = {
		is_lover = ROOT
		is_friend = ROOT
		is_rival = ROOT
	}
}
FROMs_religion_is_playable_trigger = {
	NOR = {
		AND = { #Means you're not allowed to play Muslims
			FROM = { religion_group = muslim }
			NOT = { has_dlc = "The Sword of Islam" }
		}
		AND = { #Means you're not allowed to play Jewish
			FROM = { religion_group = jewish_group }
			NOT = { has_dlc = "Sons of Abraham" }
		}
		AND = { #Means you're not allowed to play (most) Pagans
			FROM = {
				religion_group = pagan_group
				NOT = { religion = bon }
			}
			NOT = { has_dlc = "The Old Gods" }
		}
		AND = { #Means you're not allowed to play the Bön religion (Pagan)
			FROM = { 
				religion = bon
			}
			NOR = {
				has_dlc = "The Old Gods"
				has_dlc = "Jade Dragon"
			}
		}
		AND = { #Means you're not allowed to play the Eastern Religions
			FROM = { religion_group = indian_group }
			NOT = { 
				FROM = { 
					religion = taoist
				} 
			}
			NOT = {	has_dlc = "Rajas of India" }
		}
		AND = { #Means you're not allowed to play the Zoroastrians
			FROM = { religion_group = zoroastrian_group }
			NOT = { has_dlc = "The Old Gods" }
		}
		AND = { #Means you're not allowed to play the Taoist religion 
			FROM = { religion = taoist }
			NOR = { 
				has_dlc = "Jade Dragon"
				has_dlc = "Rajas of India"
			}
		}
	}
}

###Use the actual is_<family member>_of = scope triggers now
family_of_root_trigger = { #use is_blood_relative_of_root_trigger for all relatives
	OR = {
		is_close_relative = ROOT #spouse, parents, children, siblings, grandparents, grandchildren
		cousin_of_root_trigger = yes #cousins
		sibling_child_of_root_trigger = yes #nephews, nieces
		parent_sibling_of_root_trigger = yes #aunts, uncles
		sibling_in_law_of_root_trigger = yes #brothers and sisters in law
	}
}

cousin_of_root_trigger = {
	is_cousin_of = ROOT
}

sibling_of_root_trigger = {
	sibling = ROOT
}

sibling_child_of_root_trigger = {
	is_nibling_of = ROOT
}

parent_sibling_of_root_trigger = {
	is_aunt_uncle_of = ROOT
}

grandchild_of_root_trigger = {
	is_grandchild_of = ROOT
}

sibling_in_law_of_root_trigger = {
	OR = {
		mother_even_if_dead = { any_child = { any_spouse = { character = ROOT } } }
		father_even_if_dead = { any_child = { any_spouse = { character = ROOT } } }
		any_spouse = { mother_even_if_dead = { any_child = { character = ROOT } } }
		any_spouse = { father_even_if_dead = { any_child = { character = ROOT } } }
	}
}

is_murder_quest_target_of_prev_trigger = {
	PREVPREV = {
		has_quest = quest_the_assassins_assassination
		quest_target = { character = PREVPREV }
	}
}

is_murder_quest_target_of_root_trigger = {
	ROOT = {
		has_quest = quest_the_assassins_assassination
		quest_target = { character = PREVPREV }
	}
}

assassins_appropriate_target_trigger = {
	is_within_diplo_range = ROOT
	is_adult = yes
	is_quest_target = no

	OR = {
		is_ruler = no
		AND = {
			ROOT = {
				society_rank = {
					rank == 3
					society = the_assassins
				}
			}
			primary_title = { higher_real_tier_than = COUNT }
		}
		AND = {
			ROOT = {
				society_rank = {
					rank == 2
					society = the_assassins
				}
			}
			primary_title = { lower_real_tier_than = EMPEROR }
		}
		AND = {
			ROOT = {
				society_rank = {
					rank == 1
					society = the_assassins
				}
			}
			primary_title = { lower_real_tier_than = DUKE }
		}
	}
}

interesting_face_trigger = {
	OR = {
		trait = fair
		trait = ugly
		trait = scarred
		is_ill = yes
		trait = disfigured
		trait = blinded
		trait = one_eyed
		trait = leper
		trait = harelip
		is_strong_trigger = yes
		is_weak_trigger = yes
		trait = lunatic
		trait = possessed
		trait = rabies
		trait = horse
	}
}

can_pay_assassins_debt = {
	OR = {
		AND = {
			is_variable_equal = { which = assassins_debt value = 50 }
			wealth = 50
		}
		AND = {
			is_variable_equal = { which = assassins_debt value = 250 }
			wealth = 250
		}
		AND = {
			is_variable_equal = { which = assassins_debt value = 300 }
			wealth = 300
		}
		AND = {
			is_variable_equal = { which = assassins_debt value = 500 }
			wealth = 500
		}
	}
}

is_rich_holding = {
	OR = {
		calc_true_if = {
			amount = 2
			has_building = ca_keep_3
			has_building = ca_keep_4
			has_building = ca_keep_5
			has_building = ca_keep_6
			has_building = ca_town_3
			has_building = ca_town_4
			has_building = ca_town_5
			has_building = ca_town_6
			has_building = tp_monastery_3
			has_building = tp_monastery_4
			has_building = tp_monastery_5
			has_building = tp_monastery_6
			has_building = tp_town_3
			has_building = tp_town_4
			has_building = tp_town_5
			has_building = tp_town_6
		}
		has_building = ct_marketplace_3
		has_building = ct_marketplace_4
		has_building = ct_marketplace_5
		has_building = ct_marketplace_6

	}
}
is_richer_holding = {
	
	OR = {
		calc_true_if = {
			amount = 2
			has_building = ca_keep_5
			has_building = ca_keep_6
			has_building = ca_town_5
			has_building = ca_town_6
			has_building = tp_monastery_5
			has_building = tp_monastery_6
			has_building = tp_town_5
			has_building = tp_town_6
		}
		has_building = ct_marketplace_5
		has_building = ct_marketplace_6
	}
}

has_society_currency_trivial_trigger = {
	society_currency >= 15
}

has_society_currency_tiny_trigger = {
	society_currency >= 50
}

has_society_currency_minor_trigger = {
	society_currency >= 150
}

has_society_currency_medium_trigger = {
	society_currency >= 300
}

has_society_currency_major_trigger = {
	society_currency >= 500
}

is_ill_trigger = {
	OR = {
		has_disease_trigger = yes
	}
}

is_devil_worshiper_trigger = {
	custom_tooltip = {
		text = IS_DEVIL_WORSHIPPER_TRIGGER
		OR = {
			society_member_of = the_satanists
			society_member_of = the_cold_ones
			society_member_of = the_plaguebringers
			society_member_of = the_cult_of_kali
			society_member_of = the_trollcrafters
		}
	}
}

has_negative_congenital_trigger = {
	OR = {
		trait = ugly
		trait = clubfooted
		trait = hunchback
		trait = dwarf
		trait = harelip
		trait = stutter
		trait = lisp
		trait = slow
		trait = inbred
		trait = weak
		trait = imbecile
	}
}

is_christian_monastic_member_trigger = {
	OR = {
		society_member_of = monastic_order_orthodox
		society_member_of = monastic_order_benedictine
		society_member_of = monastic_order_dominican
		society_member_of = monastic_order_nestorian
		society_member_of = monastic_order_monophysite
	}
}

is_dharmic_monastic_member_trigger = {
	OR = {
		society_member_of = monastic_order_hindu
		society_member_of = monastic_order_buddhist
		society_member_of = monastic_order_jain
	}
}

is_monastic_member_trigger = {
	OR = {
		is_dharmic_monastic_member_trigger = yes
		is_christian_monastic_member_trigger = yes
	}
}

is_ascetic_trigger = {
	custom_tooltip = {
		text = is_ascetic_tooltip
		OR = {
			trait = monk
			trait = nun
			trait = muni
			trait = aryika
			trait = bhikkhu
			trait = bhikkhuni
			trait = sanyasi
			trait = sanyasini
		}
	}
}

is_virgin_trigger = {
	NOR = {
		any_lover = { always = yes }
		any_child_even_if_dead = { always = yes }
		any_spouse_even_if_dead = { always = yes }
		has_focus = focus_seduction
		is_pregnant = yes
		trait = pregnant
		trait = lustful
		trait = hedonist
		trait = seducer
		trait = seductress
		trait = lovers_pox
		trait = has_aztec_disease
		trait = syphilitic
	}
	OR = {
		NOT = { age = 25 }
		trait = celibate
		trait = chaste
		trait = shy
		is_ascetic_trigger = yes
	}
}

print_scope_trigger = {
	log = "------------------------------"
	log = "- Printing the current scope -"
	log = "- This: [This.GetName][This.GetBestName]"
	log = "- Root: [Root.GetName][Root.GetBestName]"
	log = "- Prev: [Prev.GetName][Prev.GetBestName]"
	log = "- PrevPrev: [PrevPrev.GetName][PrevPrev.GetBestName]"
	log = "- PrevPrevPrev: [PrevPrevPrev.GetName][PrevPrevPrev.GetBestName]"
	log = "- PrevPrevPrevPrev: [PrevPrevPrevPrev.GetName][PrevPrevPrevPrev.GetBestName]"
	log = "- From: [From.GetName][From.GetBestName]"
	log = "- FromFrom: [FromFrom.GetName][FromFrom.GetBestName]"
	log = "- FromFromFrom: [FromFromFrom.GetName][FromFromFrom.GetBestName]"
	log = "- FromFromFromFrom: [FromFromFromFrom.GetName][FromFromFromFrom.GetBestName]"
	log = "- Event_target:test_target1: [test_target1.GetName][test_target1.GetBestName]"
	log = "- Event_target:test_target2: [test_target2.GetName][test_target2.GetBestName]"
	log = "- Event_target:test_target3: [test_target3.GetName][test_target3.GetBestName]"
	log = "------------------------------"
}

is_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
}

is_christian_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	secret_religion_group = christian
}

is_muslim_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	secret_religion_group = muslim
}

is_zoroastrian_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	secret_religion_group = zoroastrian_group
}

is_indian_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	secret_religion_group = indian_group
}

is_jewish_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	secret_religion_group = jewish_group
}

is_norse_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_norse_pagan_reformed
		society_member_of = secret_religious_society_norse_pagan
	}
}

is_slavic_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_slavic_pagan_reformed
		society_member_of = secret_religious_society_slavic_pagan
	}
}

is_tengri_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_tengri_pagan_reformed
		society_member_of = secret_religious_society_tengri_pagan
	}
}

is_baltic_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_baltic_pagan_reformed
		society_member_of = secret_religious_society_baltic_pagan
	}
}

is_finnish_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_finnish_pagan_reformed
		society_member_of = secret_religious_society_finnish_pagan
	}
}

is_west_african_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_west_african_pagan_reformed
		society_member_of = secret_religious_society_west_african_pagan
	}
}

is_zun_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_zun_pagan_reformed
		society_member_of = secret_religious_society_zun_pagan
	}
}

is_aztec_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_cult
	OR = {
		society_member_of = secret_religious_society_aztec_reformed
		society_member_of = secret_religious_society_aztec
	}
}

is_bon_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_society_bon
}

is_taoist_secret_religious_society_member_trigger = {
	society_member_of = secret_religious_society_taoist
}

is_openly_of_prevs_secret_religion_trigger = {
	religion = { target = PREV target_type = secret }
}

is_openly_of_roots_secret_religion_trigger = {
	religion = { target = ROOT target_type = secret }
}

has_sympathy_for_true_religion_of_prev_trigger = { 
	OR = {
		AND = {
			trait = sympathy_christendom
			PREV = { true_religion_group_christian_trigger = yes }
		}
		AND = {
			trait = sympathy_islam
			PREV = { true_religion_group_muslim_trigger = yes }
		}
		AND = {
			trait = sympathy_pagans
			PREV = { true_religion_group_pagan_group_trigger = yes }
		}
		AND = {
			trait = sympathy_zoroastrianism
			PREV = { true_religion_group_zoroastrian_group_trigger = yes }
		}
		AND = {
			trait = sympathy_judaism
			PREV = { true_religion_group_jewish_group_trigger = yes }
		}
		AND = {
			trait = sympathy_indian
			PREV = { true_religion_group_indian_group_trigger = yes }
		}
	}
}

has_sympathy_for_true_religion_of_root_trigger = { 
	OR = {
		AND = {
			trait = sympathy_christendom
			ROOT = { true_religion_group_christian_trigger = yes }
		}
		AND = {
			trait = sympathy_islam
			ROOT = { true_religion_group_muslim_trigger = yes }
		}
		AND = {
			trait = sympathy_pagans
			ROOT = { true_religion_group_pagan_group_trigger = yes }
		}
		AND = {
			trait = sympathy_zoroastrianism
			ROOT = { true_religion_group_zoroastrian_group_trigger = yes }
		}
		AND = {
			trait = sympathy_judaism
			ROOT = { true_religion_group_jewish_group_trigger = yes }
		}
		AND = {
			trait = sympathy_indian
			ROOT = { true_religion_group_indian_group_trigger = yes }
		}
	}
}

ok_sr_induction_mission_target_trigger = {
	is_adult = yes
	NOT = { secret_religion = ROOT }
	NOT = { religion = { target_type = secret target = ROOT } }
	prisoner = no
	NOT = { trait = incapable }
	is_inaccessible_trigger = no
	NOT = { has_character_modifier = secret_religion_sympathy_timer }
	OR = {
		religion_group = { target_type = secret target = ROOT }
		has_sympathy_for_true_religion_of_root_trigger = yes
	}
}

ok_sr_sympathy_mission_target_trigger = {
	has_secret_religion_trait_trigger = no
	ROOT = {
		NOT = { secret_religion = { target_type = public target = PREV } }
		NOR = {
			AND = {
				true_religion_group = christian
				PREV = { trait = sympathy_christendom }
			}
			AND = {
				true_religion_group = muslim
				PREV = { trait = sympathy_islam }
			}
			AND = {
				true_religion_group = pagan_group
				PREV = { trait = sympathy_pagans }
			}
			AND = {
				true_religion_group = zoroastrian_group
				PREV = { trait = sympathy_zoroastrianism }
			}
			AND = {
				true_religion_group = jewish_group
				PREV = { trait = sympathy_judaism }
			}
			AND = {
				true_religion_group = indian_group
				PREV = { trait = sympathy_indian }
			}
		}
	}
	ROOT = { PREV = { is_openly_of_prevs_secret_religion_trigger = no } }
	ROOT = { PREV = { has_sympathy_for_true_religion_of_prev_trigger = no } }
	prisoner = no
	is_adult = yes
	NOT = { trait = incapable }
	is_inaccessible_trigger = no
	NOT = { has_character_modifier = secret_religion_sympathy_timer }
}

has_prevs_secret_religion_truly_trigger = {
	secret_religion = { target = PREV target_type = true }
}

has_roots_secret_religion_truly_trigger = {
	secret_religion = { target = ROOT target_type = true }
}

has_my_liege_secret_religion_truly_trigger = {
	secret_religion = { target = event_target:my_liege target_type = true }
}

is_in_prevs_interesting_society_trigger = {
	OR = {
		AND = {
			society_member_of = secret_religious_society_catholic
			PREV = { interested_in_society = secret_religious_society_catholic }
		}
		AND = {
			society_member_of = secret_religious_society_cathar
			PREV = { interested_in_society = secret_religious_society_cathar }
		}
		AND = {
			society_member_of = secret_religious_society_fraticelli
			PREV = { interested_in_society = secret_religious_society_fraticelli }
		}
		AND = {
			society_member_of = secret_religious_society_waldensian
			PREV = { interested_in_society = secret_religious_society_waldensian }
		}
		AND = {
			society_member_of = secret_religious_society_lollard
			PREV = { interested_in_society = secret_religious_society_lollard }
		}
		AND = {
			society_member_of = secret_religious_society_orthodox
			PREV = { interested_in_society = secret_religious_society_orthodox }
		}
		AND = {
			society_member_of = secret_religious_society_miaphysite
			PREV = { interested_in_society = secret_religious_society_miaphysite }
		}
		AND = {
			society_member_of = secret_religious_society_monophysite
			PREV = { interested_in_society = secret_religious_society_monophysite }
		}
		AND = {
			society_member_of = secret_religious_society_bogomilist
			PREV = { interested_in_society = secret_religious_society_bogomilist }
		}
		AND = {
			society_member_of = secret_religious_society_monothelite
			PREV = { interested_in_society = secret_religious_society_monothelite }
		}
		AND = {
			society_member_of = secret_religious_society_iconoclast
			PREV = { interested_in_society = secret_religious_society_iconoclast }
		}
		AND = {
			society_member_of = secret_religious_society_paulician
			PREV = { interested_in_society = secret_religious_society_paulician }
		}
		AND = {
			society_member_of = secret_religious_society_nestorian
			PREV = { interested_in_society = secret_religious_society_nestorian }
		}
		AND = {
			society_member_of = secret_religious_society_messalian
			PREV = { interested_in_society = secret_religious_society_messalian }
		}
		AND = {
			society_member_of = secret_religious_society_sunni
			PREV = { interested_in_society = secret_religious_society_sunni }
		}
		AND = {
			society_member_of = secret_religious_society_zikri
			PREV = { interested_in_society = secret_religious_society_zikri }
		}
		AND = {
			society_member_of = secret_religious_society_yazidi
			PREV = { interested_in_society = secret_religious_society_yazidi }
		}
		AND = {
			society_member_of = secret_religious_society_ibadi
			PREV = { interested_in_society = secret_religious_society_ibadi }
		}
		AND = {
			society_member_of = secret_religious_society_kharijite
			PREV = { interested_in_society = secret_religious_society_kharijite }
		}
		AND = {
			society_member_of = secret_religious_society_shiite
			PREV = { interested_in_society = secret_religious_society_shiite }
		}
		AND = {
			society_member_of = secret_religious_society_druze
			PREV = { interested_in_society = secret_religious_society_druze }
		}
		AND = {
			society_member_of = secret_religious_society_hurufi
			PREV = { interested_in_society = secret_religious_society_hurufi }
		}
		AND = {
			society_member_of = secret_religious_society_jewish
			PREV = { interested_in_society = secret_religious_society_jewish }
		}
		AND = {
			society_member_of = secret_religious_society_karaite
			PREV = { interested_in_society = secret_religious_society_karaite }
		}
		AND = {
			society_member_of = secret_religious_society_samaritan
			PREV = { interested_in_society = secret_religious_society_samaritan }
		}
		AND = {
			society_member_of = secret_religious_society_zoroastrian
			PREV = { interested_in_society = secret_religious_society_zoroastrian }
		}
		AND = {
			society_member_of = secret_religious_society_mazdaki
			PREV = { interested_in_society = secret_religious_society_mazdaki }
		}
		AND = {
			society_member_of = secret_religious_society_manichean
			PREV = { interested_in_society = secret_religious_society_manichean }
		}
		AND = {
			society_member_of = secret_religious_society_khurmazta
			PREV = { interested_in_society = secret_religious_society_khurmazta }
		}
		AND = {
			society_member_of = secret_religious_society_bon
			PREV = { interested_in_society = secret_religious_society_bon }
		}
		AND = {
			society_member_of = secret_religious_society_taoist
			PREV = { interested_in_society = secret_religious_society_taoist }
		}
		AND = {
			society_member_of = secret_religious_society_hindu
			PREV = { interested_in_society = secret_religious_society_hindu}
		}
		AND = {
			society_member_of = secret_religious_society_buddhist
			PREV = { interested_in_society = secret_religious_society_buddhist }
		}
		AND = {
			society_member_of = secret_religious_society_jain
			PREV = { interested_in_society = secret_religious_society_jain }
		}
		AND = {
			society_member_of = secret_religious_society_norse_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_norse_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_slavic_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_slavic_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_tengri_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_tengri_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_baltic_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_baltic_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_finnish_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_finnish_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_west_african_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_west_african_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_zun_pagan_reformed
			PREV = { interested_in_society = secret_religious_society_zun_pagan_reformed }
		}
		AND = {
			society_member_of = secret_religious_society_norse_pagan
			PREV = { interested_in_society = secret_religious_society_norse_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_slavic_pagan
			PREV = { interested_in_society = secret_religious_society_slavic_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_tengri_pagan
			PREV = { interested_in_society = secret_religious_society_tengri_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_baltic_pagan
			PREV = { interested_in_society = secret_religious_society_baltic_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_finnish_pagan
			PREV = { interested_in_society = secret_religious_society_finnish_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_west_african_pagan
			PREV = { interested_in_society = secret_religious_society_west_african_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_zun_pagan
			PREV = { interested_in_society = secret_religious_society_zun_pagan }
		}
		AND = {
			society_member_of = secret_religious_society_aztec
			PREV = { interested_in_society = secret_religious_society_aztec }
		}
		AND = {
			society_member_of = secret_religious_society_aztec_reformed
			PREV = { interested_in_society = secret_religious_society_aztec_reformed }
		}
	}
}

shares_prevs_secret_religion_trigger = {
	secret_religion = PREV
}

character_knows_prev_trigger = {
	OR = {
		is_close_relative = PREV
		is_lover = PREV
		is_friend = PREV
		is_rival = PREV
		any_courtier_or_vassal = { character = PREVPREV }
		is_liege_or_above = PREV
		dynasty = PREV
		same_liege = PREV
		AND = {
			is_within_diplo_range = PREV
			PREV = { independent = yes } 
		}
	}
}

shares_true_religion_group_with_prev_trigger = {
	true_religion_group = PREV
}

is_openly_of_prevs_true_religion_group = {
	religion_group = { target = PREV target_type = true }
}

is_visible_to_self_trigger = { #For hidden modifiers
	custom_tooltip = {
		text =  is_visible_to_self_trigger_tooltip
		character = FROM
	}
}

has_any_char_old_religion = {
	OR = {
		AND = {
			has_character_flag = character_was_catholic
	    	any_character = {
	    		religion = catholic
	    	}
	    }
		AND = {
			has_character_flag = character_was_cathar
	    	any_character = {
	    		religion = cathar
	    	}
	    }
		AND = {
			has_character_flag = character_was_fraticelli
	    	any_character = {
	    		religion = fraticelli
	    	}
	    }
		AND = {
			has_character_flag = character_was_waldensian
	    	any_character = {
	    		religion = waldensian
	    	}
	    }
		AND = {
			has_character_flag = character_was_lollard
	    	any_character = {
	    		religion = lollard
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_orthodox
	    	any_character = {
	    		religion = orthodox
	    	}
	    }
		AND = {
			has_character_flag = character_was_miaphysite
	    	any_character = {
	    		religion = miaphysite
	    	}
	    }
		AND = {
			has_character_flag = character_was_monophysite
	    	any_character = {
	    		religion = monophysite
	    	}
	    }
		AND = {
			has_character_flag = character_was_bogomilist
	    	any_character = {
	    		religion = bogomilist
	    	}
	    }
		AND = {
			has_character_flag = character_was_monothelite
	    	any_character = {
	    		religion = monothelite
	    	}
	    }
		AND = {
			has_character_flag = character_was_iconoclast
	    	any_character = {
	    		religion = iconoclast
	    	}
	    }
		AND = {
			has_character_flag = character_was_paulician
	    	any_character = {
	    		religion = paulician
	    	}
	    }
		AND = {
			has_character_flag = character_was_nestorian
	    	any_character = {
	    		religion = nestorian
	    	}
	    }
		AND = {
			has_character_flag = character_was_messalian
	    	any_character = {
	    		religion = messalian
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_sunni
	    	any_character = {
	    		religion = sunni
	    	}
	    }
		AND = {
			has_character_flag = character_was_zikri
	    	any_character = {
	    		religion = zikri
	    	}
	    }
		AND = {
			has_character_flag = character_was_yazidi
	    	any_character = {
	    		religion = yazidi
	    	}
	    }
		AND = {
			has_character_flag = character_was_ibadi
	    	any_character = {
	    		religion = ibadi
	    	}
	    }
		AND = {
			has_character_flag = character_was_kharijite
	    	any_character = {
	    		religion = kharijite
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_shiite
	    	any_character = {
	    		religion = shiite
	    	}
	    }
		AND = {
			has_character_flag = character_was_druze
	    	any_character = {
	    		religion = druze
	    	}
	    }
		AND = {
			has_character_flag = character_was_hurufi
	    	any_character = {
	    		religion = hurufi
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_jewish
	    	any_character = {
	    		religion = jewish
	    	}
	    }
		AND = {
			has_character_flag = character_was_karaite
	    	any_character = {
	    		religion = karaite
	    	}
	    }
		AND = {
			has_character_flag = character_was_samaritan
	    	any_character = {
	    		religion = samaritan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_zoroastrian
	    	any_character = {
	    		religion = zoroastrian
	    	}
	    }
		AND = {
			has_character_flag = character_was_mazdaki
	    	any_character = {
	    		religion = mazdaki
	    	}
	    }
		AND = {
			has_character_flag = character_was_manichean
	    	any_character = {
	    		religion = manichean
	    	}
	    }
		AND = {
			has_character_flag = character_was_khurmazta
	    	any_character = {
	    		religion = khurmazta
	    	}
	    }
		AND = {
			has_character_flag = character_was_bon
	    	any_character = {
	    		religion = bon
	    	}
	    }
		AND = {
			has_character_flag = character_was_taoist
	    	any_character = {
	    		religion = taoist
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_hindu
	    	any_character = {
	    		religion = hindu
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_buddhist
	    	any_character = {
	    		religion = buddhist
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_jain
	    	any_character = {
	    		religion = jain
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_norse_pagan_reformed
	    	any_character = {
	    		religion = norse_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_slavic_pagan_reformed
	    	any_character = {
	    		religion = slavic_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_tengri_pagan_reformed
	    	any_character = {
	    		religion = tengri_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_baltic_pagan_reformed
	    	any_character = {
	    		religion = baltic_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_finnish_pagan_reformed
	    	any_character = {
	    		religion = finnish_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_west_african_pagan_reformed
	    	any_character = {
	    		religion = west_african_pagan_reformed
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_zun_pagan_reformed
	    	any_character = {
	    		religion = zun_pagan_reformed
	    	}
	    }
		AND = { 
	    	has_character_flag = character_was_norse_pagan
	    	any_character = {
	    		religion = norse_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_slavic_pagan
	    	any_character = {
	    		religion = slavic_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_tengri_pagan
	    	any_character = {
	    		religion = tengri_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_baltic_pagan
	    	any_character = {
	    		religion = baltic_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_finnish_pagan
	    	any_character = {
	    		religion = finnish_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_west_african_pagan
	    	any_character = {
	    		religion = west_african_pagan
	    	}
	    }
	    AND = { 
	    	has_character_flag = character_was_zun_pagan
	    	any_character = {
	    		religion = zun_pagan
	    	}
	    }
		AND = { 
	    	has_character_flag = character_was_aztec
	    	any_character = {
	    		religion = aztec
	    	}
	    }
		AND = { 
	    	has_character_flag = character_was_aztec_reformed
	    	any_character = {
	    		religion = aztec_reformed
	    	}
	    }
	}
}

can_add_admin_bonus_trigger = {
	NAND = {
		has_province_modifier = harvest_festivals
		has_province_modifier = inspired_peasantry
		has_province_modifier = new_roads
	}
}

can_be_sabotaged_trigger = {
	NAND = {
		has_province_modifier = sabotaged_buildings
		has_province_modifier = sabotaged_defences
		has_province_modifier = sabotaged_unrest
	}
}

has_assassins_prerequisites = {
	age = 16
	conditional_tooltip = { #recruitment decision
		trigger = { FROM = { society_member_of = the_assassins } }
		OR = {
			FROM = { ai = no }
			hidden_trigger = { ai = no }
			religion_group = muslim
		}
	}
	conditional_tooltip = { #showing interest via interface
		trigger = { NOT = { FROM = { society_member_of = the_assassins } } }
		OR = {
			true_religion = shiite
			religion_group = muslim
			AND = {
				ai = no
				NOT = { trait = zealous }
				any_playable_ruler = {
					religion = shiite
					NOT = {
						distance_from_realm = { value = 300 who = ROOT }
					}
				}
			}
		}
	}
	OR = {
		is_female = no
		has_game_rule = {
			name = gender
			value = all
		}
	}
}

has_common_devilworship_prerequisites = {
	age = 16
	custom_tooltip = {
		text = must_be_a_sinner_tooltip
		hidden_tooltip = {
			OR = {
				has_impious_trait_trigger = yes
				has_vice_trigger = yes
				trait = drunkard
				trait = possessed
				trait = lunatic
			}
		}
	}
}

has_satanists_prerequisites = {
	has_common_devilworship_prerequisites = yes
	OR = {
		religion_group = christian
		religion_group = muslim
		religion_group = zoroastrian_group
		religion_group = jewish_group
		religion = zun_pagan
		religion = zun_pagan_reformed
	}
}

has_trollcrafters_prerequisites = {
	has_common_devilworship_prerequisites = yes
	religion_openly_norse_or_reformed_trigger = yes
}

has_cult_of_kali_prerequisites = {
	has_common_devilworship_prerequisites = yes
	OR = {
		religion = hindu
	}
}

has_cold_ones_prerequisites = {
	has_common_devilworship_prerequisites = yes
	OR = {
		religion_openly_baltic_or_reformed_trigger = yes
		religion_openly_slavic_or_reformed_trigger = yes
		religion_openly_finnish_or_reformed_trigger = yes
	}
}

has_plaguebringers_prerequisites = {
	has_common_devilworship_prerequisites = yes
	religion_openly_tengri_or_reformed_trigger = yes
}

same_society_rank_as_prev_trigger = {
	OR = {
		AND = {
			society_rank == 1
			PREV = { society_rank == 1 }
		}
		AND = {
			society_rank == 2
			PREV = { society_rank == 2 }
		}
		AND = {
			society_rank == 3
			PREV = { society_rank == 3 }
		}
		AND = {
			society_rank == 4
			PREV = { society_rank == 4 }
		}
	}
}

higher_society_rank_than_prev_trigger = {
	OR = {
		AND = {
			PREV = { society_rank == 1 }
			society_rank > 1
		}
		AND = {
			PREV = { society_rank == 2 }
			society_rank > 2
		}
		AND = {
			PREV = { society_rank == 3 }
			society_rank > 3
		}
	}
}

#returns true if scoped character already likes ROOT and could be physically attracted to them
possibly_romantically_interested_in_ROOT_trigger = {
	NOT = { is_rival = ROOT }
	attacted_to_root_trigger = yes
	OR = {
		opinion = { who = ROOT value = 45 }
		has_opinion_modifier = { who = ROOT modifier = opinion_budding_romance }
	}
}

#returns true if scoped character is already liked by ROOT and ROOT could be physically attracted to them
ROOT_possibly_romantically_interested_trigger = {
	NOT = { is_rival = ROOT }
	root_attraction_trigger = yes
	OR = { 
		reverse_opinion = { who = ROOT value = 45 }
		reverse_has_opinion_modifier = { who = ROOT modifier = opinion_budding_romance }
	}
}

#returns true if scoped character and ROOT are somewhat likely to fancy each other
possibly_romantically_interested_in_each_other_trigger = {
	possibly_romantically_interested_in_ROOT_trigger = yes
	ROOT_possibly_romantically_interested_trigger = yes
}

looting_artifact_event_religious_artifacts_trigger = {
	FROM = {
		any_artifact = {
			has_artifact_flag = looted_artifact_tooltip_1
			has_artifact_flag = religious
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = catholic
				ROOT = { religion = catholic }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = cathar
				ROOT = { religion = cathar }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = fraticelli
				ROOT = { religion = fraticelli }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = waldensian
				ROOT = { religion = waldensian }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = lollard
				ROOT = { religion = lollard }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = orthodox
				ROOT = { religion = orthodox }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = bogomilist
				ROOT = { religion = bogomilist }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = monothelite
				ROOT = { religion = monothelite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = iconoclast
				ROOT = { religion = iconoclast }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = paulician
				ROOT = { religion = paulician }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = miaphysite
				ROOT = { religion = miaphysite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = monophysite
				ROOT = { religion = monophysite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = nestorian
				ROOT = { religion = nestorian }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = messalian
				ROOT = { religion = messalian }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = sunni
				ROOT = { religion = sunni }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = zikri
				ROOT = { religion = zikri }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = yazidi
				ROOT = { religion = yazidi }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = shiite
				ROOT = { religion = shiite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = druze
				ROOT = { religion = druze }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = hurufi
				ROOT = { religion = hurufi }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = ibadi
				ROOT = { religion = ibadi }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = kharijite
				ROOT = { religion = kharijite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = jewish
				ROOT = { religion = jewish }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = samaritan
				ROOT = { religion = samaritan }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = karaite
				ROOT = { religion = karaite }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = zoroastrian
				ROOT = { religion = zoroastrian }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = mazdaki
				ROOT = { religion = mazdaki }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = manichean
				ROOT = { religion = manichean }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = khurmazta
				ROOT = { religion = khurmazta }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = bon
				ROOT = { religion = bon }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = taoist
				ROOT = { religion = taoist }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = hindu
				ROOT = { religion = hindu }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = buddhist
				ROOT = { religion = buddhist }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = jain
				ROOT = { religion = jain }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = norse_pagan
				ROOT = { OR = { religion = norse_pagan religion = norse_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = baltic_pagan
				ROOT = { OR = { religion = baltic_pagan religion = baltic_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = finnish_pagan
				ROOT = { OR = { religion = finnish_pagan religion = finnish_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = slavic_pagan
				ROOT = { OR = { religion = slavic_pagan religion = slavic_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = tengri_pagan
				ROOT = { OR = { religion = tengri_pagan religion = tengri_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = aztec
				ROOT = { OR = { religion = aztec religion = aztec_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = west_african_pagan
				ROOT = { OR = { religion = west_african_pagan religion = west_african_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = zun_pagan
				ROOT = { OR = { religion = zun_pagan religion = zun_pagan_reformed } }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = hellenic_pagan
				ROOT = { religion = hellenic_pagan }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = pagan
				ROOT = { religion = pagan }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = christian
				ROOT = { religion_group = christian }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = muslim
				ROOT = { religion_group = muslim }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = pagan_group
				ROOT = { religion_group = pagan_group }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = zoroastrian_group
				ROOT = { religion_group = zoroastrian_group }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = jewish_group
				ROOT = { religion_group = jewish_group }
			}
		}
		NAND = {
			any_artifact = {
				has_artifact_flag = looted_artifact_tooltip_1
				has_artifact_flag = indian_group
				ROOT = { religion_group = indian_group }
			}
		}
	}
}

can_be_asked_to_leave_court_trigger = {
	NOR = {
		is_ruler = yes
		is_landed = yes
		has_job_title = yes
		has_minor_title = title_regent
		has_minor_title = title_appointed_regent
		has_minor_title = title_commander
		has_minor_title = title_court_physician
		dynasty = FROM
		is_married = FROM
		is_consort = FROM
		is_adult = no
		is_close_relative = FROM
		has_character_flag = eternal_life_mystic
		has_character_flag = immortal_rival
		trait = horse
		has_character_modifier = in_seclusion
	}
}

has_a_seer_modifier_trigger = {
	OR = {
		has_character_modifier = fulfilled_vision_great
		has_character_modifier = fulfilled_vision_ok
		has_character_modifier = fulfilled_vision_bad
		has_character_modifier = fulfilled_vision_worst
	}
}

has_an_omen_modifier_trigger = {
	OR = {
		has_character_modifier = good_battle_omen
		has_character_modifier = good_relationship_omen
		has_character_modifier = good_power_omen
		has_character_modifier = bad_battle_omen
		has_character_modifier = bad_relationship_omen
		has_character_modifier = bad_power_omen
	}
}

has_positive_omen_modifier_trigger = {
	OR = {
		has_character_modifier = good_battle_omen
		has_character_modifier = good_relationship_omen
		has_character_modifier = good_power_omen
	}
}

has_negative_omen_modifier_trigger = {
	OR = {
		has_character_modifier = bad_battle_omen
		has_character_modifier = bad_relationship_omen
		has_character_modifier = bad_power_omen
	}
}

has_battle_omen_modifier_trigger = {
	OR = {
		has_character_modifier = good_battle_omen
		has_character_modifier = bad_battle_omen
	}
}

has_relationship_omen_modifier_trigger = {
	OR = {
		has_character_modifier = good_relationship_omen
		has_character_modifier = bad_relationship_omen
	}
}

has_power_omen_modifier_trigger = {
	OR = {
		has_character_modifier = good_power_omen
		has_character_modifier = bad_power_omen
	}
}

has_bottom_tier_education_trait_trigger = {
	OR = {
		trait = naive_appeaser
		trait = misguided_warrior
		trait = indulgent_wastrel
		trait = amateurish_plotter
		trait = detached_priest
	}
}

has_2nd_tier_education_trait_trigger = {
	OR = {
		trait = underhanded_rogue
		trait = tough_soldier
		trait = thrifty_clerk
		trait = flamboyant_schemer
		trait = martial_cleric
	}
}

has_3rd_tier_education_trait_trigger = {
	custom_tooltip = {
		text = tribute_interaction_level4_education_tt
		hidden_trigger = {	
			OR = {
				trait = charismatic_negotiator
				trait = skilled_tactician
				trait = fortune_builder
				trait = intricate_webweaver
				trait = scholarly_theologian
			}
		}
	}
}

has_top_tier_education_trait_trigger = {
	custom_tooltip = {
		text = tribute_interaction_level4_education_tt
		hidden_trigger = {
			OR = {
				trait = elusive_shadow
				trait = grey_eminence
				trait = midas_touched
				trait = brilliant_strategist
				trait = mastermind_theologian
			}
		}
	}
}

has_medium_education_trait_trigger = {
	OR = {
		has_2nd_tier_education_trait_trigger = yes
		has_3rd_tier_education_trait_trigger = yes
	}
}

has_childhood_horoscope_modifier_trigger = {
	OR = {
		has_character_modifier = guided_by_horoscope_diplomacy
		has_character_modifier = guided_by_horoscope_martial
		has_character_modifier = guided_by_horoscope_stewardship
		has_character_modifier = guided_by_horoscope_intrigue
		has_character_modifier = guided_by_horoscope_learning
	}
}

is_born_in_january_trigger = {
	month_of_birth = 1
	NOT = { month_of_birth = 2 }
}
is_born_in_february_trigger = {
	month_of_birth = 2
	NOT = { month_of_birth = 3 }
}
is_born_in_march_trigger = {
	month_of_birth = 3
	NOT = { month_of_birth = 4 }
}
is_born_in_april_trigger = {
	month_of_birth = 4
	NOT = { month_of_birth = 5 }
}
is_born_in_may_trigger = {
	month_of_birth = 5
	NOT = { month_of_birth = 6 }
}
is_born_in_june_trigger = {
	month_of_birth = 6
	NOT = { month_of_birth = 7 }
}
is_born_in_july_trigger = {
	month_of_birth = 7
	NOT = { month_of_birth = 8 }
}
is_born_in_august_trigger = {
	month_of_birth = 8
	NOT = { month_of_birth = 9 }	
}
is_born_in_september_trigger = {
	month_of_birth = 9
	NOT = { month_of_birth = 10 }	
}
is_born_in_october_trigger = {
	month_of_birth = 10
	NOT = { month_of_birth = 11 }	
}
is_born_in_november_trigger = {
	month_of_birth = 11
	NOT = { month_of_birth = 12 }	
}
is_born_in_december_trigger = {
	month_of_birth = 12
}

is_born_under_Aries_trigger = {
	OR = {
		AND = {
			is_born_in_march_trigger = yes
			day_of_birth = 20 #including this
		}
		AND = {
			is_born_in_april_trigger = yes
			NOT = { day_of_birth = 19 } #not 19th, so 18th at the latest
		}
	}
}
is_born_under_Taurus_trigger = {
	OR = {
		AND = {
			is_born_in_april_trigger = yes
			day_of_birth = 19
		}
		AND = {
			is_born_in_may_trigger = yes
			NOT = { day_of_birth = 20 }
		}
	}
}
is_born_under_Gemini_trigger = {
	OR = {
		AND = {
			is_born_in_may_trigger = yes
			day_of_birth = 20
		}
		AND = {
			is_born_in_june_trigger = yes
			NOT = { day_of_birth = 21 }
		}
	}
}
is_born_under_Cancer_trigger = {
	OR = {
		AND = {
			is_born_in_june_trigger = yes
			day_of_birth = 21
		}
		AND = {
			is_born_in_july_trigger = yes
			NOT = { day_of_birth = 22 }
		}
	}
}
is_born_under_Leo_trigger = {
	OR = {
		AND = {
			is_born_in_july_trigger = yes
			day_of_birth = 22
		}
		AND = {
			is_born_in_august_trigger = yes
			NOT = { day_of_birth = 22 }
		}
	}
}
is_born_under_Virgo_trigger = {
	OR = {
		AND = {
			is_born_in_august_trigger = yes
			day_of_birth = 22
		}
		AND = {
			is_born_in_september_trigger = yes
			NOT = { day_of_birth = 22 }
		}
	}
}
is_born_under_Libra_trigger = {
	OR = {
		AND = {
			is_born_in_september_trigger = yes
			day_of_birth = 22
		}
		AND = {
			is_born_in_october_trigger = yes
			NOT = { day_of_birth = 23 }
		}
	}
}
is_born_under_Scorpius_trigger = {
	OR = {
		AND = {
			is_born_in_october_trigger = yes
			day_of_birth = 23
		}
		AND = {
			is_born_in_november_trigger = yes
			NOT = { day_of_birth = 22 }
		}
	}
}
is_born_under_Sagittarius_trigger = {
	OR = {
		AND = {
			is_born_in_november_trigger = yes
			day_of_birth = 22
		}
		AND = {
			is_born_in_december_trigger = yes
			NOT = { day_of_birth = 21 }
		}
	}
}
is_born_under_Capricorn_trigger = {
	OR = {
		AND = {
			is_born_in_december_trigger = yes
			day_of_birth = 21
		}
		AND = {
			is_born_in_january_trigger = yes
			NOT = { day_of_birth = 20 }
		}
	}
}
is_born_under_Aquarius_trigger = {
	OR = {
		AND = {
			is_born_in_january_trigger = yes
			day_of_birth = 19
		}
		AND = {
			is_born_in_february_trigger = yes
			NOT = { day_of_birth = 18 }
		}
	}
}
is_born_under_Pisces_trigger = {
	OR = {
		AND = {
			is_born_in_february_trigger = yes
			day_of_birth = 18
		}
		AND = {
			is_born_in_march_trigger = yes
			NOT = { day_of_birth = 20 }
		}
	}
}

is_romantic_zodiac_match_with_root_trigger = {
	OR = {
		AND = {
			is_born_under_Aries_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Gemini_trigger = yes
					is_born_under_Leo_trigger = yes
					is_born_under_Sagittarius_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Taurus_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Cancer_trigger = yes
					is_born_under_Virgo_trigger = yes
					is_born_under_Capricorn_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Gemini_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Leo_trigger = yes
					is_born_under_Libra_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Cancer_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Virgo_trigger = yes
					is_born_under_Scorpius_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Leo_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Gemini_trigger = yes
					is_born_under_Libra_trigger = yes
					is_born_under_Sagittarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Virgo_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Cancer_trigger = yes
					is_born_under_Scorpius_trigger = yes
					is_born_under_Capricorn_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Libra_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Gemini_trigger = yes
					is_born_under_Leo_trigger = yes
					is_born_under_Sagittarius_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Scorpius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Cancer_trigger = yes
					is_born_under_Virgo_trigger = yes
					is_born_under_Capricorn_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Sagittarius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Leo_trigger = yes
					is_born_under_Libra_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Capricorn_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Virgo_trigger = yes
					is_born_under_Scorpius_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Aquarius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Gemini_trigger = yes
					is_born_under_Libra_trigger = yes
					is_born_under_Sagittarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Pisces_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Cancer_trigger = yes
					is_born_under_Scorpius_trigger = yes
					is_born_under_Capricorn_trigger = yes
				}
			}
		}
	}
}

is_romantic_zodiac_mismatch_with_root = {
	OR = {
		AND = {
			is_born_under_Aries_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Cancer_trigger = yes
					is_born_under_Capricorn_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Taurus_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Leo_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Gemini_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Virgo_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Cancer_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Libra_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Leo_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Scorpius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Virgo_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Gemini_trigger = yes
					is_born_under_Sagittarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Libra_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Cancer_trigger = yes
					is_born_under_Capricorn_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Scorpius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Leo_trigger = yes
					is_born_under_Aquarius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Sagittarius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Virgo_trigger = yes
					is_born_under_Pisces_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Capricorn_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Aries_trigger = yes
					is_born_under_Libra_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Aquarius_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Taurus_trigger = yes
					is_born_under_Scorpius_trigger = yes
				}
			}
		}
		AND = {
			is_born_under_Pisces_trigger = yes
			ROOT = {
				OR = {
					is_born_under_Gemini_trigger = yes
					is_born_under_Sagittarius_trigger = yes
				}
			}
		}
	}
}

has_unsafe_secret_religion = {
	NOT = { is_nomadic = yes }
	OR = {
		AND = {
			NOT = { has_dlc = "The Sword of Islam" }
			OR = {
				secret_religion = sunni
				secret_religion = zikri
				secret_religion = yazidi
				secret_religion = shiite
				secret_religion = druze
				secret_religion = hurufi
				secret_religion = ibadi
				secret_religion = kharijite
			}
		}
		AND = {
			NOT = { has_dlc = "Sons of Abraham" }
			OR = {
				secret_religion = jewish
				secret_religion = samaritan
				secret_religion = karaite
			}
		}
		AND = {
			NOT = { has_dlc = "The Old Gods" }
			OR = {
				secret_religion = zoroastrian
				secret_religion = mazdaki
				secret_religion = manichean
				secret_religion = khurmazta
				secret_religion = bon
				secret_religion = norse_pagan
				secret_religion = norse_pagan_reformed
				secret_religion = baltic_pagan
				secret_religion = baltic_pagan_reformed
				secret_religion = finnish_pagan
				secret_religion = finnish_pagan_reformed
				secret_religion = slavic_pagan
				secret_religion = slavic_pagan_reformed
				secret_religion = tengri_pagan
				secret_religion = tengri_pagan_reformed
				secret_religion = west_african_pagan
				secret_religion = west_african_pagan_reformed
				secret_religion = zun_pagan
				secret_religion = zun_pagan_reformed
				secret_religion = hellenic_pagan
				secret_religion = pagan
				secret_religion = aztec
				secret_religion = aztec_reformed
			}
		}
		AND = {
			NOT = { has_dlc = "Rajas of India" }
			OR = {
				secret_religion = hindu
				secret_religion = buddhist
				secret_religion = jain
			}
		}
		AND = {
			NOT = { has_dlc = "Jade Dragon" }
			secret_religion = taoist
		}
	}
}

#to check type of ingredient... (if more are added, they need to go in here to work with the current system)
is_ingredient_herb_trigger = {
	OR = {
		artifact_type = ingredient_herb1
		artifact_type = ingredient_herb2
		artifact_type = ingredient_herb3
		artifact_type = ingredient_herb4
		artifact_type = ingredient_herb5
		artifact_type = ingredient_herb6
		artifact_type = ingredient_herb7
		artifact_type = ingredient_herb8
		artifact_type = ingredient_herb9
	}
}

is_ingredient_animal_part_trigger = {
	OR = {
		artifact_type = ingredient_animal1
		artifact_type = ingredient_animal2
		artifact_type = ingredient_animal3
		artifact_type = ingredient_animal4
		artifact_type = ingredient_animal5
		artifact_type = ingredient_animal6
		artifact_type = ingredient_animal7
		artifact_type = ingredient_animal8
		artifact_type = ingredient_animal9
	}
}

is_ingredient_powder_trigger = {
	OR = {
		artifact_type = ingredient_metal_exotic1
		artifact_type = ingredient_metal_exotic5
		artifact_type = ingredient_metal_exotic6
		artifact_type = ingredient_metal_exotic7
		artifact_type = ingredient_metal_exotic8
		artifact_type = ingredient_metal_exotic9
	}
}

is_ingredient_liquid_trigger = {
	OR = {
		artifact_type = ingredient_metal_exotic2
		artifact_type = ingredient_metal_exotic3
		artifact_type = ingredient_metal_exotic4
	}
}

#to check which ingredient TO BE selected (via scripted effects)...
has_a_herb_ingredient_trigger = {
	any_artifact = {
		is_ingredient_herb_trigger = yes
	}
}

has_an_animal_part_ingredient_trigger = {
	any_artifact = {
		is_ingredient_animal_part_trigger = yes
	}
}

has_a_powder_ingredient_trigger = {
	any_artifact = {
		is_ingredient_powder_trigger = yes
	}
}

has_a_liquid_ingredient_trigger = {
	any_artifact = {
		is_ingredient_liquid_trigger = yes
	}
}

#to check if HAS selected (via scripted effects) an ingredient...
has_selected_herb_ingredient_1_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
		is_ingredient_herb_trigger = yes
	}
}

has_selected_animal_part_ingredient_1_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
		is_ingredient_animal_part_trigger = yes
	}
}

has_selected_powder_ingredient_1_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
		is_ingredient_powder_trigger = yes
	}
}

has_selected_liquid_ingredient_1_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
		is_ingredient_liquid_trigger = yes
	}
}

has_selected_herb_ingredient_2_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_2
		is_ingredient_herb_trigger = yes
	}
}

has_selected_animal_part_ingredient_2_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_2
		is_ingredient_animal_part_trigger = yes
	}
}

has_selected_powder_ingredient_2_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_2
		is_ingredient_powder_trigger = yes
	}
}

has_selected_liquid_ingredient_2_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_2
		is_ingredient_liquid_trigger = yes
	}
}

has_selected_ingredient_1_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
	}
}

has_selected_ingredient_2_trigger = {
	any_artifact = {
		has_artifact_flag = selected_ingredient_2
	}
}

selected_ingredient_is_sleep_inducing_trigger = {
	any_artifact = {
		OR = {
			has_artifact_flag = selected_ingredient_1
			has_artifact_flag = selected_ingredient_2
		}
		OR = {
			artifact_type = ingredient_herb7
			artifact_type = ingredient_herb3
			artifact_type = ingredient_herb9			
		}
	}
}

selected_ingredient_is_antipyretic_trigger = {
	any_artifact = {
		OR = {
			has_artifact_flag = selected_ingredient_1
			has_artifact_flag = selected_ingredient_2
		}
		OR = {
			artifact_type = ingredient_herb1
			artifact_type = ingredient_herb2
			artifact_type = ingredient_herb4
			artifact_type = ingredient_herb5
			artifact_type = ingredient_herb8
			artifact_type = ingredient_metal_exotic6
		}
	}
}

selected_ingredient_is_perceived_healthy_trigger = {
	any_artifact = {
		OR = {
			has_artifact_flag = selected_ingredient_1
			has_artifact_flag = selected_ingredient_2
		}
		OR = {
			AND = {
				is_ingredient_herb_trigger = yes
				NOT = { artifact_type = ingredient_herb3 } #Mandrake
			}
			artifact_type = ingredient_metal_exotic8 #Mercury
			artifact_type = ingredient_metal_exotic8 #Iron
			artifact_type = ingredient_metal_exotic6 #Gold

			artifact_type = ingredient_animal2 #Kidney
			artifact_type = ingredient_animal7 #Heart
			artifact_type = ingredient_animal8 #Liver
			artifact_type = ingredient_animal9 #Intestines
		}
	}
}

selected_ingredient_is_unhealthy_trigger = {
	any_artifact = {
		OR = {
			has_artifact_flag = selected_ingredient_1
			has_artifact_flag = selected_ingredient_2
		}
		OR = {
			artifact_type = ingredient_herb3 #Mandrake
			artifact_type = ingredient_metal_exotic8 #Mercury
			artifact_type = ingredient_metal_exotic8 #Iron
			is_ingredient_animal_part_trigger = yes
		}
	}
}

selected_ingredient_1_and_2_are_same = {
	#Checks whether the ingredients selected are same type, such as two Hibiscus (if so, returns true)...
	any_artifact = {
		has_artifact_flag = selected_ingredient_1
		ROOT = {
			any_artifact = {
				has_artifact_flag = selected_ingredient_2
				is_artifact_same_type_as = PREVPREV
			}
		}
	}
}

ingredient_is_sleep_inducing_trigger = {
	OR = {
		artifact_type = ingredient_herb7
		artifact_type = ingredient_herb3
		artifact_type = ingredient_herb9
	}
}

ingredient_is_antipyretic_trigger = {
	OR = {
		artifact_type = ingredient_herb1
		artifact_type = ingredient_herb2
		artifact_type = ingredient_herb4
		artifact_type = ingredient_herb5
		artifact_type = ingredient_herb8
		artifact_type = ingredient_metal_exotic6
	}
}

ingredient_is_perceived_healthy_trigger = {
	OR = {
		AND = {
			is_ingredient_herb_trigger = yes
			NOT = { artifact_type = ingredient_herb3 } #Mandrake
		}
		artifact_type = ingredient_metal_exotic8 #Mercury
		artifact_type = ingredient_metal_exotic8 #Iron
		artifact_type = ingredient_metal_exotic6 #Gold

		artifact_type = ingredient_animal2 #Kidney
		artifact_type = ingredient_animal7 #Heart
		artifact_type = ingredient_animal8 #Liver
		artifact_type = ingredient_animal9 #Intestines
	}
}

ingredient_is_unhealthy_trigger = {
	OR = {
		artifact_type = ingredient_herb3 #Mandrake
		artifact_type = ingredient_metal_exotic8 #Mercury
		artifact_type = ingredient_metal_exotic8 #Iron
		AND = {
			is_ingredient_animal_part_trigger = yes
			NOR = {
				artifact_type = ingredient_animal2 #Kidney
				artifact_type = ingredient_animal7 #Heart
				artifact_type = ingredient_animal8 #Liver
				artifact_type = ingredient_animal9 #Intestines
			}
		}
	}
}

same_true_religion_as_from_trigger = {
	true_religion = FROM
}
same_true_religion_as_root_trigger = {
	true_religion = ROOT
}

religion_openly_norse_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_norse_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = norse_pagan
				religion = norse_pagan_reformed
			}
		}
	}
}

religion_openly_baltic_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_baltic_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = baltic_pagan
				religion = baltic_pagan_reformed
			}
		}
	}
}

religion_openly_finnish_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_finnish_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = finnish_pagan
				religion = finnish_pagan_reformed
			}
		}
	}
}

religion_openly_slavic_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_slavic_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = slavic_pagan
				religion = slavic_pagan_reformed
			}
		}
	}
}

religion_openly_tengri_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_tengri_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = tengri_pagan
				religion = tengri_pagan_reformed
			}
		}
	}
}

religion_openly_west_african_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_west_african_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = west_african_pagan
				religion = west_african_pagan_reformed
			}
		}
	}
}

religion_openly_zun_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_zun_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = zun_pagan
				religion = zun_pagan_reformed
			}
		}
	}
}

religion_openly_aztec_or_reformed_trigger = {
	custom_tooltip = {
		text = religion_openly_aztec_or_reformed_tooltip
		hidden_trigger = {
			OR = {
				religion = aztec
				religion = aztec_reformed
			}
		}
	}
}

has_dharmic_religion_trigger = {
	OR = {
		religion = hindu
		religion = buddhist
		religion = jain
	}
}

###CHINA TRIGGERS###

#Grace triggers
has_grace_trivial_trigger = {
	has_offmap_currency = { offmap = offmap_china value = 10 }
}
has_grace_minor_trigger = {
	has_offmap_currency = { offmap = offmap_china value = 50 }
}
has_grace_medium_trigger = {
	has_offmap_currency = { offmap = offmap_china value = 150 }
}
has_grace_major_trigger = {
	has_offmap_currency = { offmap = offmap_china value = 500 }
}
has_grace_massive_trigger = { 
	has_offmap_currency = { offmap = offmap_china value = 1000 }
}


#Always put this at the end of your triggers!
china_diplo_interaction_trigger = { 
	offmap_china = {
		governor = { 
			NOT = { war_with = PREVPREV } 
			is_within_diplo_range = PREVPREV
		}
		NOT = { has_policy = china_isolationist }
	}
	conditional_tooltip = { 
		trigger = { government = chinese_imperial_government }
		custom_tooltip = { 
			text = china_offmap_decisions_pretender_emperor_tt
			always = no
		}
	}
}

china_is_suffering_trigger = {
	offmap_china = {
		OR = {
			has_status = china_unrest
			has_status = china_civil_war
			has_status = china_famine
			has_status = china_plague
			has_status = china_mongol_invasion
			has_status = china_jurchen_invasion
		}
	}
}

china_is_fine_trigger = { #"fine", read like "fiii-iine", i.e. China is currently treating the world as their oyster
	offmap_china = {
		OR = {
			has_status = china_golden_age
			has_status = china_stable
		}
		OR = {
			has_policy = china_open
			has_policy = china_expansionist
		}
	}
}

china_is_stable_open_trigger = {
	offmap_china = {
		has_status = china_stable
		has_policy = china_open
	}
}
china_is_stable_expansionist_trigger = {
	offmap_china = {
		has_status = china_stable
		has_policy = china_expansionist
	}
}
china_is_golden_age_open_trigger = {
	offmap_china = {
		has_status = china_golden_age
		has_policy = china_open
	}
}
china_is_golden_age_expansionist_trigger = {
	offmap_china = {
		has_status = china_golden_age
		has_policy = china_expansionist
	}
}


#Found in the 00_offmap_powers file... and the conditions for the decisions
china_offmap_boon_decisions_enabled_trigger = {
	china_offmap_decisions_enabled_trigger = yes
	custom_tooltip = {
		text = china_offmap_boon_decisions_enabled_trigger_cd_tt #From is player character
		FROM = { NOT = { has_character_modifier = jd_china_boon_cd } } #boon cooldown, which is set in each decision (one year!)...
	}
}

#Found in the 00_offmap_powers file... and the conditions for the decisions, use custom tooltip for that decisions cooldown modifier
china_offmap_tribute_decisions_enabled_trigger = {
	china_offmap_decisions_enabled_trigger = yes
}

#What goes into the two triggers above...
china_offmap_decisions_enabled_trigger = { 
	offmap_china = {
		NOT = { has_policy = china_isolationist }
		custom_tooltip = {
			text = china_offmap_decisions_enabled_trigger_war_tt #"Is at peace with §Y[From.GetTitledFirstName]§!"
			NOT = { governor = { war_with = FROM } }
		}
		governor = {
			show_scope_change = no
			is_within_diplo_range = FROM
			hidden_trigger  = { NOT = { character = FROM } } #Governor cannot use boon/tributes decisions
		}
	}
	custom_tooltip = {
		text = china_offmap_boon_decisions_enabled_trigger_raiding_tt
		FROM = {
			NOR = {
				has_character_modifier = china_raid_active
				has_character_modifier = china_raid_grace_cd
			}
		}
	}
	hidden_trigger = { has_dlc = "Jade Dragon" }
	conditional_tooltip = { 
		trigger = { FROM = { primary_title = { has_title_flag = rebel_general_title } } }
		custom_tooltip = { 
			text = china_offmap_decisions_pretender_emperor_tt
			always = no
		}
	}
	conditional_tooltip = { 
		trigger = { FROM = { has_character_modifier = failed_invasion_of_china } }
		custom_tooltip = { 
			text = china_offmap_decisions_failed_invasion_tt
			always = no
		}
	}
}

#Found in the 00_offmap_powers file... and the conditions for the force open china decision
china_offmap_hostile_decisions_enabled_trigger = {
	offmap_china = {
		custom_tooltip = {
			text = china_offmap_decisions_enabled_trigger_war_tt #"Is at peace with §Y[From.GetTitledFirstName]§!"
			NOT = { governor = { war_with = FROM } }
		}
		governor = {
			show_scope_change = no
			is_within_diplo_range = FROM
			hidden_trigger  = { NOT = { character = FROM } } #Governor cannot use boon/tributes decisions
		}
		offmap_ruler = {
			NOT = { dynasty = FROM }
		}
	}
	hidden_trigger = { has_dlc = "Jade Dragon" }
}

#Used with Sending Tribute characters to China...
local_third_party_score_low_trigger = {
	NOT = { check_variable = { which = local_third_party_score value = 91 } }
}
local_third_party_score_medium_trigger = {
	check_variable = { which = local_third_party_score value = 91 }
	NOT = { check_variable = { which = local_third_party_score value = 141 } }
}
local_third_party_score_great_trigger = {
	check_variable = { which = local_third_party_score value = 141 }
}

# For checking the Chinese Emperor's likes & dislikes
is_liked_by_China_trigger = {
	liked_by_offmap = {
        type = offmap_china
    }
    NOT = {
        disliked_by_offmap = {
            type = offmap_china
        }
    }
    offmap_china = {
        show_scope_change = no
        custom_tooltip = { text = emperor_likes_THIS_tt }
    }
}

is_disliked_by_China_trigger = {
	disliked_by_offmap = {
        type = offmap_china
    }
    NOT = {
		liked_by_offmap = {
            type = offmap_china
        }
    }
    offmap_china = {
        show_scope_change = no
        custom_tooltip = { text = emperor_dislikes_THIS_tt }
    }
}

is_liked_and_disliked_by_China = {
    disliked_by_offmap = {
        type = offmap_china
    }
    liked_by_offmap = {
        type = offmap_china
    }
    offmap_china = {
        show_scope_change = no
        custom_tooltip = { text = emperor_has_ambiguous_feelings_of_THIS_tt }
    }
}

#Used in the invasion script...
valid_offmap_china_target = {
	NOT = { character = ROOT }
	NOT = { has_character_modifier = peace_deal_with_china }
	NOT = { has_character_flag = defeated_china }
	NOT = {	is_tributary = { suzerain = ROOT } }
	in_revolt = no
	is_within_diplo_range = ROOT
	is_landed = yes
	higher_tier_than = BARON
	NOT = { primary_title = { has_title_flag = rebel_general_title } } #uses special cb to target
	NOT = { offmap_china = { offmap_ruler = { dynasty = PREVPREV } } }
}

valid_offmap_china_target_location = {
	OR = {
		any_realm_province = { region = custom_chinese_invasion_target_region }
		any_neighbor_independent_ruler = {
			has_landed_title = e_china_west_governor
		}
	}
}

valid_offmap_china_target_location_tributary_chain = {
	OR = {
		#any_realm_province = { region = custom_chinese_invasion_target_region }
		any_neighbor_independent_ruler = {
			has_landed_title = e_china_west_governor
		}
		any_neighbor_independent_ruler = {
			is_tributary = yes
			suzerain = {
				has_landed_title = e_china_west_governor
			}
		}
	}
}

# JADE DRAGON
# EMPEROR LIKES & DISLIKES
likes_concubines = {
	context = concubine # Not a trigger, but used by the 'liked_by_offmap' & 'disliked_by_offmap' triggers
}
likes_eunuchs = {
	context = eunuch # Not a trigger, but used by the 'liked_by_offmap' & 'disliked_by_offmap' triggers
	trait = eunuch
}
likes_wealth = {
	context = wealth # Not a trigger, but used by the 'liked_by_offmap' & 'disliked_by_offmap' triggers
}
likes_tributaries = {
	context = tributary # Not a trigger, but used by the 'liked_by_offmap' & 'disliked_by_offmap' triggers
}
likes_indians = {
	culture_group = indo_aryan_group
}
likes_dravidians = {
	culture_group = dravidian_group
}
likes_tibetans = {
	culture_group = tibetan_group
}
likes_germanics = {
	OR = {
		culture_group = north_germanic
		culture_group = central_germanic
		culture_group = west_germanic
	}
}
likes_latino_iberians = {
	OR = {
		culture_group = latin
		culture_group = iberian
	}
}
likes_byzantines = {
	culture_group = byzantine
}
likes_celts = {
	culture_group = celtic
}
likes_finno_ugrics = {
	OR = {
		culture_group = finno_ugric
		culture_group = magyar
	}
}
likes_altaics = {
	culture_group = altaic
}
likes_balto_slavics = {
	OR = {
		culture_group = baltic
		culture_group = east_slavic
		culture_group = west_slavic
		culture_group = south_slavic
	}
}
likes_arabs = {
	culture_group = arabic
}
likes_iranians = {
	culture_group = iranian
}
likes_africans = {
	OR = {
		culture_group = west_african
		culture_group = east_african
	}
}
likes_mesoamericans = {
	culture_group = mesoamerican
}
likes_muslims = {
	religion_group = muslim
}
likes_christians = {
	religion_group = christian
}
likes_jews = {
	religion_group = jewish_group
}
likes_mazdans = {
	religion_group = zoroastrian_group
}
likes_zoroastrians = {
	religion = zoroastrian
}
likes_mazdakis = {
	religion = mazdaki
}
likes_manicheans = {
	religion = manichean
}
likes_khurmaztans = {
	religion = khurmazta
}
likes_buddhists = {
	religion = buddhist
}
likes_hindus = {
	religion = hindu
}
likes_jains = {
	religion = jain
}
likes_tengris = {
	OR = {
		religion = tengri_pagan
		religion = tengri_pagan_reformed
	}
}
likes_zunists = {
	OR = {
		religion = zun_pagan
		religion = zun_pagan_reformed
	}
}
likes_bon = {
	religion = bon
}

is_blood_relative_of_root_trigger = {
	OR = {
		is_ancestor_of = ROOT
		is_descendant_of = ROOT
		sibling = ROOT
		is_cousin_of = ROOT
		is_aunt_uncle_of = ROOT
		is_nibling_of = ROOT
		dynasty = ROOT
	}
}

silk_road_trade_post_trigger = {
	custom_tooltip = {
		text = silk_road_province_desc
		hidden_tooltip = {
			OR = {
				province_id = 1491
				province_id = 1498
				province_id = 1478
				province_id = 1359
				province_id = 1365
				province_id = 1448
				province_id = 1440
				province_id = 1439
				province_id = 678
				province_id = 764
				province_id = 802
				province_id = 596
				province_id = 667
				province_id = 693
				province_id = 649
				province_id = 646
				province_id = 641
				province_id = 630
				province_id = 1180
				province_id = 1297
				province_id = 1127
				province_id = 1220
				province_id = 1114
				province_id = 1221
				province_id = 1446
				province_id = 868
				province_id = 719
				province_id = 1338
				province_id = 1369
				province_id = 858
				province_id = 903
				province_id = 1185
				province_id = 1129
				province_id = 1318
				province_id = 1297
				province_id = 1163
				province_id = 1154
				province_id = 1151
				province_id = 1481
				province_id = 1115
				province_id = 1288
				province_id = 796
				province_id = 1362
				province_id = 728
				province_id = 774
				province_id = 620
				province_id = 622
				province_id = 775
				province_id = 775
				province_id = 633
				province_id = 664
				province_id = 644
			}
		}
	}
}

is_any_kinslayer_trigger = {
	OR = {
		trait = kinslayer
		trait = familial_kinslayer
		trait = dynastic_kinslayer
	}
}

has_unsafe_religion = {
	NOT = { is_nomadic = yes }
	OR = {
		AND = {
			NOT = { has_dlc = "The Sword of Islam" }
			OR = {
				religion = sunni
				religion = zikri
				religion = yazidi
				religion = shiite
				religion = druze
				religion = hurufi
				religion = ibadi
				religion = kharijite
			}
		}
		AND = {
			NOT = { has_dlc = "Sons of Abraham" }
			OR = {
				religion = jewish
				religion = samaritan
				religion = karaite
			}
		}
		AND = {
			NOT = { has_dlc = "The Old Gods" }
			OR = {
				religion = zoroastrian
				religion = mazdaki
				religion = manichean
				religion = khurmazta
				religion = bon
				religion = norse_pagan
				religion = norse_pagan_reformed
				religion = baltic_pagan
				religion = baltic_pagan_reformed
				religion = finnish_pagan
				religion = finnish_pagan_reformed
				religion = slavic_pagan
				religion = slavic_pagan_reformed
				religion = tengri_pagan
				religion = tengri_pagan_reformed
				religion = west_african_pagan
				religion = west_african_pagan_reformed
				religion = zun_pagan
				religion = zun_pagan_reformed
				religion = hellenic_pagan
				religion = pagan
				religion = aztec
				religion = aztec_reformed
			}
		}
		AND = {
			NOT = { has_dlc = "Rajas of India" }
			OR = {
				religion = hindu
				religion = buddhist
				religion = jain
			}
		}
		AND = {
			NOT = { has_dlc = "Jade Dragon" }
			religion = taoist
		}
	}
}

courtier_from_china_trigger = {
	custom_tooltip = {
		text = courtier_from_china_trigger_tt
		has_character_flag = originated_from_chinese_court
	}
}

using_unimportant_cb = {
	OR = {
		using_cb = peasant_revolt
		using_cb = heretic_revolt
		using_cb = religious_revolt
		using_cb = liberation_revolt
	}
}

death_in_china_trigger = {
	OR = {
		death_reason = death_went_to_china
		death_reason = death_offmap
		death_reason = death_went_back_to_china
		death_reason = death_in_china_historic
	}
}

death_no_trace_trigger = {
	OR = {
		death_reason = death_missing
		death_reason = death_vanished
	}
}

proselytize_convert_independent_trigger = {
	owner = {
		FROM = { NOT = { religion_group = pagan_group } }
		independent = yes
		NOT = { religion = FROM }
		religion_group = pagan_group
		OR = {
			NOT = { religion = aztec }
			year = 1350
		}
		is_reformed_religion = no
		capital_scope = {
			province = ROOT
		}
		controls_religion = no
		FROM = {
			higher_tier_than = COUNT
			OR = {
				independent = yes
				higher_tier_than = DUKE
			}
		}
		NOT = {
			has_opinion_modifier = { who = FROM modifier = opinion_sent_preacher }
		}
		is_within_diplo_range = FROM
	}
}

is_toddler_age_trigger = {
	age = 0
 	NOT = { age = 4 }
}

is_young_child_age_trigger = {
	age = 4
 	NOT = { age = 9 }
}

is_child_age_trigger = {
	age = 9
 	NOT = { age = 12 }
}

is_adolescent_age_trigger = {
	age = 12
 	NOT = { age = 17 }
}

is_teenager_age_trigger = {
	age = 13
 	NOT = { age = 20 }
}

is_grown_up_age_trigger = {
	age = 20
}

is_senior_age_trigger = {
	age = 50
}

# Hardcoded trigger for the Execute Imprisoned interaction. Used for the description warning you of kinslaying
# Root - The executioner
# event_target:kinslayer_target - The person being executed
will_add_kinslayer = {
	NOT = { religion_group = muslim }
	OR = {
		AND = {
			NOT = { trait = kinslayer }
			OR = {
				is_ancestor_of = event_target:kinslayer_target
				is_descendant_of = event_target:kinslayer_target
				sibling = event_target:kinslayer_target
			}
		}
		AND = {
			NOR = { 
				trait = kinslayer
				trait = familial_kinslayer
			}
			OR = {
				is_cousin_of = event_target:kinslayer_target
				is_aunt_uncle_of = event_target:kinslayer_target
				is_nibling_of = event_target:kinslayer_target
			}
		}
		AND = {
			NOR = { 
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
			is_lowborn = no
			dynasty = event_target:kinslayer_target
		}
	}
}

# Hardcoded trigger for the Assassinate interaction. Used for triggering whether it can be used at all
# Root - The person being assassinated
# From - The person doing the assassination
assassination_interaction_trigger = {
	conditional_tooltip = {
		trigger = {
			multiplayer = yes
		}
		custom_tooltip = {
			text = MP_GAME_RULE_ALLOWED
			OR = {
				ai = yes
				NOT = {
					has_game_rule = {
						name = multiplayer_assassinations
						value = no_players
					}
				}
			}
			OR = {
				NOT = {
					has_game_rule = {
						name = multiplayer_assassinations
						value = no_players_or_relatives
					}
				}
				AND = {
					ai = yes
					NOT = {
						any_close_relative = {
							ai = no
							NOT = { character = FROM }
						}
					}
					NOT = {
						any_spouse = {
							ai = no
							NOT = { character = FROM }
						}
					}
					NOT = {
						liege = {
							ai = no
							dynasty = ROOT
							NOT = { character = FROM }
						}
						is_heir = yes
					}
				}
			}
		}
	}
}

#checks whether ROOT has one of the following opinion modifiers with the currently scoped character
root_has_terrible_opinion_modifier_of_this_trigger = {
	OR = {
		reverse_has_opinion_modifier = { who = ROOT modifier = opinion_hate }
		reverse_has_opinion_modifier = { who = ROOT modifier = opinion_tortured_me }
		reverse_has_opinion_modifier = { who = ROOT modifier = opinion_mutilated_me }
		reverse_has_opinion_modifier = { who = ROOT modifier = opinion_imprisoned }
	}
}

#for MNM.9000 chain
the_hunt_for_an_artifact_has_made_enough_progress_trigger = {
	OR = {
		AND = {
			event_target:relic_ruler = { check_variable = { which = relic_score value = 8 } } #15 } } old value
			event_target:relic_ruler = { has_character_modifier = relic_rumor_minor } 
		}
		AND = {
			event_target:relic_ruler = { check_variable = { which = relic_score value = 14 } } #25 } } old value
			event_target:relic_ruler = { has_character_modifier = relic_rumor_medium } 
		}
		AND = {
			event_target:relic_ruler = { check_variable = { which = relic_score value = 20 } } #40 } } old value
			event_target:relic_ruler = { has_character_modifier = relic_rumor_major } 
		}
	}
}
		}
	}
}

