###########################
# GOE Events
###########################

add_namespace = GOE_generic_events


# French Government Collapses
country_event = {
	id = GOE_generic_events.1
	title = GOE_generic_events.1.t
	desc = GOE_generic_events.1.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# Support Vichy
	option = {
		name = GOE_generic_events.1.a
		trigger = { 
			surrender_progress < 0.30
		}
		ai_chance = {
			base = 10
		}
		# Syria supports us
		hidden_effect = {
			OVERLORD = {
				end_puppet = ROOT
			}
			drop_cosmetic_tag = yes
			IF = {
				limit = {
					original_tag = SYR
				}
				set_cosmetic_tag = SYR_vichy
			}
			IF = {
				limit = {
					original_tag = LEB
				}
				set_cosmetic_tag = LEB_vichy
			}
		}
		VIC = {
			country_event = {
				id = GOE_generic_events.2
				hours = 1
			}
			puppet = ROOT
		}
	}	
	# Support Free France
	option = {
		name = GOE_generic_events.1.b
		trigger = { 
			surrender_progress < 0.80
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				is_historical_focus_on = no
			}
		}
		# Syria supports us
		FRA = {
			country_event = {
				id = GOE_generic_events.2
				hours = 1
			}
		}
		# Syria betrays us
		VIC = {
			country_event = {
				id = GOE_generic_events.3
				hours = 1
			}
		}
		custom_effect_tooltip = GOE_generic_events_1_tt
	}
	# Declare Independence
	option = {
		name = GOE_generic_events.1.c
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				is_historical_focus_on = no
			}
			modifier = {
				add = 50
				surrender_progress > 0.30
			}
		}
		# Syria betrays us
		VIC = {
			country_event = {
				id = GOE_generic_events.4
				hours = 1
			}
		}
		OVERLORD = {
			end_puppet = ROOT
		}
		drop_cosmetic_tag = yes
		custom_effect_tooltip = GOE_generic_events_1_tt
	}
}

# Syria/Lebanon stays loyal to us
country_event = {
	id = GOE_generic_events.2
	title = GOE_generic_events.2.t
	desc = GOE_generic_events.2.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# ok
	option = {
		name = GOE_generic_events.2.a
		ai_chance = {
			base = 10
		}
	}	
}

# Syria/Lebanon betray us
country_event = {
	id = GOE_generic_events.3
	title = GOE_generic_events.3.t
	desc = GOE_generic_events.3.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# DoW FROM
	option = {
		name = GOE_generic_events.3.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				is_historical_focus_on = yes
			}
		}
		add_ai_strategy = { 
			type = conquer 
			id = FROM
			value = 100
		}
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
		FROM = {
			country_event = {
				id = GOE_generic_events.5
				hours = 1
			}
		}
	}	
	# Oh well
	option = {
		name = GOE_generic_events.3.b
		ai_chance = {
			base = 10
		}
	}
}

# Syria/Lebanon declare independence
country_event = {
	id = GOE_generic_events.4
	title = GOE_generic_events.4.t
	desc = GOE_generic_events.4.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# DoW FROM
	option = {
		name = GOE_generic_events.4.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				is_historical_focus_on = no
			}
		}
		add_ai_strategy = { 
			type = conquer 
			id = FROM
			value = 100
		}
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
		FROM = {
			country_event = {
				id = GOE_generic_events.5
				hours = 1
			}
		}
	}	
	# Oh well
	option = {
		name = GOE_generic_events.4.b
		ai_chance = {
			base = 10
		}
	}
}

# France declares war upon us
country_event = {
	id = GOE_generic_events.5
	title = GOE_generic_events.5.t
	desc = GOE_generic_events.5.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# ok
	option = {
		name = GOE_generic_events.5.a
		ai_chance = {
			base = 10
		}
		add_war_support = 0.1
		add_political_power = 50
	}	
}