#####Spanish Major Events########
#By Joakim 'Greven' Bergqwist   #
#   Henrik 'Doomdark' Fåhraeus  #
#   Thomas 'Besuchov' Johansson #
#   Kristof 'BiB' Haekens       #
#################################

#The Iberian Wedding#
event = {

	id = 3716
	trigger = {
		exists = ARG
		NOT = { vassal = { country = ARG country = SPA } }
		NOT = { vassal = { country = SPA country = ARG } }
		owned = { province = 439 data = SPA }
	}
	random = no
	country = SPA
	name = "EVENTNAME3716"
	desc = "EVENTHIST3716"
	style = 1

	date = { day = 1 month = january year = 1477 }
	offset = 30
	deathdate = { day = 30 month = december year = 1491 }

	action_a ={			#Let us bind their Dynasty to ours#
		name = "ACTIONNAME3716A"
		command = { type = dynastic which = ARG }
		command = { type = alliance which = ARG }
		command = { type = vassal which = ARG }
		command = { type = relation which = ARG value = 150 }
		command = { type = relation which = POR value = -50 }
		command = { type = land value = 800 }
		command = { type = stability value = 2 }
		command = { type = casusbelli which = GRA value = 300 }
		command = { type = domestic which = ARISTOCRACY value = -1 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = domestic which = MERCANTILISM value = 1 }
		command = { type = domestic which = OFFENSIVE value = 1 }
	}

	action_b ={			#No let us marry a local talent instead#
		name = "ACTIONNAME3716B"
		command = { type = relation which = ARG value = -150 }
		command = { type = relation which = POR value = -150 }
		command = { type = stability value = -3 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = merchants value = 5 }
		command = { type = trade value = 800 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = OFFENSIVE value = -1 }
		command = { type = sleepmonarch which = 4140 }
	}
}

#The Iberian Wedding#
event = {

	id = 3717
	trigger = {
			exists = CAS
		}
	random = no
	country = SPA
	name = "EVENTNAME3717"
	desc = "EVENTHIST3717"
	style = 1

	date = { day = 1 month = january year = 1477 }
	offset = 30
	deathdate = { day = 30 month = december year = 1491 }

	action_a ={			#Let us bind their Dynasty to ours#
		name = "ACTIONNAME3717A"
		command = { type = dynastic which = CAS }
		command = { type = alliance which = CAS }
		command = { type = vassal which = CAS }
		command = { type = relation which = CAS value = 150 }
		command = { type = relation which = POR value = -50 }
		command = { type = land value = 800 }
		command = { type = stability value = 2 }
		command = { type = casusbelli which = GRA value = 300 }
		command = { type = domestic which = ARISTOCRACY value = -1 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = domestic which = MERCANTILISM value = 1 }
		command = { type = domestic which = OFFENSIVE value = 1 }
	}

	action_b ={			#No let us marry a local talent instead#
		name = "ACTIONNAME3717B"
		command = { type = relation which = CAS value = -150 }
		command = { type = relation which = POR value = -150 }
		command = { type = stability value = -3 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = fortress which = -1 value = 1 }
		command = { type = merchants value = 5 }
		command = { type = trade value = 800 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = OFFENSIVE value = -1 }
		command = { type = sleepmonarch which = 4140 }
	}
}

#Torquemada and the Expulsion of the Moors#
event = {

	id = 3150
                trigger = {
		owned = { province = 443 data = SPA }
		owned = { province = 438 data = SPA }
	}

	random = no
	country = SPA
	name = "EVENTNAME3150"
	desc = "EVENTHIST3150"
	style = 1

	date = { day = 1 month = january year = 1493 }
	offset = 30
	deathdate = { day = 1 month = january year = 1499 }

	action_a ={		#Let us be rid of those we cannot trust#
		name = "ACTIONNAME3150A"
		command = { type = domestic which = INNOVATIVE value = -3 }
		command = { type = population which = 443 value = -10000 }
		command = { type = population which = 438 value = -10000 }
		command = { type = religiousrevolt which = 438 }
		command = { type = religiousrevolt which = 443 }
		command = { type = provincereligion which = 438 value = catholic }
		command = { type = provincereligion which = 443 value = catholic }
		command = { type = stability value = -1 }
		command = { type = trigger which = 3654 }
		command = { type = trigger which = 3652 }
		command = { type = trigger which = 3657 }
	}

	action_b ={		#Let us make a clean sweep for the Glory of God#
		name = "ACTIONNAME3150B"
		command = { type = domestic which = INNOVATIVE value = -5 }
		command = { type = population which = 445 value = -25000 }
		command = { type = population which = 444 value = -11000 }
		command = { type = population which = 438 value = -15000 }
		command = { type = population which = 443 value = -25000 }
		command = { type = provincereligion which = 438 value = catholic }
		command = { type = provincereligion which = 443 value = catholic }
		command = { type = provincereligion which = 444 value = catholic }
		command = { type = provincereligion which = 445 value = catholic }
		command = { type = provinceculture which = 438 value = iberian }
		command = { type = provinceculture which = 443 value = iberian }
		command = { type = provinceculture which = 444 value = iberian }
		command = { type = provinceculture which = 445 value = iberian }
		command = { type = religiousrevolt which = 438 }
		command = { type = religiousrevolt which = 443 }
		command = { type = religiousrevolt which = 444 }
		command = { type = religiousrevolt which = 445 }
		command = { type = stability value = -5 }
		command = { type = sleepevent which = 3160 }
		command = { type = sleepevent which = 3167 }
		command = { type = trigger which = 3728 }
		command = { type = trigger which = 3729 }
		command = { type = trigger which = 3730 }
	}
}

#The Habsburg Wedding#
event = {

	id = 3151		#Triggered by HAB3179#
	random = no
	country = SPA
	name = "EVENTNAME3151"
	desc = "EVENTHIST3151"
	style = 1

	action_a ={		#Humbly Accept Carlos' Wise Decision#
		name = "ACTIONNAME3151A"
		command = { type = stability value = -2 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = diplomats value = -6 }
	}
}

#The Habsburg Wedding#
event = {

	id = 3731		#Triggered by HAB3179#
	random = no
	country = SPA
	name = "EVENTNAME3731"
	desc = "EVENTHIST3731"
	style = 1

	action_a ={		#Humbly Accept Carlos' Wise Decision#
		name = "ACTIONNAME3731A"
		command = { type = dynastic which = HAB }
		command = { type = alliance which = HAB }
#		command = { type = vassal which = HAB }
		command = { type = treasury value = 500 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
	}
}


#The Quest for the New World#
event = {

	id = 3152
	trigger = {
		control = { province = 1880 data = SPA }
	}
	random = no
	country = SPA
	name = "EVENTNAME3152"
	desc = "EVENTHIST3152"
	style = 2

	date = { day = 1 month = january year = 1470 }
	offset = 30
	deathdate = { day = 1 month = january year = 1560 }

	action_a ={		#A New Reconquista! A New Beginning!#
		name = "ACTIONNAME3152A"
		command = { type = inherit which = AZT }
                command = { type = stability value = 1 }
		command = { type = treasury value = 300 }
		command = { type = colonists value = 6 }
		command = { type = missionaries value = 6 }
		}
}

#The Trade Center of Sevilla#
event = {

	id = 3153
                trigger = {
		owned = { province = 443 data = SPA }
	}
	random = no
	country = SPA
	name = "EVENTNAME3153"
	desc = "EVENTHIST3153"
	style = 2

	date = { day = 1 month = january year = 1500 }
	offset = 30
	deathdate = { day = 1 month = january year = 1511 }

	action_a ={		#We now have control of our Oversea Trade#
		name = "ACTIONNAME3153A"
		command = { type = cot which = 443 }
		command = { type = gainbuilding which = 443 value = shipyard }
		command = { type = merchants value = 6 }
		command = { type = treasury value = 200 }
	}
}

#The Fuggers#
event = {

	id = 3154
	random = no
	country = SPA
	name = "EVENTNAME3154"
	desc = "EVENTHIST3154"
	style = 2

	date = { day = 1 month = january year = 1514 }
	offset = 30
	deathdate = { day = 1 month = january year = 1520 }

	action_a ={		#Let the Fuggers run our Finances#
		name = "ACTIONNAME3154A"
		command = { type = loansize which = 1000 }
		command = { type = treasury value = -100 }
		command = { type = merchants value = 6 }
		command = { type = inflation value = -2 }
	}

	action_b ={		#Turn the Fuggers offer down#
		name = "ACTIONNAME3154B"
		command = { type = treasury value = -300 }
		command = { type = stability value = -4 }
		command = { type = inflation value = 10 }
	}
}

#The Communeros#
event = {

	id = 3155
	random = no
	country = SPA
	name = "EVENTNAME3155"
	desc = "EVENTHIST3155"
	style = 2

	date = { day = 1 month = january year = 1520 }
	offset = 30
	deathdate = { day = 1 month = july year = 1520 }

	action_a ={		#Crush the Rebellion#
	name = "ACTIONNAME3155A"
	command = { type = stability value = -1 }
	command = { type = domestic which = CENTRALIZATION value = 1 }
	command = { type = revoltrisk which = 24 value = 6 }
	}

	action_b ={		#Use force, but give concessions to the Peasantry#
	name = "ACTIONNAME3155B"
	command = { type = treasury value = -200 }
	command = { type = domestic which = ARISTOCRACY value = -1 }
	command = { type = domestic which = SERFDOM value = -1 }
	#command = { type = INF which = -1 value = 12083 }
	#command = { type = INF which = -1 value = 9712 }
	command = { type = revoltrisk which = 18 value = 2 }
	}

	action_c ={		#Use force, but give concessions to the Nobility#
	name = "ACTIONNAME3155C"
	command = { type = treasury value = -200 }
	command = { type = domestic which = ARISTOCRACY value = 1 }
	command = { type = domestic which = SERFDOM value = 1 }
	#command = { type = CAV which = -1 value = 8342 }
	#command = { type = CAV which = -1 value = 7665 }
	command = { type = revoltrisk which = 18 value = 4 }
	}

}

#The Knights of St:John of Jerusalem#
event = {

	id = 3156
	trigger = {
		exists = KNI
		owned = {
			province = 819
			data = -1
			}
		NOT = {
			war = {
				country = SPA
				country = KNI
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3156"
	desc = "EVENTHIST3156"
	style = 2

	date = { day = 1 month = january year = 1528 }
	offset = 30
	deathdate = { day = 1 month = january year = 1533 }

	action_a ={		#Give Malta to the Knights of St:John#
		name = "ACTIONNAME3156A"
		command = { type = secedeprovince which = KNI value = 819 }
		command = { type = vassal which = KNI }
		command = { type = stability value = 1 }
		command = { type = relation which = KNI value = 100 }
		command = { type = trigger which = 3540 }
	}

	action_b ={		#Don't give them anything#
		name = "ACTIONNAME3156B"
		command = { type = relation which = KNI value = -150 }
		command = { type = relation which = PAP value = -150 }
		command = { type = warships which = -1 value = 5 }
		command = { type = warships which = -1 value = 4 }
		command = { type = warships which = -1 value = 3 }
	}
}

#The Abdication of Charles V#
event = {

	id = 3157		#Triggered by HAB3190#
	random = no
	country = SPA
	name = "EVENTNAME3157"
	desc = "EVENTHIST3157"
	style = 2

	action_a ={		#Yes Father!#
		name = "ACTIONNAME3157A"
		#Holland
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 337 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
		#Belgium
		command = { type = addcore which = 387 }
		command = { type = addcore which = 377 }
		command = { type = addcore which = 378 }
		command = { type = addcore which = 379 }
		command = { type = addcore which = 380 }
		command = { type = addcore which = 1924 }
		#Italy
		command = { type = addcore which = 389 }
		command = { type = addcore which = 1921 }
		command = { type = relation which = HAB value = 100 }
		command = { type = stability value = 1 }
	}
}

#The Abdication of Charles V#
event = {

	id = 3484		#Triggered by HAB3190#
	random = no
	country = SPA
	name = "EVENTNAME3484"
	desc = "EVENTHIST3484"
	style = 2

	action_a ={		#Yes Father!#
		name = "ACTIONNAME3484A"
		#Holland
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 337 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
		#Belgium
		command = { type = addcore which = 387 }
		command = { type = addcore which = 377 }
		command = { type = addcore which = 378 }
		command = { type = addcore which = 379 }
		command = { type = addcore which = 380 }
		command = { type = addcore which = 1924 }
		#Italy
		command = { type = addcore which = 389 }
		command = { type = addcore which = 1921 }
		command = { type = relation which = HAB value = -100 }
		command = { type = stability value = -2 }
	}
}


#The Abdication of Charles V#
event = {

	id = 3747		#Triggered by HAB3190#
	random = no
	country = SPA
	name = "EVENTNAME3747"
	desc = "EVENTHIST3747"
	style = 2

	action_a ={		#Yes Father!#
		name = "ACTIONNAME3747A"
		#Holland
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 337 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
		#Belgium
		command = { type = addcore which = 387 }
		command = { type = addcore which = 377 }
		command = { type = addcore which = 378 }
		command = { type = addcore which = 379 }
		command = { type = addcore which = 380 }
		command = { type = addcore which = 1924 }
		#Italy
		command = { type = addcore which = 389 }
		command = { type = addcore which = 1921 }
		command = { type = relation which = HAB value = 50 }
		command = { type = stability value = -2 }
	}
}

#The Abdication of Charles V#
event = {

	id = 3748		#Triggered by HAB3749#
	random = no
	country = SPA
	name = "EVENTNAME3748"
	desc = "EVENTHIST3748"
	style = 2

	action_a ={		#Yes Father!#
		name = "ACTIONNAME3748A"
		command = { type = relation which = HAB value = 150 }
		command = { type = stability value = 1 }
	}
}

#State Bankruptcy#
event = {

	id = 3158
	trigger = {
		AND = {
			OR ={
				owned = { province = 24 data = -1 }
				owned = { province = 27 data = -1 }
				owned = { province = 159 data = -1 }
				}
			OR ={
				owned = { province = 25 data = -1 }
				owned = { province = 163 data = -1 }
				owned = { province = 167 data = -1 }
				}
			OR ={
				owned = { province = 26 data = -1 }
				owned = { province = 194 data = -1 }
				owned = { province = 169 data = -1 }
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3158"
	desc = "EVENTHIST3158"
	style = 2

	date = { day = 1 month = january year = 1592 }
	offset = 30
	deathdate = { day = 1 month = january year = 1598 }

	action_a ={		#Declare State Bankruptcy#
		name = "ACTIONNAME3158A"
		command = { type = treasury value = -500 }
		command = { type = loansize which = 100 }
		command = { type = inflation value = 5 }
		command = { type = stability value = -3 }
		command = { type = losemanufactory which = -1 }
		command = { type = losemanufactory which = -1 }
		command = { type = losemanufactory which = -1 }
		command = { type = desertion which = -1 value = 9892 }
		command = { type = desertion which = -1 value = 5841 }
		command = { type = desertion which = -1 value = 5613 }
	}
}

#Dutch Nobility demands General Estates#
event = {
	id = 3159
	trigger = {
		OR = {
			owned = { province = 337 data = -1 }
			owned = { province = 338 data = -1 }
			owned = { province = 339 data = -1 }
			owned = { province = 340 data = -1 }
			owned = { province = 377 data = -1 }
			owned = { province = 378 data = -1 }
			owned = { province = 379 data = -1 }
			owned = { province = 380 data = -1 }
			owned = { province = 1924 data = -1 }
			owned = { province = 1925 data = -1 }
			owned = { province = 1927 data = -1 }
			}
		AND = {
			NOT = {
				domestic = {
					type = innovative
					value = 8
					}
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3159"
	desc = "EVENTHIST3159"
	style = 2

	date = { day = 1 month = january year = 1560 }
	offset = 30
	deathdate = { day = 1 month = january year = 1571 }

	action_a ={			#No Concessions#
		name = "ACTIONNAME3159A"
		command = { type = province_revoltrisk which = 337 value = 10 }
		command = { type = province_revoltrisk which = 338 value = 10 }
		command = { type = province_revoltrisk which = 339 value = 10 }
		command = { type = revolt which = 339 } #Holland
		command = { type = province_revoltrisk which = 340 value = 10 }
		command = { type = revolt which = 340 } #Zeeland
		command = { type = province_revoltrisk which = 377 value = 10 }
		command = { type = province_revoltrisk which = 378 value = 10 }
		command = { type = province_revoltrisk which = 379 value = 10 }
		command = { type = province_revoltrisk which = 380 value = 10 }
		command = { type = province_revoltrisk which = 1924 value = 10 }
		command = { type = province_revoltrisk which = 1925 value = 10 }
		command = { type = province_revoltrisk which = 1927 value = 10 }
		command = { type = revolt which = 380 } #Flandern
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = treasury value = 300 }
		command = { type = stability value = 1 }
	}

	action_b ={			#Lower the taxes#
		name = "ACTIONNAME3159B"
		command = { type = province_revoltrisk which = 337 value = 5 }
		command = { type = province_revoltrisk which = 338 value = 5 }
		command = { type = province_revoltrisk which = 339 value = 5 }
		command = { type = province_revoltrisk which = 340 value = 5 }
		command = { type = province_revoltrisk which = 377 value = 5 }
		command = { type = province_revoltrisk which = 378 value = 5 }
		command = { type = province_revoltrisk which = 379 value = 5 }
		command = { type = province_revoltrisk which = 380 value = 5 }
		command = { type = province_revoltrisk which = 1924 value = 5 }
		command = { type = province_revoltrisk which = 1925 value = 5 }
		command = { type = province_revoltrisk which = 1927 value = 5 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = treasury value = -500 }
		command = { type = stability value = -2 }
	}
}

#The Purge of the Morisques#
event = {

	id = 3160
                trigger = {
		owned = { province = 444 data = SPA }
		owned = { province = 445 data = SPA }
	}

	random = no
	country = SPA
	name = "EVENTNAME3160"
	desc = "EVENTHIST3160"
	style = 2

	date = { day = 1 month = january year = 1566 }
	offset = 30
	deathdate = { day = 1 month = january year = 1571 }

	action_a ={		#Force them to become Good Catholic Spaniards#	
		name = "ACTIONNAME3160A"
		command = { type = domestic which = INNOVATIVE value = -2 }
		command = { type = population which = 444 value = -12500 }
		command = { type = population which = 445 value = -5000 }
		command = { type = provincereligion which = 444 value = catholic }
		command = { type = provincereligion which = 445 value = catholic }
		command = { type = revolt which = 444 }
		command = { type = revolt which = 445 }
		command = { type = stability value = 2 }
		command = { type = trigger which = 3655 }
		command = { type = trigger which = 3658 }
                    }

	action_b ={		#Let them be as they are needed for the economy#
		name = "ACTIONNAME3160B"
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = INNOVATIVE value = 2 }
		command = { type = stability  value = -4 }
		command = { type = revoltrisk which = 36 value = 6 }
		command = { type = trade value = 1800 }
		command = { type = infra value = 1200 }
		command = { type = provincetax which = 438 value = 2 }
		command = { type = provincetax which = 443 value = 2 }
		command = { type = provincetax which = 444 value = 2 }
		command = { type = provincetax which = 445 value = 2 }
	}
}

#The Holy League#
event = {

	id = 3161
	trigger = {
			exists = TUR
			AND = {
				event = 3549 
				} 
		}
	random = no
	country = SPA
	name = "EVENTNAME3161"
	desc = "EVENTHIST3161"
	style = 2

	date = { day = 1 month = january year = 1568 }
	offset = 30
	deathdate = { day = 1 month = january year = 1571 }

	action_a ={		#Support the Holy League#
		name = "ACTIONNAME3161A"
		command = { type = casusbelli which = TUR value = 72 }
		command = { type = relation which = TUR value = -150 }
		command = { type = relation which = PAP value = 150 }
		command = { type = relation which = FRA value = 150 }
		command = { type = relation which = KNI value = 150 }
		command = { type = relation which = TOS value = 150 }
		command = { type = relation which = VEN value = 150 }
		command = { type = relation which = NAP value = 150 }
		command = { type = relation which = SAV value = 150 }
	}

	action_b ={		#Let the matter fall#
		name = "ACTIONNAME3161B"
		command = { type = relation which = TUR value = 50 }
		command = { type = relation which = PAP value = -50 }
		command = { type = relation which = FRA value = -50 }
		command = { type = relation which = KNI value = -50 }
		command = { type = relation which = TOS value = -50 }
		command = { type = relation which = VEN value = -50 }
		command = { type = relation which = NAP value = -50 }
		command = { type = relation which = SAV value = -50 }
	}
}

#The Portuguese Crown#
event = {

	id = 3162
	random = no
	country = SPA
	name = "EVENTNAME3162"
	desc = "EVENTHIST3162"
	style = 2
	trigger = { exists = POR }

	date = { day = 1 month = february year = 1580 }
	offset = 0
	deathdate = { day = 2 month = february year = 1580 }

	action_a ={		#One King, One Kingdom#
		name = "ACTIONNAME3162A"
		command = { Type = vassal which = POR }
		command = { Type = dynastic which = POR }
		command = { Type = stability value = 1 }
	}

	action_b ={		#One King, Two Kingdoms#
		name = "ACTIONNAME3162B"
		command = { Type = alliance which = POR }
		command = { Type = dynastic which = POR }
		command = { Type = stability value = -1 }
	}
}

#The Portuguese Crown#
event = {

	id = 3163
	random = no
	trigger = { exists = POR }
	country =  SPA
	name = "EVENTNAME3163"
	desc = "EVENTHIST3163"
	style = 3

	date = { day = 1 month = april year = 1621 }
	offset = 0
	deathdate = { day = 2 month = april year = 1621 }

	action_a ={		#One King, One Kingdom#
		name = "ACTIONNAME3163A"
		command = { Type = vassal which = POR }
		command = { Type = dynastic which = POR }
		command = { Type = stability value = 1 }
	}

	action_b ={		#One King, Two Kingdoms#
		name = "ACTIONNAME3163B"
		command = { Type = alliance which = POR }
		command = { Type = dynastic which = POR }
		command = { Type = stability value = -1 }

	}
}

#State Bankruptcy#
event = {

	id = 3164
	trigger = {
		AND = {
			OR ={
				owned = { province = 24 data = -1 }
				owned = { province = 27 data = -1 }
				owned = { province = 159 data = -1 }
				}
			OR ={
				owned = { province = 25 data = -1 }
				owned = { province = 163 data = -1 }
				owned = { province = 167 data = -1 }
				}
			OR ={
				owned = { province = 26 data = -1 }
				owned = { province = 194 data = -1 }
				owned = { province = 169 data = -1 }
				}
			}
		}

	random = no
	country = SPA
	name = "EVENTNAME3164"
	desc = "EVENTHIST3164"
	style = 3

	date = { day = 1 month = january year = 1621 }
	offset = 30
	deathdate = { day = 1 month = january year = 1641 }

	action_a ={			#Declare State Bankruptcy#
		name = "ACTIONNAME3164A"
		command = { type = treasury value = -1000 }
		command = { type = loansize which = 200 }
		command = { type = inflation value = 10 }
		command = { type = stability value = -3 }
		command = { type = losemanufactory which = -1 }
		command = { type = losemanufactory which = -1 }
		command = { type = losemanufactory which = -1 }
		command = { type = desertion which = -1 value = 11198 }
		command = { type = desertion which = -1 value = 7317 }
		command = { type = desertion which = -1 value = 9467 }

	}
}

#Epidemic Plague#
event = {

	id = 3165
	random = no
	country = SPA
	name = "EVENTNAME3165"
	desc = "EVENTHIST3165"
	style = 3

	date = { day = 1 month = january year = 1596 }
	offset = 30
	deathdate = { day = 1 month = january year = 1603 }

	action_a ={				#Arrgh!#
		name = "ACTIONNAME3165A"
		command = { type = stability value = -1 }
		command = { type = trigger which = 3273 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -3000 }
		command = { type = provincetax which = -3 value = -1 }
	}
}

#The Catholic League#
event = {

	id = 3166
	trigger = {
		 OR = {
			religion = catholic
			religion = counterreform
				}
			}
	random = no
	country = SPA
	name = "EVENTNAME3166"
	desc = "EVENTHIST3166"
	style = 3

	date = { day = 1 month = january year = 1607 }
	offset = 30
	deathdate = { day = 1 month = january year = 1609 }

	action_a ={			#Prepare to Join#
		name = "ACTIONNAME3166A"
		command = { type = relation which = FRA value = -100 }
		command = { type = relation which = BRA value = -150 }
		command = { type = relation which = HAN value = -150 }
		command = { type = relation which = HES value = -150 }
		command = { type = relation which = PFA value = -150 }
		command = { type = relation which = SAC value = -150 }
		command = { type = relation which = THU value = -150 }
		command = { type = relation which = SHL value = -150 }
		command = { type = relation which = KLE value = 100 }
		command = { type = relation which = KOL value = 150 }
		command = { type = relation which = BAY value = 150 }
		command = { type = relation which = PAP value = 150 }
		command = { type = relation which = HAB value = 150 }
	}

	action_b ={			#Stay Neutral#
		name = "ACTIONNAME3166B"
		command = { type = relation which = BRA value = 100 }
		command = { type = relation which = HAN value = 100 }
		command = { type = relation which = HES value = 100 }
		command = { type = relation which = PFA value = 100 }
		command = { type = relation which = SAC value = 100 }
		command = { type = relation which = THU value = 100 }
		command = { type = relation which = BAY value = 50 }
		command = { type = relation which = KLE value = -50 }
		command = { type = relation which = KOL value = -50 }
		command = { type = relation which = HAB value = -100 }
		command = { type = relation which = PAP value = -150 }
	}
}

#The Expulsion of the Morisques#
event = {

	id = 3167
                trigger = {
		owned = { province = 444 data = SPA }
		owned = { province = 445 data = SPA }
	}
	random = no
	country = SPA
	name = "EVENTNAME3167"
	desc = "EVENTHIST3167"
	style = 3

	date = { day = 1 month = january year = 1600 }
	offset = 134
	deathdate = { day = 1 month = january year = 1612 }

	action_a ={			#Expel the Heretics!#
		name = "ACTIONNAME3167A"
		command = { type = domestic which = INNOVATIVE value = -2 }
		command = { type = population which = 444 value = -12500 }
		command = { type = population which = 445 value = -5000 }
		command = { type = provinceculture which = 444 value = iberian }
		command = { type = provinceculture which = 445 value = iberian }
		command = { type = revolt which = 445 }
		command = { type = revolt which = 444 }
		command = { type = stability value = 1 }
		command = { type = trigger which = 3656 }
		command = { type = trigger which = 3653 }
		command = { type = trigger which = 3659 }
                    }

	action_b ={	#Let them be as they are needed for the economy#
		name = "ACTIONNAME3167B"
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = INNOVATIVE value = 2 }
		command = { type = stability  value = -4 }
		command = { type = revoltrisk which = 36 value = 6 }
		command = { type = trade value = 1800 }
		command = { type = infra value = 1200 }
		command = { type = provincetax which = 438 value = 3 }
		command = { type = provincetax which = 443 value = 3 }
		command = { type = provincetax which = 444 value = 3 }
		command = { type = provincetax which = 445 value = 3 }
	}
}

#National revolt in Portugal#
event = {

	id = 3168					#Triggered by SPA3169#
	random = no
	country = SPA
	name = "EVENTNAME3168"
	desc = "EVENTHIST3168"
	style = 3

	action_a ={			#Put it down!#
		name = "ACTIONNAME3168A"
		command = { type = breakvassal which = POR }
		command = { type = relation which = POR value = -200 }
		command = { type = revolt which = 434 }
		command = { type = revolt which = 441 }
		command = { type = revolt which = 442 }
		command = { type = revolt which = 823 }
		command = { type = revolt which = 818 }
		command = { type = INF which = 435 value = 10000 }
		command = { type = domestic which = INNOVATIVE value = -1 }
	}

	action_b ={			#Appease them!#
		name = "ACTIONNAME3168B"
		command = { type = treasury value = -800 }
		command = { type = stability value = 1 }
		command = { type = domestic which = ARISTOCRACY value = 1 }
		command = { type = domestic which = CENTRALIZATION value = -2 }
	}
}

#The Iberian Revolts#
event = {

	id = 3169
	trigger ={
		atwar = yes
		}
	random = no
	country = SPA
	name = "EVENTNAME3169"
	desc = "EVENTHIST3169"
	style = 3

	date = { day = 1 month = january year = 1630 }
	offset = 41
	deathdate = { day = 1 month = january year = 1649 }


	action_a ={			#Put it down!#
		name = "ACTIONNAME3169A"
		command = { type = trigger which = 3168 }
		command = { type = trigger which = 3170 }
		command = { type = breakvassal which = ARG }
		command = { type = relation which = ARG value = -200 }
		command = { type = breakvassal which = CAS }
		command = { type = relation which = CAS value = -200 }
		command = { type = breakvassal which = CAT }
		command = { type = relation which = CAT value = -200 }
		command = { type = revolt which = 429 }
		command = { type = revolt which = 429 }
		command = { type = revolt which = 427 }
		command = { type = revolt which = 821 }
		command = { type = revolt which = 397 }
		command = { type = INF which = 436 value = 10000 }
		command = { type = domestic which = INNOVATIVE value = -1 }
	}

	action_b ={			#Appease them!#
		name = "ACTIONNAME3169B"
		command = { type = trigger which = 3168 }
		command = { type = trigger which = 3170 }
		command = { type = treasury value = -500 }
		command = { type = stability value = 1 }
		command = { type = domestic which = ARISTOCRACY value = 3 }
		command = { type = domestic which = CENTRALIZATION value = -1 }

	}
}

#The Italian Revolts#
event = {

	id = 3170					#Triggered by SPA3169#
	random = no
	country = SPA
	name = "EVENTNAME3170"
	desc = "EVENTHIST3170"
	style = 3

	action_a ={			#Put it down!#
		name = "ACTIONNAME3170A"
		command = { type = revolt which = 395 }
		command = { type = revolt which = 393 }
		command = { type = revolt which = 399 }
		command = { type = revolt which = 400 }
		command = { type = revolt which = 402 }
		command = { type = revolt which = 389 }
		command = { type = INF which = 396 value = 5000 }
		command = { type = INF which = 394 value = 5000 }
		command = { type = domestic which = INNOVATIVE value = -1 }
	}

	action_b ={			#Appease them!#
		name = "ACTIONNAME3170B"
		command = { type = treasury value = -300 }
		command = { type = stability value = 1 }
		command = { type = domestic which = CENTRALIZATION value = -1 }

	}
}

#The Repatriation of the Netherlands#
event = {

	id = 3171
	trigger = {
		OR = {
			event = 3159
			event = 3315
			event = 3316
		}
		NOT = { event = 3935 }
	}
	random = no
	country = SPA
	name = "EVENTNAME3171"
	desc = "EVENTHIST3171"
	style = 3

	date = { day = 1 month = january year = 1648 }
	offset = 10
	deathdate = { day = 1 month = january year = 1649 }

	action_a ={			#The Netherlands is Subjugated#
		name = "ACTIONNAME3171A"
		command = { type = conversion which = 380 }
		command = { type = province_revoltrisk which = 337 value = -30 }
		command = { type = province_revoltrisk which = 338 value = -30 }
		command = { type = province_revoltrisk which = 339 value = -30 }
		command = { type = province_revoltrisk which = 340 value = -30 }
		command = { type = province_revoltrisk which = 377 value = -27 }
		command = { type = province_revoltrisk which = 378 value = -27 }
		command = { type = province_revoltrisk which = 379 value = -27 }
		command = { type = province_revoltrisk which = 380 value = -27 }
		command = { type = province_revoltrisk which = 1924 value = -27 }
		command = { type = province_revoltrisk which = 1925 value = -27 }
		command = { type = province_revoltrisk which = 1927 value = -27 }
		command = { type = domestic which = CENTRALIZATION value = 3 }
		command = { type = treasury value = 300 }
		command = { type = stability value = 3 }
	}
}

#France opens Chambers of Reunion#
event = {

	id = 3172			#Triggered by FRA3127#
	random = no
	country = SPA
	name = "EVENTNAME3172"
	desc = "EVENTHIST3172"
	style = 3

	action_a ={				#Defy French claims#
		name = "ACTIONNAME3172A"
		command = { type = casusbelli which = FRA value = 72 }
		command = { type = relation which = FRA value = -150 }
		command = { type = relation which = ENG value = 150 }
		command = { type = relation which = HAB value = 150 }
		command = { type = relation which = PRU value = 150 }
		command = { type = relation which = HOL value = 150 }
		command = { type = relation which = HAN value = 100 }
		command = { type = relation which = BAD value = 100 }
		command = { type = relation which = HES value = 100 }
		command = { type = relation which = KLE value = 100 }
		command = { type = relation which = KOL value = 100 }
		command = { type = relation which = PFA value = 100 }
		command = { type = relation which = THU value = 100 }
	}

	action_b ={				#Give in to France#
		name = "ACTIONNAME3172B"
		command = { type = secedeprovince which = FRA value = 377 }
		command = { type = secedeprovince which = FRA value = 378 }
		command = { type = secedeprovince which = FRA value = 379 }
		command = { type = relation which = ENG value = -100 }
		command = { type = relation which = HAB value = -100 }
		command = { type = relation which = PRU value = -100 }
		command = { type = relation which = HOL value = -100 }
		command = { type = relation which = FRA value = 150 }
		command = { type = treasury value = -200 }
	}
}

#The Succession of Carlos II in Spain#
event = {

	id = 3173
	random = no
	country = SPA
	name = "EVENTNAME3173"
	desc = "EVENTHIST3173"
	style = 4

	date = { day = 1 month = november year = 1700 }
	offset = 41
	deathdate = { day = 2 month = november year = 1700 }

	action_a ={
		name = "ACTIONNAME3173A"	#Felipe of Bourbon#
		command = { type = trigger which = 3199 }
		command = { type = trigger which = 3130 }
		command = { type = trigger which = 3035 }
		command = { type = trigger which = 3511 }
		command = { type = stability value = 3 }
		command = { type = dynastic which = FRA }
#		command = { type = alliance which = FRA }
		command = { type = relation which = FRA value = 150 }
		command = { type = relation which = HAB value = -150 }
	}

	action_b ={
		name = "ACTIONNAME3173B"	#Carlos of Habsburg#
		command = { type = trigger which = 3200 }
		command = { type = trigger which = 3131 }
		command = { type = trigger which = 3036 }
		command = { type = trigger which = 3512 }
		command = { type = stability value = -6 }
		command = { type = dynastic which = HAB }
#		command = { type = alliance which = HAB }
		command = { type = relation which = HAB value = 150 }
		command = { type = relation which = FRA value = -150 }
		#Habsburg Dynasty#
		command = { type = wakemonarch which = 04151 }
		command = { type = wakemonarch which = 04152 }
		command = { type = wakemonarch which = 04153 }
		command = { type = wakemonarch which = 04154 }
		command = { type = wakemonarch which = 04155 }
                command = { type = sleepmonarch which = 04146 }
		command = { type = sleepmonarch which = 04147 }
		command = { type = sleepmonarch which = 04148 }
		command = { type = sleepmonarch which = 04149 }
		command = { type = sleepmonarch which = 04150 }
            }


}

#The Effects of the Pragmatic Sanction#
event = {

	id = 3174
	trigger = {
		NOT = { 
			Event = 3200
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3174"
	desc = "EVENTHIST3174"
	style = 4

	date = { day = 1 month = january year = 1741 }
	offset = 10
	deathdate = { day = 1 month = august year = 1741 }

	action_a ={		#Anti-Habsburg#
		name = "ACTIONNAME3174A"
		command = { type = casusbelli which = HAB value = 36 }
		command = { type = stability value = -1 }
		command = { type = relation which = BAY value = 100 }
		command = { type = relation which = SAC value = 100 }
		command = { type = relation which = GEN value = 100 }
		command = { type = relation which = PRU value = 100 }
		command = { type = relation which = FRA value = 150 }
		command = { type = relation which = ENG value = -150 }
		command = { type = relation which = HOL value = -100 }
		command = { type = relation which = POR value = -100 }
		command = { type = relation which = RUS value = -50 }
		command = { type = relation which = HES value = -50 }
		command = { type = relation which = HAN value = -50 }
		command = { type = relation which = HAB value = -150 }

	}

	action_b ={		#Neutral#
		name = "ACTIONNAME3174B"
		command = { type = stability value = 2 }
		command = { type = relation which = BAY value = -50 }
		command = { type = relation which = SAC value = -50 }
		command = { type = relation which = GEN value = 50 }
		command = { type = relation which = PRU value = -50 }
		command = { type = relation which = FRA value = 50 }
		command = { type = relation which = ENG value = 50 }
		command = { type = relation which = HOL value = 100 }
		command = { type = relation which = POR value = 100 }
		command = { type = relation which = RUS value = 50 }
		command = { type = relation which = HES value = 50 }
		command = { type = relation which = HAN value = 50 }
		command = { type = relation which = HAB value = 100 }

	}

	action_c ={		#Pro-Habsburg#
		name = "ACTIONNAME3174C"
		command = { type = stability value = -2 }
		command = { type = casusbelli which = FRA value = 36 }
		command = { type = relation which = BAY value = -100 }
		command = { type = relation which = SAC value = -100 }
		command = { type = relation which = GEN value = -50 }
		command = { type = relation which = PRU value = -100 }
		command = { type = relation which = FRA value = -150 }
		command = { type = relation which = ENG value = 100 }
		command = { type = relation which = HOL value = -150 }
		command = { type = relation which = POR value = 150 }
		command = { type = relation which = RUS value = 50 }
		command = { type = relation which = HES value = 50 }
		command = { type = relation which = HAN value = 50 }
		command = { type = relation which = HAB value = 150 }	}

}

#The Sale of Corsica#
event = {

	id = 3175		#Triggered by GEN3708 or ENG3046#
	random = no
	country = SPA
	name = "EVENTNAME3175"
	desc = "EVENTHIST3175"
	style = 4

	action_a ={				#Offer to buy Corsica#
		name = "ACTIONNAME3175A"
		command = { type = trigger which = 3709 }
	}

	action_b ={			#Pass the opportunity#
		name = "ACTIONNAME3175B"
		command = { type = trigger which = 3648 }
	}
}

#Genoa accepts offer to buy Corsica#
event = {

	id = 3723			#Triggered by GEN3709#
	random = no
	country = SPA
	name = "EVENTNAME3723"
	desc = "EVENTHIST3723"
	style = 4

	action_a ={				#Good#
		name = "ACTIONNAME3723A"
		command = { type = relation which = GEN value = 150 }
		command = { type = treasury value = -1200 }
	}
}

#Genoa decline offer to buy Corsica#
event = {

	id = 3724			#Triggered by GEN3709#
	random = no
	country = SPA
	name = "EVENTNAME3724"
	desc = "EVENTHIST3724"
	style = 4

	action_a ={				#Darn#
		name = "ACTIONNAME3724A"
		command = { type = relation which = GEN value = -100 }
	}
}

#The American Colonial Policy#
event = {

	id = 3176
	trigger = {
		NOT = {
			domestic = {
				type = innovative
				value = 10
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3176"
	desc = "EVENTHIST3176"
	style = 4

	date = { day = 1 month = january year = 1790 }
	offset = 10
	deathdate = { day = 1 month = august year = 1820 }


	action_a ={		#Govern through Spanish Governors#
		name = "ACTIONNAME3176A"
		command = { type = province_revoltrisk which = 24  value = 6 }
		command = { type = province_revoltrisk which = 25  value = 6 }
		command = { type = province_revoltrisk which = 26  value = 6 }
		command = { type = province_revoltrisk which = 27  value = 6 }
		command = { type = province_revoltrisk which = 28  value = 6 }
		command = { type = province_revoltrisk which = 29  value = 6 }
		command = { type = province_revoltrisk which = 30  value = 6 }
		command = { type = province_revoltrisk which = 223  value = 6 }
		command = { type = province_revoltrisk which = 222  value = 6 }
		command = { type = province_revoltrisk which = 1485  value = 6 }
		command = { type = province_revoltrisk which = 1486  value = 6 }
		command = { type = province_revoltrisk which = 218  value = 6 }
		command = { type = province_revoltrisk which = 217  value = 6 }
		command = { type = province_revoltrisk which = 224  value = 6 }
		command = { type = province_revoltrisk which = 158  value = 6 }
		command = { type = province_revoltrisk which = 160  value = 6 }
		command = { type = province_revoltrisk which = 161  value = 6 }
		command = { type = province_revoltrisk which = 162  value = 6 }
		command = { type = province_revoltrisk which = 163  value = 6 }
		command = { type = province_revoltrisk which = 164  value = 6 }
		command = { type = province_revoltrisk which = 165  value = 6 }
		command = { type = province_revoltrisk which = 166  value = 6 }
		command = { type = province_revoltrisk which = 167  value = 6 }
		command = { type = province_revoltrisk which = 168  value = 6 }
		command = { type = stability value = 1 }
		command = { type = relation which = USA value = -50 }
	}

	action_b ={		#Govern from Madrid#
		name = "ACTIONNAME3176B"
		command = { type = province_revoltrisk which = 24  value = 9 }
		command = { type = province_revoltrisk which = 25  value = 9 }
		command = { type = province_revoltrisk which = 26  value = 9 }
		command = { type = province_revoltrisk which = 27  value = 9 }
		command = { type = province_revoltrisk which = 28  value = 9 }
		command = { type = province_revoltrisk which = 29  value = 9 }
		command = { type = province_revoltrisk which = 30  value = 9 }
		command = { type = province_revoltrisk which = 223  value = 9 }
		command = { type = province_revoltrisk which = 222  value = 9 }
		command = { type = province_revoltrisk which = 1485  value = 9 }
		command = { type = province_revoltrisk which = 1486  value = 9 }
		command = { type = province_revoltrisk which = 218  value = 9 }
		command = { type = province_revoltrisk which = 217  value = 9 }
		command = { type = province_revoltrisk which = 224  value = 9 }
		command = { type = province_revoltrisk which = 158  value = 9 }
		command = { type = province_revoltrisk which = 160  value = 9 }
		command = { type = province_revoltrisk which = 161  value = 9 }
		command = { type = province_revoltrisk which = 162  value = 9 }
		command = { type = province_revoltrisk which = 163  value = 9 }
		command = { type = province_revoltrisk which = 164  value = 9 }
		command = { type = province_revoltrisk which = 165  value = 9 }
		command = { type = province_revoltrisk which = 166  value = 9 }
		command = { type = province_revoltrisk which = 167  value = 9 }
		command = { type = province_revoltrisk which = 168  value = 9 }
		command = { type = stability value = 3 }
		command = { type = relation which = USA value = -150  }
	}

	action_c ={		#Franchised Citizenship#
		name = "ACTIONNAME3176C"
		command = { type = province_revoltrisk which = 24  value = 3 }
		command = { type = province_revoltrisk which = 25  value = 3 }
		command = { type = province_revoltrisk which = 26  value = 3 }
		command = { type = province_revoltrisk which = 27  value = 3 }
		command = { type = province_revoltrisk which = 28  value = 3 }
		command = { type = province_revoltrisk which = 29  value = 3 }
		command = { type = province_revoltrisk which = 30  value = 3 }
		command = { type = province_revoltrisk which = 223  value = 3 }
		command = { type = province_revoltrisk which = 222  value = 3 }
		command = { type = province_revoltrisk which = 1485  value = 3 }
		command = { type = province_revoltrisk which = 1486  value = 3 }
		command = { type = province_revoltrisk which = 218  value = 3 }
		command = { type = province_revoltrisk which = 217  value = 3 }
		command = { type = province_revoltrisk which = 224  value = 3 }
		command = { type = province_revoltrisk which = 158  value = 3 }
		command = { type = province_revoltrisk which = 160  value = 3 }
		command = { type = province_revoltrisk which = 161  value = 3 }
		command = { type = province_revoltrisk which = 162  value = 3 }
		command = { type = province_revoltrisk which = 163  value = 3 }
		command = { type = province_revoltrisk which = 164  value = 3 }
		command = { type = province_revoltrisk which = 165  value = 3 }
		command = { type = province_revoltrisk which = 166  value = 3 }
		command = { type = province_revoltrisk which = 167  value = 3 }
		command = { type = province_revoltrisk which = 168  value = 3 }
		command = { type = stability value = -2 }
		command = { type = relation which = USA value = 100 }
	}

}

#The Sale of Florida to the United States#
event = {

	id = 3090
	date = { day = 1 month = january year = 1819 }
	offset = 120
	deathdate = { day = 2 month = may year = 1819 }
	trigger = {
		exists = USA
		OR = { 
			owned = { province = 48 data = -1 }
			owned = { province = 49 data = -1 }
			owned = { province = 50 data = -1 }
			}
	}

	random = no
	country = SPA
	name = "EVENTNAME3090"
	desc = "EVENTHIST3090"
	style = 5

	action_a ={		#Offer Florida for 500 ducats#
		name = "ACTIONNAME3090A"
		command = { type = trigger which = 3067 }
	}

	action_b ={		#Offer them nothing#
		name = "ACTIONNAME3090B"
		command = { type = relation which = USA value = -100 }
		command = { type = stability value = -1 } 
	}
}

#Adam-Onís Treaty#
event = {

	id = 3091			#Triggered by USA3067#
	random = no
	country = SPA
	name = "EVENTNAME3091"
	desc = "EVENTHIST3091"
	style = 5

	action_a ={			#Ok#
		name = "ACTIONNAME3091A"
		command = { type = treasury value = 500 }
		command = { type = stability value = 2 }
		command = { type = relation which = USA value = 100 }
		command = { type = secedeprovince which = USA value = 48 }
		command = { type = secedeprovince which = USA value = 49 }
		command = { type = secedeprovince which = USA value = 50 }
	}
}

#The United States declined the offer of Florida#
event = {

	id = 3092			#Triggered by USA3067#
	random = no
	country = SPA
	name = "EVENTNAME3092"
	desc = "EVENTHIST3092"
	style = 5

	action_a ={			#Ok#
		name = "ACTIONNAME3092A"
		command = { type = relation which = USA value = -100 }
	}

}
#José Monino's Reforms#
event = {

	id = 3094
	random = no
	country = SPA
	name = "EVENTNAME3094"
	desc = "EVENTHIST3094"
	style = 5

	date = { day = 1 month = january year = 1769 }
	offset = 10
	deathdate = { day = 1 month = january year = 1770 }

	action_a ={			#Reform#
		name = "ACTIONNAME3094A"
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = INNOVATIVE value = 2 }
		command = { type = gainmanufactory which = -1 value = refinery }
		command = { type = gainmanufactory which = -1 value = goods }
		command = { type = stability value = -2 }
	}

	action_b ={			#Do not reform#
		name = "ACTIONNAME3094B"
		command = { type = stability value = 2 }
		command = { type = treasury value = 300 }
	}
}

#The Constitution of 1812#
event = {

	id = 3095
	random = no
	country = SPA
	name = "EVENTNAME3095"
	desc = "EVENTHIST3095"
	style = 5

	date = { day = 1 month = january year = 1812 }
	offset = 10
	deathdate = { day = 30 month = december year = 1812 }

	action_a ={		#The Cortes has enacted it already#
		name = "ACTIONNAME3095A"
		command = { type = domestic which = ARISTOCRACY value = -5 }
		command = { type = domestic which = SERFDOM value = -5 }
		command = { type = domestic which = MERCANTILISM value = -2 }
		command = { type = domestic which = INNOVATIVE value = 2 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = stability value = -1 }
	}
}

#The Reaction of 1813#
event = {

	id = 3096
	random = no
	country = SPA
	name = "EVENTNAME3096"
	desc = "EVENTHIST3096"
	style = 5

	date = { day = 1 month = january year = 1813 }
	offset = 10
	deathdate = { day = 30 month = december year = 1813 }

	action_a ={		#Introduce a regime of reaction#
		name = "ACTIONNAME3096A"
		command = { type = domestic which = ARISTOCRACY value = 7 }
		command = { type = domestic which = SERFDOM value = 6 }
		command = { type = domestic which = MERCANTILISM value = 3 }
		command = { type = domestic which = INNOVATIVE value = -5 }
		command = { type = domestic which = CENTRALIZATION value = -2 }
		command = { type = stability value = 3 }
	}

	action_b ={		#Let the liberal constitution stay put#
		name = "ACTIONNAME3096B"
		command = { type = stability value = -1 }
		command = { type = treasury value = -200 }
	}
}
#The Duke of Alba and the Edict of Blood#
event = {

	id = 3315
	trigger = {
		event = 3159
		NOT = {
			religion = protestant
			religion = reformed
		}
		OR = {
			owned = { province = 337 data = -1 }
			owned = { province = 338 data = -1 }
			owned = { province = 339 data = -1 }
			owned = { province = 340 data = -1 }
			owned = { province = 377 data = -1 }
			owned = { province = 378 data = -1 }
			owned = { province = 379 data = -1 }
			owned = { province = 380 data = -1 }
			owned = { province = 1924 data = -1 }
			owned = { province = 1925 data = -1 }
			owned = { province = 1927 data = -1 }
			}
		AND = {
			NOT = {
				domestic = {
					type = innovative
					value = 8
					}
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3315"
	desc = "EVENTHIST3315"
	style = 2

	date = { day = 1 month = january year = 1565 }
	offset = 30
	deathdate = { day = 1 month = january year = 1576 }

	action_a ={			#No Concessions#
		name = "ACTIONNAME3315A"
		command = { type = province_revoltrisk which = 337 value = 10 }
		command = { type = province_revoltrisk which = 338 value = 10 }
		command = { type = province_revoltrisk which = 339 value = 10 }
		command = { type = revolt which = 339 } #Holland
		command = { type = province_revoltrisk which = 340 value = 10 }
		command = { type = revolt which = 340 } #Zeeland
		command = { type = province_revoltrisk which = 377 value = 7 }
		command = { type = province_revoltrisk which = 378 value = 7 }
		command = { type = province_revoltrisk which = 379 value = 7 }
		command = { type = province_revoltrisk which = 380 value = 7 }
		command = { type = province_revoltrisk which = 1924 value = 7 }
		command = { type = province_revoltrisk which = 1925 value = 7 }
		command = { type = province_revoltrisk which = 1927 value = 10 }
		command = { type = revolt which = 380 } #Flandern
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = treasury value = 300 }
		command = { type = stability value = 1 }
	}

	action_b ={			#Don't introduce that Consumption Tax#
		name = "ACTIONNAME3315B"
		command = { type = province_revoltrisk which = 337 value = 5 }
		command = { type = province_revoltrisk which = 338 value = 5 }
		command = { type = province_revoltrisk which = 339 value = 5 }
		command = { type = province_revoltrisk which = 340 value = 5 }
		command = { type = province_revoltrisk which = 377 value = 2 }
		command = { type = province_revoltrisk which = 378 value = 2 }
		command = { type = province_revoltrisk which = 379 value = 2 }
		command = { type = province_revoltrisk which = 380 value = 2 }
		command = { type = province_revoltrisk which = 1924 value = 2 }
		command = { type = province_revoltrisk which = 1925 value = 2 }
		command = { type = province_revoltrisk which = 1927 value = 5 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = treasury value = -500 }
		command = { type = stability value = -2 }
	}
}

#Alessandro Farnese and the Union of Arras#
event = {

	id = 3316
	trigger = {
		NOT = {
			religion = protestant
			religion = reformed
		}
		event = 3159
		event = 3315
		OR = {
			owned = { province = 337 data = -1 }
			owned = { province = 338 data = -1 }
			owned = { province = 339 data = -1 }
			owned = { province = 340 data = -1 }
			owned = { province = 377 data = -1 }
			owned = { province = 378 data = -1 }
			owned = { province = 379 data = -1 }
			owned = { province = 380 data = -1 }
			owned = { province = 1924 data = -1 }
			owned = { province = 1925 data = -1 }
			owned = { province = 1927 data = -1 }
			}
		AND = {
			NOT = {
				domestic = {
					type = innovative
					value = 8
					}
				}
			}
		}
	random = no
	country = SPA
	name = "EVENTNAME3316"
	desc = "EVENTHIST3316"
	style = 2

	date = { day = 1 month = january year = 1575 }
	offset = 30
	deathdate = { day = 1 month = january year = 1586 }

	action_a ={			#Sign the Union of Arras#
		name = "ACTIONNAME3316A"
		command = { type = province_revoltrisk which = 337 value = 10 }
		command = { type = province_revoltrisk which = 338 value = 10 }
		command = { type = province_revoltrisk which = 339 value = 10 }
		command = { type = revolt which = 339 } #Holland
		command = { type = province_revoltrisk which = 340 value = 10 }
		command = { type = revolt which = 340 } #Zeeland
		command = { type = province_revoltrisk which = 377 value = -7 }
		command = { type = province_revoltrisk which = 378 value = -7 }
		command = { type = province_revoltrisk which = 379 value = -7 }
		command = { type = province_revoltrisk which = 380 value = -7 }
		command = { type = province_revoltrisk which = 1924 value = -7 }
		command = { type = province_revoltrisk which = 1925 value = -7 }
		command = { type = province_revoltrisk which = 1927 value = 10 }
		command = { type = treasury value = -200 }
		command = { type = stability value = 1 }
	}

	action_b ={			#No Concessions#
		name = "ACTIONNAME3316B"
		command = { type = province_revoltrisk which = 337 value = 10 }
		command = { type = province_revoltrisk which = 338 value = 10 }
		command = { type = province_revoltrisk which = 339 value = 10 }
		command = { type = revolt which = 339 } #Holland
		command = { type = province_revoltrisk which = 340 value = 10 }
		command = { type = revolt which = 340 } #Zeeland
		command = { type = province_revoltrisk which = 377 value = 7 }
		command = { type = province_revoltrisk which = 378 value = 7 }
		command = { type = province_revoltrisk which = 379 value = 7 }
		command = { type = province_revoltrisk which = 380 value = 7 }
		command = { type = province_revoltrisk which = 1924 value = 7 }
		command = { type = province_revoltrisk which = 1925 value = 7 }
		command = { type = province_revoltrisk which = 1927 value = 10 }
		command = { type = revolt which = 380 } #Flandern
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = treasury value = 300 }
		command = { type = stability value = 3 }
	}

	action_c ={			#Sign the Union of Arras and lower taxes#
		name = "ACTIONNAME3316C"
		command = { type = province_revoltrisk which = 337 value = 5 }
		command = { type = province_revoltrisk which = 338 value = 5 }
		command = { type = province_revoltrisk which = 339 value = 5 }
		command = { type = province_revoltrisk which = 340 value = 5 }
		command = { type = province_revoltrisk which = 377 value = -7 }
		command = { type = province_revoltrisk which = 378 value = -7 }
		command = { type = province_revoltrisk which = 379 value = -7 }
		command = { type = province_revoltrisk which = 380 value = -7 }
		command = { type = province_revoltrisk which = 1924 value = -7 }
		command = { type = province_revoltrisk which = 1925 value = -7 }
		command = { type = province_revoltrisk which = 1927 value = 5 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = treasury value = -500 }
		command = { type = stability value = -1 }
	}

}
#Olivares#
event = {

	id = 3711
	random = no
	country = SPA
	name = "EVENTNAME3711"
	desc = "EVENTHIST3711"
	style = 3

	date = { day = 1 month = january year = 1622 }
	offset = 10
	deathdate = { day = 30 month = december year = 1622 }


	action_a ={			#An Excellent Minister!#
		name = "ACTIONNAME3711A"
		command = { type = DIP which = 3 value = 240 }
		command = { type = ADM which = 3 value = 240 }
		command = { type = MIL which = 3 value = 240 }
		command = { type = stability value = 2 }
	}
}
#Alberoni#
event = {

	id = 3712
	random = no
	country = SPA
	name = "EVENTNAME3712"
	desc = "EVENTHIST3712"
	style = 3

	date = { day = 1 month = january year = 1701 }
	offset = 10
	deathdate = { day = 30 month = december year = 1701 }

	action_a ={			#An Excellent Minister!#
		name = "ACTIONNAME3712A"
		command = { type = DIP which = 3 value = 240 }
		command = { type = ADM which = 2 value = 240 }
		command = { type = MIL which = 2 value = 240 }
		command = { type = stability value = 2 }
	}
}

#The Dutch Revolt is successful!#
event = {

	id = 3814
	trigger = {
		exists = HOL
		NOT = {
			religion = protestant
			religion = reformed
		}
		OR = {
			owned = { province = 337 data = -1 }
			owned = { province = 338 data = -1 }
			owned = { province = 339 data = -1 }
			owned = { province = 340 data = -1 }
			owned = { province = 1925 data = -1 }
			owned = { province = 1927 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "EVENTNAME3814"
	desc = "EVENTHIST3814"
	style = 2

	date = { day = 1 month = january year = 1555 }
	offset = 30
	deathdate = { day = 1 month = january year = 1648 }

     action_a = { # Curses!
         name = "ACTIONNAME3814A"
         command = { type = secedeprovince which = HOL value = 337 }
         command = { type = secedeprovince which = HOL value = 338 }
         command = { type = secedeprovince which = HOL value = 339 }
         command = { type = secedeprovince which = HOL value = 340 }
         command = { type = secedeprovince which = HOL value = 1925 }
         command = { type = secedeprovince which = HOL value = 1927 }
         }
}

# Spain is Unified
event = {

	id = 3848
	
	# Triggered by CAS 3849 or ARG 3850
	
	random = no
	country = SPA
	name = "EVENTNAME3848"
	desc = "EVENTHIST3848"
	style = 2

	action_a = { #The Kingdoms are one!#
		name = "ACTIONNAME3848A"
		command = { type = inherit which = ARG }
		command = { type = inherit which = CAS }
                                    command = { type = addcore which = 427 }
		command = { type = addcore which = 429 }
		command = { type = addcore which = 430 }
		command = { type = addcore which = 431 }
		command = { type = addcore which = 432 }
		command = { type = addcore which = 433 }
		command = { type = addcore which = 435 }
		command = { type = addcore which = 436 }
		command = { type = addcore which = 437 }
		command = { type = addcore which = 438 }
		command = { type = addcore which = 439 }
		command = { type = addcore which = 440 }
		command = { type = addcore which = 443 }
		command = { type = addcore which = 444 }
		command = { type = addcore which = 445 }
		command = { type = addcore which = 817 }
		command = { type = addcore which = 821 }
		command = { type = addcore which = 1948 }
		command = { type = addcore which = 921 }
		} 
}
#The Dutch Revolt is successful!#
#This event reduces the revoltrisk in the Southern Netherlands after then Northern Netherlands achieves independence.  
event = {
	id = 3935
	trigger = {
		exists = HOL
		event = 3159 #Dutch Nobility Demands General Estates
		event = 3900 #creation of Dutch Republic
		NOT = { event = 3171} # Repatriation of the Netherlands
		OR = {
			owned = { province = 377 data = -1 } #Luxemburg
			owned = { province = 378 data = -1 } #Brabant
			owned = { province = 379 data = -1 } #Artois
			owned = { province = 380 data = -1 } #Flanders
			owned = { province = 1924 data = -1 } #Flanders
			}
	}
	random = no
	country = SPA
	name = "EVENTNAME3819"#text from 'Dutch Revolt Sucessful'#
	desc = "EVENTHIST3819"#text from 'Dutch Revolt Sucessful'#
	style = 2

	date = { day = 1 month = january year = 1585 }
	offset = 30
	deathdate = { day = 1 month = january year = 1648 }

     action_a = { # Curses!
         name = "ACTIONNAME4980A" # ="OK"#
	command = { type = province_revoltrisk which = 377 value = -27 } #Luxemburg
	command = { type = province_revoltrisk which = 378 value = -27 } #Brabant
	command = { type = province_revoltrisk which = 379 value = -27 } #Artois
	command = { type = province_revoltrisk which = 380 value = -27 } #Flanders
	command = { type = province_revoltrisk which = 1924 value = -27 } #Flanders
	command = { type = conversion which = 380 }
         }
}

# Colonial revolts are succesful - by Kasperus
event = {

	id = 220002
	trigger = {
		exists = MEX
		OR = {
			owned = { province = 1880 data = -1 }
			owned = { province = 12 data = -1 }
			owned = { province = 13 data = -1 }
			owned = { province = 15 data = -1 }
			owned = { province = 16 data = -1 }
			owned = { province = 17 data = -1 }
			owned = { province = 20 data = -1 }
			owned = { province = 21 data = -1 }
			owned = { province = 22 data = -1 }
			owned = { province = 23 data = -1 }
			owned = { province = 24 data = -1 }
			owned = { province = 25 data = -1 }
			owned = { province = 26 data = -1 }
			owned = { province = 27 data = -1 }
			owned = { province = 28 data = -1 }
			owned = { province = 29 data = -1 }
			owned = { province = 30 data = -1 }
			owned = { province = 31 data = -1 }
			owned = { province = 32 data = -1 }
			owned = { province = 34 data = -1 }
			owned = { province = 35 data = -1 }
			owned = { province = 1879 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Mexican independence"
	desc = "Mexican independence (recognized in 1821) came about almost by accident when constitutionalists in Spain led a rebellion that, in 1820, forced Ferdinand VII to reinstate the liberal constitution of 1812."
	style = 2

	date = { day = 1 month = january year = 1750 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Mexican revolters are succesful!"
         command = { type = secedeprovince which = MEX value = 1880 }
         command = { type = secedeprovince which = MEX value = 12 }
         command = { type = secedeprovince which = MEX value = 13 }
         command = { type = secedeprovince which = MEX value = 15 }
         command = { type = secedeprovince which = MEX value = 16 }
         command = { type = secedeprovince which = MEX value = 17 }
         command = { type = secedeprovince which = MEX value = 20 }
         command = { type = secedeprovince which = MEX value = 21 }
         command = { type = secedeprovince which = MEX value = 22 }
         command = { type = secedeprovince which = MEX value = 23 }
         command = { type = secedeprovince which = MEX value = 24 }
         command = { type = secedeprovince which = MEX value = 25 }
         command = { type = secedeprovince which = MEX value = 26 }
         command = { type = secedeprovince which = MEX value = 27 }
         command = { type = secedeprovince which = MEX value = 28 }
         command = { type = secedeprovince which = MEX value = 29 }
         command = { type = secedeprovince which = MEX value = 30 }
         command = { type = secedeprovince which = MEX value = 31 }
         command = { type = secedeprovince which = MEX value = 32 }
         command = { type = secedeprovince which = MEX value = 34 }
         command = { type = secedeprovince which = MEX value = 35 }
         command = { type = secedeprovince which = MEX value = 1879 }
         }
}

event = {

	id = 220003
	trigger = {
		exists = COL
		OR = {
			owned = { province = 160 data = -1 }
			owned = { province = 39 data = -1 }
			owned = { province = 154 data = -1 }
			owned = { province = 155 data = -1 }
			owned = { province = 156 data = -1 }
			owned = { province = 157 data = -1 }
			owned = { province = 158 data = -1 }
			owned = { province = 159 data = -1 }
			owned = { province = 160 data = -1 }
			owned = { province = 161 data = -1 }
			owned = { province = 162 data = -1 }
			owned = { province = 163 data = -1 }
			owned = { province = 164 data = -1 }
			owned = { province = 178 data = -1 }
			owned = { province = 179 data = -1 }
			owned = { province = 187 data = -1 }
			owned = { province = 188 data = -1 }
			owned = { province = 1856 data = -1 }
			owned = { province = 1857 data = -1 }
			owned = { province = 1858 data = -1 }
			owned = { province = 1859 data = -1 }
			owned = { province = 1860 data = -1 }
			owned = { province = 1861 data = -1 }
			owned = { province = 1862 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Colombian independence"
	desc = "Colombian independence was precipitated by the Napoleonic invasion of Spain. However, the revolution was foreshadowed by the rising of the 'comuneros'. Prominent among the first revolutionary leaders was Antonio Nariño who took part in the uprising at Bogotá on July 20 1810. The revolution was to last nine years before the victory of Simón Bolívar at Boyacá in 1819 secured the independence of Greater Colombia. The new state Bolívar created included what is now Venezuela, Panama and Ecuador as well as Colombia."
	style = 2

	date = { day = 1 month = january year = 1750 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Colombian revolters are succesful"
         command = { type = secedeprovince which = COL value = 1880 }
         command = { type = secedeprovince which = COL value = 39 }
         command = { type = secedeprovince which = COL value = 154 }
         command = { type = secedeprovince which = COL value = 155 }
         command = { type = secedeprovince which = COL value = 156 }
         command = { type = secedeprovince which = COL value = 157 }
         command = { type = secedeprovince which = COL value = 158 }
         command = { type = secedeprovince which = COL value = 159 }
         command = { type = secedeprovince which = COL value = 160 }
         command = { type = secedeprovince which = COL value = 161 }
         command = { type = secedeprovince which = COL value = 162 }
         command = { type = secedeprovince which = COL value = 163 }
         command = { type = secedeprovince which = COL value = 164 }
         command = { type = secedeprovince which = COL value = 178 }
         command = { type = secedeprovince which = COL value = 179 }
         command = { type = secedeprovince which = COL value = 187 }
         command = { type = secedeprovince which = COL value = 188 }
         command = { type = secedeprovince which = COL value = 1856 }
         command = { type = secedeprovince which = COL value = 1857 }
         command = { type = secedeprovince which = COL value = 1858 }
         command = { type = secedeprovince which = COL value = 1859 }
         command = { type = secedeprovince which = COL value = 1860 }
         command = { type = secedeprovince which = COL value = 1861 }
         command = { type = secedeprovince which = COL value = 1862 }
         }
}

event = {

	id = 220004
	trigger = {
		exists = PEU
		OR = {
			owned = { province = 1876 data = -1 }
			owned = { province = 165 data = -1 }
			owned = { province = 166 data = -1 }
			owned = { province = 167 data = -1 }
			owned = { province = 168 data = -1 }
			owned = { province = 169 data = -1 }
			owned = { province = 170 data = -1 }
			owned = { province = 171 data = -1 }
			owned = { province = 193 data = -1 }
			owned = { province = 1482 data = -1 }
			owned = { province = 1483 data = -1 }
			owned = { province = 1484 data = -1 }
			owned = { province = 1854 data = -1 }
			owned = { province = 1855 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Peruvian independence"
	desc = "Peruvian independence was declared in 1821 by the famous freedomfighter San Martin. Making good use of the Spanish weakness he defeated the last Spanish contignents in battles of Junin and Ayacucho in 1824 which resulted in Spanish withdrawal."
	style = 2

	date = { day = 1 month = january year = 1750 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Peruvian revolters are succesful"
         command = { type = secedeprovince which = PEU value = 1876 }
         command = { type = secedeprovince which = PEU value = 165 }
         command = { type = secedeprovince which = PEU value = 166 }
         command = { type = secedeprovince which = PEU value = 167 }
         command = { type = secedeprovince which = PEU value = 168 }
         command = { type = secedeprovince which = PEU value = 169 }
         command = { type = secedeprovince which = PEU value = 170 }
         command = { type = secedeprovince which = PEU value = 171 }
         command = { type = secedeprovince which = PEU value = 193 }
         command = { type = secedeprovince which = PEU value = 1482 }
         command = { type = secedeprovince which = PEU value = 1483 }
         command = { type = secedeprovince which = PEU value = 1484 }
         command = { type = secedeprovince which = PEU value = 1854 }
         command = { type = secedeprovince which = PEU value = 1855 }
         }
}

event = {

	id = 220005
	trigger = {
		exists = LAP
		OR = {
			owned = { province = 223 data = -1 }
			owned = { province = 216 data = -1 }
			owned = { province = 217 data = -1 }
			owned = { province = 218 data = -1 }
			owned = { province = 219 data = -1 }
			owned = { province = 220 data = -1 }
			owned = { province = 221 data = -1 }
			owned = { province = 222 data = -1 }
			owned = { province = 223 data = -1 }
			owned = { province = 224 data = -1 }
			owned = { province = 1485 data = -1 }
			owned = { province = 1486 data = -1 }
			owned = { province = 1830 data = -1 }
			owned = { province = 1831 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Argentinian independence"
	desc = "When Carlos III rose to the throne in Spain a great reform of the Spanish American possesions was started. One of those reforms was the division of the 'Virreynato del Perú' for political reasons, creating a new Virreynato called 'de la Plata' with its capital in Buenos Aires. The new Virreynato included the territories of Charcas Tucumán Cuyo Paraguay and Buenos Aires. Later, in 1810 when Napoleon Bonaparte invaded Spain and replaced Carlos V with his brother José Bonaparte, several 'juntas' were created in Spain and Spanish America to govern in the name of the true king. One of those was the 'Primera Junta' of Buenos Aires. First they swore loyalty to Fernando VII, the heir of Carlos V, but later they broke their links with Spain and declared independence in July 1816."
	style = 2

	date = { day = 1 month = january year = 1750 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Argentinian revolters are succesful"
         command = { type = secedeprovince which = LAP value = 223 }
         command = { type = secedeprovince which = LAP value = 216 }
         command = { type = secedeprovince which = LAP value = 217 }
         command = { type = secedeprovince which = LAP value = 218 }
         command = { type = secedeprovince which = LAP value = 219 }
         command = { type = secedeprovince which = LAP value = 220 }
         command = { type = secedeprovince which = LAP value = 221 }
         command = { type = secedeprovince which = LAP value = 222 }
         command = { type = secedeprovince which = LAP value = 223 }
         command = { type = secedeprovince which = LAP value = 224 }
         command = { type = secedeprovince which = LAP value = 1485 }
         command = { type = secedeprovince which = LAP value = 1486 }
         command = { type = secedeprovince which = LAP value = 1830 }
         command = { type = secedeprovince which = LAP value = 1831 }
         }
}


event = {

	id = 220006
	trigger = {
		exists = U05
		OR = {
			owned = { province = 174 data = -1 }
			owned = { province = 173 data = -1 }
			owned = { province = 1832 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Chilean independence"
	desc = "The war of Chilean independance started in 1810 but the leaders, o'Higgins and Carrera were defeated by the Spanish in 1814. During the 1817/1818 wintermarch through the Andes O'Higgins liberated Chili and became its dictator till 1823."
	style = 2

	date = { day = 1 month = january year = 1800 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Chilean revolters are succesful"
         command = { type = secedeprovince which = U05 value = 173 }
         command = { type = secedeprovince which = U05 value = 174 }
         command = { type = secedeprovince which = U05 value = 1832 }
         }
}

event = {

	id = 220007
	trigger = {
		exists = U06
		OR = {
			owned = { province = 1835 data = -1 }
			owned = { province = 172 data = -1 }
			owned = { province = 194 data = -1 }
			owned = { province = 1848 data = -1 }
			owned = { province = 1849 data = -1 }
			owned = { province = 1850 data = -1 }
			owned = { province = 1851 data = -1 }
			owned = { province = 1852 data = -1 }
			owned = { province = 1853 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Bolivian independence"
	desc = "Bolivian independence was achieved when Spain withdrew from the former Vice-royalty of Peru after its defeats in Chile in 1818 and in Peru in 1824. Under the leadership of Sucre the former South-Peru became an independent republic."
	style = 2

	date = { day = 1 month = january year = 1800 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Bolivian revolters are succesful"
         command = { type = secedeprovince which = U06 value = 1835 }
         command = { type = secedeprovince which = U06 value = 172 }
         command = { type = secedeprovince which = U06 value = 194 }
         command = { type = secedeprovince which = U06 value = 1848 }
         command = { type = secedeprovince which = U06 value = 1849 }
         command = { type = secedeprovince which = U06 value = 1850 }
         command = { type = secedeprovince which = U06 value = 1851 }
         command = { type = secedeprovince which = U06 value = 1852 }
         command = { type = secedeprovince which = U06 value = 1853 }
         }
}


event = {

	id = 220008
	trigger = {
		exists = U07
		OR = {
			owned = { province = 1846 data = -1 }
			owned = { province = 1847 data = -1 }
			}
	}
	random = no
	country = SPA
	name = "Paraguayan independence"
	desc = "Paraguayan junta's in northern La Plata decleared independence in 1811. Under leadership of Dr Jose Francia, the later dictator, Paraguay became eventually independent."
	style = 2

	date = { day = 1 month = january year = 1800 }
	offset = 30
	deathdate = { day = 1 month = january year = 1850 }

     action_a = { # Curses!
         name = "Paraguayan revolters are succesful"
         command = { type = secedeprovince which = U07 value = 1846 }
         command = { type = secedeprovince which = U07 value = 1847 }
         }
}