# Civil war
country_event = {

	id = 11901

	major = yes
	
	trigger = {
		NOT = {
			has_country_flag = civil_war 
			has_country_flag = total_war_series
			tag = BUC
			tag = INC
			VAR = { has_country_flag = CWTOT_No }
			government = feudal_daimyo
			government = sengoku_daimyo
			government = centralized_shogunate
		} 
		num_of_cities = 10
	}

	mean_time_to_happen = {
		months = 1600

		modifier = {
			factor = 0.9
			revolt_percentage = 0.1
		}
		modifier = {
			factor = 3.0
			OR = {
				tag = MOS
				tag = NOV
				tag = TVE
				tag = YAR
				tag = PSK
			}
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -0 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 0.8
			war = no
		}
		modifier = {
			factor = 1.5
			aristocracy_plutocracy = 1
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = 0 }
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = -2 }
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = -4 }
		}
		modifier = {
			factor = 1.5
			serfdom_freesubjects = 1
		}
		modifier = {
			factor = 0.8
			has_country_flag = Slave_Surplus
		}
		modifier = {
			factor = 1.5
			has_country_flag = Emancipated
		}
		modifier = {
			factor = 0.8
			has_country_flag = Penal_Colony
		}
		modifier = {
			factor = 2.0
			has_country_flag = Maintanence
		}
		modifier = {
			factor = 0.5
			has_country_flag = Maintanence_No
		}
		modifier = {
			factor = 3.0
			has_country_flag = civil_war_hap
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption1
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption2
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption3
		}
		modifier = {
			factor = 0.8
			is_bankrupt = yes
		}
		modifier = {
			factor = 1.5
			idea = bill_of_rights
		}
		modifier = {
			factor = 1.5
			idea = humanist_tolerance
		}
		modifier = {
			factor = 1.5
			idea = church_attendance_duty
		}
		modifier = {
			factor = 0.8
			idea = bureaucracy
		}
		modifier = {
			factor = 0.8
			idea = vice_roys
		}
		modifier = {
			factor = 0.8
			num_of_cities = 25
		}
		modifier = {
			factor = 0.8
			num_of_cities = 40
		}
		modifier = {
			factor = 0.8
			num_of_cities = 60
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 10
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 20
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 30
		}
		modifier = {
			factor = 0.8
			has_country_flag = Unlucky
		}
		modifier = {
			factor = 1.5
			ADM = 6
		}
		modifier = {
			factor = 1.5
			stability = 1
		}
		modifier = {
			factor = 1.5
			stability = 2
		}
		modifier = {
			factor = 1.5
			stability = 3
		}
		modifier = {
			factor = 0.7
			badboy = 0.30
		}
		modifier = {
			factor = 0.9
			badboy = 0.45
		}
		modifier = {
			factor = 1.2
			prestige = 0.3
		}
		modifier = {
			factor = 1.3
			prestige = 0.5 
		}
		modifier = {
			factor = 1.1
			advisor = statesman
		}
		modifier = {
			factor = 1.2
			statesman = 5
		}
		modifier = {
			factor = 1.3
			statesman = 6
		}
	}
	
	title = "EVTNAME11901"#	A Civil War Is Starting
	desc = "EVTDESC3091"
	
	option = {
		name = "EVTOPTA3091"			# Support the opposition
		ai_chance = { factor = 40 }
		set_country_flag = civil_war
		set_country_flag = Maintanence
		random_owned = {
			limit = { is_core = THIS }
			change_controller = REB
		}
		random_owned = {
			limit = { is_core = THIS }
			change_controller = REB
		}
		add_country_modifier = {
			name = "oppose_monarch"
			duration = 720
		}
	}
	option = {
		name = "EVTOPTB3091"			# Support the Monarch
		ai_chance = { factor = 60 }
		set_country_flag = civil_war
		set_country_flag = Maintanence
		treasury = -70
		random_owned = {
			limit = { is_core = THIS }
			change_controller = REB
		}
		add_country_modifier = {
			name = "support_monarch"
			duration = 720
		}
	}
	option = {
	name = "EVTOPTA11901"#	*I am Optimistic!
		ai_chance = { factor = 0 }
		VAR = { aristocracy_plutocracy = 2 }
		random_owned = { # only allow cheat in SP
			limit = {
				VAR = { has_country_flag = Multiplayer }
			}
			owner = {
				set_country_flag = civil_war
				set_country_flag = Maintanence
				treasury = -70
				add_country_modifier = {
					name = "oppose_monarch"
					duration = 300
				}	
			}
		}
	}
}

# Random effects
country_event = {

	id = 11902
	
	trigger = {
		has_country_flag = civil_war
	}
	
	mean_time_to_happen = {
		months = 36

		modifier = {
			factor = 1.5
			has_country_flag = allies
		}
		modifier = {
			factor = 1.5
			has_country_flag = unscrupulous_inlaws
		}
		modifier = {
			factor = 1.5
			has_country_flag = rebel_control
		}
		modifier = {
			factor = 1.5
			has_country_flag = deserting_troops
		}
	}
	
	title = "EVTNAME11902"#	The Civil War progresses
	desc = "EVTDESC11902"#	As the Civil war progresses, we must do all that we can to fix our Nation. This will be a bumpy road.
	
	option = {
	name = "EVTOPTA11902"#	Ok
		ai_chance = { factor = 100 }
		random_owned = { #A cry for help
			limit = {
				owner = {
					NOT = {
						has_country_flag = allies
					}
					num_of_revolts = 0.15
					num_of_allies = 2
				}
				is_core = THIS
			}
			owner = {
				set_country_flag = allies
				prestige = -0.05
				diplomats = -1
			}
			change_controller = REB 
		}
		random_owned = { #Unscrupulous in-laws
			limit = {
				owner = {
					NOT = { 
						has_country_flag = unscrupulous_inlaws
					}
					num_of_royal_marriages = 2
				}
				is_core = THIS
			}
			owner = { 
				set_country_flag = unscrupulous_inlaws
				stability = -1
			}
			change_controller = REB
		}
		random_owned = { #Rebel forces take over
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = rebel_control
						MIL = 6
					}
					war = no
					treasury = 61
				}
				is_core = THIS
			}
			owner = {
				set_country_flag = rebel_control
				treasury = -60
				add_country_modifier = {
					name = "battle_preparations"
					duration = 365
				}
			}
			change_controller = REB
		}
		random_owned = { #Army deserters
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = deserting_troops
					}
					war = no
				}
			}
			owner = {
				set_country_flag = deserting_troops
				add_country_modifier = {
					name = "deserters"
					duration = 365
				}
			}
			change_manpower = -1
		}
	}
}

# Retreating rebels
country_event = {

	id = 11903

	major = yes
	
	trigger = {
		has_country_flag = civil_war
		stability = 0
	}
	
	mean_time_to_happen = {
		months = 84

		modifier = {
			factor = 0.9
			stability = 2
		}
		modifier = {
			factor = 0.9
			stability = 3
		}
		modifier = {
			factor = 0.9
			stability = 1
		}
		modifier = {
			factor = 2.0
			num_of_revolts = 1
		}
		modifier = {
			factor = 0.5
			MIL = 5
		}
		modifier = {
			factor = 0.5
			war = no
		}
		modifier = {
			factor = 0.9
			prestige = 0.2
		}
		modifier = {
			factor = 0.9
			prestige = 0.3
		}
		modifier = {
			factor = 0.9
			prestige = 0.4
		}
		modifier = {
			factor = 1.1
			NOT = { prestige = 0.01 }
		}
		modifier = {
			factor = 1.1
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 1.1
			has_country_flag = deserting_troops
		}
	}
	
	title = "EVTNAME3096"
	desc = "EVTDESC3096"
	
	option = {
		name = "EVTOPTA3096"			# Prepare for a final battle
		clr_country_flag = civil_war
		clr_country_flag = allies
		clr_country_flag = unscrupulous_inlaws
		clr_country_flag = rebel_control
		clr_country_flag = deserting_troops
		set_country_flag = civil_war_hap
		treasury = -65
		add_country_modifier = {
			name = "battle_preparations"
			duration = 365
		}
	}
	option = {
		name = "EVTOPTB3096"			# Let them run
		clr_country_flag = civil_war
		clr_country_flag = allies
		clr_country_flag = unscrupulous_inlaws
		clr_country_flag = rebel_control
		clr_country_flag = deserting_troops
		set_country_flag = civil_war_hap	
		stability = 2
		badboy = -3
	}
}

###################################################################
# Time of Troubles
country_event = {

	id = 11904

	major = yes
	
	trigger = {
		NOT = {
			has_country_flag = time_of_troubles
			tag = BUC
			tag = INC
			tag = MOS
			tag = NOV
			tag = TVE
			tag = YAR
			tag = PSK
			government = feudal_daimyo
			government = sengoku_daimyo
			government = centralized_shogunate
			VAR = { has_country_flag = CWTOT_No }
		}
		num_of_cities = 10
	}
	
	mean_time_to_happen = {
		months = 1600
		
		modifier = {
			factor = 0.9
			NOT = { aristocracy_plutocracy = -2 }
		}
		modifier = {
			factor = 0.9
			NOT = { aristocracy_plutocracy = -4 }
		}
		modifier = {
			factor = 0.9
			NOT = { aristocracy_plutocracy = 0 }
		}
		modifier = {
			factor = 1.5
			aristocracy_plutocracy = 0
		}
		modifier = {
			factor = 0.8
			war = yes
		}
		modifier = {
			factor = 1.3
			war = no
		}	
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -2 }
		}
		modifier = {
			factor = 0.85
			NOT = { centralization_decentralization = -4 }
		}
		modifier = {
			factor = 2.0
			centralization_decentralization = 0
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = 0 }
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = -2 }
		}
		modifier = {
			factor = 0.85
			NOT = { serfdom_freesubjects = -4 }
		}
		modifier = {
			factor = 2.0
			serfdom_freesubjects = 0
		}
		modifier = {
			factor = 0.6
			revolt_percentage = 0.1
		}
		modifier = {
			factor = 0.8
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 0.8
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 0.8
			NOT = { stability = -2 }
		}
		modifier = {
			factor = 1.3
			stability = 1
		}
		modifier = {
			factor = 1.3
			stability = 2
		}
		modifier = {
			factor = 1.3
			stability = 3
		}
		modifier = {
			factor = 1.1
			luck = yes
		}
		modifier = {
			factor = 0.8
			has_country_flag = Slave_Surplus
		}
		modifier = {
			factor = 1.5
			has_country_flag = Emancipated
		}
		modifier = {
			factor = 0.8
			has_country_flag = Penal_Colony
		}
		modifier = {
			factor = 2.0
			has_country_flag = Maintanence
		}
		modifier = {
			factor = 0.5
			has_country_flag = Maintanence_No
		}
		modifier = {
			factor = 3.0
			has_country_flag = TOT_Happened
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption1
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption2
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption3
		}
		modifier = {
			factor = 0.8
			is_bankrupt = yes
		}
		modifier = {
			factor = 1.5
			idea = bill_of_rights
		}
		modifier = {
			factor = 1.5
			idea = humanist_tolerance
		}
		modifier = {
			factor = 1.5
			idea = church_attendance_duty
		}
		modifier = {
			factor = 0.8
			OR = {
				has_country_flag = Unlucky
				tag = FRA
				tag = MNG
			}
		}
		modifier = {
			factor = 0.8
			NOT = { ADM = 3 }
		}
		modifier = {
			factor = 1.3
			ADM = 4
		}
		modifier = {
			factor = 0.8
			idea = bureaucracy
		}
		modifier = {
			factor = 0.8
			idea = vice_roys
		}
		modifier = {
			factor = 0.8
			num_of_cities = 25
		}
		modifier = {
			factor = 0.8
			num_of_cities = 40
		}
		modifier = {
			factor = 0.8
			num_of_cities = 60
		}
		modifier = {
			factor = 0.9
			badboy = 0.75
		}
		modifier = {
			factor = 0.9
			badboy = 0.90
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 10
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 20
		}
		modifier = {
			factor = 0.9
			overseas_provinces_percentage  = 30
		}
	}
	
	title = "EVTNAME11904"#	Time of Troubles
	desc = "EVTDESC3001"
	
	option = {
		name = "EVTOPTA3001"	# Dire times are ahead of us
		ai_chance = { factor = 100 }
		set_country_flag = time_of_troubles
		set_country_flag = Maintanence
		stability = -2	
	}
	option = {
	name = "EVTOPTA11904"#	*I am Optimistic!
		ai_chance = { factor = 0 }
		VAR = { aristocracy_plutocracy = 2 }
		random_owned = { # only allow cheat in SP
			limit = {
				VAR = { has_country_flag = Multiplayer }
			}
			owner = {
				set_country_flag = time_of_troubles
				set_country_flag = Maintanence
				stability = -2	
			}
		}
	}
}

# Religious struggles
province_event = {

	id = 11905
	
	trigger = {
		owner = {
			has_country_flag = time_of_troubles 
			NOT = { has_country_flag = religious_struggles }
			NOT = { religion = THIS }
			war = yes
		}
	}

	mean_time_to_happen = {
		months = 36

		modifier = {
			factor = 0.9
			owner = {
				NOT = { protestant = 0 }
			}
		}
		modifier = {
			factor = 0.9
			owner = {
				NOT = { reformed = 0 }
			}
		}
		modifier = {
			factor = 1.1
			owner = {
				NOT = { protestant = -2 }
			}
		}
		modifier = {
			factor = 1.1
			owner = {
				NOT = { reformed = -2 }
			}
		}
		
		modifier = {
			factor = 1.2
			owner = {
				protestant = 1
			}
		}
		modifier = {
			factor = 1.2
			owner = {
				reformed = 1
			}
		}
		modifier = {
			factor = 0.9
			owner = {
				revolt_percentage = 0.1
			}
		}
		modifier = {
			factor = 0.8
			owner = {
				revolt_percentage = 0.2
			}
		}
		modifier = {
			factor = 0.7
			owner = {
				revolt_percentage = 0.3
			}
		}	
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = 0 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 3 }
		}
	}
	
	title = "EVTNAME3002"
	desc = "EVTDESC3002"
	
	option = {
		name = "EVTOPTA3002"			# One nation, one belief!
		ai_chance = { factor = 55 }
		owner = {
			set_country_flag = religious_struggles
			missionaries = 1
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 720
			}
		}
	}
	option = {
		name = "EVTOPTB3002"			# Tolerate all beliefs
		ai_chance = { factor = 45 }
		owner = {
			set_country_flag = religious_struggles
			missionaries = -1
			add_country_modifier = {
				name = "religious_tolerance"
				duration = 720
			}
		}
	}
}

# Random effects
country_event = {

	id = 11906
	
	trigger = {
		has_country_flag = time_of_troubles
	}
	
	mean_time_to_happen = {
		months = 36

		modifier = {
			factor = 1.5
			has_country_flag = national_instability
		}
		modifier = {
			factor = 1.5
			has_country_flag = unrest
		}
		modifier = {
			factor = 1.5
			has_country_flag = war_exhuastion
		}
		modifier = {
			factor = 1.5
			has_country_flag = inefficient_ruler
		}
		modifier = {
			factor = 1.5
			has_country_flag = famine
		}
	}
	
	title = "EVTNAME11906"#	Difficult Times Ahead
	desc = "EVTDESC11906"#	Our unhappy peasants, incapable Leaders, wars, famines and many other problems must be slowly resolved.
	
	option = {
	name = "EVTOPTA11906"#	Ok
		ai_chance = { factor = 100 }
		random_owned = { #National instability
			limit = {
				owner = {
					NOT = {
						has_country_flag = national_instability
					}
					treasury = 101
				}
			}
			owner = {
				set_country_flag = national_instability
				add_country_modifier = {
					name = "domestic_improvements"
					duration = 720
				}
				treasury = -100
			}
		}
		random_owned = { #Unrest among the peasants
			limit = { #Restrict serfdom
				owner = {
					NOT = { 
						has_country_flag = unrest
					}
					serfdom_freesubjects = 1
				}
			}
			owner = { 
				set_country_flag = unrest
				serfdom_freesubjects = 1
				add_country_modifier = {
					name = "restrict_serfdom"
					duration = 720
				}
			}
		}
		random_owned = { #Unrest among the peasants
			limit = { #Keep the masses in chains
				owner = { 
					NOT = { 
						has_country_flag = unrest
						serfdom_freesubjects = 0
					}
				}
			}
			owner = {
				set_country_flag = unrest
				serfdom_freesubjects = -1
				add_country_modifier = {
					name = "enforce_serfdom"
					duration = 720
				}
			}
			add_province_modifier = {
				name = "suppress_minority"
				duration = 730
			}
		}
		random_owned = { #War exhaustion
			limit = { #Let their voices be heard
				owner = { 
					NOT = { 
						has_country_flag = war_exhuastion
					}
					war_exhaustion = 5
					wartax = yes
				}
			}
			owner = {
				set_country_flag = war_exhuastion
				add_country_modifier = {
					name = "disarmament"
					duration = 720
				}
			}
		}
		random_owned = { #Inefficient ruler
			limit = { #Leave the nation's fate in his hands
				owner = { 
					NOT = { 
						has_country_flag = inefficient_ruler
					}
					ADM = 4
					MIL = 4
				}
			}
			owner = {
				set_country_flag = inefficient_ruler
				add_country_modifier = {
					name = "support_monarch"
					duration = 720
				}
			}
		}
		random_owned = { #Inefficient ruler
			limit = { #Oppose him
				owner = { 
					NOT = { 
						has_country_flag = inefficient_ruler
						ADM = 4
						MIL = 4
					}
				}
			}
			owner = {
				set_country_flag = inefficient_ruler
				add_country_modifier = {
					name = "oppose_monarch"
					duration = 720
				}
			}
			add_province_modifier = {
				name = "suppress_minority"
				duration = 730
			}
		}
		random_owned = { #Famine
			limit = { #We are helpless in the face of such a disaster...
				owner = { 
					NOT = { 
						has_country_flag = famine
						grain = 3
					}
				}
				citysize = 2000
			}
			owner = {
				set_country_flag = famine
				add_country_modifier = {
					name = "starvation"
					duration = 720
				}
			}
			citysize = -1000
		}
	}
}

# Stability returns
country_event = {

	id = 11907

	major = yes
	
	trigger = {
		has_country_flag = time_of_troubles
		stability = 1
	}
	
	mean_time_to_happen = {
		months = 84
				
		modifier = {
			factor = 0.8
			MIL = 6
		}
		modifier = {
			factor = 0.8
			MIL = 7
		}
		modifier = {
			factor = 2.0
			num_of_revolts = 1
		}
		modifier = {
			factor = 0.8
			war = no
		}
		modifier = {
			factor = 1.1
			NOT = { MIL = 6 }
		}	
		modifier = {
			factor = 1.2
			NOT = { MIL = 5 }
		}
		modifier = {
			factor = 0.8
			ADM = 6
		}	
		modifier = {
			factor = 0.8
			ADM = 7
		}
		modifier = {
			factor = 1.1
			NOT = { ADM = 6 }
		}	
		modifier = {
			factor = 1.2
			NOT = { ADM = 5 }
		}
		modifier = {
			factor = 0.8
			stability = 2
		}
		modifier = {
			factor = 0.8
			stability = 3
		}
	}
	
	title = "EVTNAME3008"
	desc = "EVTDESC3008"
	
	option = {
		name = "EVTOPTA3008"			# Restore order
		clr_country_flag = time_of_troubles
		clr_country_flag = religious_struggles
		clr_country_flag = national_instability
		clr_country_flag = unrest
		clr_country_flag = war_exhuastion
		clr_country_flag = famine
		clr_country_flag = inefficient_ruler
		set_country_flag = TOT_Happened
		stability = 2
	}
}

##################################################################
# Revolution
country_event = {

	id = 11908

	major = yes
	
	trigger = {
		
		NOT = {
			has_country_flag = revolution
			tag = BUC
			VAR = { has_country_flag = Revolutions_No }
		}
		OR = {
			government = feudal_monarchy
			government = despotic_monarchy
			government = noble_republic
			government = absolute_monarchy
			government = administrative_monarchy
			government = enlightened_despotism
			government = bureaucratic_despotism
			government = republican_dictatorship
		}
		government_tech = 45 
		num_of_cities = 10
		war = no
		war_exhaustion = 6
	}
	
	mean_time_to_happen = {
		months = 400
		
		modifier = {
			factor = 0.9
			NOT = { aristocracy_plutocracy = -3 }
		}
		modifier = {
			factor = 0.8
			NOT = { aristocracy_plutocracy = -4 }
		}
		modifier = {
			factor = 1.5
			aristocracy_plutocracy = 0
		}		
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -3 }
		}
		modifier = {
			factor = 0.8
			NOT = { centralization_decentralization = -4 }
		}
		modifier = {
			factor = 1.5
			centralization_decentralization = 0
		}
		modifier = {
			factor = 0.9
			NOT = { serfdom_freesubjects = -3 }
		}
		modifier = {
			factor = 0.8
			NOT = { serfdom_freesubjects = -4 }
		}
		modifier = {
			factor = 1.5
			serfdom_freesubjects = 0
		}
		modifier = {
			factor = 0.9
			revolt_percentage = 0.1
		}
		modifier = {
			factor = 1.2
			idea = humanist_tolerance
		}
		modifier = {
			factor = 0.9
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -2 }
		}
		modifier = {
			factor = 1.5
			stability = 1
		}
		modifier = {
			factor = 1.5
			stability = 2
		}
		modifier = {
			factor = 1.5
			stability = 3
		}
		modifier = {
			factor = 0.8
			tag = FRA
		}
		modifier = {
			factor = 3.0
			has_country_flag = revolution_hap
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption1
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption2
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption3
		}
	}
	
	title = "EVTNAME3011"
	desc = "EVTDESC3011"
	
	option = {
	name = "EVTOPTA11908"#	The Revolution Begins
		ai_chance = { factor = 100 }
		set_country_flag = revolution
		stability = -1
	}
	option = {
	name = "EVTOPTB11908"#	*I am Optimistic!
		ai_chance = { factor = 0 }
		VAR = { aristocracy_plutocracy = 2 }
		random_owned = { # only allow cheat in SP
			limit = {
				VAR = { has_country_flag = Multiplayer }
			}
			owner = {
				set_country_flag = revolution
				stability = -1	
			}
		}
	}
}

# Random effects
country_event = {

	id = 11909
	
	trigger = {
		has_country_flag = revolution
	}
	
	mean_time_to_happen = {
		months = 36

		modifier = {
			factor = 1.3
			has_country_flag = religious_revolution
		}
		modifier = {
			factor = 1.3
			has_country_flag = serfdom
		}
		modifier = {
			factor = 1.3
			has_country_flag = social_reform
		}
		modifier = {
			factor = 1.3
			has_country_flag = royal_bureaucracy
		}
		modifier = {
			factor = 1.3
			has_country_flag = deplorable_reign
		}
		modifier = {
			factor = 1.3
			has_country_flag = road_to_bankruptcy
		}
		modifier = {
			factor = 1.3
			has_country_flag = financial_crisis
		}
	}
	
	title = "EVTNAME11909"#	The Revolution Continues
	desc = "EVTDESC11909"#	Our unhappy peasants, incapable Leaders, wars, famines and many other problems must be slowly resolved.
	
	option = {
	name = "EVTOPTA11909"#	Ok
		ai_chance = { factor = 100 }
		random_owned = { # Religious intolerance
			limit = {
				owner = {
					NOT = {
						has_country_flag = religious_revolution
						protestant = -1
						reformed = -1
					}
				}
			}
			owner = {
				set_country_flag = religious_revolution
				add_country_modifier = {
					name = "religious_intolerance"
					duration = 720
				}
			}
		}
		random_owned = { # Serfdom
			limit = {
				owner = {
					NOT = { 
						has_country_flag = serfdom
						serfdom_freesubjects = -2
					}
				}
			}
			owner = { 
				set_country_flag = serfdom
				add_country_modifier = {
					name = "enforce_serfdom"
					duration = 720
				}
			}
		}
		random_owned = { # Social reform
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = social_reform
						stability = 0
					}
					advisor = philosopher
				}
			}
			owner = {
				set_country_flag = social_reform
				add_country_modifier = {
					name = "suppress_free_thinkers"
					duration = 720
				}
			}
		}
		random_owned = { # Royal Bureaucracy
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = royal_bureaucracy
					}
					centralization_decentralization = -2
					idea = bureaucracy
				}
			}
			owner = {
				set_country_flag = royal_bureaucracy
				add_country_modifier = {
					name = "bureaucratic_reduction"
					duration = 720
				}
			}
		}
		random_owned = { # Deplorable reign
			limit = {
				owner = { 
					NOT = {
						has_country_flag = deplorable_reign
						ADM = 4
					}
				}
			}
			owner = {
				set_country_flag = deplorable_reign
				add_country_modifier = {
					name = "oppose_monarch"
					duration = 720
				}
			}
		}
		random_owned = { # The road to bankruptcy
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = road_to_bankruptcy
					}
					number_of_loans = 1
					inflation = 30
				}
			}
			owner = {
				set_country_flag = road_to_bankruptcy
				treasury = 40
				add_country_modifier = {
					name = "mint_money"
					duration = 720
				}
			}
		}
		random_owned = { # Financial Crisis
			limit = {
				owner = { 
					NOT = { 
						has_country_flag = financial_crisis
					}
				}
				is_bankrupt = yes
				war = yes
			}
			owner = {
				set_country_flag = financial_crisis
				add_country_modifier = {
					name = "disarmament"
					duration = 720
				}
			}
		}
	}
}

# Stability returns
country_event = {

	id = 11910

	major = yes
	
	trigger = {
		has_country_flag = revolution
		stability = 1
		NOT = { num_of_revolts = 1 }
	}
	
	mean_time_to_happen = {
		months = 84
		
		modifier = {
			factor = 0.9
			MIL = 5
		}
		modifier = {
			factor = 0.8
			MIL = 6
		}
		modifier = {
			factor = 1.1
			NOT = { MIL = 4 }
		}
		modifier = {
			factor = 0.9
			ADM = 5
		}	
		modifier = {
			factor = 0.8
			ADM = 6
		}
		modifier = {
			factor = 1.1
			NOT = { ADM = 4 }
		}	
		modifier = {
			factor = 0.9
			stability = 1
		}
		modifier = {
			factor = 0.9
			stability = 2
		}
		modifier = {
			factor = 0.9
			stability = 3
		}
		modifier = {
			factor = 1.1
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 1.1
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 1.1
			NOT = { stability = -2 }
		}
	}
	
	title = "EVTNAME3019"
	desc = "EVTDESC3019"
	
	option = {
		name = "EVTOPTA3019"			# Restore order
		clr_country_flag = revolution
		clr_country_flag = religious_revolution
		clr_country_flag = serfdom
		clr_country_flag = social_reform
		clr_country_flag = royal_bureaucracy
		clr_country_flag = deplorable_reign
		clr_country_flag = road_to_bankruptcy
		clr_country_flag = financial_crisis
		set_country_flag = revolution_hap	
		stability = 2
	}
}

#############################################################
# Religious Wars
province_event = {

	id = 11911

	major = yes
	
	trigger = {
		owner = {
			NOT = {
				has_country_flag = religious_turmoil
				has_country_flag = had_religious_turmoil
				religion = THIS
			}
		}
		#has_owner_religion = false
		OR = {
			AND = {
				owner = {
					religion_group = christian
				}
				religion_group = christian
			}
			AND = {
				owner = {
					religion_group = muslim
				}
				religion_group = muslim
			}
			AND = {
				owner = {
					religion_group = eastern
				}
				religion_group = eastern
			}
		}
	}
	
	mean_time_to_happen = {
		months = 540
		
		modifier = {
			factor = 0.8
			owner = { tag = FRA }
		}
		modifier = {
			factor = 0.9
			any_neighbor_province = {
				religion = THIS
			}
		}
		modifier = {
			factor = 2.0
			owner = {
				religion_group = muslim
			}
		}
		modifier = {
			factor = 2.0
			owner = {
				religion_group = eastern
			}
		}
		modifier = {
			factor = 2.0
			owner = { adm = 5 }
		}
		modifier = {
			factor = 2.0
			owner = { adm = 6 }
		}
		modifier = {
			factor = 0.9
			owner = { idea = divine_supremacy }
		}
		modifier = {
			factor = 0.9
			owner = { innovative_narrowminded = 3 }
		}
		modifier = {
			factor = 0.9
			owner = { innovative_narrowminded = 4 }
		}
		modifier = {
			factor = 1.15
			owner = { NOT = { innovative_narrowminded = -2 } }
		}
		modifier = {
			factor = 1.15
			owner = { NOT = { innovative_narrowminded = -3 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = 0 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 1.2
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.2
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.2
			owner = { stability = 3 } 
		}
		modifier = {
			factor = 2.0
			owner = { has_country_flag = Maintanence }
		}
		modifier = {
			factor = 0.75
			VAR = { has_country_flag = Maintanence_No }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption1 }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption2 }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption3 }
		}
		modifier = {
			factor = 2.0
			owner = { idea = ecumenism }
		}
		modifier = {
			factor = 2.0
			owner = { has_country_modifier = counter_reformation }
		}
		modifier = {
			factor = 1.3
			year = 1600
		}
	}
	
	title = "EVTNAME11911"#	Religious War
	desc = "EVTDESC2031"
	
	option = {
		name = "EVTOPTA2031"				# Eradicate the heretics to bring peace
		owner = {
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 730
			}
			set_country_flag = religious_intolerance
			set_country_flag = religious_turmoil
			set_country_flag = Maintanence
		}
	}
	option = {
		name = "EVTOPTB2031"				# We should strive for a tolerant society
		owner = {
			missionaries = -2
			add_country_modifier = {
				name = "religious_tolerance"
				duration = 730
			}
			set_country_flag = religious_tolerance			
			set_country_flag = religious_turmoil
			set_country_flag = Maintanence
		}
	}
}

# Intolerant society, large number of heretics
province_event = {

	id = 11912
	
	trigger = {
		owner = {
			has_country_flag = religious_turmoil
			has_country_flag = religious_intolerance
			NOT = { has_country_flag = intolerant }
			NOT = { religion = THIS }
		}		
		any_neighbor_province = {
			religion = THIS
		}
	}
	
	mean_time_to_happen = {
		months = 120
		
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = 0 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 3 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.02 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.04 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.06 }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { adm = 5 } }
		}	
		modifier = {
			factor = 0.9
			owner = { NOT = { adm = 4 } }
		}
		modifier = {
			factor = 1.1
			owner = { adm = 6 }
		}	
		modifier = {
			factor = 1.1
			owner = { adm = 7 }
		}		
	}

	title = "EVTNAME2032"
	desc = "EVTDESC2032"
	
	option = {
		name = "EVTOPTA2032"		# Banish the nonconformists.
		add_province_modifier = {
			name = "suppress_minority"
			duration = 730
		}
		owner = { set_country_flag = intolerant }
	}
	option = {
		name = "EVTOPTB2032"		# Increase funding to convert the heretics.
		owner = {
			missionaries = 2
			treasury = -50
			add_country_modifier = {
				name = "convert_heretics"
				duration = 730
			}
			clr_country_flag = religious_intolerance	# Marks the end of the nation's religious problems	
			set_country_flag = had_religious_turmoil
		}
	}
}

# Intolerant society
province_event = {

	id = 11913
	
	trigger = {
		owner = {
			has_country_flag = religious_turmoil
			has_country_flag = religious_intolerance
			NOT = { religion = THIS } 
		}
	}
	
	mean_time_to_happen = {
		months = 72
		
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = 0 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 3 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.05 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.1 }
		}
	}
	
	title = "EVTNAME2033"
	desc = "EVTDESC2033"
	
	option = {				# Increase funding to suppress the heretics.
		name = "EVTOPTA2033"
		add_province_modifier = {
			name = "suppress_minority"
			duration = 730
		}
		owner = {
			clr_country_flag = religious_intolerance	# Marks the end of the nation's religious problems
			set_country_flag = had_religious_turmoil
			treasury = -60
			add_country_modifier = {
				name = "military_funding"
				duration = 730
			}
		}
	}
	option = {				# Ignore them.
		name = "EVTOPTB2033"
		add_province_modifier = {
			name = "suppress_minority"
			duration = 730
		}
		owner = { stability = -1 }
	}
	option = {				# Give Concessions.
		name = "EVTOPTC2033"
		owner = {
			innovative_narrowminded = -1
			clr_country_flag = religious_intolerance	# Marks the end of the nation's religious problems
			set_country_flag = had_religious_turmoil
			add_country_modifier = {
				name = "disorder"
				duration = 730
			}
		}
	}
}

# Tolerant society
province_event = {

	id = 11914
	
	trigger = {
		owner = {
			has_country_flag = religious_turmoil
			has_country_flag = religious_tolerance
			NOT = { has_country_flag = subdue_heretics }
			NOT = { religion = catholic }
		}
	}
	
	mean_time_to_happen = {
		months = 60
		
		modifier = {
			factor = 0.95
			owner = { idea = church_attendance_duty }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = 0 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 1 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 2 }
		}
		modifier = {
			factor = 1.1
			owner = { stability = 3 }
		}
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.05 }
		}
		modifier = {
			factor = 0.8
			owner = { revolt_percentage = 0.1 }
		}
		modifier = {
			factor = 1.1
			owner = { NOT = { innovative_narrowminded = -1 } }
		}
		modifier = {
			factor = 1.1
			owner = { NOT = { innovative_narrowminded = -2 } }
		}
		modifier = {
			factor = 0.9
			owner = { innovative_narrowminded = 2 }
		}
		modifier = {
			factor = 0.9
			owner = { innovative_narrowminded = 3 }
		}
	}
	
	title = "EVTNAME2034"
	desc = "EVTDESC2034"
	
	option = {
		name = "EVTOPTA2034"		# Subdue the heretics.
		owner = {
			missionaries = -2
			stability = 1
			add_country_modifier = {
				name = "religious_intolerance"
				duration = 1825
			}
			clr_country_flag = religious_tolerance
			set_country_flag = subdue_heretics
			set_country_flag = had_religious_turmoil
		}
	}
	option = {
		name = "EVTOPTB2034"		# Convert them.
		owner = {
			missionaries = 2
			stability = -1
			add_country_modifier = {
				name = "religious_tolerance"
				duration = 1825
			}
			clr_country_flag = religious_tolerance		# Marks the end of the nation's religious problems
			set_country_flag = had_religious_turmoil
		}
	}
}

# Tolerant society
country_event = {

	id = 11915
	
	trigger = {
		has_country_flag = religious_turmoil
		has_country_flag = religious_tolerance
		NOT = { has_country_flag = ignorance }
	}
	
	mean_time_to_happen = {
		months = 36
		
		modifier = {
			factor = 0.9
			owner = { revolt_percentage = 0.05 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -1 }
		}
		modifier = {
			factor = 0.9
			NOT = { stability = -2 }
		}
		modifier = {
			factor = 1.1
			stability = 1
		}
		modifier = {
			factor = 1.1
			stability = 2
		}
		modifier = {
			factor = 1.1
			stability = 3
		}
	}
	
	title = "EVTNAME2035"
	desc = "EVTDESC2035"
	
	option = {
		name = "EVTOPTA2035"		# Our time is better spent elsewhere
		stability = 1
		add_country_modifier = {
			name = "religious_intolerance"
			duration = 1825
		}
		set_country_flag = ignorance
		clr_country_flag = religious_tolerance
		set_country_flag = had_religious_turmoil
	}
	option = {
		name = "EVTOPTB2035"		# Issue a new edict
		stability = -1
		add_country_modifier = {
			name = "religious_tolerance"
			duration = 1825
		}
		clr_country_flag = religious_tolerance		# Marks the end of the nation's religious problems
		set_country_flag = had_religious_turmoil
	}
}

####################################################

# Renaissance
province_event = {

	id = 11916
	
	trigger = {
		owner = {
			NOT = {
				tag = BUC
				government = feudal_daimyo
				government = sengoku_daimyo
				government = centralized_shogunate
				has_country_flag = Renaissance
				has_country_flag = Renaissance_Hap
			}
		}
		NOT = { 
			VAR = { has_country_flag = CWTOT_No }
		}
		OR = {
			has_building = fine_arts_academy
			has_building = university
		}
	}

	mean_time_to_happen = {
		months = 6000

		modifier = {
			factor = 0.8
			continent = europe
		}
		modifier = {
			factor = 1.5
			any_neighbor_province = {
				has_province_flag = plague
			}
		}
		modifier = {
			factor = 0.8
			owner = { stability = 0 }
		}
		modifier = {
			factor = 0.8
			owner = { war = no }
		}
		modifier = {
			factor = 0.8
			owner = { primary_culture = lombard }
		}
		modifier = {
			factor = 1.3
			owner = { num_of_cities = 25 }
		}
		modifier = {
			factor = 1.3
			owner = { num_of_cities = 50 }
		}
		modifier = {
			factor = 1.3
			owner = { num_of_cities = 75 }
		}
		modifier = {
			factor = 1.5
			owner = { has_country_flag = Unlucky }
		}
		modifier = {
			factor = 0.8
			owner = { philosopher = 5 }
		}
		modifier = {
			factor = 0.8
			owner = { natural_scientist = 5 }
		}
		modifier = {
			factor = 0.8
			owner = { artist = 5 }
		}
		modifier = {
			factor = 0.8
			owner = { theologian = 5 }
		}
		modifier = {
			factor = 0.8
			owner = { 
			any_neighbor_country = {
				OR = {
					has_country_flag = Renaissance
					has_country_flag = Renaissance_Hap
				}
			}
			}
		}
		modifier = {
			factor = 0.9
			owner = { defender_of_faith = no }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption1 }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption2 }
		}
		modifier = {
			factor = 0.9
			owner = { has_country_flag = Corruption3 }
		}
	}
	
	title = "EVTNAME11916"#	The Renaissance has reached us
	desc = "EVTDESC11916"#	A major change in the way people view Art, Science and Religion has begun.
	
	option = {
	name = "EVTOPTA11916"#	La Rinascita
		ai_chance = { factor = 100 }
		owner = {
			clr_country_flag = Maintanence
			set_country_flag = Renaissance
			stability = -1
		}
		base_tax = 2
		change_manpower = 2
	}
}

# Random effects
province_event = {

	id = 11917
	
	trigger = {
		owner = {
			has_country_flag = Renaissance
		}
	}
	
	mean_time_to_happen = {
		months = 2500

		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Uni }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Art }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Temp }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Mar }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Ref }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Tex }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_For }
		}
		modifier = {
			factor = 1.4
			owner = { has_country_flag = Ren_Tax }
		}
	}
	
	title = "EVTNAME11917"#	The Renaissance progresses
	desc = "EVTDESC11917"#	As the Renaissance progresses, we must do all that we can to adjust. This will be a bumpy road.
	
	option = {
	name = "EVTOPTA11917"#	Ok
		ai_chance = { factor = 100 }
		owner = {
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Uni
							innovative_narrowminded = 0
							stability = 2
						}
						innovative_narrowminded = -5
						stability = 1
					}
					NOT = { has_building = fine_arts_academy }
					NOT = { has_building = university }
					NOT = { has_building = refinery }
					NOT = { has_building = wharf }
					NOT = { has_building = weapons }
					NOT = { has_building = textile }
				}
				add_building = university
				owner = {
					set_country_flag = Ren_Uni
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Art
							stability = 2
						}
						innovative_narrowminded = 1
						stability = 1
					}
					NOT = { has_building = fine_arts_academy }
					NOT = { has_building = university }
					NOT = { has_building = refinery }
					NOT = { has_building = wharf }
					NOT = { has_building = weapons }
					NOT = { has_building = textile }
				}
				add_building = fine_arts_academy
				owner = {
					set_country_flag = Ren_Art
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Temp
							stability = 1
						}
						innovative_narrowminded = 1
						stability = 0
					}
					NOT = { has_building = temple }
				}
				add_building = temple
				owner = {
					set_country_flag = Ren_Temp
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Mar
							innovative_narrowminded = 0
							stability = 1
						}
						innovative_narrowminded = -5
						stability = 0
					}
					NOT = { has_building = marketplace }
				}
				add_building = marketplace
				owner = {
					set_country_flag = Ren_Mar
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Ref
							innovative_narrowminded = 0
							stability = 3
						}
						innovative_narrowminded = -5
						stability = 2
					}
					NOT = { has_building = fine_arts_academy }
					NOT = { has_building = university }
					NOT = { has_building = refinery }
					NOT = { has_building = wharf }
					NOT = { has_building = weapons }
					NOT = { has_building = textile }
				}
				add_building = refinery
				owner = {
					set_country_flag = Ren_Ref
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Tex
							stability = 3
						}
						innovative_narrowminded = 1
						stability = 2
					}
					NOT = { has_building = fine_arts_academy }
					NOT = { has_building = university }
					NOT = { has_building = refinery }
					NOT = { has_building = wharf }
					NOT = { has_building = weapons }
					NOT = { has_building = textile }
				}
				add_building = textile
				owner = {
					set_country_flag = Ren_Tex
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_For
							innovative_narrowminded = 0
						}
						innovative_narrowminded = -5
						stability = 3
					}
					NOT = { has_building = fort6 }
				}
				add_building = fort6
				owner = {
					set_country_flag = Ren_For
				}
			}
			random_owned = {
				limit = {
					owner = {
						NOT = {
							has_country_flag = Ren_Tax
						}
						innovative_narrowminded = 1
						stability = 3
					}
					NOT = { has_building = tax_assessor }
				}
				add_building = tax_assessor
				owner = {
					set_country_flag = Ren_Tax
				}
			}
		}
		add_province_modifier = {
			name = "medical_evolution"
			duration = 1095
		}
	}
}

# Calming
country_event = {

	id = 11918
	
	trigger = {
		has_country_flag = Renaissance
	}
	
	mean_time_to_happen = {
		months = 600

	}
	
	title = "EVTNAME11918"#	The Renaissance Stabilizes
	desc = "EVTDESC11918"#	Our Nation's People seem to be Calming down and adjusting to current events.
	
	option = {
	name = "EVTOPTA11918"#	Ok
		clr_country_flag = Renaissance
		clr_country_flag = Ren_Uni
		clr_country_flag = Ren_Art
		clr_country_flag = Ren_Temp
		clr_country_flag = Ren_Mar
		clr_country_flag = Ren_Ref
		clr_country_flag = Ren_Tex
		clr_country_flag = Ren_For
		clr_country_flag = Ren_Tax
		set_country_flag = Renaissance_Hap	
		stability = 1
	}
}

############################################
# 			Secret Societies
############################################
# SS start
country_event = {

	id = 11919

	major = yes

	trigger = {
		NOT = { 
			has_country_flag = Disable
			has_country_flag = SS_Yes
			has_country_flag = SS_No
			has_country_flag = Unlucky
			technology_group = african
			technology_group = new_world
			tag = BUC
		}
	}
	
	mean_time_to_happen = {
		months = 5200

		modifier = {
			factor = 0.7
			OR = {
				tag = ENG
				tag = GBR
				tag = USA
				#tag = FRN
				#tag = RFR
				#tag = FRE
				#tag = HAB
				#tag = NAP
			}
		}
		modifier = {
			factor = 1.3
			OR = {
				#tag = RUS
				tag = POL
			}
		}
		modifier = {
			factor = 0.8
			technology_group = latin
		}
		modifier = {
			factor = 0.8
			has_country_flag = Slave_Surplus
		}
		modifier = {
			factor = 0.8
			has_country_flag = PB_Yes
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption1
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption2
		}
		modifier = {
			factor = 0.9
			has_country_flag = Corruption3
		}
		modifier = {
			factor = 0.9
			is_bankrupt = yes
		}
		modifier = {
			factor = 1.5
			idea = bill_of_rights
		}
		modifier = {
			factor = 1.5
			idea = humanist_tolerance
		}
		modifier = {
			factor = 0.8
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 1.3
			stability = 1
		}
		modifier = {
			factor = 0.9
			idea = bureaucracy
		}
		modifier = {
			factor = 0.9
			idea = vice_roys
		}
	}
	
	title = "EVTNAME11919"#	The Secret Society
	desc = "EVTDESC11919"#	We have been aproached by a politicaly powerfull secret society that is pressuring us to join thier ranks.

	option = {
	name = "EVTOPTA11919"#	These men are wise!
		ai_chance = {
			factor = 50
			days = 1
			modifier = {
				#factor = 2.0
				factor = 0.5	#25%
				NOT = { 
					has_country_flag = Corruption1
					has_country_flag = Corruption2
					has_country_flag = Corruption3
				}
			}
			modifier = {
				factor = 1.15 	#58%
				has_country_flag = Corruption1
			}
			modifier = {
				factor = 1.15
				has_country_flag = Corruption2
			}
			modifier = {
				factor = 1.15
				has_country_flag = Corruption3
			}
		}
		set_country_flag = SS_Yes
		any_country = {
			limit = {
				has_country_flag = SS_Yes
				num_of_cities = 1 #prevents war on nonexisting nation
			}		
			relation = { who = THIS value = 50 }
		}
		serfdom_freesubjects = -1
		aristocracy_plutocracy = -1
		mercantilism_freetrade = -1
		centralization_decentralization = -1
		innovative_narrowminded = 1
		offensive_defensive = -1
	}
	option = {
	name = "EVTOPTB11919"#	This is wrong!
		ai_chance = {
			factor = 50
			days = 1
			modifier = {
				factor = 1.5 	#75%
				NOT = { 
					has_country_flag = Corruption1
					has_country_flag = Corruption2
					has_country_flag = Corruption3
				}
			}
			modifier = {
				factor = 0.84 	#42%
				has_country_flag = Corruption1
			}
			modifier = {
				factor = 0.84
				has_country_flag = Corruption2
			}
			modifier = {
				factor = 0.84
				has_country_flag = Corruption3
			}
		}
		set_country_flag = SS_No 
	}
}

# continue or end
country_event = {

	id = 11920

	major = yes

	trigger = {
		NOT = { 
			has_country_flag = Disable
		}
		has_country_flag = SS_Yes
	}
	
	mean_time_to_happen = {
		months = 2400

		modifier = {
			factor = 1.1
			OR = {
				tag = ENG
				tag = GBR
				tag = USA
				#tag = FRN
				#tag = RFR
				#tag = FRE
				#tag = HAB
				#tag = NAP
			}
		}
		modifier = {
			factor = 0.9
			OR = {
				#tag = RUS
				tag = POL
			}
		}
		modifier = {
			factor = 1.1
			has_country_flag = Slave_Surplus
		}
		modifier = {
			factor = 1.1
			has_country_flag = PB_Yes
		}
		modifier = {
			factor = 1.1
			has_country_flag = Corruption1
		}
		modifier = {
			factor = 1.1
			has_country_flag = Corruption2
		}
		modifier = {
			factor = 1.1
			has_country_flag = Corruption3
		}
		modifier = {
			factor = 0.9
			idea = bill_of_rights
		}
		modifier = {
			factor = 0.9
			idea = humanist_tolerance
		}
		modifier = {
			factor = 1.1
			idea = bureaucracy
		}
		modifier = {
			factor = 1.1
			idea = vice_roys
		}
	}
	
	title = "EVTNAME11920"#	Secret Society Problems
	desc = "EVTDESC11920"#	The Secret Society is demanding that we adjust our policies to be more like thier goals. What should we do?

	option = {
	name = "EVTOPTA11920"#	Comply with the requests
		ai_chance = { factor = 75 }
		serfdom_freesubjects = -1
		aristocracy_plutocracy = -1
		mercantilism_freetrade = -1
		centralization_decentralization = -1
		innovative_narrowminded = 1
		offensive_defensive = -1
	}
	option = {
	name = "EVTOPTB11920"#	Defy the Society!
		ai_chance = { factor = 25 }
		serfdom_freesubjects = 1
		aristocracy_plutocracy = 1
		mercantilism_freetrade = 1
		centralization_decentralization = 1
		innovative_narrowminded = -1
		offensive_defensive = 1
		add_country_modifier = {
			name = "reform_tensions"
			duration = 7300
		}
		clr_country_flag = SS_Yes
		set_country_flag = SS_No
		any_country = {
			limit = {
				has_country_flag = SS_Yes
				num_of_cities = 1 #prevents war on nonexisting nation
				NOT = { alliance_with = THIS }
			}		
			war = THIS
		}
	}
}

