########################################
# Events for Oman
#
# written by Johan Andersson
########################################

namespace = flavor_oma
normal_or_historical_nations = yes

#Struggle (repeating event)
country_event = {
	id = flavor_oma.1
	title = flavor_oma.1.t
	desc = flavor_oma.1.d
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		tag = OMA
		has_reform = feudal_theocracy
		dynasty = "0000"
	}
	
	mean_time_to_happen = {
		months = 240		#happens maybe every 20 years.
	}	
	
	
	option = {	
		name = flavor_oma.1.a
		ai_chance = {
			factor = 1
			modifier = {
				NOT = { piety = 0 }
				factor = 0
			}			
		}
		add_piety = 0.30
		add_legitimacy = 15
	}
	option = {
		name = flavor_oma.1.b
		add_piety = -0.30
		add_legitimacy = -10
		ai_chance = {
			factor = 1
			modifier = {
				piety = 0.01
				factor = 0
			}			
		}
		
	}
}

#Conflict with Portugal
country_event = {
	id = flavor_oma.2
	title = flavor_oma.2.t
	desc = flavor_oma.2.d
	picture = BATTLE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = OMA
		
		4346 = {
			is_strongest_trade_power = POR
		}	
		NOT = { is_year = 1550 }
		owns = 399	
	}
	
	mean_time_to_happen = {
		months = 120
	}	
	option = {	
		name = flavor_oma.2.a
		ai_chance = {
			factor = 90
		}
		
		POR = {		
			add_opinion = {
				who = root
				modifier = mam_por_confronted
			}	
			
			country_event = { 
				id = flavor_oma.3
				tooltip = flavor_oma.2.3
			}
		}
		4346 = {
			add_trade_modifier = {
				who = root
				duration = 3650
				power = 15
				key = oman_aggressive_trade
			}
		}		
	}
	option = {
		name = flavor_oma.2.b
		add_prestige = -10
		add_navy_tradition = -10
	}
}


#POR gets a cb!
country_event = {
	id = flavor_oma.3
	title = flavor_oma.3.t
	desc = flavor_oma.3.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	option = {	
		name = flavor_oma.3.a
		add_prestige = 5
		add_claim = 399	#Suhar
	}
}


# Ship building of Sur
country_event = {
	id = flavor_oma.4
	title = flavor_oma.4.t
	desc = flavor_oma.4.d
	picture = SHIP_SAILING_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = OMA
		is_year = 1650
		NOT = { is_year = 1700 }
		is_free_or_tributary_trigger = yes
		owns = 400
		owns = 399
	}
	mean_time_to_happen = {
		months = 300
	}	
	option = {
		name = flavor_oma.4.a
		400 = {
			add_base_tax = 1
		}
	}
}
