namespace = "fo_debugles"

country_event = {
	id = fo_debugles.1
	title = fo_debugles.1.t
	desc = fo_debugles.1.d
	picture = EXPLORERS_eventPicture
	
	hidden = yes
	
	trigger = {
		is_year = 1515
		NOT = { reform_desire = 1 }
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = {
		name = fo_debugles.1.a
		add_reform_desire = 0.1
	}
}

country_event = {
	id = fo_debugles.2
	title = fo_debugles.2.t
	desc = fo_debugles.2.d
	picture = EXPLORERS_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = fo_debugles.2.a
		capital_scope = {
			region = {
				add_permanent_claim = ROOT
			}
		}
	}
}

country_event = {
	id = fo_debugles.3
	title = fo_debugles.3.t
	desc = fo_debugles.3.d
	picture = EXPLORERS_eventPicture
	
	hidden = yes
	trigger = { exists = yes }
	is_triggered_only = yes
	
	option = {
		name = fo_debugles.3.a
		
		if = {
			limit = {
				capital_scope = {
					continent = europe
				}
			}
			europe = {
				discover_country = ROOT
			}
		}
		
		if = {
			limit = {
				capital_scope = {
					continent = asia
				}
			}
			asia = {
				discover_country = ROOT
			}
		}
		
		if = {
			limit = {
				capital_scope = {
					continent = africa
				}
			}
			africa = {
				discover_country = ROOT
			}
		}
		
		if = {
			limit = {
				capital_scope = {
					continent = north_america
				}
			}
			north_america = {
				discover_country = ROOT
			}
		}
	
		if = {
			limit = {
				capital_scope = {
					continent = south_america
				}
			}
			south_america = {
				discover_country = ROOT
			}
		}
		
		if = {
			limit = {
				capital_scope = {
					continent = oceania
				}
			}
			oceania = {
				discover_country = ROOT
			}
		}
	}
}

country_event = {
	id = fo_debugles.4
	title = fo_debugles.4.t
	desc = fo_debugles.4.d
	picture = EXPLORERS_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = fo_debugles.4.a
		
		hidden_effect = {
			south_america = {
				cede_province = ---
				if = {
					limit = { has_building = fort_15th }
					remove_building = fort_15th
				}
			}		
			north_america = {
				cede_province = ---
					if = {
						limit = { has_building = fort_15th }
						remove_building = fort_15th
					}
			}		
			oceania = {
				cede_province = ---
				if = {
					limit = { has_building = fort_15th }
					remove_building = fort_15th
				}
			}
		}
	}
}

country_event = {
	id = fo_debugles.5
	title = fo_debugles.5.t
	desc = fo_debugles.5.d
	picture = NOBLE_ESTATE_DEMANDS_eventPicture
	fire_only_once = yes
	trigger = {
		exists = yes
	}
	hidden = yes
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = fo_debugles.5.a 
		
		every_country = {
			country_event = { id = fo_debugles.3 }
		}
	}
}

country_event = {
	id = fo_debugles.6
	title = fo_debugles.6.t
	desc = fo_debugles.6.d
	picture = NOBLE_ESTATE_DEMANDS_eventPicture
	is_triggered_only = yes
	trigger = {
		exists = yes
		has_global_flag = fo_yearly_claims_flag
	}
	hidden = yes
	
	option = {
		name = fo_debugles.6.a 
		every_neighbor_province = {
			limit = {
				NOT = { is_core = ROOT }
			}
			add_core = ROOT
		}
	}
}

country_event = {
	id = fo_debugles.7
	title = fo_debugles.7.t
	desc = fo_debugles.7.d
	picture = NOBLE_ESTATE_DEMANDS_eventPicture
	is_triggered_only = yes
	trigger = {
		exists = yes
		has_global_flag = fo_bi_yearly_claims_flag
	}
	hidden = yes
	
	option = {
		name = fo_debugles.7.a 
		every_neighbor_province = {
			limit = {
				NOT = { is_core = ROOT }
			}
			add_core = ROOT
		}
	}
}

country_event = {
	id = fo_debugles.8
	title = fo_debugles.8.t
	desc = fo_debugles.8.d
	picture = NOBLE_ESTATE_DEMANDS_eventPicture
	is_triggered_only = yes
	trigger = {
		exists = yes
		has_global_flag = fo_five_yearly_claims_flag
	}
	hidden = yes
	
	option = {
		name = fo_debugles.8.a 
		every_neighbor_province = {
			limit = {
				NOT = { is_core = ROOT }
			}
			add_core = ROOT
		}
	}
}

country_event = {
	id = fo_debugles.9
	title = fo_debugles.9.t
	desc = fo_debugles.9.d
	picture = NOBLE_ESTATE_DEMANDS_eventPicture
	is_triggered_only = yes

	
	option = {
		name = fo_debugles.9.a 
		
		set_global_flag = fo_yearly_claims_flag
	}
	option = {
		name = fo_debugles.9.b 
		
		set_global_flag = fo_bi_yearly_claims_flag
	}
	option = {
		name = fo_debugles.9.c 
		
		set_global_flag = fo_five_yearly_claims_flag
	}
}
