namespace = ORDERUE

character_event = {
    id = ORDERUE.1
    desc = EVTDESCORDERDEM.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAORDERDEM.1
		e_european_union = {
			grant_title = PREV
			hidden_tooltip = { make_primary_title = yes }
		}
		set_government_type = democracy_government
		add_law = succ_democracy
		any_vassal = {
			limit = {
				government = feudal_government
				religion_group = capitalist
			}
			set_government_type = democracy_government
			add_law = succ_democracy
		}
	}	
}

character_event = {
    id = ORDERUE.2
    desc = EVTDESCORDERDEM.1A
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1A
	
	trigger= {
		religion_group = capitalist
		has_landed_title = e_european_union
		has_landed_title = e_germany
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAORDERDEM.1A
		e_germany = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.3
    desc = EVTDESCORDERDEM.1A
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1A
	
	trigger= {
		religion_group = capitalist
		has_landed_title = e_european_union
		has_landed_title = e_france
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAORDERDEM.1A
		e_france = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.4
    desc = EVTDESCORDERDEM.1A
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1A
	
	trigger= {
		has_landed_title = e_european_union
		has_landed_title = e_hre
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAORDERDEM.1A
		e_hre = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.5
    desc = EVTDESCORDERDEM.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAORDERDEM.1
		e_european_union = {
			grant_title = FROM
			add_law = succ_democracy
			hidden_tooltip = { make_primary_title = yes }
		}
		set_government_type = democracy_government
		any_independent_ruler = {
			limit = {
				eligible_to_ue_trigger = yes
				any_realm_province = {
					any_neighbor_province = {
						owner = {
							top_liege = {
								character = FROM
							}
						}
					}
				}
				opinion = { 
					who = FROM
					value = 30 
				}
			}
			set_defacto_liege = FROM
		}
		any_vassal = {
			limit = {
				government = feudal_government
				religion_group = capitalist
			}
			set_government_type = democracy_government
			primary_title = {
				add_law = succ_democracy
			}
		}
	}
}
	
character_event = {
    id = ORDERUE.6
    desc = EVTDESCORDERUE.1
	picture = GFX_ask_to_join_eu
	
	trigger = {
		has_character_flag = asked_for_eu
	}
	
	mean_time_to_happen = {
		weeks = 2
	}
	
	option = {
		name = EVTOPTAORDERUE.1
		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = kind
			}
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 3
				trait = zealous
			}
		}
		any_independent_ruler = {
			limit = {
				has_character_flag = asking_for_eu
			}
			set_defacto_liege = FROM
			clr_character_flag = asking_for_eu
			set_character_flag = eu_acceptance
			opinion = {
				who = FROM
				modifier = opinion_accepted_join_eu
				years = 20
			}
		}
		clr_character_flag = asked_for_eu
	}
	
	option = {
		name = EVTOPTAORDERUE.2
		ai_chance = {
			factor = 0
			modifier = {
				factor = 1
				trait = paranoid
				}
			modifier = {
				factor = 2
				trait = wroth 
			}
			modifier = {
				factor = 2
				trait = greedy
			}
			modifier = {
				factor = 3
				NOT = { religion_group = capitalist }
			}
		}
		any_independent_ruler = {
			limit = {
				has_character_flag = asking_for_eu
			}
			clr_character_flag = asking_for_eu
			set_character_flag = refused_for_eu
			set_character_flag = eu_refusal
			opinion = {
				who = FROM
				modifier = opinion_refused_join_eu
				years = 20
			}
		}
		clr_character_flag = asked_for_eu
	}
}

character_event = {
    id = ORDERUE.7
    desc = EVTDESCORDERDEM.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1
	
	trigger = {
		has_character_flag = eu_acceptance
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = HOURRA
		clr_character_flag = eu_acceptance
	}
}

character_event = {
    id = ORDERUE.8
    desc = EVTDESCORDERUE.2
	picture = GFX_eu_acceptance
	
	trigger = {
		has_character_flag = eu_acceptance
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = HOURRA
		clr_character_flag = eu_acceptance
	}
}

character_event = {
    id = ORDERUE.9
    desc = EVTDESCORDERUE.3
	picture = GFX_eu_refusal
	
	trigger = {
		has_character_flag = eu_refusal
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = DAMN
		clr_character_flag = eu_refusal
	}
}

character_event = {
    id = ORDERUE.10
    desc = EVTDESCORDERDEM.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAORDERDEM.1
		e_byzantin_union = {
			grant_title = PREV
			hidden_tooltip = { make_primary_title = yes }
		}
		set_government_type = democracy_government
		add_law = succ_democracy
		any_vassal = {
			limit = {
				government = feudal_government
				religion_group = capitalist
			}
			set_government_type = democracy_government
			add_law = succ_democracy
		}
	}	
}

character_event = {
    id = ORDERUE.11
    desc = EVTDESCORDERDEM.1A
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1A
	
	trigger= {
		religion_group = capitalist
		has_landed_title = e_byzantin_union
		has_landed_title = e_byzantium
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAORDERDEM.1A
		e_byzantium = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.12
    desc = EVTDESCORDERDEM.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAORDERDEM.1
		e_union_jack = {
			grant_title = PREV
			hidden_tooltip = { make_primary_title = yes }
		}
		set_government_type = democracy_government
		add_law = succ_democracy
		any_vassal = {
			limit = {
				government = feudal_government
				religion_group = capitalist
			}
			set_government_type = democracy_government
			add_law = succ_democracy
		}
	}	
}

character_event = {
    id = ORDERUE.13
    desc = EVTDESCORDERDEM.1A
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEORDERDEM.1A
	
	trigger= {
		religion_group = capitalist
		has_landed_title = e_britannia
		has_landed_title = e_union_jack
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAORDERDEM.1A
		e_britannia = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.14
    desc = EVTDESCBACKTO.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEBACKTO.1
	
	trigger= {
		NOT = { religion_group = capitalist }
		has_landed_title = e_european_union
		has_landed_title = e_germany
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = OK
		e_european_union = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.15
    desc = EVTDESCBACKTO.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEBACKTO.1
	
	trigger= {
		NOT = { religion_group = capitalist }
		has_landed_title = e_european_union
		has_landed_title = e_france
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = OK
		e_european_union = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.16
    desc = EVTDESCBACKTO.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEBACKTO.1
	
	trigger= {
		NOT = { religion_group = capitalist }
		has_landed_title = e_european_union
		has_landed_title = e_hre
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = OK
		e_european_union = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.17
    desc = EVTDESCBACKTO.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEBACKTO.1
	
	trigger= {
		NOT = { religion_group = capitalist }
		has_landed_title = e_byzantin_union
		has_landed_title = e_byzantium
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = OK
		e_byzantin_union = {
			destroy_landed_title = THIS
		}
	}
}

character_event = {
    id = ORDERUE.18
    desc = EVTDESCBACKTO.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEBACKTO.1
	
	trigger= {
		NOT = { religion_group = capitalist }
		has_landed_title = e_union_jack
		has_landed_title = e_britannia
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = OK
		e_union_jack = {
			destroy_landed_title = THIS
		}
	}
}