namespace = CIML

character_event = {
	id = CIML.354
	desc = "EVTDESC39300"	# Icon of Mary, Mother of God  
	picture = "GFX_evt_icon"
	border = "GFX_event_normal_frame_religion"

	
	min_age = 16
	only_playable = yes
	prisoner = no
	only_capable = yes
	religion = barlaamite

	trigger = {
		NOT = {
			has_character_flag = commisioned_icon
		}
		NOT = { trait = cynical }
	}
	
	mean_time_to_happen = {
		months = 600	
		modifier = {
			factor = 0.8
			trait = zealous
		}
		modifier = {
			factor = 0.8
			piety = 100
		}
		modifier = {
			factor = 0.8
			trait = kind
		}
	}
	option = {
		name = "EVTOPTA39300"	#Yes Please
		scaled_wealth = -0.25
		change_intrigue = 1
		set_character_flag = commisioned_icon
	} 
	option = {
		name = "EVTOPTB39300"	#No.
		piety = -25
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
	} 
}

#Icon of Christ Pantocrator
character_event = {
	id = CIML.355
	desc = "EVTDESC39301"	
	picture = "GFX_evt_icon"
	border = "GFX_event_normal_frame_religion"

	min_age = 16
	only_playable = yes
	prisoner = no
	only_capable = yes
	religion = barlaamite

	trigger = {
		NOT = {
			has_character_flag = commisioned_icon
		}
		NOT = { trait = cynical }
	}
	
	mean_time_to_happen = {
		months = 600	
		modifier = {
			factor = 0.8
			trait = zealous
		}
		modifier = {
			factor = 0.8
			piety = 100
		}
		modifier = {
			factor = 0.8
			trait = gregarious
		}
		
	}
	option = {
		name = "EVTOPTA39301"	#Yes Please
		scaled_wealth = -0.25
		change_diplomacy = 1
		set_character_flag = commisioned_icon
	} 
	option = {
		name = "EVTOPTB39301"	#No.
		piety = -25
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
	} 
}

#Icon of St.Peter
character_event = {
	id = CIML.356
	desc = "EVTDESC39302"	
	picture = "GFX_evt_icon"
	border = "GFX_event_normal_frame_religion"
	
	min_age = 16
	only_playable = yes
	prisoner = no
	only_capable = yes
	religion = barlaamite

	trigger = {
		NOT = {
			has_character_flag = commisioned_icon
		}
		NOT = { trait = cynical }
	}
	
	mean_time_to_happen = {
		months = 600	
		modifier = {
			factor = 0.8
			trait = zealous
		}
		modifier = {
			factor = 0.8
			piety = 100
		}
		modifier = {
			factor = 0.8
			trait = just
		}
		
	}
	option = {
		name = "EVTOPTA39302"	#Yes Please
		scaled_wealth = -0.25
		change_stewardship = 1
		set_character_flag = commisioned_icon
	} 
	option = {
		name = "EVTOPTB39302"	#No.
		piety = -25
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
	} 
}

#Icon of John the Baptist
character_event = {
	id = CIML.357
	desc = "EVTDESC39303"	
	picture = "GFX_evt_icon"
	border = "GFX_event_normal_frame_religion"

	min_age = 16
	only_playable = yes
	prisoner = no
	only_capable = yes
	religion = barlaamite

	trigger = {
		NOT = {
			has_character_flag = commisioned_icon
		}
		NOT = { trait = cynical }
	}
	
	mean_time_to_happen = {
		months = 600	
		modifier = {
			factor = 0.8
			trait = zealous
		}
		modifier = {
			factor = 0.8
			piety = 100
		}
		modifier = {
			factor = 0.8
			trait = patient
		}
		
	}
	option = {
		name = "EVTOPTA39303"	#Yes Please
		scaled_wealth = -0.25
		change_learning = 1
		set_character_flag = commisioned_icon
	} 
	option = {
		name = "EVTOPTB39303"	#No.
		piety = -25
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
	} 
}

#Icon of Saint George
character_event = {
	id = CIML.358
	desc = "EVTDESC39304"
	picture = "GFX_evt_icon"
	border = "GFX_event_normal_frame_religion"
	
	min_age = 16
	only_playable = yes
	prisoner = no
	only_capable = yes
	religion = barlaamite

	trigger = {
		NOT = {
			has_character_flag = commisioned_icon
		}
		NOT = { trait = cynical }
	}
	
	mean_time_to_happen = {
		months = 600	
		modifier = {
			factor = 0.8
			trait = zealous
		}
		modifier = {
			factor = 0.8
			piety = 100
		}
	}
	option = {
		name = "EVTOPTA39304"	#Yes Please
		scaled_wealth = -0.25
		change_martial = 1
		set_character_flag = commisioned_icon
	} 
	option = {
		name = "EVTOPTB39304"	#No.
		piety = -25
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
	} 
}

####################  Creating the patriarchate Barlaamite
narrative_event = {
	id = CIML.359
	title = EVTNAMECIML.359
	desc = EVTDESCCIML.359
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.359
		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					religion = barlaamite
					controls_religion = no
				}
				narrative_event = { id = CIML.360 }
			}
			any_playable_ruler = {
				limit = {
					religion = orthodox
					controls_religion = no
				}
				narrative_event = { id = CIML.361 }
			}
			any_playable_ruler = {
				limit = {
					religion_group = christian
					controls_religion = no
					NOT = { religion = barlaamite }
					NOT = { religion = orthodox }
				}
				narrative_event = { id = CIML.362 }
			}
		}
	}
}

# Inform other barlaamites
narrative_event = {
	id = CIML.360
	title = EVTNAMECIML.360
	desc = EVTDESCCIML.360
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.360
	}
}

# Inform orthodox
narrative_event = {
	id = CIML.361
	title = EVTNAMECIML.361
	desc = EVTDESCCIML.361
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.361
	}
}

# Inform other christian
narrative_event = {
	id = CIML.362
	title = EVTNAMECIML.362
	desc = EVTDESCCIML.362
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { 
		name = EVTOPTACIML.362
	}
}

# Anti-palamite synod start
narrative_event = {
	id = CIML.367
	title = EVTNAMECIML.367
	desc = EVTDESCCIML.367
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.367

		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					OR = {
						religion = orthodox
					}
					controls_religion = no
				}
				narrative_event = { id = CIML.368 }
			}
			any_playable_ruler = {
				limit = {
					NOT = {
						religion = orthodox
					}
					controls_religion = no
				}
				narrative_event = { id = CIML.369 }
			}
		}
	}
}

# Anti-palamite synod, Convert or Not?
narrative_event = {
	id = CIML.368
	title = EVTNAMECIML.368
	desc = EVTDESCCIML.368
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.368
		ai_chance = { factor = 50 }
		religion = FROM
		any_courtier = {
			limit = {
				OR = {
					religion = orthodox
					}
				liege = { character = ROOT }
			}
			religion = FROM
		}
		capital_scope = {
			religion = FROM
		}
	}
	option = { # No
		name = EVTOPTBCIML.368
		ai_chance = { factor = 50 }
	}
}

narrative_event = {
	id = CIML.369
	title = EVTNAMECIML.369
	desc = EVTDESCCIML.369
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { # Yes
		trigger = {
		religion = barlaamite
	}
		name = EVTOPTACIML.369
	}
	option = { # No
		trigger = {
			NOT = {
				religion = barlaamite
				}
	}
		name = EVTOPTCCIML.369
	}
}

#################### Creating the patriarchate Orthodox
narrative_event = {
	id = CIML.363
	title = EVTNAMECIML.363
	desc = EVTDESCCIML.363
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.363
		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					religion = orthodox
					controls_religion = no
				}
				narrative_event = { id = CIML.364 }
			}
			any_playable_ruler = {
				limit = {
					religion = barlaamite
					controls_religion = no
				}
				narrative_event = { id = CIML.365 }
			}
			any_playable_ruler = {
				limit = {
					religion_group = christian
					controls_religion = no
					NOT = { religion = barlaamite }
					NOT = { religion = orthodox }
				}
				narrative_event = { id = CIML.366 }
			}
		}
	}
}

# Inform other orthodox
narrative_event = {
	id = CIML.364
	title = EVTNAMECIML.364
	desc = EVTDESCCIML.364
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.364
	}
}

# Inform barlaamite
narrative_event = {
	id = CIML.365
	title = EVTNAMECIML.365
	desc = EVTDESCCIML.365
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.365
	}
}

# Inform other christian
narrative_event = {
	id = CIML.366
	title = EVTNAMECIML.366
	desc = EVTDESCCIML.366
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { 
		name = EVTOPTACIML.366
	}
}

# Anti-barlaamite synod start
narrative_event = {
	id = CIML.370
	title = EVTNAMECIML.370
	desc = EVTDESCCIML.370
	
	picture = GFX_evt_bishop
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.370

		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					OR = {
						religion = barlaamite
					}
					controls_religion = no
				}
				narrative_event = { id = CIML.371 }
			}
			any_playable_ruler = {
				limit = {
					NOT = {
						religion = barlaamite
					}
					controls_religion = no
				}
				narrative_event = { id = CIML.372 }
			}
		}
	}
}

# Anti-barlaamite synod, Convert or Not?
narrative_event = {
	id = CIML.371
	title = EVTNAMECIML.371
	desc = EVTDESCCIML.371
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { # Yes
		name = EVTOPTACIML.371
		ai_chance = { factor = 50 }
		religion = FROM
		any_courtier = {
			limit = {
				OR = {
					religion = barlaamite
					}
				liege = { character = ROOT }
			}
			religion = FROM
		}
		capital_scope = {
			religion = FROM
		}
	}
	option = { # No
		name = EVTOPTBCIML.371
		ai_chance = { factor = 50 }
	}
}

narrative_event = {
	id = CIML.372
	title = EVTNAMECIML.372
	desc = EVTDESCCIML.372
	
	picture = GFX_evt_hagia_sofia
	
	is_triggered_only = yes
	
	option = { # Yes
		trigger = {
		religion = orthodox
	}
		name = EVTOPTACIML.372
	}
	option = { # No
		trigger = {
			NOT = {
				religion = orthodox
			}
		}
		name = EVTOPTCCIML.372
	}
}

# Massacre of the Latins
narrative_event = {
	id = CIML.373
	title = EVTNAMECIML.373
	desc = EVTDESCCIML.373
	
	picture = GFX_evt_impalement
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.373
		any_playable_ruler = {
			limit = {
				NOT = {
					has_landed_title = e_byzantium
				}
			}
			limit = {
				religion_group = christian
			}
			narrative_event = { id = CIML.374 }
		}
	}
}

narrative_event = {
	id = CIML.374
	title = EVTNAMECIML.374
	desc = EVTDESCCIML.374
	
	picture = GFX_evt_impalement
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.374
		trigger = {
			religion = orthodox
		}
	}
	option = {
		name = EVTOPTBCIML.374
	}
	option = {
		name = EVTOPTCCIML.374
		tooltip_info = cruel
		trigger = {
			trait = cruel
			NOT = { religion = orthodox }
		}
	}
}

# Triumph of Orthodoxy
narrative_event = {
	id = CIML.900
	title = EVTNAMECIML.900
	desc = EVTDESCCIML.900
	picture = GFX_evt_icon

	is_triggered_only = yes
	
	option = {
		name = EVTOPTACIML.900
		trigger = {
			OR = {
				religion = orthodox
				religion = barlaamite
				religion = catholic
				religion = fraticelli
			}
		}
	}
	option = {
		name = EVTOPTBCIML.900
		trigger = {
			religion_group = christian
			NOR = {
				religion = orthodox
				religion = barlaamite
				religion = catholic
				religion = fraticelli
				religion = iconoclast
			}
		}
	}
	option = {
		name = EVTOPTCCIML.900
		trigger = {
			OR = {
				religion_group = muslim
				religion = iconoclast
			}
		}
	}
	option = {
		name = EVTOPTDCIML.900
		trigger = {
			NOR = {
				religion_group = muslim
				religion_group = christian
			}
		}
	}
}