﻿namespace = NEOW_religious_decision

NEOW_religious_decision.0001 = { #custom patron gods for Leviathan
	type = character_event
	title = NEOW_religious_decision.0001.t
	desc = NEOW_religious_decision.0001.desc
	theme = faith
	left_portrait = {
		character = root
		animation = personality_rational
	}

	option = {
		name = NEOW_religious_decision.0001.nationalisators
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_nationalisators }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_nationalisators }
	}

	option = {
		name = NEOW_religious_decision.0001.technosaurs
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_technosaurs }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_technosaurs }
	}

	option = {
		name = NEOW_religious_decision.0001.mechasaurs
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_mechasaurs }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_mechasaurs }
	}

	option = {
		name = NEOW_religious_decision.0001.petrosaurs
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_petrosaurs }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_petrosaurs }
	}

	option = {
		name = NEOW_religious_decision.0001.metallurgicals
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_metallurgicals }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_metallurgicals }
	}
	
	option = {
		name = NEOW_religious_decision.0001.nautiluses
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_nautiluses }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_nautiluses }
	}

	option = {
		name = NEOW_religious_decision.0001.aerosaurs
		trigger = {
			NOT = { has_character_modifier = bhakti_leviathan_aerosaurs }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_leviathan_aerosaurs }
	}

	# Opt-Out
	option = {
		name = NEOW_religious_decision.0001.optout
		flavor = NEOW_religious_decision.0001.flavor

		ai_chance = {
			base = 0
		}
	}
}

NEOW_religious_decision.0103 = { #custom patron gods for Leviathan
	type = character_event
	title = NEOW_religious_decision.0103.t
	desc = NEOW_religious_decision.0103.desc
	theme = faith
	left_portrait = {
		character = root
		animation = personality_rational
	}

	option = {
		name = NEOW_religious_decision.0103.jesus
		trigger = {
			NOT = { has_character_modifier = bhakti_folketero_jesus }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_folketero_jesus }
	}

	option = {
		name = NEOW_religious_decision.0103.per
		trigger = {
			NOT = { has_character_modifier = bhakti_folketero_per }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_folketero_per }
	}

	option = {
		name = NEOW_religious_decision.0103.lucia
		trigger = {
			NOT = { has_character_modifier = bhakti_folketero_lucia }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_folketero_lucia }
	}

	option = {
		name = NEOW_religious_decision.0103.olaf
		trigger = {
			NOT = { has_character_modifier = bhakti_folketero_olaf }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_folketero_olaf }
	}

	# Opt-Out
	option = {
		name = NEOW_religious_decision.0001.optout
		flavor = NEOW_religious_decision.0001.flavor

		ai_chance = {
			base = 0
		}
	}
}

NEOW_religious_decision.0104 = { #custom icons for orthodoxy
	type = character_event
	title = NEOW_religious_decision.0104.t
	desc = NEOW_religious_decision.0104.desc
	theme = faith
	left_portrait = {
		character = root
		animation = personality_rational
	}

	option = {
		name = NEOW_religious_decision.0104.paisos
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_paisos }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_paisos}
	}

	option = {
		name = NEOW_religious_decision.0104.gabriel
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_gabriel }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_gabriel }
	}

	option = {
		trigger = { is_vaguely_nistrenian_bhakti_trigger = yes }	
		name = NEOW_religious_decision.0104.adriana
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_adriana }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_adriana }
	}

	option = {
		trigger = { is_vaguely_nistrenian_bhakti_trigger = no }	
		name = NEOW_religious_decision.0104.olga
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_olga }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_olga }
	}

	option = {
		name = NEOW_religious_decision.0104.palamas
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_palamas }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_palamas }
	}
	option = {
		name = NEOW_religious_decision.0104.surgeon
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_surgeon }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_surgeon }
	}

	option = {
		name = NEOW_religious_decision.0104.lazar
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_lazar }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_lazar }
	}

	option = {
		name = NEOW_religious_decision.0104.theotokos
		trigger = {
			NOT = { has_character_modifier = bhakti_orthodox_theotokos }
		}
		NEOW_set_bhakti_effect = { BHAKTI = bhakti_orthodox_theotokos }
	}
	# Opt-Out
	option = {
		name = NEOW_religious_decision.0001.optout
		flavor = NEOW_religious_decision.0001.flavor

		ai_chance = {
			base = 0
		}
	}
}

NEOW_religious_decision.0200 = { #restoring the patriarch
	type = character_event
	title = NEOW_religious_decision.0200.t
	desc = NEOW_religious_decision.0200.desc
	theme = faith
	override_background = { reference = ep3_hagia_sophia }
	override_effect_2d = {
		reference = legend_glow
	}
	left_portrait = {
		character = root
		animation = prayer
	}
	right_portrait = {
		character = scope:new_patriarch
		animation = wedding_priest
	}

	option = {
		name = NEOW_religious_decision.0200.a
	}
}
NEOW_religious_decision.0201 = { # Restoring the Patriarch
	type = character_event
	title = NEOW_religious_decision.0201.t
	desc = NEOW_religious_decision.0201.desc
	theme = faith

	override_background = {
		reference = ep3_hagia_sophia
	}

	override_effect_2d = {
		reference = legend_glow
	}

	left_portrait = {
		character = root
		animation = prayer
	}

	right_portrait = {
		character = scope:new_patriarch
		animation = wedding_priest
	}

	immediate = {
		# Give Russian Orthodoxy the doctrine that enables GHWs
		faith:russian_orthodox = {
			remove_doctrine = special_doctrine_not_allowed_to_hof

			# Unlock the GHW system for this faith's religion
			religion = {
				set_variable = {
					name = variable_ghw_unlocked
					value = yes
				}
			}
		}
	}

	option = {
		name = NEOW_religious_decision.0201.a
	}
}

NEOW_religious_decision.0202 = { # An ecclesiarch restores the See of Saint Andrew
	type = character_event
	title = NEOW_religious_decision.0202.t
	desc = NEOW_religious_decision.0202.desc
	theme = faith
	override_background = { reference = ep3_hagia_sophia }
	override_effect_2d = { reference = legend_glow }
	left_portrait = {
		character = root
		animation = prayer
	}

	option = {
		name = NEOW_religious_decision.0202.a
	}
}

NEOW_religious_decision.0203 = { # Proclamation of the Athonite Empire
	type = character_event
	title = NEOW_religious_decision.0203.t
	desc = NEOW_religious_decision.0203.desc
	theme = faith
	override_effect_2d = { reference = legend_glow }
	left_portrait = {
		character = root
		animation = prayer
	}

	option = {
		name = NEOW_religious_decision.0203.a
	}
}

NEOW_religious_decision.0210 = {
	type = character_event
	title = NEOW_religious_decision.0210.t
	desc = NEOW_religious_decision.0210.desc
	theme = faith

	left_portrait = {
		character = root
		animation = personality_rational
	}

	option = {
		name = NEOW_religious_decision.0210.a

		# Enter communion with the victorious Patriarchate.
		set_character_faith_with_conversion = scope:reunited_orthodox_faith

		# The base-game schism reunion also brings the ruler's own counties
		# into the communion whose hierarchy the ruler has recognised.
		every_held_title = {
			limit = { title_tier = county }
			set_county_faith = scope:reunited_orthodox_faith
		}

		ai_chance = {
			base = 75

			modifier = {
				add = 25
				has_trait = zealous
			}

			modifier = {
				add = -50
				has_trait = stubborn
			}

			modifier = {
				add = -75
				has_trait = cynical
			}
		}
	}

	option = {
		name = NEOW_religious_decision.0210.b

		ai_chance = {
			base = 25
		}
	}
}
NEOW_religious_decision.0211 = {
	type = character_event
	title = NEOW_religious_decision.0211.t
	desc = NEOW_religious_decision.0211.desc
	theme = faith

	override_background = {
		reference = ep3_hagia_sophia
	}

	override_effect_2d = {
		reference = legend_glow
	}

	left_portrait = {
		character = root
		animation = prayer
	}

	option = {
		name = NEOW_religious_decision.0211.a
	}
}