#Written by Dub
namespace = culture_creoles

province_event = { #1 The Greek Language is settling in [ROOT.GetName]
	id = culture_creoles.1
	title = "culture_creoles.1.t" 
	desc = "culture_creoles.1.d"
	picture = RELIGIOUS_CONVERSION_eventPicture
	
	hidden = yes
	trigger = {
		NOT = { nationalism = 1 } #Cannot have nationalism
		has_owner_religion = yes
		NOT = { culture_group = byzantine } #Doesn't occur to Hellenic cultures.
		NOT = { #Doesn't occur if the overlord of the owner of the province accepts the culture in the province.
			owner = {
				overlord = {
					accepted_culture = ROOT
				}
			}
		}
		OR = {  #CI Compat - disable event in CI
			NOT = { has_global_flag = cultural_influence_installed_flag }
			has_global_flag = CI_events_disabled
		}
		owner = {
			#If Hellenic Exarchate
			culture_group = byzantine
			has_reform = exarchate_reform
			#Only triggers if AI, as player can culture-convert.
			ai = yes
			adm_power = 100 #Because for some weird reason, culture conversions using the below effect uses admin points and not diplo points.
		}
		NOT = { has_construction = culture } #Don't want to convert something that is already being converted.
	}

	mean_time_to_happen = {
		years = 10
		modifier = {
			factor = 0.5
			#Assimilation happens faster if neighboring assimilated province
			any_neighbor_province = {
				culture_group = byzantine
			}
		}
		#Stolen from BT colonial cultures.
		modifier = { #Larger settlements convert more slowly
			factor = 1.2
			development = 5
		}
		modifier = { #Larger settlements convert more slowly
			factor = 1.2
			development = 10
		}
		modifier = { #Larger settlements convert more slowly
			factor = 1.2
			development = 20
		}
	}
	#There is no reason as to why the AI should say no to this.
	option = { #Great!
		name = "culture_creoles.1.a"
		add_culture_construction = {
			speed = 1
			cost = 1
		}
	}
}

#Deprecated.
# province_event = { #2 The population in [Root.GetName] resist our rule!
	# id = culture_creoles.2
	# title = "culture_creoles.2.t" 
	# desc = "culture_creoles.2.d"
	# picture = REVOLT_eventPicture
	
	# trigger = {
		# NOT = { nationalism = 1 } #Cannot have nationalism, as to compete with the above event.
		# NOT = { culture_group = byzantine } #Doesn't occur to Hellenic cultures.
		# NOT = { #Doesn't occur if the overlord of the owner of the province accepts the culture in the province.
			# owner = {
				# overlord = {
					# accepted_culture = ROOT
				# }
			# }
		# }
		# owner = {
			# #If Hellenic Exarchate
			# culture_group = byzantine
			# if = {
				# limit = {
					# has_dlc = "Dharma"
				# }
				# has_reform = exarchate_reform
			# }
			# else = { #I hope this works. Non-Dharma users will have to report about this.
				# government = exarchate_legacy
			# }
			# #Only triggers if AI, as player can culture-convert.
			# ai = yes
		# }
		# any_country = { #Cannot happen for cultures that do not have a nation.
			# primary_culture = PREV
		# }
	# }

	# mean_time_to_happen = {
		# years = 50
		# modifier = {
			# factor = 2
			# #Less likely to revolt if any neighbours are assimilated.
			# any_neighbor_province = {
				# culture_group = byzantine
			# }
		# }
		# #Stolen from BT colonial cultures. Adjusted in this one
		# modifier = { #Larger settlements convert more slowly
			# factor = 0.9
			# development = 5
		# }
		# modifier = { #Larger settlements convert more slowly
			# factor = 0.9
			# development = 10
		# }
		# modifier = { #Larger settlements convert more slowly
			# factor = 0.9
			# development = 20
		# }
	# }
	# #There is no reason as to why the AI should say no to this.
	# option = { #We'll show them.
		# name = "culture_creoles.1.a"
		# add_nationalism = 10
		# every_country = {
			# limit = {
				# primary_culture = PREV
			# }
			# add_casus_belli = {
				# target = ROOT #This is the event receiver, right? If not I'll just add an event target.
				# type = cb_border_war #Because rebel support doesn't work as no rebels spawn.
				# months = 12
			# }
		# }
		# ai_chance = { 
			# factor = 100
		# }
	# }
# }