namespace = discontinue
narrative_event = {	#help event
	id = discontinue.0
	title = EVTNAMEDISC0
	desc = EVTDESCDISC0
	picture = GFX_evt_death
	is_triggered_only = yes
	option = {
		name = EVTOPTADISC0
	}
}
character_event = {	#new rulers get flagged for potential switch - highest priority within first week of rule
	id = discontinue.1
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	trigger = {
		is_playable = yes #In theory, restricts to landed, count+, dlc-compatible rulers. In theory.
		num_of_count_titles = 1 	#drew faux-landed in testing
		mercenary = no	#See above
		holy_order = no #See above
		is_theocracy = no #apparently theocracy counts as playable (???)
		ai = yes
		NOR = {
			has_global_flag = discontinuity_off 
			is_playable = no #restricts to at DLC-compatible counts and above
			any_demesne_title = { ruled_years = 1 }	#doesn't fire if merely added a title to old ones
			has_character_flag = discontinuous_ruler_1 #just in case conquer something in first year
			has_character_flag = discontinuous_ruler_2 #just in case conquer something in first year
			has_character_flag = discontinuous_ruler_3 #just in case conquer something in first year
			has_character_flag = discontinuous_ruler_4 #just in case conquer something in first year
			has_character_flag = discontinuous_ruler_5 #just in case conquer something in first year
		}
	}
	mean_time_to_happen = {
		days = 0
	}
	option = {
		name = EVTOPTADISC1
		set_character_flag = discontinuous_ruler_1
		character_event = { id = discontinue.2 days = 7 } #demote priority after 7 Days
	}
}
character_event = {
	id = discontinue.2
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC1
		clr_character_flag = discontinuous_ruler_1
		set_character_flag = discontinuous_ruler_2
		character_event = { id = discontinue.3 days = 23 } #demote priority after 30 days
	}
}
character_event = {
	id = discontinue.3
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC1
		clr_character_flag = discontinuous_ruler_2
		set_character_flag = discontinuous_ruler_3
		character_event = { id = discontinue.4 days = 60 } #demote priority after 90 days
	}
}
character_event = {
	id = discontinue.4
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC1
		clr_character_flag = discontinuous_ruler_3
		set_character_flag = discontinuous_ruler_4
		character_event = { id = discontinue.5 days = 90 } #demote priority after 180 days
	}
}
character_event = {
	id = discontinue.5
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC1
		clr_character_flag = discontinuous_ruler_4
		set_character_flag = discontinuous_ruler_5
		character_event = { id = discontinue.6 days = 185 } #dispose of after 365 days
	}
}
character_event = {
	id = discontinue.6
	desc = EVTDESCDISC1
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC1
		clr_character_flag = discontinuous_ruler_5
	}
}
character_event = {
	id = discontinue.9
	title = EVTNAMEDISC9
	desc = EVTDESCDISC9
	#hide_window = yes
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { 
		NOT = { has_global_flag = discontinuity_off } 
		ai = no
	}
	immediate = { current_heir = { character_event = { id = discontinue.10 days = 1 } }  }
	option = { name = EVTOPTADISC9 }
}

narrative_event = {	#pings possible new rulers
	id = discontinue.10
	title = EVTNAMEDISC10
	desc = EVTDESCDISC10
	picture = GFX_evt_death
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC10
		trigger = {
			any_playable_ruler = {
				has_character_flag = discontinuous_ruler_1
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}
			}
		}
		random_playable_ruler = {
			limit = { 
				has_character_flag = discontinuous_ruler_1
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}
			}
			letter_event = { id = discontinue.20 }	#we found one!
		}
	}
	option = {
		name = EVTOPTADISC10
		trigger = {
			NOT = {
				any_playable_ruler = {
					has_character_flag = discontinuous_ruler_1	
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

				}
			}
			any_playable_ruler = {
				has_character_flag = discontinuous_ruler_2
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
		}
		random_playable_ruler = {
			limit = { 
				has_character_flag = discontinuous_ruler_2
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
			letter_event = { id = discontinue.20 }	#we found one!
		}
	}
	option = {
		name = EVTOPTADISC10
		trigger = {
			NOT = {
				any_playable_ruler = {
					OR = {
						has_character_flag = discontinuous_ruler_1	
						has_character_flag = discontinuous_ruler_2
					}
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

				}
			}
			any_playable_ruler = {
				has_character_flag = discontinuous_ruler_3
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
		}
		random_playable_ruler = {
			limit = { 
				has_character_flag = discontinuous_ruler_3 
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
			letter_event = { id = discontinue.20 }	#we found one!
		}
	}
	option = {
		name = EVTOPTADISC10
		trigger = {
			NOT = {
				any_playable_ruler = {
					OR = {
						has_character_flag = discontinuous_ruler_1	
						has_character_flag = discontinuous_ruler_2
						has_character_flag = discontinuous_ruler_3
					}
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

				}
			}
			any_playable_ruler = {
				has_character_flag = discontinuous_ruler_4
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
		}
		random_playable_ruler = {
			limit = { 
				has_character_flag = discontinuous_ruler_4 
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
			letter_event = { id = discontinue.20 }	#we found one!
		}
	}
	option = {
		name = EVTOPTADISC10
		trigger = {
			NOT = {
				any_playable_ruler = {
					OR = {
						has_character_flag = discontinuous_ruler_1	
						has_character_flag = discontinuous_ruler_2
						has_character_flag = discontinuous_ruler_3
						has_character_flag = discontinuous_ruler_4
					}
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

				}
			}
			any_playable_ruler = {
				has_character_flag = discontinuous_ruler_5
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
		}
		random_playable_ruler = {
			limit = { 
				has_character_flag = discontinuous_ruler_5
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

			}
			letter_event = { id = discontinue.20 }	#we found one!
		}
	}
	option = {
		name = EVTOPTBDISC10
		trigger = {
			NOT = {
				any_playable_ruler = {
					OR = {
						has_character_flag = discontinuous_ruler_1	
						has_character_flag = discontinuous_ruler_2
						has_character_flag = discontinuous_ruler_3
						has_character_flag = discontinuous_ruler_4
						has_character_flag = discontinuous_ruler_5
					}
				OR = {
					religion_group = ROOT
					NOT = { has_global_flag = disc_religion_group }
				}
				OR = {
					religion = ROOT
					NOT = { has_global_flag = disc_religion }
				}
				NAND = {
					is_feudal = yes
					has_global_flag = disc_feudal
				}
				NAND = {
					is_tribal = yes
					has_global_flag = disc_tribal
				}
				NAND = {
					is_republic = yes
					has_global_flag = disc_republic
				}
				NAND = {
					is_nomadic = yes
					has_global_flag = disc_nomadic
				}
				OR = {
					age = 12
					NOT = { has_global_flag = disc_12_min }
				}
				OR = {
					age = 16
					NOT = { has_global_flag = disc_16_min }
				}
				OR = {
					age = 20
					NOT = { has_global_flag = disc_20_min }
				}
				OR = {
					age = 30
					NOT = { has_global_flag = disc_30_min }
				}
				OR = {
					age = 40
					NOT = { has_global_flag = disc_40_min }
				}
				OR = {
					age = 50
					NOT = { has_global_flag = disc_50_min }
				}
				NAND = {
					age = 13
					has_global_flag = disc_12_max
				}
				NAND = {
					age = 17
					has_global_flag = disc_16_max
				}
				NAND = {
					age = 21
					has_global_flag = disc_20_max
				}
				NAND = {
					age = 31
					has_global_flag = disc_30_max
				}
				NAND = {
					age = 41
					has_global_flag = disc_40_max
				}
				NAND = {
					age = 51
					has_global_flag = disc_50_max
				}

				}
			}
		}
		character_event = { id = discontinue.10 }
	}
	option = {
		name = EVTOPTCDISC10
	}



}
letter_event = {
	id = discontinue.20
	desc = EVTDESCDISC20
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC20
		FROM = { letter_event = { id = discontinue.21 } }
		clr_character_flag = discontinuous_ruler_1	
		clr_character_flag = discontinuous_ruler_2	
		clr_character_flag = discontinuous_ruler_3	
		clr_character_flag = discontinuous_ruler_4	
		clr_character_flag = discontinuous_ruler_5	
	}
}
letter_event = {
	id = discontinue.21
	desc = EVTDESCDISC21
	is_triggered_only = yes
	trigger = { NOT = { has_global_flag = discontinuity_off } }
	option = {
		name = EVTOPTADISC21
	}
	option = {
		name = EVTOPTBDISC21
		character_event = { id = discontinue.10 }
	}
}

		
