namespace = HIE_Events

# Lusitanian Empire
country_event = {
	id = HIE_Events.1
	title = HIE_Events.1.T
	desc = HIE_Events.1.D
	picture = GOOD_WITH_MONARCH_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = HIE_Events.1.OPT1
		ai_chance = { factor = 0 }

		override_country_name = HIE_SPA_POR_LUSITANIA
		change_country_color = {
			color = { 40 110 140 }
		}
		add_prestige_or_monarch_power = { amount = 25 }
		set_government_rank_force = 3
	}

	option = {
		name = HIE_Events.1.OPT2
		ai_chance = { factor = 100 }

		add_prestige_or_monarch_power = { amount = 25 }
		set_government_rank_force = 3
	}
}

# The Kingdom of God on Earth
country_event = {
	id = HIE_Events.2
	title = HIE_Events.2.T
	desc = HIE_Events.2.D
	picture = POPE_PREACHING_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = HIE_Events.2.OPT1
		ai_chance = { factor = 1 }

		swap_free_idea_group = yes
		add_prestige_or_monarch_power = { amount = 25 }
		set_government_rank_force = 3
	}

	option = {
		name = HIE_Events.2.OPT2
		ai_chance = { factor = 0 }

		add_prestige_or_monarch_power = { amount = 25 }
		set_government_rank_force = 3
	}
}

# Accepting Christianity
country_event = {
	id = HIE_Events.3
	title = HIE_Events.3.T
	desc = HIE_Events.3.D
	picture = POPE_PREACHING_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					any_neighbor_country = {
						NOT = { same_continent = ROOT }
						religion_group = christian
					}
				}
				save_event_target_as = hie_christianity_coloniser
			}
		}
	}

	option = {
		name = HIE_Events.3.OPT1
		ai_chance = { factor = 50 }

		add_stability = 1
	}

	option = {
		name = HIE_Events.3.OPT2
		trigger = {
			NOT = { religion_group = christian }
		}
		ai_chance = { factor = 50 }

		if = {
			limit = { has_saved_event_target = hie_christianity_coloniser }
			change_religion = event_target:hie_christianity_coloniser
			capital_scope = {
				change_religion = event_target:hie_christianity_coloniser
				add_or_upgrade_tax_building = yes
			}
		}
		else = {
			change_religion = catholic
			capital_scope = {
				change_religion = catholic
				add_or_upgrade_tax_building = yes
			}
		}
	}
}

# The Hidden Way
country_event = {
	id = HIE_Events.4
	title = HIE_Events.4.T
	desc = HIE_Events.4.D
	picture = RELIGIOUS_CONVERSION_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = HIE_Events.4.OPT1
		ai_chance = { factor = 50 }

		change_religion = zoroastrian
		add_country_modifier = {
			name = hie_zoroastrian_revolt
			duration = 5475
		}
		capital_scope = {
			area = {
				limit = { owned_by = ROOT }
				change_religion = zoroastrian
			}
		}
	}

	option = {
		name = HIE_Events.4.OPT2
		ai_chance = { factor = 50 }

		add_prestige = -5
		add_stability_or_adm_power = yes
	}
}

# The Jewish Legacy
country_event = {
	id = HIE_Events.5
	title = HIE_Events.5.T
	desc = HIE_Events.5.D
	picture = JERUSALEM_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = HIE_Events.5.OPT1
		ai_chance = { factor = 2 }

		change_religion = jewish
		add_country_modifier = {
			name = hie_jewish_rebirth
			duration = 5475
		}
		capital_scope = {
			area = {
				limit = { owned_by = ROOT }
				change_religion = jewish
			}
		}
	}

	option = {
		name = HIE_Events.5.OPT2
		ai_chance = { factor = 98 }

		add_prestige = -5
		add_stability_or_adm_power = yes
	}
}

# Emerging from Obscurity
country_event = {
	id = HIE_Events.6
	title = HIE_Events.6.T
	desc = HIE_Events.6.D
	picture = COPTIC_BISHOP_eventPicture

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = HIE_Events.6.OPT1
		ai_chance = { factor = 25 }

		change_religion = coptic
		change_primary_culture = aramaic
		add_country_modifier = {
			name = hie_aramaic_resurgence
			duration = 5475
		}
		capital_scope = {
			change_culture = aramaic
			change_religion = coptic
		}
	}

	option = {
		name = HIE_Events.6.OPT2
		ai_chance = { factor = 75 }

		add_stability_or_adm_power = yes
	}
}