###############################################################
# Flavor Events for Greece
#
# written by Henrik Lohmander
###############################################################

namespace = flavor_gre
normal_or_historical_nations = yes

# Greek Cores
country_event = {
	id = flavor_gre.1
	title = "flavor_gre.1.t"
	desc = "flavor_gre.1.d"
	picture = ANGRY_MOB_eventPicture
	
	trigger ={
		NOT = { exists = GRE }
		NOT = { exists = BYZ }
		NOT = { has_global_flag = greek_cores }
		NOT = { primary_culture = greek }
		NOT = { primary_culture = pontic_greek }
		adm_tech = 65
		any_owned_province = {
			culture = greek
			OR = {
				area = morea_area
				area = northern_greece_area
				area = macedonia_area
			}
		}
   	}
	
	mean_time_to_happen = {
		months = 120
	}

	option = {		#Ok
		name = "flavor_gre.1.a"
		trigger = { NOT = { has_country_flag = greek_information } }
		set_global_flag = greek_cores
		every_province = {
			limit = {
				OR = {
					area = macedonia_area
					area = morea_area
					area = northern_greece_area
				}
			}
			add_core = GRE
		}
		if = {
			limit = {
				1853 = {
					NOT = { culture = greek }
				}
			}
			1853 = {
				change_culture = greek
			}
		}
		if = {
			limit = {
				1853 = {
					owner = {
						NOT = { primary_culture = greek }
						NOT = { primary_culture = pontic_greek }
					}
				}
			}
			1853 = {
				add_unrest = 4
			}
		}
		every_province = {
			limit = {
				is_core = BYZ
			}
			remove_core = BYZ
		}
		hidden_effect = {
			every_known_country = {
				limit = {
					any_owned_province = {
						OR = {
							area = northern_greece_area
							area = morea_area
							area = macedonia_area
						}
					}
				}
				set_country_flag = greek_information
				country_event = { id = flavor_gre.1 }
			}
		}
	}
	option = {		#Ok
		name = "flavor_gre.1.a"
		trigger = {
			has_country_flag = greek_information
			NOT = { primary_culture = greek }
			NOT = { primary_culture = pontic_greek }
		}
		tooltip = {
			every_province = {
				limit = {
					OR = {
						area = macedonia_area
						area = northern_greece_area
						area = morea_area
					}
				}
				add_core = GRE
			}
		}
		if = {
			limit = { owns = 1853 }
			tooltip = {
				1853 = {
					add_unrest = 4
				}
			}
		}
		if = {
			limit = {
				owns = 1853
				1853 = { NOT = { culture = greek } }
			}
			tooltip = {
				1853 = {
					change_culture = greek
				}
			}
		}
	}
	option = {		#Ok
		name = "flavor_gre.1.a"
		trigger = {
			has_country_flag = greek_information
			OR = {
				primary_culture = greek
				primary_culture = pontic_greek
			}
		}
		tooltip = {
			every_province = {
				limit = {
					OR = {
						area = morea_area
						area = macedonia_area
						area = northern_greece_area
					}
				}
				add_core = GRE
			}
		}
	}
}
