# Brazilian quest for independence
country_event = {

	id = 1030
	
	trigger = {
		NOT = { exists = BRZ }
		NOT = { has_country_flag = brazilian_nationalism }
		BRZ = {
			NOT = {
				OR = {
					is_core = 749		# Maranhao
					is_core = 751		# Ceara
					is_core = 752		# Oeiras
					is_core = 753		# Rio Grande
					is_core = 754		# Itamaraca
					is_core = 755		# Pernambuco
					is_core = 756		# Bahia
					is_core = 757		# Ilheus
					is_core = 759		# Diamentina
					is_core = 760		# Porto Seguro
					is_core = 762		# Sao Tome
					is_core = 763		# Rio de Janeiro
					is_core = 764		# Santo Amaro
					is_core = 766		# Sao Vicente
				}
			}
		}
		OR = {
			owns = 751		# Ceara
			owns = 755		# Pernambuco
			owns = 756		# Bahia
			owns = 764		# Santo Amaro
			owns = 766		# Sao Vicente
		}
		year = 1750	
	}
	
	mean_time_to_happen = {
		months = 480

		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = 0 }
		}
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -2 }
		}
		modifier = {
			factor = 0.9
			NOT = { centralization_decentralization = -4 }
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 1
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 3
		}
		modifier = {
			factor = 1.1
			centralization_decentralization = 5
		}
		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
		}		
		modifier = {
			factor = 0.9
			year = 1760
		}
		modifier = {
			factor = 0.8
			year = 1780
		}
	}
	
	title = "EVTNAME1030"
	desc = "EVTDESC1030"
	
	option = {
		name = "EVTOPTA1030"
		set_country_flag = brazilian_nationalism
		BRZ = {
			add_core = 749		# Maranhao
			add_core = 751		# Ceara
			add_core = 752		# Oeiras
			add_core = 753		# Rio Grande
			add_core = 754		# Itamaraca
			add_core = 755		# Pernambuco
			add_core = 756		# Bahia
			add_core = 757		# Ilheus
			add_core = 759		# Diamentina
			add_core = 760		# Porto Seguro
			add_core = 762		# Sao Tome
			add_core = 763		# Rio de Janeiro
			add_core = 764		# Santo Amaro
			add_core = 766		# Sao Vicente
		}
		colonists = -1
		random_owned = {
			limit = { is_colony = yes }
			create_revolt = 1
		}
	}
}


# Colonial assembly
province_event = {

	id = 1033
	
	trigger = {
		is_colony = yes
		owner = {
			has_country_flag = brazilian_nationalism
			NOT = { stability = 0 }
			NOT = { advisor = colonial_governor }
		}
	}
	
	mean_time_to_happen = {
		months = 60

		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -1 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { stability = -2 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { advisor = statesman } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { ADM = 4 } }
		}
		modifier = {
			factor = 0.9
			owner = { NOT = { DIP = 4 } }
		}
		modifier = {
			factor = 1.1
			owner = { ADM = 8 }
		}
		modifier = {
			factor = 1.1
			owner = { DIP = 8 }
		}
		modifier = {
			factor = 1.1
			owner = { advisor = statesman }
		}
	}
	
	title = "EVTNAME1023"
	desc = "EVTDESC1023"
	
	option = {
		name = "EVTOPTA1023"		# Attempt to find a diplomatic solution
		owner = {
			clr_country_flag = brazilian_nationalism
			add_country_modifier = {
				name = "diplomatic_negotiation"
				duration = 300
			}
		}
	}
		
	option = {
		name = "EVTOPTB1023"		# The days of diplomacy are over
		owner = { stability = -1 }
		add_province_modifier = {
			name = "colonial_tensions"
			duration = 300
		}
	}
}