###########################################
#                                         #
# RoI India various events                #
#                                         #
###########################################

# Written by Tobias Bodlund & Henrik Fhraeus

namespace = RoI

# Choose patron deity 1
character_event = {
	id = RoI.100
	desc = EVTDESC_RoI_100
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # choose_hindu_patron_deity, minor_decisions.txt

	option = {
		name = EVTOPTA_RoI_100

		add_character_modifier = {
			name = patron_shiva
			duration = -1
		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_SHIVA
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_100

		add_character_modifier = {
			name = patron_vishnu
			duration = -1
		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_VISHNU
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTC_RoI_100

		add_character_modifier = {
			name = patron_brahma
			duration = -1
		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_BRAHMA
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTD_RoI_100

		character_event = { id = RoI.101 }
	}
}

# Choose patron deity 2
character_event = {
	id = RoI.101
	desc = EVTDESC_RoI_101
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_101

		add_character_modifier = {
			name = patron_kali
			duration = -1

		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_KALI
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_101

		add_character_modifier = {
			name = patron_ganesha
			duration = -1
		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_GANESHA
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTC_RoI_101

		add_character_modifier = {
			name = patron_ganga
			duration = -1
		}

		clr_character_flag = selecting_patron_deity

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_PATRON_DEITY_GANGA
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = EVTOPTD_RoI_101

		character_event = { id = RoI.100 }
	}
}

# Converted to Hinduism - choose branch
character_event = {
	id = RoI.110
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_110
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_110_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_to_hinduism, conversion_decisions.txt

	religion = hindu

	option = {
		name = {
			text = EVTOPTA_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = shaivist_hindu
	}

	option = {
		name = {
			text = EVTOPTB_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = vaishnavist_hindu
	}

	option = {
		name = {
			text = EVTOPTC_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTD_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = shaktist_hindu
	}

	option = {
		name = {
			text = EVTOPTD_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTD_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = smartist_hindu
	}
}

# Converted to Buddhism - choose branch
character_event = {
	id = RoI.111
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_111
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_111_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_to_buddhism, conversion_decisions.txt

	religion = buddhist

	option = {
		name = {
			text = EVTOPTA_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = mahayana_buddhist
	}

	option = {
		name = {
			text = EVTOPTB_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = vajrayana_buddhist
	}

	option = {
		name = {
			text = EVTOPTC_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTC_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = theravada_buddhist
	}
}

# Converted to Jainism - choose branch
character_event = {
	id = RoI.112
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_112
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_112_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_to_jainism, conversion_decisions.txt

	religion = jain

	option = {
		name = {
			text = EVTOPTA_RoI_112
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_112_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = digambara_jain
	}

	option = {
		name = {
			text = EVTOPTB_RoI_112
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_112_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		add_trait = svetambara_jain
	}
}

# Converted within Hinduism - choose branch
character_event = {
	id = RoI.115
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_115
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_115_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_indian_branch, conversion_decisions.txt

	option = {
		name = {
			text = EVTOPTA_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = shaivist_hindu }
		}

		add_trait = shaivist_hindu

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = hindu

				NOR = {
					trait = zealous
					trait = shaivist_hindu
				}
			}

			add_trait = shaivist_hindu
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = hindu

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = shaivist_hindu
				}
			}

			add_trait = shaivist_hindu
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_HINDU_BRANCH_TO_SHAIVIST
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = {
			text = EVTOPTB_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = vaishnavist_hindu }
		}

		add_trait = vaishnavist_hindu

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = hindu

				NOR = {
					trait = zealous
					trait = vaishnavist_hindu
				}
			}

			add_trait = vaishnavist_hindu
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = hindu

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = vaishnavist_hindu
				}
			}

			add_trait = vaishnavist_hindu
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_HINDU_BRANCH_TO_VAISHNAVIST
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = {
			text = EVTOPTC_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTC_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = shaktist_hindu }
		}

		add_trait = shaktist_hindu

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = hindu

				NOR = {
					trait = zealous
					trait = shaktist_hindu
				}
			}

			add_trait = shaktist_hindu
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = hindu

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = shaktist_hindu
				}
			}

			add_trait = shaktist_hindu
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_HINDU_BRANCH_TO_SHAKTIST
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = {
			text = EVTOPTD_RoI_110
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTD_RoI_110_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = smartist_hindu }
		}

		add_trait = smartist_hindu

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = hindu

				NOR = {
					trait = zealous
					trait = smartist_hindu
				}
			}

			add_trait = smartist_hindu
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = hindu

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = smartist_hindu
				}
			}

			add_trait = smartist_hindu
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_HINDU_BRANCH_TO_SMARTIST
				picture = GFX_evt_bishop_hindu
			}
		}
	}

	option = {
		name = NEVERMIND

		prestige = 50
		piety = -25
	}
}

# Converted within Buddhism - choose branch
character_event = {
	id = RoI.116
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_116
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_116_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_indian_branch, conversion_decisions.txt

	option = {
		name = {
			text = EVTOPTA_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = mahayana_buddhist }
		}

		add_trait = mahayana_buddhist

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = buddhist

				NOR = {
					trait = zealous
					trait = mahayana_buddhist
				}
			}

			add_trait = mahayana_buddhist
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = buddhist

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = mahayana_buddhist
				}
			}

			add_trait = mahayana_buddhist
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_BUDDHIST_BRANCH_TO_MAHAYANA
				picture = GFX_evt_bishop_indian_group
			}
		}
	}

	option = {
		name = {
			text = EVTOPTB_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = vajrayana_buddhist }
		}

		add_trait = vajrayana_buddhist

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = buddhist

				NOR = {
					trait = zealous
					trait = vajrayana_buddhist
				}
			}

			add_trait = vajrayana_buddhist
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = buddhist

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = vajrayana_buddhist
				}
			}

			add_trait = vajrayana_buddhist
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_BUDDHIST_BRANCH_TO_VAJRAYANA
				picture = GFX_evt_bishop_indian_group
			}
		}
	}

	option = {
		name = {
			text = EVTOPTC_RoI_111
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTC_RoI_111_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = theravada_buddhist }
		}

		add_trait = theravada_buddhist

		any_spouse = {
			limit = {
				religion = buddhist

				NOR = {
					trait = zealous
					trait = theravada_buddhist
				}
			}

			add_trait = theravada_buddhist
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = buddhist

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = theravada_buddhist
				}
			}

			add_trait = theravada_buddhist
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_BUDDHIST_BRANCH_TO_THERAVADA
				picture = GFX_evt_bishop_indian_group
			}
		}
	}

	option = {
		name = NEVERMIND

		prestige = 50
		piety = -25
	}
}

# Converted within Jainism - choose branch
character_event = {
	id = RoI.117
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC_RoI_117
		trigger = {
			NOT = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}
	}
	desc = {
		text = EVTDESC_RoI_117_ALT
		trigger = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	is_triggered_only = yes # convert_indian_branch, conversion_decisions.txt

	option = {
		name = {
			text = EVTOPTA_RoI_117
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTA_RoI_117_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = digambara_jain }
		}

		add_trait = digambara_jain

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = jain

				NOR = {
					trait = zealous
					trait = digambara_jain
				}
			}

			add_trait = digambara_jain
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = jain

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = digambara_jain
				}
			}

			add_trait = digambara_jain
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_JAIN_BRANCH_TO_DIGAMBARA
				picture = GFX_evt_bishop_indian_group
			}
		}
	}

	option = {
		name = {
			text = EVTOPTB_RoI_117
			trigger = {
				NOT = {
					has_alternate_start_parameter = {
						key = religion_names
						value = random
					}
				}
			}
		}
		name = {
			text = EVTOPTB_RoI_117_ALT
			trigger = {
				has_alternate_start_parameter = {
					key = religion_names
					value = random
				}
			}
		}

		trigger = {
			NOT = { trait = svetambara_jain }
		}

		add_trait = svetambara_jain

		any_spouse = {
			show_scope_change = no

			limit = {
				religion = jain

				NOR = {
					trait = zealous
					trait = svetambara_jain
				}
			}

			add_trait = svetambara_jain
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				is_close_relative = ROOT
				religion = jain

				NOR = {
					is_married = ROOT
					trait = zealous
					trait = svetambara_jain
				}
			}

			add_trait = svetambara_jain
		}

		if = {
			limit = { ai = no }

			chronicle = {
				entry = CHRONICLE_CHANGE_JAIN_BRANCH_TO_SVETAMBARA
				picture = GFX_evt_bishop_indian_group
			}
		}
	}

	option = {
		name = NEVERMIND

		prestige = 50
		piety = -25
	}
}

# After diplomacy action conversion
character_event = {
	id = RoI.120

	is_triggered_only = yes # on_vassal_accepts_religious_conversion via event 39700, base_religious_events.txt
	hide_window = yes

	immediate = {
		FROMFROMFROM = {
			trigger_switch = {
				on_trigger = trait

				shaivist_hindu     = { ROOT = { add_trait = shaivist_hindu } }
				vaishnavist_hindu  = { ROOT = { add_trait = vaishnavist_hindu } }
				shaktist_hindu     = { ROOT = { add_trait = shaktist_hindu } }
				smartist_hindu     = { ROOT = { add_trait = smartist_hindu } }
				mahayana_buddhist  = { ROOT = { add_trait = mahayana_buddhist } }
				vajrayana_buddhist = { ROOT = { add_trait = vajrayana_buddhist } }
				theravada_buddhist = { ROOT = { add_trait = theravada_buddhist } }
				digambara_jain     = { ROOT = { add_trait = digambara_jain } }
				svetambara_jain    = { ROOT = { add_trait = svetambara_jain } }
			}
		}
	}
}

# After conversion, set religious branch randomly
character_event = {
	id = RoI.30120

	is_triggered_only = yes # SoA.4020, soa_heresy_events.txt
	hide_window = yes

	immediate = {
		if = {
			limit = { religion = hindu }

			random_list = {
				25 = { add_trait = shaivist_hindu }
				25 = { add_trait = vaishnavist_hindu }
				25 = { add_trait = shaktist_hindu }
				25 = { add_trait = smartist_hindu }
			}
		}
		else_if = {
			limit = { religion = buddhist }

			random_list = {
				33 = { add_trait = mahayana_buddhist }
				33 = { add_trait = vajrayana_buddhist }
				33 = { add_trait = theravada_buddhist }
			}
		}
		else = {
			random_list = {
				50 = { add_trait = digambara_jain }
				50 = { add_trait = svetambara_jain }
			}
		}
	}
}

# After conversion, set religious branch to liege's branch
character_event = {
	id = RoI.30121

	is_triggered_only = yes # numerous events
	hide_window = yes

	immediate = {
		liege = {
			trigger_switch = {
				on_trigger = trait

				shaivist_hindu     = { ROOT = { add_trait = shaivist_hindu } }
				vaishnavist_hindu  = { ROOT = { add_trait = vaishnavist_hindu } }
				shaktist_hindu     = { ROOT = { add_trait = shaktist_hindu } }
				smartist_hindu     = { ROOT = { add_trait = smartist_hindu } }
				mahayana_buddhist  = { ROOT = { add_trait = mahayana_buddhist } }
				vajrayana_buddhist = { ROOT = { add_trait = vajrayana_buddhist } }
				theravada_buddhist = { ROOT = { add_trait = theravada_buddhist } }
				digambara_jain     = { ROOT = { add_trait = digambara_jain } }
				svetambara_jain    = { ROOT = { add_trait = svetambara_jain } }
			}
		}
	}
}

# After conversion, set religious branch to FROM's branch
character_event = {
	id = RoI.30122

	is_triggered_only = yes # SoA.4031, soa_heresy_events.txt
	hide_window = yes

	immediate = {
		FROM = {
			trigger_switch = {
				on_trigger = trait

				shaivist_hindu     = { ROOT = { add_trait = shaivist_hindu } }
				vaishnavist_hindu  = { ROOT = { add_trait = vaishnavist_hindu } }
				shaktist_hindu     = { ROOT = { add_trait = shaktist_hindu } }
				smartist_hindu     = { ROOT = { add_trait = smartist_hindu } }
				mahayana_buddhist  = { ROOT = { add_trait = mahayana_buddhist } }
				vajrayana_buddhist = { ROOT = { add_trait = vajrayana_buddhist } }
				theravada_buddhist = { ROOT = { add_trait = theravada_buddhist } }
				digambara_jain     = { ROOT = { add_trait = digambara_jain } }
				svetambara_jain    = { ROOT = { add_trait = svetambara_jain } }
			}
		}
	}
}

###########################################
# Reincarnation Events
###########################################
# by Henrik Fhraeus
###########################################

# [on_birth] Child might be a reincarnation
character_event = {
	id = RoI.10000

	is_triggered_only = yes # on_birth, random_events
	hide_window = yes

	only_men = yes

	trigger = {
		OR = {
			has_dharmic_religion_trigger = yes
			religion_openly_bon_or_reformed_trigger = yes
			religion_openly_west_african_or_reformed_trigger = yes
			religion = mazdaki
			religion = manichaean
			religion = khurmazta
			religion = druze
			religion = yazidi
			religion_openly_celtic_or_reformed_trigger = yes
		}

		OR = {
			has_dlc = "Rajas of India"
			has_dlc = "Jade Dragon"
			has_dlc = "Holy Fury"
			has_dlc = "The Sword of Islam"
		}

		NOT = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}

		OR = {
			father = {
				trigger_if = {
					limit = { ai = yes }

					has_game_rule = {
						name = supernatural_events
						value = unrestricted
					}
				}

				is_reincarnated = no

				father_even_if_dead = {
					trigger_if = {
						limit = { is_alive = yes }

						father_even_if_dead = {
							is_alive = no
						}
					}
				}

				NOT = {
					any_sibling = {
						is_reincarnated = yes
					}
				}
			}

			mother = {
				ai = no
				is_reincarnated = no

				father_even_if_dead = {
					trigger_if = {
						limit = { is_alive = yes }

						father_even_if_dead = {
							is_alive = no
						}
					}
				}

				NOT = {
					any_sibling = {
						is_reincarnated = yes
					}
				}
			}
		}

		NOT = {
			any_sibling = {
				is_reincarnated = yes
			}
		}
	}

	option = {
		if = {
			limit = {
				father = {
					trigger_if = {
						limit = { ai = yes }

						has_game_rule = {
							name = supernatural_events
							value = unrestricted
						}
					}
				}
			}

			father = {
				if = {
					limit = {
						father_even_if_dead = {
							father_even_if_dead = {
								is_alive = no
							}
						}
					}

					father_even_if_dead = {
						father_even_if_dead = {
							ROOT = {
								set_reincarnation = PREV
							}
						}
					}
				}
				else = {
					father_even_if_dead = {
						ROOT = {
							set_reincarnation = PREV
						}
					}
				}

				character_event = {
					id = RoI.10001
					days = 3
				}
			}
		}
		else_if = {
			limit = {
				mother = { ai = no }
			}

			mother = {
				if = {
					limit = {
						father_even_if_dead = {
							father_even_if_dead = {
								is_alive = no
							}
						}
					}

					father_even_if_dead = {
						father_even_if_dead = {
							ROOT = {
								set_reincarnation = PREV
							}
						}
					}
				}
				else = {
					father_even_if_dead = {
						ROOT = {
							set_reincarnation = PREV
						}
					}
				}

				character_event = {
					id = RoI.10001
					days = 3
				}
			}
		}
	}
}

# Reincarnation: Player notices the similarities
character_event = {
	id = RoI.10001
	desc = EVTDESC_RoI_10001
	picture = GFX_evt_reincarnation
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_10001 # Yes, clearly

		hidden_effect = {
			FROM = {
				add_trait = reincarnation

				character_event = {
					id = RoI.10002
					days = 912
				}
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_10001 # Nonsense!

		hidden_effect = {
			FROM = {
				set_reincarnation = 0
			}
		}
	}
}

# Reincarnation: Toddler thinks of the past life
character_event = {
	id = RoI.10002
	desc = EVTDESC_RoI_10002
	picture = GFX_evt_reincarnation
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_10002

		FROM = {
			character_event = {
				id = RoI.10003
				days = 2
			}
		}
	}
}

# Reincarnation: Toddler speaks of the past life (parent)
character_event = {
	id = RoI.10003
	desc = EVTDESC_RoI_10003
	picture = GFX_evt_reincarnation
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_10003

		hidden_effect = {
			FROM = {
				set_character_flag = reincarnation_education
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_10003
	}
}

# [on_yearly_childhood_pulse] Reincarnation: Youth picks up a personality trait from the previous life
character_event = {
	id = RoI.10010
	desc = EVTDESC_RoI_10010
	picture = GFX_evt_reincarnation
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_childhood_pulse, random_events

	religion_group = indian_group
	has_character_flag = reincarnation_education
	has_dlc = "Rajas of India"

	trigger = {
		OR = {
			has_dharmic_religion_trigger = yes
			religion = druze
			religion = mazdaki
			religion = yazidi
			religion = manichaean
			religion_openly_celtic_or_reformed_trigger = yes
		}

		personality_traits < 5

		reincarnation_scope = {
			ROOT = {
				can_copy_personality_trait_from = PREV
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_10010

		reincarnation_scope = {
			show_scope_change = no

			ROOT = {
				show_scope_change = no

				copy_random_personality_trait = PREV
			}
		}

		father = {
			character_event = {
				id = RoI.10011
				days = 2
			}
		}

		mother = {
			character_event = {
				id = RoI.10011
				days = 2
			}
		}

		guardian = {
			character_event = {
				id = RoI.10011
				days = 2
			}
		}
	}
}

# Reincarnation: Notification of a youth picking up a personality trait from the previous life
character_event = {
	id = RoI.10011
	desc = EVTDESC_RoI_10011
	picture = GFX_evt_reincarnation
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA_RoI_10011
	}
}

# [on_yearly_pulse] Reincarnation: Reincarnated player remembers his murderer
character_event = {
	id = RoI.10020
	desc = EVTDESC_RoI_10020
	picture = GFX_evt_shadow
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	min_age = 14
	has_dlc = "Rajas of India"

	trigger = {
		is_reincarnated = yes
		trait = reincarnation

		reincarnation_scope = {
			OR = {
				death_murder_trigger = yes
				death_execution_trigger = yes
			}

			killer = { always = yes }
		}

		NOT = { has_character_flag = reinc_remembered_killer }
	}

	option = {
		name = EVTOPTA_RoI_10020

		set_character_flag = reinc_remembered_killer

		if = {
			limit = {
				reincarnation_scope = {
					killer = { is_alive = yes }
				}
			}

			reincarnation_scope = {
				show_scope_change = no

				killer = {
					show_scope_change = no

					reverse_opinion = {
						name = opinion_dishonorable
						who = ROOT
						years = 100
					}
				}
			}
		}
	}
}

# [on_yearly_pulse] Reincarnation: Reincarnated player remembers spouse
character_event = {
	id = RoI.10021
	desc = EVTDESC_RoI_10021
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	min_age = 14
	has_dlc = "Rajas of India"

	trigger = {
		is_reincarnated = yes
		trait = reincarnation

		reincarnation_scope = {
			spouse_even_if_dead = {
				always = yes
			}
		}

		NOT = { has_character_flag = reinc_remembered_spouse }
	}

	option = {
		name = EVTOPTA_RoI_10021

		set_character_flag = reinc_remembered_spouse
	}
}

# [on_yearly_pulse] Reincarnation: Reincarnated player remembers child
character_event = {
	id = RoI.10022
	desc = EVTDESC_RoI_10022
	picture = GFX_evt_child_play
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	min_age = 14
	has_dlc = "Rajas of India"

	trigger = {
		is_reincarnated = yes
		trait = reincarnation

		reincarnation_scope = {
			has_living_children = yes

			any_child = {
				always = yes
			}
		}

		NOT = { has_character_flag = reinc_remembered_child }
	}

	immediate = {
		reincarnation_scope = {
			random_child = {
				save_event_target_as = target_child
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_10022

		set_character_flag = reinc_remembered_child
	}
}

###########################################
# Ascetics                                #
###########################################

# Hindu ascetic comes to visit
character_event = {
	id = RoI.203
	desc = EVTDESC_RoI_203
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		OR = {
			religion = buddhist
			religion = jain
		}

		NOT = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_203

		trigger = {
			NOT = { trait = zealous }
		}

		character_event = { id = RoI.204 }
	}

	option = {
		name = EVTOPTB_RoI_203
	}

	option = {
		name = EVTOPTC_RoI_203

		prestige = 20

		custom_tooltip = {
			text = realm_hindus_insulted

			any_realm_character = {
				limit = { religion = hindu }

				opinion = {
					name = insulted
					who = ROOT
					years = 2
				}
			}
		}

		ai_chance = {
			factor = 1

			mult_modifier = {
				factor = 10
				trait = zealous
			}
		}
	}
}

# Tell me more, Hindu ascetic
character_event = {
	id = RoI.204
	desc = EVTDESC_RoI_204
	picture = GFX_evt_bishop_hindu
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_204

		religion = hindu
		add_trait = shaivist_hindu
		set_character_flag = india_converted

		add_character_modifier = {
			name = hindu_ascetic
			duration = -1
		}
	}

	option = {
		name = EVTOPTB_RoI_204

		religion = hindu
		add_trait = shaivist_hindu
		set_character_flag = india_converted
	}

	option = {
		name = EVTOPTC_RoI_204
	}
}

# Buddhist ascetic comes to visit
character_event = {
	id = RoI.206
	desc = EVTDESC_RoI_206
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		OR = {
			religion = hindu
			religion = jain
		}

		NOT = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_203

		trigger = {
			NOT = { trait = zealous }
		}

		character_event = { id = RoI.207 }
	}

	option = {
		name = EVTOPTB_RoI_203
	}

	option = {
		name = EVTOPTC_RoI_206

		prestige = 20

		custom_tooltip = {
			text = realm_buddhists_insulted

			any_realm_character = {
				limit = { religion = buddhist }

				opinion = {
					name = insulted
					who = ROOT
					years = 2
				}
			}
		}
	}
}

# Tell me more, Buddhist ascetic
character_event = {
	id = RoI.207
	desc = EVTDESC_RoI_204
	picture = GFX_evt_bishop_indian_group
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_207

		religion = buddhist
		add_trait = mahayana_buddhist
		set_character_flag = india_converted

		add_character_modifier = {
			name = buddhist_ascetic
			duration = -1
		}
	}

	option = {
		name = EVTOPTB_RoI_207

		religion = buddhist
		add_trait = mahayana_buddhist
		set_character_flag = india_converted
	}

	option = {
		name = EVTOPTC_RoI_207

		ai_chance = { factor = 5 }
	}
}

# Jain ascetic comes to visit
character_event = {
	id = RoI.209
	desc = EVTDESC_RoI_209
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		OR = {
			religion = hindu
			religion = buddhist
		}

		NOT = {
			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_203

		trigger = {
			NOT = { trait = zealous }
		}

		character_event = { id = RoI.210 }

		ai_chance = { factor = 5 }
	}

	option = {
		name = EVTOPTB_RoI_209
	}

	option = {
		name = EVTOPTC_RoI_209

		prestige = 20

		custom_tooltip = {
			text = realm_jains_insulted

			any_realm_character = {
				limit = { religion = jain }

				opinion = {
					name = insulted
					who = ROOT
					years = 2
				}
			}
		}

		ai_chance = {
			factor = 1

			mult_modifier = {
				factor = 10
				trait = zealous
			}
		}
	}
}

# Tell me more, Jain ascetic
character_event = {
	id = RoI.210
	desc = EVTDESC_RoI_210
	picture = GFX_evt_bishop_indian_group
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_210

		religion = jain
		add_trait = digambara_jain
		set_character_flag = india_converted

		add_character_modifier = {
			name = jain_naked_ascetic
			duration = -1
		}
	}

	option = {
		name = EVTOPTB_RoI_210

		religion = jain
		add_trait = digambara_jain
		set_character_flag = india_converted
	}

	option = {
		name = EVTOPTC_RoI_210

		ai_chance = { factor = 5 }
	}
}

###########################################
# The cursed diamond                      #
###########################################

# Diamond is found
character_event = {
	id = RoI.215
	desc = EVTDESC_RoI_215
	picture = GFX_evt_emissary

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		higher_real_tier_than = COUNT

		capital_scope = {
			region = world_india
		}

		NOT = { has_global_flag = cursed_diamond }
		is_inaccessible_trigger = no
	}

	immediate = {
		set_global_flag = cursed_diamond
	}

	option = {
		name = EVTOPTA_RoI_215

		wealth = -30
		prestige = 30
		add_artifact = cursed_diamond_crown
		set_character_flag = cursed_diamond_crown

		character_event = {
			id = RoI.216 # Make a grand crown
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_215

		add_artifact = cursed_diamond

		new_artifact = {
			set_creation_date = 1.1.1
		}

		set_character_flag = cursed_diamond

		character_event = {
			id = RoI.221 # Put it in the treasury
			months = 2
		}
	}

	option = {
		name = EVTOPTC_RoI_215

		trigger = {
			is_married = yes
			spouse = { ai = yes }
		}

		spouse = {
			show_scope_change = no

			add_lover = ROOT
			add_artifact = cursed_diamond

			new_artifact = {
				set_creation_date = 1.1.1
			}

			set_character_flag = spouse_diamond
		}

		character_event = {
			id = RoI.226 # Give it to your spouse
			months = 2
		}
	}

	option = {
		name = EVTOPTD_RoI_215

		wealth = 100
	}
}

# Diamond sparkles in crown
character_event = {
	id = RoI.216
	desc = EVTDESC_RoI_216
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_216

		prestige = 10

		hidden_effect = {
			random_list = {
				33 = { character_event = { id = RoI.217 months = 2 } } # Thief tries to steal crown
				33 = { character_event = { id = RoI.218 months = 2 } } # Diamonds sparkles and frightens elephant

				33 = {
					trigger = {
						any_courtier = {
							ai = yes
							block_general_event_trigger = no

							NOR = {
								is_married = ROOT
								is_child_of = ROOT
							}
						}
					}

					random_courtier = {
						limit = {
							ai = yes
							block_general_event_trigger = no

							NOR = {
								is_married = ROOT
								is_child_of = ROOT
							}
						}

						save_event_target_as = target_courtier
					}

					character_event = {
						id = RoI.220 # Courtier tries to murder owner of diamond
						months = 2
					}
				}
			}
		}
	}
}

# Thief tries to steal crown
character_event = {
	id = RoI.217
	desc = EVTDESC_RoI_217
	picture = GFX_evt_large_army

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_217

		random = {
			chance = 20
			add_trait_stressed_effect = yes
		}

		character_event = { id = RoI.240 }
	}
}

# Diamonds sparkles and frightens elephant
character_event = {
	id = RoI.218
	desc = EVTDESC_RoI_218
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_218

		random_courtier = {
			limit = {
				is_incapable = no

				NOR = {
					trait = mangled
					trait = maimed
				}
			}

			random_list = {
				70 = { add_trait_wounded_effect = yes }

				25 = {
					if = {
						limit = { has_dlc = "Reapers" }

						add_trait = mangled
						add_trait = severely_injured
						resolve_severely_injured_effect = yes
						character_event = { id = RIP.11505 }
					}
					else = {
						add_trait_maimed_effect = yes
					}
				}

				5 = {
					if = {
						limit = { immortal = no }
						add_trait = incapable
					}
				}
			}
		}

		character_event = { id = RoI.240 }
	}
}

# Owner subjected to murder attempt
character_event = {
	id = RoI.220
	desc = EVTDESC_RoI_220
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_220

		random = {
			chance = 20
			add_trait_wounded_effect = yes
		}

		event_target:target_courtier = {
			show_scope_change = no

			death = {
				death_reason = death_execution
				killer = ROOT
			}
		}

		character_event = { id = RoI.240 }
	}
}

# Diamond is lovely in your treasury
character_event = {
	id = RoI.221
	desc = EVTDESC_RoI_221
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_221

		prestige = 10

		hidden_effect = {
			random_list = {
				33 = { character_event = { id = RoI.222 months = 2 } } # Spending too much time in the treasury with the Precious... becoming troglodytic and weird
				33 = { character_event = { id = RoI.223 months = 2 } } # Diamond is stolen from your treasury
				33 = { character_event = { id = RoI.224 months = 2 } } # Worries about diamond
			}
		}
	}
}

# Spending too much time in the treasury with the Precious... becoming troglodytic and weird
character_event = {
	id = RoI.222
	desc = EVTDESC_RoI_222
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_222

		set_character_flag = loves_diamond
		add_trait_fully_silently_shy_effect = yes

		random = {
			chance = 30
			add_trait_fully_greedy_effect = yes
		}

		random = {
			chance = 30
			add_trait_fully_envious_effect = yes
		}

		random = {
			chance = 10
			add_trait_lunatic_effect = yes
		}

		character_event = { id = RoI.240 }
	}
}

# Diamond is stolen from your treasury
character_event = {
	id = RoI.223
	desc = EVTDESC_RoI_223
	picture = GFX_evt_emissary

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { has_artifact = cursed_diamond }
			unsafe_destroy_artifact = cursed_diamond
		}
		if = {
			limit = { has_artifact = cursed_diamond_crown }
			unsafe_destroy_artifact = cursed_diamond_crown
		}
	}

	option = {
		name = EVTOPTA_RoI_223

		prestige = -30

		random = {
			chance = 30
			add_trait_fully_paranoid_effect = yes
		}

		random = {
			chance = 10
			add_trait_stressed_effect = yes
		}
	}
}

# Worries about diamond
character_event = {
	id = RoI.224
	desc = EVTDESC_RoI_224
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_224

		if = {
			limit = {
				NOT = { trait = stressed }
			}

			random = {
				chance = 30
				add_trait_stressed_effect = yes
			}
		}
		else_if = {
			limit = {
				NOT = { trait = paranoid }
			}

			add_trait = paranoid
		}

		character_event = { id = RoI.240 }
	}
}

# Spouse is happy about magnificent diamond
character_event = {
	id = RoI.226
	desc = EVTDESC_RoI_226
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	trigger = {
		spouse = {
			has_character_flag = spouse_diamond
		}
	}

	option = {
		name = EVTOPTA_RoI_226

		spouse = {
			show_scope_change = no

			prestige = 30
		}

		hidden_effect = {
			random_list = {
				33 = { character_event = { id = RoI.228 months = 2 } } # Spouse is robbed of diamond
				33 = { character_event = { id = RoI.230 months = 2 } } # Diamond drives spouse insane
				33 = { character_event = { id = RoI.232 months = 2 } } # Spouse killed by robbers but diamond retained
			}
		}
	}
}

# Spouse is robbed of diamond
character_event = {
	id = RoI.228
	desc = EVTDESC_RoI_228
	picture = GFX_evt_market

	is_triggered_only = yes

	trigger = {
		spouse = {
			has_character_flag = spouse_diamond
		}
	}

	immediate = {
		spouse = {
			unsafe_destroy_artifact = cursed_diamond
		}
	}

	option = {
		name = EVTOPTA_RoI_228
		prestige = -20
	}
}

# Diamond drives spouse insane
character_event = {
	id = RoI.230
	desc = EVTDESC_RoI_230
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	trigger = {
		spouse = {
			has_character_flag = spouse_diamond
		}
	}

	option = {
		name = EVTOPTA_RoI_230

		spouse = {
			show_scope_change = no

			if = {
				limit = { trait = lunatic }
				add_trait_silently_possessed_effect = yes
			}
			else = {
				add_trait = lunatic
			}
		}

		character_event = { id = RoI.240 }
	}
}

# Spouse killed by robbers but diamond retained
character_event = {
	id = RoI.232
	desc = EVTDESC_RoI_232
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	trigger = {
		spouse = {
			has_character_flag = spouse_diamond
		}
	}

	immediate = {
		spouse = {
			random_artifact = {
				limit = { artifact_type = cursed_diamond }

				transfer_artifact = {
					from = PREV
					to = ROOT
				}
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_232

		spouse = {
			show_scope_change = no

			death = { death_reason = death_murder }
		}

		random = {
			chance = 20
			add_trait_depressed_effect = yes
		}

		character_event = { id = RoI.240 }
	}
}

# Diamond may be cursed. What to do with it?
character_event = {
	id = RoI.240
	desc = EVTDESC_RoI_240
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_240

		trigger = {
			NOT = { has_character_flag = loves_diamond }
		}

		wealth = 100

		character_event = {
			id = RoI.241
			months = 1
		}

		if = {
			limit = { has_artifact = cursed_diamond }

			unsafe_destroy_artifact = cursed_diamond
			set_character_flag = sold_cursed_diamond
		}

		if = {
			limit = { has_artifact = cursed_diamond_crown }

			unsafe_destroy_artifact = cursed_diamond_crown
			set_character_flag = sold_cursed_diamond_crown
		}
	}

	option = {
		name = EVTOPTB_RoI_240

		character_event = {
			id = RoI.243
			months = 1
		}

		if = {
			limit = { has_artifact = cursed_diamond }
			unsafe_destroy_artifact = cursed_diamond
		}

		if = {
			limit = { has_artifact = cursed_diamond_crown }
			unsafe_destroy_artifact = cursed_diamond_crown
		}
	}

	option = {
		name = EVTOPTC_RoI_240

		character_event = {
			id = RoI.245
			months = 1
		}
	}

	option = {
		name = EVTOPTD_RoI_240

		trigger = { has_character_flag = loves_diamond }

		if = {
			limit = { has_artifact = cursed_diamond }
			unsafe_destroy_artifact = cursed_diamond
		}

		if = {
			limit = { has_artifact = cursed_diamond_crown }
			unsafe_destroy_artifact = cursed_diamond_crown
		}

		death = { death_reason = death_suicide }
	}
}

# Sold diamond but regrets it
character_event = {
	id = RoI.241
	desc = EVTDESC_RoI_241
	picture = GFX_evt_large_army

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_241

		character_event = { id = RoI.242 }
	}

	option = {
		name = EVTOPTB_RoI_241
	}
}

# Sends riders after buyers
character_event = {
	id = RoI.242
	desc = EVTDESC_RoI_242
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_242

		add_character_modifier = {
			name = the_diamond_thief
			days = 1800
		}

		if = {
			limit = {
				OR = {
					has_character_flag = cursed_diamond_crown
					has_character_flag = sold_cursed_diamond_crown
				}
			}

			add_artifact = cursed_diamond_crown
			clr_character_flag = sold_cursed_diamond_crown
		}

		if = {
			limit = {
				has_character_flag = cursed_diamond
				has_character_flag = sold_cursed_diamond
			}

			add_artifact = cursed_diamond
			clr_character_flag = sold_cursed_diamond
		}

		character_event = {
			id = RoI.245
			months = 2
		}
	}
}

# Threw diamond in river but regrets it
character_event = {
	id = RoI.243
	desc = EVTDESC_RoI_243
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_243

		character_event = { id = RoI.244 }
	}

	option = {
		name = EVTOPTB_RoI_243
	}
}

# Searches but cannot find diamond
character_event = {
	id = RoI.244
	desc = EVTDESC_RoI_244
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_244

		if = {
			limit = { is_ill = yes }

			random = {
				chance = 30

				if = {
					limit = { has_dlc = "Reapers" }

					add_trait = infection

					character_event = {
						id = RIP.11001
						days = 365
						random = 1095
					}
				}

				else = {
					add_trait = pneumonic
				}
			}
		}
		else = {
			random = {
				chance = 30

				if = {
					limit = { has_dlc = "Reapers" }
					add_symptom_effect = yes
				}
				else = {
					add_trait = ill
				}
			}
		}
	}
}

# Keeps diamond
character_event = {
	id = RoI.245
	desc = EVTDESC_RoI_245
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { has_artifact = cursed_diamond }
			unsafe_destroy_artifact = cursed_diamond
		}

		if = {
			limit = { has_artifact = cursed_diamond_crown }
			unsafe_destroy_artifact = cursed_diamond_crown
		}

		clr_character_flag = cursed_diamond
		clr_character_flag = cursed_diamond_crown

		random_spouse = {
			limit = {
				NOT = { has_character_flag = spouse_diamond }
				ai = yes
				at_location = ROOT
				block_general_event_trigger = no
			}

			save_event_target_as = blamed_spouse
		}

		random_sibling = {
			limit = {
				ai = yes
				at_location = ROOT
				block_general_event_trigger = no
			}

			save_event_target_as = blamed_sibling
		}

		random_voter = {
			limit = {
				ai = yes
				at_location = ROOT
				block_general_event_trigger = no
			}

			save_event_target_as = blamed_councillor
		}

		# Backup
		if = {
			limit = {
				NOR = {
					event_target:blamed_spouse = { always = yes }
					event_target:blamed_sibling = { always = yes }
					event_target:blamed_councillor = { always = yes }
				}
			}

			random_courtier = {
				limit = {
					ai = yes
					at_location = ROOT
					block_general_event_trigger = no
				}

				save_event_target_as = blamed_courtier
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_245

		trigger = {
			event_target:blamed_spouse = { always = yes }
		}

		event_target:blamed_spouse = {
			save_event_target_as = blamed_character
		}
	}

	option = {
		name = EVTOPTB_RoI_245

		trigger = {
			event_target:blamed_sibling = { always = yes }
		}

		event_target:blamed_sibling = {
			save_event_target_as = blamed_character
		}
	}

	option = {
		name = EVTOPTC_RoI_245

		trigger = {
			event_target:blamed_councillor = { always = yes }
		}

		event_target:blamed_councillor = {
			save_event_target_as = blamed_character
		}
	}

	option = {
		name = EVTOPTD_RoI_245

		trigger = {
			event_target:blamed_courtier = { always = yes }
		}

		event_target:blamed_courtier = {
			save_event_target_as = blamed_character
		}
	}

	after = {
		character_event = { id = RoI.247 }
	}
}

# Verdict - guilty or innocent?
character_event = {
	id = RoI.247
	desc = EVTDESC_RoI_247
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_247

		reverse_opinion = {
			name = insulted
			who = event_target:blamed_character
			years = 5
		}
	}

	option = {
		name = EVTOPTB_RoI_247

		event_target:blamed_character = {
			show_scope_change = no

			death = {
				death_reason = death_execution
				killer = ROOT
			}
		}
	}
}

# On Death - clearing the treasury
character_event = {
	id = RoI.248

	is_triggered_only = yes # on_death
	hide_window = yes

	trigger = {
		OR = {
			has_artifact = cursed_diamond_crown
			has_artifact = cursed_diamond
		}
	}

	immediate = {
		if = {
			limit = { has_artifact = cursed_diamond }
			unsafe_destroy_artifact = cursed_diamond
		}

		if = {
			limit = { has_artifact = cursed_diamond_crown }
			unsafe_destroy_artifact = cursed_diamond_crown
		}

		save_event_target_as = cursed_diamond_parent

		current_heir = {
			character_event = {
				id = RoI.249
				days = 7
			}
		}
	}
}

# Heir finds out famous diamond has disappeared
character_event = {
	id = RoI.249
	desc = EVTDESC_RoI.249
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA_RoI.249
	}
}

###########################################
# Thugs                                   #
###########################################

# Thug problem appears
character_event = {
	id = RoI.147
	desc = EVTDESC_RoI_147
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		capital_scope = {
			region = world_india
		}

		is_inaccessible_trigger = no
		NOT = { has_global_flag = thugs_global }
	}

	immediate = {
		set_global_flag = thugs_global

		random_demesne_province = {
			limit = {
				region = world_india
				owned_by = PREV
			}

			save_event_target_as = thugs_province
		}
	}

	option = {
		name = EVTOPTA_RoI_147

		character_event = {
			id = RoI.148
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_147

		event_target:thugs_province = {
			show_scope_change = no

			add_province_modifier = {
				name = thugs_rampant
				years = 10
			}
		}
	}
}

# Agents disappear
character_event = {
	id = RoI.148
	desc = EVTDESC_RoI_148
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_148

		character_event = {
			id = RoI.155
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_148

		add_trait_fully_silently_cruel_effect = yes

		character_event = {
			id = RoI.149
			months = 4
		}
	}

	option = {
		name = EVTOPTC_RoI_148

		event_target:thugs_province = {
			show_scope_change = no

			add_province_modifier = {
				name = thugs_rampant
				years = 10
			}
		}
	}
}

# Terror in the countryside but the peasants are not to blame
character_event = {
	id = RoI.149
	desc = EVTDESC_RoI_149
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_149

		scaled_wealth = -0.1

		character_event = {
			id = RoI.150
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_149

		event_target:thugs_province = {
			show_scope_change = no

			add_province_modifier = {
				name = thugs_rampant
				years = 10
			}
		}
	}
}

# Send out armed parties?
character_event = {
	id = RoI.150
	desc = EVTDESC_RoI_150
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_150

		scaled_wealth = -0.2

		character_event = {
			id = RoI.155
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_150

		scaled_wealth = -0.1

		character_event = {
			id = RoI.151
			months = 2
		}
	}
}

# Thug assassin arrives
character_event = {
	id = RoI.151
	desc = EVTDESC_RoI_151
	picture = GFX_evt_emissary

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_151

		hidden_effect = {
			random_courtier = {
				limit = {
					at_location = ROOT
					is_incapable = no
					ai = yes
				}

				preferred_limit = {
					prisoner = no
					NOT = { trait = craven }

					opinion = {
						who = ROOT
						value >= 25
					}
				}

				preferred_limit = {
					prisoner = no
				}

				save_event_target_as = saving_courtier
			}
		}

		narrative_event = { id = RoI.152 }
	}
}

# Thug assassin strikes
narrative_event = {
	id = RoI.152
	title = EVTNAME_RoI_152
	desc = EVTDESC_RoI_152
	picture = GFX_evt_emissary

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_152

		event_target:saving_courtier = {
			show_scope_change = no

			death = { death_reason = death_murder }
		}

		character_event = { id = RoI.153 }
	}
}

# Hold council after assassination attempt - what to do?
character_event = {
	id = RoI.153
	desc = EVTDESC_RoI_153
	picture = GFX_evt_council

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_153

		character_event = { id = RoI.155 }
	}

	option = {
		name = EVTOPTB_RoI_153

		prestige = -100
		add_trait_fully_silently_craven_effect = yes

		event_target:thugs_province = {
			show_scope_change = no

			add_province_modifier = {
				name = thugs_rampant
				years = 10
			}
		}
	}
}

# Riders haven't found thugs - what to do?
character_event = {
	id = RoI.155
	desc = EVTDESC_RoI_155
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_155

		scaled_wealth = -0.4
		character_event = { id = RoI.156 }
	}

	option = {
		name = EVTOPTB_RoI_155

		event_target:thugs_province = {
			show_scope_change = no

			add_province_modifier = {
				name = thugs_rampant
				years = 10
			}
		}
	}
}

# Thugs have left, not our problem anymore
character_event = {
	id = RoI.156
	desc = EVTDESC_RoI_156
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_156
	}
}

###########################################
# Elephants                               #
###########################################

# Peasants need elephants for clearing forest
character_event = {
	id = RoI.157
	desc = EVTDESC_RoI_157
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		capital_scope = {
			region = world_india
		}
	}

	option = {
		name = EVTOPTA_RoI_157

		scaled_wealth = -0.2
		prestige = 50
	}

	option = {
		name = EVTOPTB_RoI_157

		scaled_wealth = -0.1
		prestige = 25
	}

	option = {
		name = EVTOPTC_RoI_157

		random_demesne_province = {
			show_scope_change = no

			limit = { owned_by = PREV }

			add_province_modifier = {
				name = neglected_development
				years = 3
			}
		}
	}
}

# Crazed elephant runs amuck
character_event = {
	id = RoI.158
	desc = EVTDESC_RoI_158
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		capital_scope = {
			OR = {
				region = world_india

				duchy = {
					OR = {
						title = d_sistan
						title = d_makran
						title = d_kerman
					}
				}
			}
		}

		NOT = { has_character_flag = crazed_elephant }
	}

	immediate = {
		set_character_flag = crazed_elephant
	}

	option = {
		name = EVTOPTA_RoI_158

		hidden_effect = {
			random_list = {
				50 = { character_event = { id = RoI.159 } }
				50 = { character_event = { id = RoI.160 } }
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_158

		hidden_effect = {
			random_list = {
				50 = { character_event = { id = RoI.161 } }
				50 = { character_event = { id = RoI.162 } }
			}
		}
	}
}

# Crazed elephant is killed by soldiers in a messy way
character_event = {
	id = RoI.159
	desc = EVTDESC_RoI_159
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_159

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_upset
				years = 4
			}
		}
	}
}

# Crazed elephant is killed by soldiers in a discrete way
character_event = {
	id = RoI.160
	desc = EVTDESC_RoI_160
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_160

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_protected
				years = 4
			}
		}
	}
}

# Crazed elephant kills people, then escapes
character_event = {
	id = RoI.161
	desc = EVTDESC_RoI_161
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE

		scaled_wealth = -0.1
		prestige = -20

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_upset
				years = 4
			}
		}
	}
}

# Crazed elephant is captured
character_event = {
	id = RoI.162
	desc = EVTDESC_RoI_162
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EXCELLENT

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_protected
				years = 4
			}
		}
	}
}

# Temple elephants are dying
character_event = {
	id = RoI.163
	desc = EVTDESC_RoI_163
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	religion_group = indian_group
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		has_dharmic_religion_trigger = yes

		capital_scope = {
			region = world_india
		}
	}

	option = {
		name = EVTOPTA_RoI_163

		add_character_modifier = {
			name = annoyed_religious
			years = 4
		}
	}

	option = {
		name = EVTOPTB_RoI_163

		scaled_wealth = -0.2

		add_character_modifier = {
			name = religious_appreciate
			years = 4
		}

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_protected
				years = 4
			}
		}
	}
}

###########################################
# The White Elephant                      #
###########################################


# White elephant is offered as a gift
character_event = {
	id = RoI.164
	desc = EVTDESC_RoI_164
	picture = GFX_evt_emissary

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	religion_group = indian_group
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no

	trigger = {
		has_dharmic_religion_trigger = yes
		higher_real_tier_than = DUKE

		capital_scope = {
			region = world_india
		}

		trigger_if = {
			limit = { independent = no }
			liege = { ai = yes }
		}
		trigger_else = {
			any_independent_ruler = {
				capital_scope = {
					region = world_india
				}

				has_dharmic_religion_trigger = yes
				ai = yes
			}
		}

		NOT = { has_global_flag = white_elephant }
	}

	immediate = {
		set_global_flag = white_elephant

		# Determine who gives player the white elephant
		if = {
			limit = { independent = no }

			liege = {
				save_event_target_as = white_elephant_donor
			}
		}
		else = {
			random_independent_ruler = {
				limit = {
					capital_scope = {
						region = world_india
					}

					has_dharmic_religion_trigger = yes
					ai = yes
				}

				save_event_target_as = white_elephant_donor
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_164

		add_friend = event_target:white_elephant_donor

		character_event = {
			id = RoI.165
			days = 5
		}
	}

	option = {
		name = EVTOPTB_RoI_164

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}
}

# White elephant needs a suitable stable
character_event = {
	id = RoI.165
	desc = EVTDESC_RoI_165
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_165

		scaled_wealth = -0.4
		set_character_flag = white_elephant_nice_stable
	}

	option = {
		name = EVTOPTB_RoI_165

		scaled_wealth = -0.05
		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}

	after = {
		character_event = {
			id = RoI.166
			months = 2
		}
	}
}

# Weird local Ganesha cult steals white elephant's droppings
character_event = {
	id = RoI.166
	desc = EVTDESC_RoI_166
	picture = GFX_evt_hindu_temple_interior

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_166

		scaled_wealth = -0.4
		add_trait_fully_silently_cruel_effect = yes
	}

	option = {
		name = EVTOPTB_RoI_166

		add_trait_fully_silently_charitable_effect = yes
	}

	option = {
		name = EVTOPTC_RoI_166

		random = {
			chance = 30
			change_stewardship = 1
		}
	}

	after = {
		character_event = {
			id = RoI.167
			months = 2
		}
	}
}

# Elephant is bored and trashes stable
character_event = {
	id = RoI.167
	desc = EVTDESC_RoI_167
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_167

		if = {
			limit = { has_character_flag = white_elephant_nice_stable }
			scaled_wealth = -0.3
		}
		else = {
			scaled_wealth = -0.03
		}

		character_event = {
			id = RoI.168
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_167

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}

	option = {
		name = EVTOPTC_RoI_167

		scaled_wealth = 0.2
		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}

	option = {
		name = EVTOPTD_RoI_167

		character_event = { id = RoI.169 }
	}
}

# Elephant escapes and tries to mate with other elephants
character_event = {
	id = RoI.168
	desc = EVTDESC_RoI_168
	picture = GFX_evt_india_rural_scene

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_168

		scaled_wealth = -0.05

		character_event = {
			id = RoI.177
			months = 2
		}
	}

	option = {
		name = EVTOPTB_RoI_168

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}

	option = {
		name = EVTOPTC_RoI_168

		wealth = 30

		if = {
			limit = { has_dharmic_religion_trigger = yes }
			piety = -100
		}

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}

			any_playable_ruler = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}
		}

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}
	}

	option = {
		name = EVTOPTD_RoI_168

		character_event = { id = RoI.169 }
	}
}

# Killing the white elephant
character_event = {
	id = RoI.169
	desc = EVTDESC_RoI_169
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_169

		hidden_effect = {
			random_list = {
				50 = { character_event = { id = RoI.170 } }
				50 = { character_event = { id = RoI.171 } }
			}
		}
	}

	option = {
		name = EVTOPTB_RoI_169

		hidden_effect = {
			random_list = {
				50 = { character_event = { id = RoI.172 days = 10 } }
				50 = { character_event = { id = RoI.173 days = 10 } }
			}
		}
	}

	option = {
		name = EVTOPTC_RoI_169

		hidden_effect = {
			random_list = {
				50 = { character_event = { id = RoI.174 days = 3 } }
				50 = { character_event = { id = RoI.175 days = 3 } }
			}
		}
	}

	option = {
		name = EVTOPTD_RoI_169

		character_event = { id = RoI.176 }
	}
}

# Poisons elephant and gets away with it
character_event = {
	id = RoI.170
	desc = EVTDESC_RoI_170
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EXCELLENT

		random = {
			chance = 20
			change_intrigue = 1
		}
	}
}

# Poisons elephant but is found out
character_event = {
	id = RoI.171
	desc = EVTDESC_RoI_171
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}

			any_playable_ruler = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}
		}
	}
}

# Starves elephant to death and gets away with it
character_event = {
	id = RoI.172
	desc = EVTDESC_RoI_172
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EXCELLENT

		change_intrigue = 1
	}
}

# Starves elephant to death but is found out
character_event = {
	id = RoI.173
	desc = EVTDESC_RoI_173
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}

			any_playable_ruler = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}
		}
	}
}

# Pushes elephant over cliff and gets away with it
character_event = {
	id = RoI.174
	desc = EVTDESC_RoI_174
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EXCELLENT

		change_intrigue = 1
	}
}

# Pushes elephant over cliff but is found out
character_event = {
	id = RoI.175
	desc = EVTDESC_RoI_175
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = UNFORTUNATE

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}

			any_playable_ruler = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}
		}
	}
}

# Elephant is killed with lances and dies, no attempt at subterfuge
character_event = {
	id = RoI.176
	desc = EVTDESC_RoI_176
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_176

		add_rival = event_target:white_elephant_donor

		reverse_opinion = {
			name = grievously_offended
			who = event_target:white_elephant_donor
			years = 10
		}

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}

			any_playable_ruler = {
				limit = { has_dharmic_religion_trigger = yes }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 3
				}
			}
		}
	}
}

# Elephant is alive and has calmed down now. Happy ending.
character_event = {
	id = RoI.177
	desc = EVTDESC_RoI_177
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_177

		prestige = 10
	}
}

###########################################
# Levitating yogi                         #
###########################################

# Hears of levitating yogi
character_event = {
	id = RoI.193
	desc = EVTDESC_RoI_193
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	min_age = 16
	in_command = no

	trigger = {
		capital_scope = { region = world_india }
		is_inaccessible_trigger = no
	}

	option = {
		name = EVTOPTA_RoI_193

		character_event = { id = RoI.194 }
	}

	option = {
		name = EVTOPTB_RoI_193

		trigger = {
			has_dharmic_religion_trigger = no
			NOT = { trait = zealous }
		}
	}
}


# Arrives and sees yogi
character_event = {
	id = RoI.194
	desc = EVTDESC_RoI_194
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = INTERESTING

		piety = 5
	}

	option = {
		name = EVTOPTB_RoI_194

		scaled_wealth = -0.1
		piety = 30
	}

	option = {
		name = EVTOPTC_RoI_194

		character_event = { id = RoI.196 }
	}

	option = {
		name = EVTOPTD_RoI_194

		character_event = { id = RoI.198 }
	}
}

# Leaves, pondering yogis
character_event = {
	id = RoI.195
	desc = EVTDESC_RoI_195
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_195
	}
}

# Pokes yogi
character_event = {
	id = RoI.196
	desc = EVTDESC_RoI_196
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_196

		character_event = { id = RoI.197 }
	}

	option = {
		name = EVTOPTB_RoI_196

		character_event = { id = RoI.195 }
	}

	option = {
		name = EVTOPTC_RoI_196

		character_event = { id = RoI.198 }
	}
}

# Pokes yogi AGAIN
character_event = {
	id = RoI.197
	desc = EVTDESC_RoI_197
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_197

		prestige = 20

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_upset
				years = 4
			}
		}
	}
}

# Shoves yogi
character_event = {
	id = RoI.198
	desc = EVTDESC_RoI_198
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_198

		prestige = 40

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_upset
				years = 4
			}
		}

		add_trait_fully_silently_cynical_effect = yes
	}
}

###########################################
# Marco Polo                              #
###########################################

# The Polos arrive
character_event = {
	id = RoI.500
	desc = EVTDESC_RoI_500
	picture = GFX_evt_throne_room

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	min_age = 16
	only_capable = yes
	prisoner = no
	has_dlc = "Rajas of India"

	trigger = {
		capital_scope = {
			region = world_persia
		}

		year >= 1200
		NOT = { has_global_flag = marco_polo_persia }
	}

	immediate = {
		set_global_flag = marco_polo_persia
	}

	option = {
		name = EVTOPTA_RoI_500

		character_event = { id = RoI.501 }
	}

	option = {
		name = EVTOPTB_RoI_500
	}
}

# Help the Polos?
character_event = {
	id = RoI.501
	desc = EVTDESC_RoI_501
	picture = GFX_evt_emissary

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_501

		scaled_wealth = -0.05
		prestige = 5
		character_event = { id = RoI.502 }
	}

	option = {
		name = EVTOPTB_RoI_501

		scaled_wealth = -0.1
		prestige = 10
		set_character_flag = helped_marco_polo_lots
		character_event = { id = RoI.502 }
	}

	option = {
		name = EVTOPTC_RoI_501

		character_event = { id = RoI.503 }
	}
}

# Helped the Polos
character_event = {
	id = RoI.502
	desc = EVTDESC_RoI_502
	picture = GFX_evt_carriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_502

		character_event = {
			id = RoI.504
			days = 4000
		}
	}
}

# Didn't help the Polos
character_event = {
	id = RoI.503
	desc = EVTDESC_RoI_503
	picture = GFX_evt_carriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_503
	}
}

# The Polos return
character_event = {
	id = RoI.504
	desc = EVTDESC_RoI_504
	picture = GFX_evt_emissary

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_504

		trigger = { has_character_flag = helped_marco_polo_lots }

		scaled_wealth = 0.3
		prestige = 50
		change_learning = 1
	}

	option = {
		name = EVTOPTA_RoI_504

		trigger = {
			NOT = { has_character_flag = helped_marco_polo_lots }
		}

		scaled_wealth = 0.1
		prestige = 20
		change_learning = 1
	}
}

###########################################
# Minor events                            #
###########################################

# Greek troops not wanting to cross the Indus
character_event = {
	id = RoI.146
	desc = EVTDESC_RoI_146
	picture = GFX_evt_large_army

	is_triggered_only = yes # on_unit_entering_province

	ai = no
	culture = greek
	has_dlc = "Rajas of India"
	war = yes

	trigger = {
		location = {
			region = world_india
		}

		any_current_enemy = {
			primary_title = {
				capital_scope = {
					region = world_india
				}
			}
		}

		NOR = {
			any_realm_province = {
				region = world_india
				held_under_PREV = yes
			}

			has_character_flag = crossing_indus
		}
	}

	immediate = {
		set_character_flag = crossing_indus
	}

	option = {
		name = EVTOPTA_RoI_146

		trigger = {
			NOT = { trait = inspiring_leader }
		}

		add_character_modifier = {
			name = troops_war_weary
			years = 2
		}

	}

	option = {
		name = EVTOPTB_RoI_146
		tooltip_info = inspiring_leader

		trigger = { trait = inspiring_leader }

		prestige = 30
	}
}

# Kung fu monks
character_event = {
	id = RoI.180
	desc = EVTDESC_RoI_180
	picture = GFX_evt_meditating_in_temple

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"

	trigger = {
		capital_scope = {
			region = world_india
		}

		is_inaccessible_trigger = no
	}

	option = {
		name = EVTOPTA_RoI_180

		random = {
			chance = 30
			change_martial = 1
		}
	}

	option = {
		name = EVTOPTB_RoI_180

		trigger = {
			NOR = {
				trait = paranoid
				trait = wroth
			}
		}

		if = {
			limit = { trait = paranoid }

			random = {
				chance = 50
				add_trait_wroth_effect = yes
			}
		}
		else = {
			random = {
				chance = 50
				add_trait_fully_paranoid_effect = yes
			}
		}
	}
}

# U-boat up the Indus
character_event = {
	id = RoI.190
	desc = EVTDESC_RoI_190
	picture = GFX_evt_emissary

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		capital_scope = {
			distance = {
				where = c_siwistan
				value < 100 # Means we live fairly near the lower Indus
			}
		}

		is_inaccessible_trigger = no
		NOT = { has_global_flag = indus_uboat }
	}

	immediate = {
		set_global_flag = indus_uboat
	}

	option = {
		name = EVTOPTA_RoI_190

		wealth = -20
		character_event = { id = RoI.191 }
	}

	option = {
		name = EVTOPTB_RoI_190
	}
}

# U-boat sails
character_event = {
	id = RoI.191
	desc = EVTDESC_RoI_191
	picture = GFX_evt_india_temple

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_191

		random = {
			chance = 30
			change_learning = 1
		}
	}
}

# Tolerant character making Indian friend
character_event = {
	id = RoI.400
	desc = EVTDESC_RoI_400
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_rulers = yes
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		trait = sympathy_indian

		any_realm_character = {
			has_dharmic_religion_trigger = yes
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_RoI_400

		random_realm_character = {
			show_scope_change = no

			limit = { has_dharmic_religion_trigger = yes }

			add_friend = ROOT
		}
	}
}

# Visit Nalanda University?
character_event = {
	id = RoI.401
	desc = EVTDESC_RoI_401
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	prisoner = no
	only_capable = yes
	min_age = 16
	in_command = no

	trigger = {
		prestige = 100

		capital_scope = {
			region = world_india
		}

		OR = {
			has_dharmic_religion_trigger = yes
			trait = sympathy_indian
		}

		is_inaccessible_trigger = no
	}

	option = {
		name = EVTOPTA_RoI_401

		scaled_wealth = -0.05
		set_character_flag = do_not_disturb

		narrative_event = {
			id = RoI.402
			days = 20
		}
	}

	option = {
		name = EVTOPTB_RoI_401

		piety = -5
	}
}

# Visiting Nalanda University
narrative_event = {
	id = RoI.402
	title = EVTNAME_RoI_402
	desc = EVTDESC_RoI_402
	picture = GFX_evt_india_temple
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_402

		random = {
			chance = 50
			change_stewardship = 1
		}
	}

	option = {
		name = EVTOPTB_RoI_402

		if = {
			limit = {
				lifestyle_traits < 1
				NOT = { has_dlc = "Way of Life" }
			}

			random = {
				chance = 50
				add_trait = scholar
			}
		}

		random = {
			chance = 30
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTC_RoI_402

		trigger = {
			NOT = { trait = cynical }
		}

		piety = 30

		random = {
			chance = 50
			add_trait_zealous_effect = yes
		}
	}

	after = {
		clr_character_flag = do_not_disturb
	}
}

# Visit the Ganges?
character_event = {
	id = RoI.403
	desc = EVTDESC_RoI_403
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	religion = hindu
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		capital_scope = {
			distance = {
				where = c_bikrampur
				value < 100	# Means we live fairly near the lower Ganges
			}
		}

		is_inaccessible_trigger = no
	}

	option = {
		name = EVTOPTA_RoI_403

		set_character_flag = do_not_disturb
		scaled_wealth = -0.1

		character_event = {
			id = RoI.404
			days = 20
		}
	}

	option = {
		name = EVTOPTB_RoI_403

		piety = -5
	}
}

# Visiting Ganges
character_event = {
	id = RoI.404
	desc = EVTDESC_RoI_404
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_RoI_404

		piety = 20

		add_character_modifier = {
			name = religious_appreciate
			years = 1
		}

		clr_character_flag = do_not_disturb
	}
}

# Local Hindu temple asks for donations
character_event = {
	id = RoI.410
	desc = EVTDESC_RoI_410
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	religion = hindu
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	in_command = no

	option = {
		name = EVTOPTG_RoI_410

		scaled_wealth = -0.1
		piety = 5
	}

	option = {
		name = {
			text = EVTOPTA_RoI_410
			trigger = { has_character_modifier = patron_shiva }
		}
		name = {
			text = EVTOPTB_RoI_410
			trigger = { has_character_modifier = patron_vishnu }
		}
		name = {
			text = EVTOPTC_RoI_410
			trigger = { has_character_modifier = patron_brahma }
		}
		name = {
			text = EVTOPTD_RoI_410
			trigger = { has_character_modifier = patron_kali }
		}
		name = {
			text = EVTOPTE_RoI_410
			trigger = { has_character_modifier = patron_ganesha }
		}
		name = {
			text = EVTOPTF_RoI_410
			trigger = { has_character_modifier = patron_ganga }
		}


		scaled_wealth = -0.3
		piety = 30

		add_character_modifier = {
			name = religious_appreciate
			years = 4
		}
	}


	option = {
		name = EVTOPTH_RoI_410

		add_character_modifier = {
			name = annoyed_religious
			years = 4
		}
	}
}

# Buddhist or Jain monks ask for donations
character_event = {
	id = RoI.411
	desc = EVTDESC_RoI_411
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		OR = {
			religion = buddhist
			religion = jain
		}
	}

	option = {
		name = EVTOPTA_RoI_411

		scaled_wealth = -0.3
		piety = 30

		add_character_modifier = {
			name = religious_appreciate
			years = 4
		}
	}

	option = {
		name = EVTOPTB_RoI_411

		scaled_wealth = -0.1
		piety = 10
	}

	option = {
		name = EVTOPTC_RoI_411

		add_character_modifier = {
			name = annoyed_religious
			years = 4
		}
	}
}

# Non-Indian merchants upset about naked Jain ascetics
character_event = {
	id = RoI.412
	desc = EVTDESC_RoI_412
	picture = GFX_evt_meditating_in_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no
	has_dlc = "Rajas of India"
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		NOT = { religion_group = indian_group }

		any_demesne_province = {
			NOT = { religion_group = indian_group }
			owned_by = PREV
		}

		OR = {
			any_demesne_province = {
				owned_by = PREV

				any_neighbor_province = {
					religion = jain
				}
			}

			any_realm_province = {
				religion = jain
				held_under_PREV = yes
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_412
	}

	option = {
		name = EVTOPTB_RoI_412
		tooltip_info = diplomacy

		trigger = { diplomacy >= 12 }

		custom_tooltip = {
			text = realm_jains_upset

			any_realm_character = {
				limit = { religion = jain }

				opinion = {
					name = opinion_upset
					who = ROOT
					years = 4
				}
			}
		}
	}

	option = {
		name = EVTOPTC_RoI_412

		custom_tooltip = {
			text = sacrilege_tooltip

			any_realm_character = {
				limit = { religion = jain }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 4
				}
			}

			any_playable_ruler = {
				limit = { religion = jain }

				opinion = {
					name = opinion_sacrilege
					who = ROOT
					years = 4
				}
			}
		}
	}
}

###########################################
# Low religion authority events           #
###########################################

# Temple corruption
character_event = {
	id = RoI.3505
	desc = EVTDESC_RoI_3505
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	religion_group = indian_group

	trigger = {
		has_dharmic_religion_trigger = yes
		NOT = { religion_authority >= 0.2 }

		any_demesne_province = {
			religion = ROOT
			owned_by = PREV

			NOR = {
				has_province_modifier = temple_corruption
				has_province_modifier = local_death_cult
				has_province_modifier = religious_tension
			}
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				religion = ROOT
				owned_by = PREV

				NOR = {
					has_province_modifier = temple_corruption
					has_province_modifier = local_death_cult
					has_province_modifier = religious_tension
				}
			}

			save_event_target_as = corrupt_temple_province
		}
	}

	option = {
		name = EVTOPTA_RoI_3505

		event_target:corrupt_temple_province = {
			show_scope_change = no

			add_province_modifier = {
				name = temple_corruption
				duration = -1
			}
		}
	}
}

# Temple corruption removed - Indian
character_event = {
	id = RoI.3509
	desc = EVTDESC_RoI_3509
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	religion_group = indian_group

	trigger = {
		religion_authority >= 0.3

		any_demesne_province = {
			has_province_modifier = temple_corruption
			religion = ROOT
			owned_by = PREV
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				has_province_modifier = temple_corruption
				religion = ROOT
				owned_by = PREV
			}

			save_event_target_as = corrupt_temple_province
		}
	}

	option = {
		name = EXCELLENT

		event_target:corrupt_temple_province = {
			show_scope_change = no

			remove_province_modifier = temple_corruption
		}
	}
}

# Local death cult
character_event = {
	id = RoI.3515
	desc = EVTDESC_RoI_3515
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	religion_group = indian_group

	trigger = {
		has_dharmic_religion_trigger = yes
		NOT = { religion_authority >= 0.2 }

		any_demesne_province = {
			religion = ROOT
			owned_by = PREV

			NOR = {
				has_province_modifier = temple_corruption
				has_province_modifier = local_death_cult
				has_province_modifier = religious_tension
			}
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				religion = ROOT
				owned_by = PREV

				NOR = {
					has_province_modifier = temple_corruption
					has_province_modifier = local_death_cult
					has_province_modifier = religious_tension
				}
			}

			save_event_target_as = death_cult_province
		}
	}

	option = {
		name = EVTOPTA_RoI_3515

		event_target:death_cult_province = {
			show_scope_change = no

			add_province_modifier = {
				name = local_death_cult
				duration = -1
			}
		}
	}
}

# Local death cult removed - Indian
character_event = {
	id = RoI.3519
	desc = EVTDESC_RoI_3519
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	religion_group = indian_group

	trigger = {
		religion_authority >= 0.3

		any_demesne_province = {
			has_province_modifier = local_death_cult
			religion = ROOT
			owned_by = PREV
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				has_province_modifier = local_death_cult
				religion = ROOT
				owned_by = PREV
			}

			save_event_target_as = death_cult_province
		}
	}

	option = {
		name = EVTOPTA_RoI_3519

		event_target:death_cult_province = {
			show_scope_change = no

			remove_province_modifier = local_death_cult
		}
	}
}

# Religious tensions
character_event = {
	id = RoI.3535
	desc = EVTDESC_RoI_3535
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	religion_group = indian_group

	trigger = {
		NOT = { religion_authority >= 0.2 }

		any_demesne_province = {
			religion = ROOT
			owned_by = PREV

			NOR = {
				has_province_modifier = temple_corruption
				has_province_modifier = local_death_cult
				has_province_modifier = religious_tension
			}
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				religion = ROOT
				owned_by = PREV

				NOR = {
					has_province_modifier = temple_corruption
					has_province_modifier = local_death_cult
					has_province_modifier = religious_tension
				}
			}

			save_event_target_as = religious_tension_province
		}
	}

	option = {
		name = EVTOPTA_RoI_3535

		event_target:religious_tension_province = {
			show_scope_change = no

			add_province_modifier = {
				name = religious_tension
				years = 2
			}
		}
	}
}

# TODO - event is comment out in CleanSlate? But not in Plus

# Religious unrest removed
# character_event = {
# 	id = RoI.3539
# 	desc = EVTDESC_RoI_3539
# 	picture = GFX_evt_india_temple
# 	border = GFX_event_normal_frame_religion
#
# 	is_triggered_only = yes
#
# 	religion_group = indian_group
# 	has_dlc = "Rajas of India"
#
# 	trigger = {
# 		religion_authority = 0.5
#
# 		any_demesne_province = {
# 			has_province_modifier = religious_tension
# 			religion = ROOT
#			owned_by = PREV
# 		}
# 	}
#
# 	immediate = {
# 		random_demesne_province = {
# 			limit = {
# 				has_province_modifier = religious_tension
# 				religion = ROOT
#				owned_by = PREV
# 			}
#
# 			save_event_target_as = religious_tension_province
# 		}
# 	}
#
# 	option = {
# 		name = EVTOPTA_RoI_3539
#
# 		event_target:religious_tension_province = {
# 			show_scope_change = no
#
# 			remove_province_modifier = religious_tension
# 		}
# 	}
# }

# Province converts to other religion!
character_event = {
	id = RoI.3525
	desc = EVTDESC_RoI_3525
	picture = GFX_evt_india_temple
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_yearly_pulse, random_events

	ai = no # For performance reasons
	only_playable = yes
	religion_group = indian_group
	has_dlc = "Rajas of India"

	trigger = {
		always = no # Disabled in Plus
		has_dharmic_religion_trigger = yes
		NOT = { religion_authority >= 0.3 }

		OR = {
			culture_group = dravidian_group
			culture_group = indo_aryan_group
		}

		any_independent_ruler = {
			any_realm_province = {
				has_dharmic_religion_trigger = yes
				NOT = { religion = ROOT }
				religion_authority >= 0.7
				held_under_PREV = yes
			}
		}

		any_demesne_province = {
			religion = ROOT
			owned_by = PREV

			OR = {
				has_castle = yes
				has_city = yes
				has_temple = yes
				has_tribal = yes
			}
		}
	}

	immediate = {
		random_demesne_province = {
			limit = {
				religion = ROOT
				owned_by = PREV

				OR = {
					has_castle = yes
					has_city = yes
					has_temple = yes
					has_tribal = yes
				}
			}

			save_event_target_as = target_province

			if = {
				limit = {
					any_neighbor_province = {
						has_dharmic_religion_trigger = yes
						NOT = { religion = ROOT }
						religion_authority = 0.7
					}
				}

				random_neighbor_province = {
					limit = {
						has_dharmic_religion_trigger = yes
						NOT = { religion = ROOT }
						religion_authority = 0.7
					}

					religion_scope = {
						save_event_target_as = target_religion
					}
				}
			}
			else = {
				random_list = {
					50 = {
						trigger = {
							NOT = { religion = hindu }
						}

						hindu = {
							save_event_target_as = target_religion
						}
					}

					50 = {
						trigger = {
							NOT = { religion = jain }
						}

						jain = {
							save_event_target_as = target_religion
						}
					}

					50 = {
						trigger = {
							NOT = { religion = buddhist }
						}

						buddhist = {
							save_event_target_as = target_religion
						}
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTA_RoI_3535

		event_target:target_province = {
			show_scope_change = no

			religion = event_target:target_religion
		}
	}
}

# Temple corruption removed - non-Indian
character_event = {
	id = RoI.3550

	is_triggered_only = yes # on_new_holder(_inheritance/usurpation)
	hide_window = yes

	trigger = {
		FROM = {
			tier = COUNT

			location = {
				has_province_modifier = temple_corruption
			}
		}

		NOT = { religion_group = indian_group }
	}

	immediate = {
		FROM = {
			location = {
				remove_province_modifier = temple_corruption
			}
		}
	}
}

# Local death cult removed - non-Indian
character_event = {
	id = RoI.3551

	is_triggered_only = yes # on_new_holder(_inheritance/usurpation)
	hide_window = yes

	trigger = {
		FROM = {
			tier = COUNT

			location = {
				has_province_modifier = local_death_cult
			}
		}

		NOT = { religion_group = indian_group }
	}

	immediate = {
		FROM = {
			location = {
				remove_province_modifier = local_death_cult
			}
		}
	}
}