###################################
# Historical Events
#
# hist.1 -> hist.29
# 
# Id 60000 - 61000 is reserved
###################################

namespace = hist

# Bavarian Ethnogensis
province_event = {
	id = hist.1
	desc = hist.1.desc
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_diplomacy
	
	trigger = {
		year = 550
		culture = rygir
		NOT = { has_province_modifier = bavarian_influx }
		k_rugiland = { has_holder = no }
		NOT = { year = 800 }
	}
	
	mean_time_to_happen = {
		months = 1400
	}

	option = {
		name = hist.1.a
		trigger = {
			NOT = {
				owner = { culture = bavarian }
			}
		}
		culture = bavarian
		add_province_modifier = {
			modifier = bavarian_influx
			duration = 9125 # 25 years
		}
	}
	option = {
		name = hist.1.b
		trigger = {
			owner = { culture = bavarian }
		}
		culture = bavarian
	}
}

# Diocese of Connor
character_event = {
	id = hist.2
	title = hist.2.name
	desc = {
		trigger = {
			has_landed_title = k_dal_riata
		}
		text = hist.2.desc.a
	}
	desc = {
		trigger = {
			NOT = { has_landed_title = k_dal_riata }
		}
		text = hist.2.desc.b
	}
	picture = GFX_evt_stone_church
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	major = yes
	
	major_trigger = {
		OR = { 
			religion_group = christian
			religion = celtic_pagan
		}
	}
	
	trigger = {
		has_landed_title = k_dal_riata
		religion = insular
		completely_controls = c_ulster
		NOT = { has_global_flag = diocese_of_connor }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	immediate = {
		religion_authority = {
			modifier = diocese_of_connor
			years = 100
		}
		set_global_flag = diocese_of_connor
	}

	option = {
		name = hist.2.a
		trigger = {
			has_landed_title = k_dal_riata
		}
		piety = 150
		wealth = 50
	}
	
	option = {
		name = hist.2.b
		trigger = {
			religion_group = christian
			NOT = { has_landed_title = k_dal_riata }
		}
	}
	
	option = {
		name = hist.2.c
		trigger = {
			religion = celtic_pagan
			NOT = { has_landed_title = k_dal_riata }
		}
	}
}

# hist.3 free

# The Hagiography of Germanus of Auxerre
character_event = {
	id = hist.4
	title = hist.4.name
	desc = hist.4.desc
	picture = GFX_evt_heretic
	border = GFX_event_normal_frame_religion
	
	only_playable = yes
	
	major = yes
	
	major_trigger = {
		OR = { 
			any_realm_province = { region = world_europe_west }
			any_realm_province = { region = world_europe_south }
		}
	}
	
	trigger = {
		has_landed_title = k_soissons
		religion = nicene 
		NOT = { has_global_flag = heresy_denounced }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	immediate = {
		religion_authority = {
			modifier = heresy_denounced
			years = 10
		}
		set_global_flag = heresy_denounced
	}

	option = {
		name = hist.4.a
		trigger = {
			has_landed_title = k_soissons
		}
		piety = 150 
		wealth = 50 
	}
	
	option = {
		name = hist.4.b
		piety = 50 
		trigger = { 
			religion = nicene
			NOT = { has_landed_title = k_soissons }
		}
	}
	
	option = {
		name = hist.4.c
		piety = -50 
		trigger = {
			NOR = {
				religion = nicene
				has_landed_title = k_soissons
			}
			religion_group = christian
		}
	}
	
	option = {
		name = hist.4.d
		trigger = {
			NOR = {
				religion_group = christian
				has_landed_title = k_soissons
			}
		}
	}
}

# hist.5 free

# The Death of Strabo
character_event = {
	id = hist.6
	desc = hist.6.desc
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_war
	
	only_playable = yes
	culture = ostrogothic
	
	trigger = {
		has_landed_title = d_thracian_goths
		e_byzantium = { holder_scope = { war_with = ROOT } }
		NOT = { has_global_flag = death_strabo }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	immediate = {
		set_global_flag = death_strabo
	}
	
	option = {
		name = hist.6.a
		random_list = {
			75 = { death = { death_reason = death_accident } }
			25 = { 
				add_trait = maimed 
				hidden_tooltip = { 
					character_event = { id = 38281 }
				} 
			}
		}
	}
}

# Tension in Armenia
character_event = {
	id = hist.7
	title = hist.7.name
	desc = hist.7.desc 
	picture = GFX_evt_bandits
	
	only_playable = yes
	
	trigger = {
		has_landed_title = e_persia
		religion = zoroastrian
		NOT = { culture = armenian }
		NOT = { has_global_flag = armenian_revolt }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	immediate = {
		set_global_flag = armenian_revolt
		set_character_flag = armenian_enemy
	}
	
	option = {
		name = hist.7.a
		random_realm_province = {
			limit = {
				culture = armenian
				OR = {
					religion = miaphysite
					religion = nestorian
				}
			}
			hidden_tooltip = { province_event = { id = hist.8 } }
		}
	}
}

# Vahan Mamikonian
province_event = {
	id = hist.8
	
	hide_window = yes
	
	is_triggered_only = yes

	immediate = {
		create_character = {
			random_traits = no
			dynasty = 23006
			religion = ROOT
			culture = armenian
			age = 45
			female = no
			trait = honest
			trait = brave
			trait = diligent
			trait = zealous
			trait = proud
			trait = brilliant_strategist
			trait = aggressive_leader
			attributes = {
				diplomacy = 10
				martial = 10
				stewardship = 5
				intrigue = 6
				learning = 7
			}
		}
		new_character = {
			set_name = Vahan
			set_character_flag = is_vahan
			set_defacto_liege = THIS
			prestige = 100
			piety = 50
			add_claim = k_armenia
			add_claim = d_armenia
			add_claim = d_atropatene
			create_title = {
				tier = DUKE
				landless = yes
				temporary = yes
				culture = armenian
				name = "ARMENIAN_REVOLT"
				holder = THIS
			}
			spawn_unit = {
				owner = THIS
				leader = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 250 250 }
				}
				attrition = 1.0
			}
			spawn_unit = {
				owner = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 250 250 }
				}
				attrition = 1.0
			}
			spawn_unit = {
				owner = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 250 250 }
				}
				attrition = 1.0
			}
			if = {
				limit = {
					FROM = { any_realm_title = { title = k_armenia } }
				}
				k_armenia = {
					FROM = {
						reverse_war = {
							target = PREVPREV
							casus_belli = claim
							thirdparty_title = PREV
						}
					}
				}
			}
			if = {
				limit = {
					FROM = { NOT = { any_realm_title = { title = k_armenia } } }
					FROM = { any_realm_title = { title = d_armenia } }
				}
				d_armenia = {
					FROM = {
						reverse_war = {
							target = PREVPREV
							casus_belli = claim
							thirdparty_title = PREV
						}
					}
				}
			}
			if = {
				limit = {
					FROM = { NOT = { any_realm_title = { title =  k_armenia } } }
					FROM = { NOT = { any_realm_title = { title =  d_armenia } } }
					FROM = { any_realm_title = { title =  d_atropatene } }
				}
				d_atropatene = {
					FROM = {
						reverse_war = {
							target = PREVPREV
							casus_belli = claim
							thirdparty_title = PREV
						}
					}
				}
			}
		}
	}
}

# The Henotikon
narrative_event = {
	id = hist.9
	title = hist.9.name
	desc = hist.9.desc
	picture = GFX_evt_stone_church
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	option = {
		name = hist.9.a
		hidden_tooltip = {
			narrative_event = {
				id = hist.10 # The Henotikon Fails
				days = 30 random = 10
			} 
		}
		piety = 150
	}
	option = {
		name = hist.9.b
		piety = -250
		prestige = 50
	}
}

# The Henotikon Fails
narrative_event = {
	id = hist.10
	title = hist.10.name
	desc = {
		trigger = {
			has_landed_title = e_byzantium
		}
		text = hist.10.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = e_byzantium }
		}
		text = hist.10.desc.b
	}
	picture = GFX_evt_stone_church
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	immediate = { 
		religion_authority = {
			modifier = the_henotikon
			years = 40
		}
		narrative_event = {
			id = hist.11 # The Acacian Schism
			days =  730 # 2 years
			random = 30
		} 
	}
	
	option = {
		name = hist.10.a
		trigger = {
			has_landed_title = e_byzantium
			religion_group = christian
		}
		piety = -50
	}
	option = {
		name = hist.10.b
		trigger = {
			NOT = { religion_group = christian }
		}
	}
	option = {
		name = hist.10.c
		trigger = {
			religion_group = christian
			NOT = { has_landed_title = e_byzantium }
		}
	}
}

# The Acacian Schism
narrative_event = {
	id = hist.11
	title = hist.11.name
	desc = {
		trigger = {
			has_landed_title = e_byzantium
		}
		text = hist.11.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = e_byzantium }
		}
		text = hist.11.desc.b
	}
	picture = GFX_evt_great_schism
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	immediate = { 
		set_global_flag = acacian_schism
	}
	
	option = {
		name = hist.11.a
		trigger = {
			has_landed_title = e_byzantium
			religion_group = christian
		}
		piety = -50
	}
	option = {
		name = hist.11.b
		trigger = {
			NOT = { religion_group = christian }
		}
	}
	option = {
		name = hist.11.c
		trigger = {
			religion_group = christian
			NOT = { has_landed_title = e_byzantium }
		}
		piety = -50
	}
}

# The Leontius Revolt
character_event = {
	id = hist.12
	title = hist.12.name
	desc = hist.12.desc
	picture = GFX_evt_bandits
	
	only_playable = yes
	
	trigger = {
		year = 484
		has_landed_title = e_byzantium
		religion = nicene
		NOT = { year = 485 }
		NOT = { has_global_flag = leontius_revolt }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	
	immediate = {
		set_global_flag = leontius_revolt
	}
	
	option = {
		name = hist.12.a
		random_realm_province = {
			limit = {
				province_id = 764
			}
			hidden_tooltip = { province_event = { id = hist.13 } }
		}
	}
}

# Leontius and Company
province_event = {
	id = hist.13
	
	hide_window = yes
	
	is_triggered_only = yes

	immediate = {
		create_character = {
			random_traits = no
			dynasty = 1022182
			religion = ROOT
			culture = helleno_aramean
			age = 46
			female = no
			trait = sympathy_pagans
			trait = brave
			trait = diligent
			trait = cynical
			trait = proud
			trait = brilliant_strategist
			trait = aggressive_leader
			attributes = {
				diplomacy = 10
				martial = 10
				stewardship = 5
				intrigue = 6
				learning = 7
			}
		}
		new_character = {
			set_name = Leontius
			set_character_flag = is_leontius
			set_defacto_liege = THIS
			prestige = 100
			piety = 50
			add_claim = e_byzantium
			add_claim = k_oriens
			add_claim = k_egypt
			create_title = {
				tier = KING
				landless = yes
				temporary = yes
				culture = helleno_aramean
				#short_name = yes
				name = "THE_EMPIRE_IN_ANTIOCH"
				ruler = "LEONTIUS_EMPEROR"
				holder = THIS
			}
			spawn_unit = {
				owner = THIS
				leader = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 750 750 }
					knights = { 250 250 }
				}
				attrition = 1.0
			}
			spawn_unit = {
				owner = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 750 750 }
					knights = { 250 250 }
				}
				attrition = 1.0
			}
			spawn_unit = {
				owner = THIS
				province = ROOT
				home = ROOT
				troops = {
					archers = { 500 500 }
					light_infantry = { 750 750 }
					heavy_infantry = { 500 500 }
					light_cavalry = { 750 750 }
					knights = { 250 250 }
				}
				attrition = 1.0
			}
			
			if = {
				limit = {
					FROM = { any_realm_title = { title = e_byzantium } }
				}
				e_byzantium = {
					FROM = {
						reverse_war = {
							target = PREVPREV
							casus_belli = claim
							thirdparty_title = PREV
						}
					}
				}
			}
		}
	}
}

# 1st Lex Burgundionum
narrative_event = {
	id = hist.14
	title = hist.14.name
	desc = {
		trigger = {
			has_landed_title = k_maxima_sequanorum
		}
		text = hist.14.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = k_maxima_sequanorum }
		}
		text = hist.14.desc.b
	}
	picture = GFX_evt_stone_church
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	major_trigger = {
		OR = { 
			any_realm_province = { region = world_europe_west }
			any_realm_province = { region = world_europe_south }
		}
	}
	
	option = {
		name = hist.14.a
		trigger = {
			has_landed_title = k_maxima_sequanorum
		}
		piety = 150
		wealth = 50
	}
	
	option = {
		name = hist.14.b
		trigger = { 
			NOT = { has_landed_title = k_maxima_sequanorum }
			religion = arian 
		}
		piety = 50 
	}
	
	option = {
		name = hist.14.c
		trigger = {
			NOR = {
				has_landed_title = k_maxima_sequanorum
				religion = arian
			}
			religion_group = christian
		}
		piety = -50 
	}
	
	option = {
		name = hist.14.d
		trigger = {
			NOR = {
				has_landed_title = k_maxima_sequanorum
				religion_group = christian
			}
		}
	}
}

# hist.15 free

# Saxons take Deva Victrix
narrative_event = {
	id = hist.16
	title = hist.16.name
	desc = hist.16.desc
	picture = GFX_evt_castle_hill
	border = GFX_event_narrative_frame_war
	
	major = yes
	
	only_playable = yes
	culture_group = central_germanic
	
	trigger = {
		completely_controls = c_lancaster
		NOT = { has_global_flag = saxon_lancaster }
	}
	
	major_trigger = {
		ai = no
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		set_global_flag = saxon_lancaster
	}
	
	option = {
		name = hist.16.a
		trigger = {
			NOT = { culture_group = central_germanic }
		}
	}
	option = {
		name = hist.16.b
		trigger = {
			culture_group = central_germanic
		}
	}
}

# 2000th anniversary of the Gothic kingdom
narrative_event = {
	id = hist.17
	title = hist.17.name
	desc = {
		trigger = {
			has_landed_title = k_ostrogoths
		}
		text = hist.17.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = k_ostrogoths }
		}
		text = hist.17.desc.b
	}
	picture = GFX_evt_feast_gothic
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	major_trigger = {
		OR = { 
			any_realm_province = { region = world_europe_west }
			any_realm_province = { region = world_europe_south }
		}
	}

	option = {
		name = hist.17.a
		trigger = {
			has_landed_title = k_ostrogoths
		}
		prestige = 250
		any_realm_character	= {
			limit = {
				OR = {
					culture = romano_gothic
					culture = ostrogothic
				}
			}
			opinion = {
				modifier = opinion_twothousandth_anniversary_gothic_kingdom
				who = ROOT
				years = 10
			}
		}
	}
	
	option = {
		name = hist.17.b
		trigger = {
			OR = {
				culture = romano_gothic
				culture = ostrogothic
			}
			NOT = { has_landed_title = k_ostrogoths }
		}
		prestige = 50
	}
	
	option = {
		name = hist.17.c
		trigger = { 
			NOR = {
				culture = romano_gothic
				culture = ostrogothic
				has_landed_title = k_ostrogoths
			}
		}
	}
}

# hist.18 free

# Invention of the Greek fire
narrative_event = {
	id = hist.19
	title = hist.19.name
	desc = hist.19.desc
	picture = GFX_evt_greek_fire
	border = GFX_event_narrative_frame_war
	
	only_playable = yes
	has_dlc = "Legacy of Rome"

	trigger = {
		OR = {
			has_landed_title = e_byzantium
			has_landed_title = e_roman_empire
		}
		year = 650 # Around 674
		NOT = { has_global_flag = greek_fire_invented }
	}
	
	mean_time_to_happen = {
		months = 240
	}
	
	immediate = { 
		set_global_flag = greek_fire_invented
	}
	
	option = {
		name = hist.19.a
	}
}

# Foundation of the Benedictines
narrative_event = {
	id = hist.20
	title = hist.20.name
	desc = hist.20.desc
	picture = GFX_evt_stone_church
	border = GFX_event_narrative_frame_religion
	
	hide_from = yes
	
	only_playable = yes
	religion_group = christian
	has_dlc = "Mystics"
	
	trigger = {
		year = 525 # Around 529
		NOT = { has_global_flag = foundation_of_benedictines }
		religion = miaphysite
		controls_religion = yes
	}
	
	major = yes
	
	major_trigger = {
		religion_group = christian
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	immediate = {
		set_global_flag = foundation_of_benedictines
	}
	
	option = {
		name = hist.20.a
	}
}

# Form Frankish Kingdom
narrative_event = {
	id = hist.21
	title = hist.21.name
	desc = hist.21.desc
	picture = GFX_evt_nicene_preacher # Pharamond is the first mythical Frankish king
	border = GFX_event_narrative_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = hist.21.a
	}
}

# Rise of the Karaite Exilarch
narrative_event = {
	id = hist.22
	title = hist.22.name
	desc = hist.22.desc
	picture = GFX_evt_holy_jerusalem
	border = GFX_event_narrative_frame_religion
	
	hide_from = yes
	
	only_playable = yes
	
	trigger = {
		year = 760 # ca.760 - death of Jewish exilarch Shelomoh ben Ḥisdai II
		d_exilarch_karaite = { has_holder = no }
		d_exilarch = { has_holder = yes }
		NOT = { has_global_flag = karaite_exilarch }
		religion = miaphysite
		controls_religion = yes
	}
	
	major = yes
	
	major_trigger = {
		religion_group = jewish_group
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	immediate = {
		clr_global_flag = VIET_end_of_exilarch_karaite
		set_global_flag = karaite_exilarch
		activate_title = { title = d_exilarch_karaite status = yes }
		if = {
			limit = {
				c_1300076 = {
					is_alive = yes
					is_adult = yes
				}
			}
			c_1300076 = { #first historical Karaite Exilarch
				d_exilarch_karaite = {
					grant_title = PREV
				}
			}
		}
		if = {
			limit = {
				c_1300076 = {
					OR = {
						is_alive = no
						is_adult = no
					}
				}
			}
			create_character = {
				random_traits = yes
				dynasty = culture
				religion = karaite
				culture = aramean
				female = no
				age = 45
				trait = house_of_david
				employer = d_exilarch_karaite
			}
			new_character = {
				d_exilarch_karaite = {
					grant_title = PREV
				}
			}
		}
	}
	
	option = {
		name = hist.22.a
	}
}

# Domuit Vascones
narrative_event = {
	id = hist.23
	title = hist.23.name
	desc = hist.23.desc
	picture = GFX_evt_battle_visigothic
	border = GFX_event_narrative_frame_war
	
	ai = no

	trigger = {
		completely_controls = d_vasconia
		has_landed_title = k_visigoths
		NOT = { has_global_flag = domuit_vascones }
    }
	
    mean_time_to_happen = {
		days = 1
    }
	
    option = {
		name = hist.23.a
		set_global_flag = domuit_vascones
		prestige = 150
    }
}

# 526 Antioch earthquake
narrative_event = {
	id = hist.24
	title = hist.24.name
	desc = hist.24.desc
	picture = GFX_evt_falling_statue
	border = GFX_event_narrative_frame_diplomacy
	
	only_playable = yes
	
	major = yes

	trigger = {
		year = 526
		NOT = { has_global_flag = 526_antioch_earthquake }
		b_antiocheia = {
			holder_scope = { top_liege = { character = ROOT } }
		}
	}
	
    mean_time_to_happen = {
        months = 3
	}
	
	immediate = {
		set_global_flag = 526_antioch_earthquake
	}
    option = {
		name = hist.24.a
		
		trigger = {
			b_antiocheia = {
				holder_scope = { top_liege = { character = ROOT } }
			}
		}
		
		b_antiocheia = {
			destroy_random_building = yes
			destroy_random_building = yes
			destroy_random_building = yes
			destroy_random_building = yes
			destroy_random_building = yes
			location = {
				add_province_modifier = { name = horrible_earthquake duration = 730 }
			}
		}
	}
	option = {
		name = hist.24.b #we must send help
		trigger = {
			b_antiocheia = {
				holder_scope = { top_liege = { character = ROOT } }
			}
		}
		
		b_antiocheia = {
			destroy_random_building = yes
			destroy_random_building = yes
			location = {
				add_province_modifier = { name = horrible_earthquake duration = 365 }
			}
		}
		scaled_wealth = -0.25
		piety = 200
	}
	
	option = {
		name = hist.24.c
		trigger = {
			NOT = { b_antiocheia = { holder_scope = { top_liege = { character = ROOT } } } }
		}
	}
}

# Lex Visigothorum
narrative_event = {
	id = hist.25
	title = hist.25.name
	desc = {
		trigger = {
			has_landed_title = k_visigoths
		}
		text = hist.25.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = k_visigoths }
		}
		text = hist.25.desc.b
	}
	picture = GFX_evt_stone_church
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	major_trigger = {
		OR = { 
			any_realm_province = { region = world_europe_west }
			any_realm_province = { region = world_europe_south }
		}
	}
	
	option = {
		name = hist.25.a
		trigger = {
			has_landed_title = k_visigoths
		}
		piety = 150
		wealth = 50
	}
	
	option = {
		name = hist.25.b
		trigger = { 
			has_romance_culture_trigger = yes
			NOT = { has_landed_title = k_visigoths }
		}
		prestige = -50 
	}
	
	option = {
		name = hist.25.c
		trigger = { 
			has_germanic_culture_trigger = yes
			NOT = { has_landed_title = k_visigoths }
		}
		prestige = 50 
	}
	
	option = {
		name = hist.25.d
		trigger = {
			has_romance_culture_trigger = no
			has_germanic_culture_trigger = no
			NOT = { has_landed_title = k_visigoths }
		}
	}
}

# Resolution of Acacian Schism
narrative_event = {
	id = hist.26
	title = hist.26.name
	desc = {
		trigger = {
			has_landed_title = e_byzantium
		}
		text = hist.26.desc.a
	}
	desc = {
		trigger = {			
			NOT = { has_landed_title = e_byzantium }
		}
		text = hist.26.desc.b
	}
	picture = GFX_evt_stone_church 
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	major = yes
	
	option = {
		name = hist.26.a
	}
}

# Platonic Academy closed
narrative_event = {
	id = hist.27
	title = hist.27.name
	desc = hist.27.desc
	picture = GFX_evt_roman_temple 
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	
	major = yes
	
	option = {
		name = hist.27.a
		trigger = { 
			religion_group = christian 
		}
		piety = 50
	}
	
	option = {
		name = hist.27.b
		trigger = { 
			religion_openly_in_hellenic_subgroup_trigger = yes 
		}
		piety = -50
	}
	
	option = {
		name = hist.27.c
		trigger = {
			NOT = { religion_group = christian }
			religion_openly_in_hellenic_subgroup_trigger = no 
		}
	}
	
	option = {
		name = hist.27.d
		trigger = { 
			has_landed_title = e_persia 
		}
		prestige = 50
		scaled_wealth = -0.01
		custom_tooltip = { 
			text = hist.27.d.tooltip
		}
	}
}

# Extreme weather events of 535-536
narrative_event = {
	id = hist.28
	title = hist.28.name
	desc = hist.28.desc
	picture = GFX_evt_autumn_harvest
	border = GFX_event_narrative_frame_diplomacy
	
	only_playable = yes
	major = yes
	
	hide_from = yes

	is_triggered_only = yes #on_action
	
	trigger = {
		year = 536
		NOT = { has_global_flag = 535_536_weather_events }
		owns = 496 #provinces are always held by someone
	}
	
    option = {
		name = hist.28.a
		set_global_flag = 535_536_weather_events
		any_realm_province = { add_province_modifier = { name = failed_crops duration = 3650 } }
    }
}

# Form the Provincia Spaniae
narrative_event = {
	id = hist.29
	title = hist.29.name
	desc = hist.29.desc
	picture = GFX_evt_nicene_preacher 
	border = GFX_event_narrative_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = hist.29.a
	}
}

# Unification of England
narrative_event = {
	id = hist.30
	title = hist.30.name
	desc = hist.30.desc
	picture = GFX_evt_coming_home

 	is_triggered_only = yes
 	
	option = {
		name = hist.30.a
		prestige = 300
		piety = 200
		primary_title = {
			 k_england = {
				grant_title = ROOT
				copy_title_laws = PREV
			}
		}
		give_nickname = nick_the_great
		k_britannia_secunda = {
			any_direct_de_jure_vassal_title = {
				de_jure_liege = k_england
			}
		}
		k_britannia_prima = {
			any_direct_de_jure_vassal_title = {
				de_jure_liege = k_england
			}
		}
		k_england = {
			de_jure_liege = e_britannia
		}
		if = {
			limit = {
				tier = king
				primary_title = {
					NOT = { title = k_england }
				}
			}
			k_england = { make_primary_title = yes }
		}
		if = {
			limit = {
				has_landed_title = k_britannia_secunda
			}
			k_britannia_secunda = { destroy_landed_title = THIS }
		}
		if = {
			limit = {
				has_landed_title = k_britannia_prima
			}
			k_britannia_prima = { destroy_landed_title = THIS }
		}
		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					capital_scope = {
						region = world_europe_west_brittania
					}
				}
				narrative_event = { id = hist.31 }
			}
		}
	}

}

narrative_event = {
	id = hist.31
	title = hist.31.name
	desc = hist.31.desc
	picture = GFX_evt_garden

 	is_triggered_only = yes

	option = {
		name = hist.30.a
		trigger = {
			OR = {
				culture = anglo
				culture = old_saxon
				culture = jute
				culture = saxon
				culture = english
			}
		}
	}
	option = {
		name = hist.31.b
		trigger = {
			OR = {
				culture_group = celtic
				culture = romano_british
			}
		}
	}
	option = {
		name =  hist.31.c
		trigger = {
			NOR = {
				culture = anglo
				culture = old_saxon
				culture = jute
				culture = saxon
				culture = english
				culture_group = celtic
				culture = romano_british
			}
		}
	}
}