namespace = CIML

##############################
### Prophetess event chain ###
##############################

# Holy maid, investigated and found orthodox
narrative_event = {
	id = CIML.717
	title = EVTNAMECIML.717
	desc = EVTDESCCIML.717

	picture = GFX_evt_woman_at_window_hf
	
	only_playable = yes
	only_capable = yes
	
	trigger = {
		primary_title = { higher_tier_than = COUNT }
		OR = {
			independent = yes
			primary_title = { higher_tier_than = DUKE }
		}
		religion = catholic
		is_adult = yes
		NOR = { 
			has_character_flag = ciml_prophecy_target
			trait =  crusader_king
			trait =  crusader_queen
			character = 6392
		}
	}
	
	mean_time_to_happen = {	months = 1800 }
	
	option = {
		name = EVTOPTACIML.717
	}
	
	option = {
		name = EVTOPTBCIML.717
	}
	
	option = {
		name = EVTOPTCCIML.717
		tooltip_info = cynical
		trigger = {
			trait = cynical
		}
	}

	after = {
		set_character_flag = ciml_prophecy_target
		if = { 
			limit = { 
				OR = {
					any_lover = {					
						NOT = {
							spouse = {
								character = ROOT
							}
						}
					}
					has_secret_religion = yes
					society_is_devil_worshiper = yes
					trait = excommunicated
					trait = cannibal_trait
					AND = {
						NOR = { 
							trait = zealous
							trait = kind
							trait = charitable
						}
						OR = { 
							trait = impaler
							AND = {
								trait = greedy
								trait = cruel
							}
						}
					}
					has_character_modifier = caesaropapist_emperor
				}
			}
			character_event = { id = CIML.718 days = 75 }
		}
		
		else_if = { 
			limit = { 
				NOR = {
					trait = lustful
					trait = gluttonous
					trait = greedy
					trait = slothful
					trait = wroth
					trait = envious
					trait = proud
					trait = cynical
					trait = deceitful
					trait = cruel
					trait = arbitrary
					has_character_modifier = known_murderer
				}
				OR = {
					trait = chaste
					trait = temperate
					trait = charitable
					trait = diligent
					trait = patient
					trait = kind
					trait = humble
					trait = zealous
				}
			}
			character_event = { id = CIML.719 days = 75 }
		}
		
		else = {
			character_event = { id = CIML.720 days = 75 }
		}
	}
} 

# Holy maid prophesy against the king
character_event = {
	id = CIML.718
	title = EVTNAMECIML.718
	desc = EVTDESCCIML.718

	picture = GFX_evt_woman_at_window_hf
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.718
		piety = -100
		prestige = -100
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
	}
	
	option = {
		name = EVTOPTBCIML.718
		piety = -100
		prestige = -100
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
	}
	
	option = {
		name = EVTOPTCCIML.718
		piety = -100
		trigger = {
			NOT = {
				AND = {
					ai = yes
					OR = {
						trait = kind
						trait = humble
						trait = patient
					}
				}
			}
		}
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
		add_character_modifier = { 
			name = ciml_executed_prophetess
			years = 2
		}
	}
	
	option = {
		name = EVTOPTDCIML.718
		tooltip_info = intrigue
		trigger = {
			intrigue = 16
		}
		piety = -40
		prestige = -40
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 3
		}
	}

	after = {
	}
} 


# Holy maid, in favour of the crown
character_event = {
	id = CIML.719
	title = EVTNAMECIML.719
	desc = EVTDESCCIML.719

	picture = GFX_evt_woman_praying_hf
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.719
		piety = 100
		prestige = 100
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}
	
	option = {
		name = EVTOPTBCIML.719
		tooltip_info = humble
		trigger = {
			trait = humble
		}
		piety = 125
		prestige = 75
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}
	
	option = {
		name = EVTOPTCCIML.719
		trigger = {
			wealth = 100
		}
		wealth = -100
		piety = 115
		prestige = 170
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}

	after = {
	}
} 


# Holy maid, joins monastery
character_event = {
	id = CIML.720
	title = EVTNAMECIML.720
	desc = EVTDESCCIML.720

	picture = GFX_evt_monastery_nuns
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.720
	}
	
	option = {
		name = EVTOPTBCIML.720
		trigger = {
			wealth = 100
		}
		wealth = -100
		piety = 75
		prestige = 25
	}
	
	option = {
		name = EVTOPTCCIML.720
		tooltip_info = cynical
		trigger = {
			trait = cynical
		}
		piety = -5
		prestige = 5
	}

	after = {
	}
} 

##################################
### Crazy Holy man event chain ###
##################################

# Holy man appear
narrative_event = {
	id = CIML.721
	title = EVTNAMECIML.721
	desc = EVTDESCCIML.721

	picture = GFX_evt_heretic
	
	only_playable = yes
	only_capable = yes
	
	trigger = {
		primary_title = { higher_tier_than = COUNT }
		OR = {
			independent = yes
			primary_title = { higher_tier_than = DUKE }
		}
		is_adult = yes
		NOT = { has_character_flag = ciml_prophecy_target }
		OR = {
			religion = orthodox
			religion = miaphysite
			religion = nestorian
			religion = monophysite
			religion = monothelite
			religion = iconoclast
			religion = judaizer
			religion = chaldean
			religion = apollinarian
			religion = barlaamite
			religion = fraticelli
		}
	}
	
	mean_time_to_happen = {	months = 1800 }
	
	option = {
		name = EVTOPTACIML.721
	}
	
	option = {
		name = EVTOPTBCIML.721
	}
	
	option = {
		name = EVTOPTCCIML.721
		tooltip_info = cynical
		trigger = {
			trait = cynical
		}
	}

	after = {
		set_character_flag = ciml_prophecy_target
		if = { 
			limit = { 
				OR = {
					any_lover = {					
						NOT = {
							spouse = {
								character = ROOT
							}
						}
					}
					has_secret_religion = yes
					society_is_devil_worshiper = yes
					trait = excommunicated
					trait = cannibal_trait
					AND = {
						NOR = { 
							trait = zealous
							trait = kind
							trait = charitable
						}
						OR = { 
							trait = impaler
							AND = {
								trait = greedy
								trait = cruel
							}
						}
					}
					has_character_modifier = caesaropapist_emperor
				}
			}
			character_event = { id = CIML.722 days = 75 }
		}
		
		else_if = { 
			limit = { 
				NOR = {
					trait = lustful
					trait = gluttonous
					trait = greedy
					trait = slothful
					trait = wroth
					trait = envious
					trait = proud
					trait = cynical
					trait = deceitful
					trait = cruel
					trait = arbitrary
					has_character_modifier = known_murderer
				}
				OR = {
					trait = chaste
					trait = temperate
					trait = charitable
					trait = diligent
					trait = patient
					trait = kind
					trait = humble
					trait = zealous
				}
			}
			character_event = { id = CIML.723 days = 75 }
		}
		
		else = {
			character_event = { id = CIML.724 days = 75 }
		}
	}
} 

# Holy man rebukes the king
character_event = {
	id = CIML.722
	title = EVTNAMECIML.722
	desc = EVTDESCCIML.722

	picture = GFX_evt_burning_castle_hf
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.722
		piety = -100
		prestige = -100
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
	}
	
	option = {
		name = EVTOPTBCIML.722
		piety = -100
		prestige = -100
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
	}
	
	option = {
		name = EVTOPTCCIML.722
		piety = -100
		trigger = {
			NOT = {
				AND = {
					ai = yes
					OR = {
						trait = kind
						trait = humble
						trait = patient
					}
				}
			}
		}
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 7
		}
		add_character_modifier = { 
			name = ciml_executed_prophet
			years = 2
		}
	}
	
	option = {
		name = EVTOPTDCIML.722
		tooltip_info = intrigue
		trigger = {
			intrigue = 16
		}
		piety = -40
		prestige = -40
		add_character_modifier = { 
			name = ciml_prophecy_target_bad
			years = 3
		}
	}

	after = {
	}
} 

# Holy man encourages loyalty and admires the king
character_event = {
	id = CIML.723
	title = EVTNAMECIML.723
	desc = EVTDESCCIML.723

	picture = GFX_evt_heretic
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.723
		piety = 100
		prestige = 100
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}
	
	option = {
		name = EVTOPTBCIML.723
		tooltip_info = humble
		trigger = {
			trait = humble
		}
		piety = 125
		prestige = 75
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}
	
	option = {
		name = EVTOPTCCIML.723
		trigger = {
			wealth = 100
		}
		wealth = -100
		piety = 115
		prestige = 170
		add_character_modifier = { 
			name = ciml_prophecy_target_good
			years = 7
		}
	}

	after = {
	}
}

# Holy man moves into the wilderness with disciples
character_event = {
	id = CIML.724
	title = EVTNAMECIML.724
	desc = EVTDESCCIML.724

	picture = GFX_evt_desert
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.724
	}
	
	option = {
		name = EVTOPTBCIML.724
		trigger = {
			wealth = 100
		}
		wealth = -100
		piety = 75
		prestige = 25
	}
	
	option = {
		name = EVTOPTCCIML.724
		tooltip_info = cynical
		trigger = {
			trait = cynical
		}
		piety = -5
		prestige = 5
	}

	after = {
	}
} 

