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

#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 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 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"
		command = { type = addcore which = 387 }
		command = { type = addcore which = 377 }
		command = { type = addcore which = 378 }
		command = { type = addcore which = 380 }
		command = { type = addcore which = 337 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 1924 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
		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"
		command = { type = relation which = HAB value = -100 }
		command = { type = stability value = 1 }
	}
}


#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"
		command = { type = addcore which = 387 }
		command = { type = addcore which = 377 }
		command = { type = addcore which = 378 }
		command = { type = addcore which = 380 }
		command = { type = addcore which = 337 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 1924 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
		command = { type = relation which = HAB value = 50 }
		command = { type = stability value = 1 }
	}
}

#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 }
				}
			}
			NOT = { 
                            stability  = 3
                            domestic   = { type = innovative   value = 4 }
                            }
                            domestic   = { type = mercantilism   value = 7 }
		}
	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 = 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 = 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 = 1424 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 = 1424 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 = 1424 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 = -5000 }
		command = { type = population which = 445 value = -5000 }
		command = { type = provincereligion which = 444 value = catholic }
		command = { type = provincereligion which = 445 value = catholic }
		command = { type = provinceculture which = 444 value = iberian }
		command = { type = provinceculture which = 445 value = iberian }
		command = { type = revolt which = 444 }
		command = { type = revolt which = 445 }
		command = { type = stability value = 2 }
		command = { type = trigger which = 3658 }
		command = { type = province_revoltrisk which = 438 value = 1 }
                command = { type = province_revoltrisk which = 439 value = 1 }
                command = { type = province_revoltrisk which = 444 value = 1 }
                command = { type = province_revoltrisk which = 445 value = 1 }
                command = { type = province_revoltrisk which = 443 value = 1 }
                command = { type = province_revoltrisk which = 435 value = 1 }
                command = { type = province_revoltrisk which = 436 value = 1 }
                command = { type = province_revoltrisk which = 440 value = 1 }
                command = { type = province_revoltrisk which = 431 value = 1 }
                command = { type = province_revoltrisk which = 432 value = 1 }
                command = { type = province_revoltrisk which = 433 value = 1 }
                command = { type = province_revoltrisk which = 917 value = 1 }
                command = { type = province_revoltrisk which = 1948 value = 1 }
                    }

	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 = -2 }
		command = { type = trade value = 1500 }
		command = { type = infra value = 1000 }
		command = { type = sleepevent which = 3167 }
                command = { type = provincetax which = 438 value = 3 }
		command = { type = provincetax which = 439 value = 3 }
		command = { type = provincetax which = 443 value = 3 }
		command = { type = provincetax which = 444 value = 3 }
                command = { type = provincetax which = 1948 value = 3 }
	}
}

#The Trade Center of Sevilla#
event = {

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

	date = { day = 1 month = january year = 1501 }
	offset = 30

	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 }
		command = { type = inflation value = -5 }
		command = { type = sleepevent which = 3153 }
	}
}

#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 }
				}
			}
		NOT = {
                            stability  = 3
                            domestic   = { type = innovative   value = 4 }
                            }
                            domestic   = { type = mercantilism   value = 7 }
		}
	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 = 15 }
		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 = -5000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -5000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -5000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -5000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -5000 }
		command = { type = provincetax which = -3 value = -1 }
		command = { type = population which = -1 value = -5000 }
		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 }
	}
}

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

	id = 78793588
	trigger = { 
	      NOT = {
                  exists = CAS
                  event = 3150
              }
        }
	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 = 444 value = -15000 }
		command = { type = population which = 439 value = -15000 }
		command = { type = religiousrevolt which = 438 }
		command = { type = religiousrevolt which = 443 }  
  		command = { type = religiousrevolt which = 1948 }
		command = { type = provincereligion which = 438 value = catholic }
		command = { type = provincereligion which = 443 value = catholic }
		command = { type = provincereligion which = 1948 value = catholic }
		command = { type = provinceculture which = 1948 value = iberian }
		command = { type = provinceculture which = 438 value = iberian }
		command = { type = provinceculture which = 443 value = iberian }
		command = { type = stability value = -1 }
		command = { type = trigger which = 3652 }
		command = { type = trigger which = 3657 }
		command = { type = sleepevent which = 3150 }
	}

	action_b ={		#Let us make a clean sweep for the Glory of God#
		name = "ACTIONNAME3150B"
		command = { type = domestic which = INNOVATIVE value = -4 }
		command = { type = population which = 439 value = -20000 }
		command = { type = population which = 444 value = -20000 }
		command = { type = provincereligion which = 438 value = catholic }
		command = { type = provincereligion which = 443 value = catholic }
		command = { type = provinceculture which = 438 value = iberian }
		command = { type = provinceculture which = 443 value = iberian }
		command = { type = provincereligion which = 444 value = catholic }
		command = { type = provincereligion which = 445 value = catholic }
		command = { type = provincereligion which = 1948 value = catholic }
		command = { type = provinceculture which = 1948 value = iberian }
		command = { type = religiousrevolt which = 438 }
		command = { type = religiousrevolt which = 443 }
		command = { type = religiousrevolt which = 444 }
		command = { type = religiousrevolt which = 445 }
 		command = { type = religiousrevolt which = 1948 }
		command = { type = stability value = -3 }
		command = { type = trigger which = 3729 }
		command = { type = trigger which = 3730 }
		command = { type = sleepevent which = 3150 }
	}
}

#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 = -5000 }
		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 = 3653 }
		command = { type = trigger which = 3659 }
		command = { type = province_revoltrisk which = 438 value = -1 }
                command = { type = province_revoltrisk which = 439 value = -1 }
                command = { type = province_revoltrisk which = 444 value = -1 }
                command = { type = province_revoltrisk which = 445 value = -1 }
                command = { type = province_revoltrisk which = 443 value = -1 }
                command = { type = province_revoltrisk which = 435 value = -1 }
                command = { type = province_revoltrisk which = 436 value = -1 }
                command = { type = province_revoltrisk which = 440 value = -1 }
                command = { type = province_revoltrisk which = 431 value = -1 }
                command = { type = province_revoltrisk which = 432 value = -1 }
                command = { type = province_revoltrisk which = 433 value = -1 }
                command = { type = province_revoltrisk which = 917 value = -1 }
                command = { type = province_revoltrisk which = 1948 value = -1 }
                    }

	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 = 12 value = 6 }
		command = { type = trade value = 1800 }
		command = { type = infra value = 1200 }
		command = { type = provincetax which = 438 value = 4 }
		command = { type = provincetax which = 439 value = 4 }
		command = { type = provincetax which = 443 value = 4 }
		command = { type = provincetax which = 444 value = 4 }
		command = { type = provincetax which = 1948 value = 4 }
	}
}

#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 = revolt which = 1918 }
		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 = 1424 value = -27 }
		command = { type = province_revoltrisk which = 1924 value = -27 }
		command = { type = province_revoltrisk which = 1925 value = -30 }
		command = { type = province_revoltrisk which = 1927 value = -30 }
		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 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 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 = 45 }
		command = { type = secedeprovince which = USA value = 46 }
		command = { type = secedeprovince which = USA value = 47 }
		command = { type = secedeprovince which = USA value = 48 }
		command = { type = secedeprovince which = USA value = 49 }
		command = { type = secedeprovince which = USA value = 50 }
		command = { type = secedeprovince which = USA value = 1427 }
		command = { type = removecore which = 45 }
		command = { type = removecore which = 46 }
		command = { type = removecore which = 47 }
		command = { type = removecore which = 48 }
		command = { type = removecore which = 49 }
                command = { type = removecore which = 50 }
		command = { type = removecore which = 1427 }





	}
}

#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 = 1424 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 = 1424 value = 7 }
		command = { type = province_revoltrisk which = 1924 value = 7 }
		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 ={			#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 = 1424 value = 2 }
		command = { type = province_revoltrisk which = 1924 value = 2 }
		command = { type = province_revoltrisk which = 1925 value = 5 }
		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 = 1424 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 = 1424 value = -7 }
		command = { type = province_revoltrisk which = 1924 value = -7 }
		command = { type = province_revoltrisk which = 1925 value = 10 }
		command = { type = province_revoltrisk which = 1927 value = 10 }
		command = { type = treasury value = -200 }
		command = { type = stability value = 1 }
		command = { type = independence which = SPR }
		command = { type = trigger which = 77887000 } # SPR
	}

	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 = 1424 value = 7 }
		command = { type = province_revoltrisk which = 1924 value = 7 }
		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 = 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 = 1424 value = -7 }
		command = { type = province_revoltrisk which = 1924 value = -7 }
		command = { type = province_revoltrisk which = 1925 value = 5 }
		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 }
		command = { type = independence which = SPR }
		command = { type = trigger which = 77887000 } # SPR
	}

}
#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 }
         }
}

#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 = 380 data = -1 } #Flanders
			owned = { province = 379 data = -1 } #Artois
			owned = { province = 1424 data = -1 } #Liège
			owned = { province = 1924 data = -1 } #Hainaut
			}
	}
	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 = 380 value = -27 } #Flanders
	command = { type = province_revoltrisk which = 379 value = -27 } #Artois
	command = { type = province_revoltrisk which = 1424 value = -27 } #Liège
	command = { type = province_revoltrisk which = 1924 value = -27 } #Hainuat
	command = { type = conversion which = 380 }
         }
}


#Spanish events from AoN modified by Hive

#The Moratorium#
event = {
	id = 15296
	random = no
	country = SPA
	name = "The Moratorium"
	desc = "With the large number of military problems Mexico had - internal and external - throughout its existence, Mexico had constant needs for troops. These troops was expensive, and as Mexico could not affort them they had loaned money from mainly France but also England and Spain. After a destructive war against between the liberals and the conservatives, Mexico declared a two year moratorium on debt repayment. In response, the 3 powers launched a punitive expedition against Mexico."
	style = 5
	action_a = {
			name = "They shall pay!"
			command = { type = treasury value = -100 }
			command = { type = casusbelli which = MEX value = 120 }
	}
}

#Cuban struggle for independence#
event = { 
	id = 15318
	trigger = {
		OR = {
			owned  = { province = 137 data = -1 } 
			owned  = { province = 138 data = -1 }
			owned  = { province = 139 data = -1 } 
		}
		NOT = {
			exists = U00
		}
	}
	random = no
	country = SPA
	name = "Cuban struggle for independence"
	desc = "Cuba was the last major Spanish colony to gain independence following a 50-year struggle that begun in 1850. Jose Marti, Cuba's national hero, began the final push for independence in 1895. In 1898, after the USS Maine sunk in the Havana Harbor on February 15 due to an explosion of undetermined origin, the United States entered the conflict, which was by then already almost won by Cuban revolutionaries. Spain sent over one million men to Cuba, of which only about 200,000 returned. The rest either died in combat, succumbed to tropical diseases or decided to stay due to the prevalent poverty in their home country. The war was devastating for Spain, as the United States annexed Puerto Rico, the Philippines and Guam and made Cuba into an American protectorate."
	style = 5
	date = { day = 1 month = january year = 1850 } 
	offset = 150 
	deathdate = { day = 1 month = january year = 1900 }
	
	action_a = {
		name = "Crush the Cuban nationalists!"
		command = { type = stability value = -1 }
		command = { type = revolt which = 137 }
        	command = { type = revolt which = 138 }
		command = { type = revolt which = 139 }
        	command = { type = province_revoltrisk which = 137 value = 3 }
		command = { type = province_revoltrisk which = 138 value = 3 }
		command = { type = province_revoltrisk which = 139 value = 3 }
	}
	action_b ={
		name = "Grant them limited autonomy"
		command = { type = stability value = 1 } 
		command = { type = independence which = U00 } 
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = sleepevent which = 15317 }
	}	
}

#Vanilla events modified by Hive

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

	id = 3156
	trigger = {
		owned = {
			province = 819
			data = -1
			}
		NOT = {
			exists = 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 = independence which = KNI }
		command = { type = stability value = 2 }
		command = { type = trigger which = 3540 }
	}

	action_b ={		#Don't give them anything#
		name = "ACTIONNAME3156B"
		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 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 = flagname which = 1701 }
		command = { type = trigger which = 3199 }
		command = { type = trigger which = 3130 }
		command = { type = trigger which = 3035 }
		command = { type = trigger which = 3511 }
		command = { type = trigger which = 79745000 }
		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 }
		command = { type = inflation value = -5 }
	}

	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 = trigger which = 79745001 }
		command = { type = stability value = -2 }
		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 }
            }


}

# 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 = 393 }
		command = { type = addcore which = 394 }
		command = { type = addcore which = 395 }
		command = { type = addcore which = 396 }
		command = { type = addcore which = 397 }
		command = { type = addcore which = 819 }
		command = { type = addcore which = 934 }
		}
}

#The Fuggers#
event = {

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

	date = { day = 1 month = january year = 1518 }
	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 = -5 }
	}

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

#The Quest for the New World#
event = {

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

	date = { day = 1 month = january year = 1521 }
	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 }
		}
}

event = {

	id = 78793589
	trigger = {
		control = { province = 169 data = SPA }
		owned = { province = 169 data = INC }
	}
	random = no
	country = SPA
	name = "Conquista of the old Inca Empire"
	desc = "We have taken over the Inca capital now the enemy is fleeing!"
	style = 2

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

	action_a ={
		name = "Great!"
		command = { type = inherit which = INC }
                command = { type = stability value = 1 }
		command = { type = treasury value = 300 }
		command = { type = colonists value = 6 }
		command = { type = missionaries value = 6 }
		}
}

event = {

	id = 78793590
	trigger = {
		control = { province = 35 data = SPA }
		owned = { province = 35 data = MAA }
	}
	random = no
	country = SPA
	name = "Conquista of the old Maya Empire"
	desc = "We have taken over the Maya capital now the enemy is fleeing!"
	style = 2

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

	action_a ={
		name = "Great!"
		command = { type = inherit which = MAA }
                command = { type = stability value = 1 }
		command = { type = treasury value = 300 }
		command = { type = colonists value = 6 }
		command = { type = missionaries value = 6 }
		}
}

event = {

	id = 78793591
	trigger = {
		control = { province = 31 data = SPA }
		owned = { province = 31 data = ZAP }
	}
	random = no
	country = SPA
	name = "Conquista of the old Zapotec Empire"
	desc = "We have taken over the Zapotec capital now the enemy is fleeing!"
	style = 2

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

	action_a ={
		name = "Great!"
		command = { type = inherit which = ZAP }
                command = { type = stability value = 1 }
		command = { type = treasury value = 300 }
		command = { type = colonists value = 6 }
		command = { type = missionaries value = 6 }
		}
}

#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 = flagname which = 1785 }
		command = { type = province_revoltrisk which = 21  value = 15 }
		command = { type = province_revoltrisk which = 24  value = 15 }
		command = { type = province_revoltrisk which = 25  value = 15 }
		command = { type = province_revoltrisk which = 26  value = 15 }
		command = { type = province_revoltrisk which = 27  value = 15 }
		command = { type = province_revoltrisk which = 28  value = 15 }
		command = { type = province_revoltrisk which = 29  value = 15 }
		command = { type = province_revoltrisk which = 30  value = 15 }
		command = { type = province_revoltrisk which = 157  value = 15 }
		command = { type = province_revoltrisk which = 158  value = 15 }
		command = { type = province_revoltrisk which = 160  value = 15 }
		command = { type = province_revoltrisk which = 161  value = 15 }
		command = { type = province_revoltrisk which = 162  value = 15 }
		command = { type = province_revoltrisk which = 163  value = 15 }
		command = { type = province_revoltrisk which = 164  value = 15 }
		command = { type = province_revoltrisk which = 165  value = 15 }
		command = { type = province_revoltrisk which = 166  value = 15 }
		command = { type = province_revoltrisk which = 167  value = 15 }
		command = { type = province_revoltrisk which = 168  value = 15 }
		command = { type = province_revoltrisk which = 217  value = 15 }
		command = { type = province_revoltrisk which = 222  value = 15 }
		command = { type = province_revoltrisk which = 223  value = 15 }
		command = { type = province_revoltrisk which = 224  value = 15 }
		command = { type = province_revoltrisk which = 225  value = 15 }
		command = { type = province_revoltrisk which = 1861  value = 15 }
		command = { type = province_revoltrisk which = 1876  value = 15 }
		command = { type = province_revoltrisk which = 1879  value = 15 }
		command = { type = province_revoltrisk which = 1880  value = 15 }
		command = { type = stability value = 1 }
		command = { type = relation which = USA value = -50 }
	}

	action_b ={		#Govern from Madrid#
		name = "ACTIONNAME3176B"
		command = { type = flagname which = 1785 }
		command = { type = province_revoltrisk which = 21  value = 20 }
		command = { type = province_revoltrisk which = 24  value = 20 }
		command = { type = province_revoltrisk which = 25  value = 20 }
		command = { type = province_revoltrisk which = 26  value = 20 }
		command = { type = province_revoltrisk which = 27  value = 20 }
		command = { type = province_revoltrisk which = 28  value = 20 }
		command = { type = province_revoltrisk which = 29  value = 20 }
		command = { type = province_revoltrisk which = 30  value = 20 }
		command = { type = province_revoltrisk which = 157  value = 20 }
		command = { type = province_revoltrisk which = 158  value = 20 }
		command = { type = province_revoltrisk which = 160  value = 20 }
		command = { type = province_revoltrisk which = 161  value = 20 }
		command = { type = province_revoltrisk which = 162  value = 20 }
		command = { type = province_revoltrisk which = 163  value = 20 }
		command = { type = province_revoltrisk which = 164  value = 20 }
		command = { type = province_revoltrisk which = 165  value = 20 }
		command = { type = province_revoltrisk which = 166  value = 20 }
		command = { type = province_revoltrisk which = 167  value = 20 }
		command = { type = province_revoltrisk which = 168  value = 20 }
		command = { type = province_revoltrisk which = 217  value = 20 }
		command = { type = province_revoltrisk which = 222  value = 20 }
		command = { type = province_revoltrisk which = 223  value = 20 }
		command = { type = province_revoltrisk which = 224  value = 20 }
		command = { type = province_revoltrisk which = 225  value = 20 }
		command = { type = province_revoltrisk which = 1861  value = 20 }
		command = { type = province_revoltrisk which = 1876  value = 20 }
		command = { type = province_revoltrisk which = 1879  value = 20 }
		command = { type = province_revoltrisk which = 1880  value = 20 }
		command = { type = stability value = 3 }
		command = { type = relation which = USA value = -150  }
	}

	action_c ={		#Franchised Citizenship#
		name = "ACTIONNAME3176C"
		command = { type = flagname which = 1785 }
		command = { type = province_revoltrisk which = 21  value = 7 }
		command = { type = province_revoltrisk which = 24  value = 7 }
		command = { type = province_revoltrisk which = 25  value = 7 }
		command = { type = province_revoltrisk which = 26  value = 7 }
		command = { type = province_revoltrisk which = 27  value = 7 }
		command = { type = province_revoltrisk which = 28  value = 7 }
		command = { type = province_revoltrisk which = 29  value = 7 }
		command = { type = province_revoltrisk which = 30  value = 7 }
		command = { type = province_revoltrisk which = 157  value = 7 }
		command = { type = province_revoltrisk which = 158  value = 7 }
		command = { type = province_revoltrisk which = 160  value = 7 }
		command = { type = province_revoltrisk which = 161  value = 7 }
		command = { type = province_revoltrisk which = 162  value = 7 }
		command = { type = province_revoltrisk which = 163  value = 7 }
		command = { type = province_revoltrisk which = 164  value = 7 }
		command = { type = province_revoltrisk which = 165  value = 7 }
		command = { type = province_revoltrisk which = 166  value = 7 }
		command = { type = province_revoltrisk which = 167  value = 7 }
		command = { type = province_revoltrisk which = 168  value = 7 }
		command = { type = province_revoltrisk which = 217  value = 7 }
		command = { type = province_revoltrisk which = 222  value = 7 }
		command = { type = province_revoltrisk which = 223  value = 7 }
		command = { type = province_revoltrisk which = 224  value = 7 }
		command = { type = province_revoltrisk which = 225  value = 7 }
		command = { type = province_revoltrisk which = 1861  value = 7 }
		command = { type = province_revoltrisk which = 1876  value = 7 }
		command = { type = province_revoltrisk which = 1879  value = 7 }
		command = { type = province_revoltrisk which = 1880  value = 7 }
		command = { type = provincetax which = 21  value = -2 }
		command = { type = provincetax which = 24  value = -2 }
		command = { type = provincetax which = 25  value = -2 }
		command = { type = provincetax which = 26  value = -2 }
		command = { type = provincetax which = 27  value = -2 }
		command = { type = provincetax which = 28  value = -2 }
		command = { type = provincetax which = 29  value = -2 }
		command = { type = provincetax which = 30  value = -2 }
		command = { type = provincetax which = 157  value = -2 }
		command = { type = provincetax which = 158  value = -2 }
		command = { type = provincetax which = 160  value = -2 }
		command = { type = provincetax which = 161  value = -2 }
		command = { type = provincetax which = 162  value = -2 }
		command = { type = provincetax which = 163  value = -2 }
		command = { type = provincetax which = 164  value = -2 }
		command = { type = provincetax which = 165  value = -2 }
		command = { type = provincetax which = 166  value = -2 }
		command = { type = provincetax which = 167  value = -2 }
		command = { type = provincetax which = 168  value = -2 }
		command = { type = provincetax which = 217  value = -2 }
		command = { type = provincetax which = 222  value = -2 }
		command = { type = provincetax which = 223  value = -2 }
		command = { type = provincetax which = 224  value = -2 }
		command = { type = provincetax which = 225  value = -2 }
		command = { type = provincetax which = 1861  value = -2 }
		command = { type = provincetax which = 1876  value = -2 }
		command = { type = provincetax which = 1879  value = -2 }
		command = { type = provincetax which = 1880  value = -2 }
		command = { type = stability value = -4 }
		command = { type = relation which = USA value = 100 }
	}

}

#Spanish events by Hive

#The King's city#
event = {

	id = 15087
	trigger = {
			owned = {
					province = 436
					data = -1
					}
		}
	random = no
	country = SPA
	name = "The King's city"
	desc = "In 1561, Felipe II decided to move the Spanish court to Madrid, thus making it the new capital."
	style = 2

	date = { day = 1 month = january year = 1561 }
	offset = 360
	deathdate = { day = 1 month = january year = 1562 }

	action_a ={				#Move the Capital to Madrid#
		name = "Move the Capital to Madrid"
		command = { type = capital which = 436 }
		command = { type = fortress which = 436 value = 1 }
		command = { type = infra value = 500 }
		command = { type = trade value = 1000 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = stability value = -1 }
	}

	action_b ={				#Stay were we are#
		name = "Stay were we are"
		command = { type = domestic which = ARISTOCRACY value = 1 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = stability value = 3 }
	}
}

#End of the American revolts#
event = {

	id = 15015
	trigger = {
		event = 3176
		OR = {
			owned = { province = 24 data = -1 }
			owned = { province = 21 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 = 157 data = -1 }
			owned = { province = 158 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 = 165 data = -1 }
			owned = { province = 166 data = -1 }
			owned = { province = 167 data = -1 }
			owned = { province = 168 data = -1 }
			owned = { province = 217 data = -1 }
			owned = { province = 222 data = -1 }
			owned = { province = 223 data = -1 }
			owned = { province = 224 data = -1 }
			owned = { province = 225 data = -1 }
			owned = { province = 1861 data = -1 }
			owned = { province = 1876 data = -1 }
			owned = { province = 1879 data = -1 }
			owned = { province = 1880 data = -1 }
			}
		}
	random = no
	country = SPA
	name = "End of the American revolts"
	desc = "My lord, our colonies in the Americas have finally calmed down. The revolts have ended!"
	style = 5

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


	action_a ={		#Excellent!#
		name = "Excellent!"
		command = { type = province_revoltrisk which = 21  value = -25 }
		command = { type = province_revoltrisk which = 24  value = -25 }
		command = { type = province_revoltrisk which = 25  value = -25 }
		command = { type = province_revoltrisk which = 26  value = -25 }
		command = { type = province_revoltrisk which = 27  value = -25 }
		command = { type = province_revoltrisk which = 28  value = -25 }
		command = { type = province_revoltrisk which = 29  value = -25 }
		command = { type = province_revoltrisk which = 30  value = -25 }
		command = { type = province_revoltrisk which = 157  value = -25 }
		command = { type = province_revoltrisk which = 158  value = -25 }
		command = { type = province_revoltrisk which = 160  value = -25 }
		command = { type = province_revoltrisk which = 161  value = -25 }
		command = { type = province_revoltrisk which = 162  value = -25 }
		command = { type = province_revoltrisk which = 163  value = -25 }
		command = { type = province_revoltrisk which = 164  value = -25 }
		command = { type = province_revoltrisk which = 165  value = -25 }
		command = { type = province_revoltrisk which = 166  value = -25 }
		command = { type = province_revoltrisk which = 167  value = -25 }
		command = { type = province_revoltrisk which = 168  value = -25 }
		command = { type = province_revoltrisk which = 217  value = -25 }
		command = { type = province_revoltrisk which = 222  value = -25 }
		command = { type = province_revoltrisk which = 223  value = -25 }
		command = { type = province_revoltrisk which = 224  value = -25 }
		command = { type = province_revoltrisk which = 225  value = -25 }
		command = { type = province_revoltrisk which = 1861  value = -25 }
		command = { type = province_revoltrisk which = 1876  value = -25 }
		command = { type = province_revoltrisk which = 1879  value = -25 }
		command = { type = province_revoltrisk which = 1880  value = -25 }
		command = { type = stability value = 3 }
	}

}

#The Carlist War#
event = {
	id = 15481
	random = no
	country = SPA
	name = "The Carlist War"
	desc = "The Carlist Wars in Spain were the last major European civil wars in which pretenders fought to establish their claim to a throne. When Ferdinand VII of Spain died in 1833, his fourth wife Maria Cristina became Queen regent on behalf of their infant daughter Isabella II. This splintered the country into two factions known as the Cristinos (or Isabelinos) and the Carlists. The Cristinos were the supporters of the Queen Regent and her government. The Carlists were the supporters of Carlos, a pretender to the throne and brother of the deceased Ferdinand VII, who denied the validity of the Pragmatic Sanction that abolished the Salic Law. The First Carlist War lasted over seven years and the fighting spanned most of the country at one time or another, although the main conflict centered around the Carlist homelands of the Basque Country and Aragon."
	date = { day = 1 month = january year = 1836 }
	offset = 30
	deathdate = { day = 1 month = january year = 1837 }
	style = 5

	action_a = {
		name = "Support Isabel II"
		command = { type = stability value = -3 }
		command = { type = revoltrisk which = 360 value = 3 }
	}
	action_b = {
		name = "Support Carlos V"
		command = { type = stability value = -4 }
		command = { type = revoltrisk which = 360 value = 4 } 
		command = { type = wakemonarch which = 16621 }
		command = { type = wakemonarch which = 16622 }
		command = { type = wakemonarch which = 16623 }
		command = { type = wakemonarch which = 16624 }
		command = { type = wakemonarch which = 16625 }
                command = { type = sleepmonarch which = 16611 }
		command = { type = sleepmonarch which = 16618 }
		command = { type = sleepmonarch which = 16620 }
	}
}

#The End of The Carlist War#
event = {
	id = 15482
	random = no
	country = SPA
	trigger = {
		event = 15481
	}
	name = "The End of The Carlist War"
	desc = "The pretender dynasty have finally abandoned their silly claim! Peace shall once again reign in our Kingdom!"
	style = 5

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

	action_a = {
		name = "Excellent!"
		command = { type = stability value = 3 }
		
	}
}

#The Inheritance of Burgundy#
event = {

	id = 15488				#Triggered by BUR15487#
	random = no
	country = SPA
	name = "The Inheritance of Burgundy"
	desc = "On january 24 1516, Charles II of Burgundy, Charles V of Austria, ascended the throne of Spain as Charles I and thus came to rule over a huge Habsburg empire. He abdicated in 1556 and his son Philip II inherited Spain and the low countries. But Philip II was mainly interested in the Spanish side of the empire, and neglected the low countries which he never even visited once - unlike his father, who was born and raised in Ghent. As Calvanism spread through the low countries, Philip II started to persecute the Protestants. These events lead to The Eighty Years War raging from 1568 to 1648, in which The Netherlands won their independence."
	style = 2

	action_a ={
		name = "Excellent!"
                command = { type = flagname which = _Habsburg }
		command = { type = inherit which = BUR }
		command = { type = stability value = 2  }
		command = { type = DIP which = 3 value = 60 }
		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 = 337 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 1924 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
	}
}

#The Inheritance of Burgundy#
event = {

	id = 15489				#Triggered by BUR15487#
	random = no
	country = SPA
	name = "The Inheritance of Burgundy"
	desc = "On january 24 1516, Charles II of Burgundy, Charles V of Austria, ascended the throne of Spain as Charles I and thus came to rule over a huge Habsburg empire. He abdicated in 1556 and his son Philip II inherited Spain and the low countries. But Philip II was mainly interested in the Spanish side of the empire, and neglected the low countries which he never even visited once - unlike his father, who was born and raised in Ghent. As Calvanism spread through the low countries, Philip II started to persecute the Protestants. These events lead to The Eighty Years War raging from 1568 to 1648, in which The Netherlands won their independence."
	style = 2

	action_a ={
		name = "Ok"
		command = { type = flagname which = _Habsburg }
		command = { type = vassal which = SPR }
		command = { type = alliance which = SPR }
		command = { type = stability value = 1  }
		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 = 337 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 1924 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
	}
}

#The Inheritance of Burgundy#
event = {

	id = 15490				#Triggered by BUR15487#
	random = no
	country = SPA
	name = "The Inheritance of Burgundy"
	desc = "My lord, Burgundy have elected a new ruler and refuse to achnowledge the rightful claims of Carlos I!"
	style = 2

	action_a ={
		name = "How dare they!"
                command = { type = flagname which = _Habsburg }
		command = { type = stability value = -1 }
		command = { type = casusbelli which = BUR value = 24 }
		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 = 337 }
		command = { type = addcore which = 338 }
		command = { type = addcore which = 339 }
		command = { type = addcore which = 340 }
		command = { type = addcore which = 1924 }
		command = { type = addcore which = 1925 }
		command = { type = addcore which = 1927 }
	}
}

event = {

	id = 12345727
	trigger = { ai = yes }
	random = no
	country = SPA
	name = "AI_EVENT"
	desc = "AI_DESC"
	style = 2

	date = { day = 1 month = january year = 1402 }
	offset = 500
	deathdate = { day = 1 month = january year = 1486 }

	action_a ={
		name = "Okay"
                command = { type = ai   which = spain_1402-1486.ai }
	}
}

event = {

	id = 78793730
	trigger = { ai = yes }
	random = no
	country = SPA
	name = "AI_EVENT"
	desc = "AI_DESC"
	style = 2

	date = { day = 1 month = january year = 1486 }
	offset = 500
	deathdate = { day = 1 month = january year = 1521 }

	action_a ={
		name = "Okay"
                command = { type = ai   which = spain_1486-1521.ai }
	}
}

event = {

	id = 12345728
	trigger = { ai = yes }
	random = no
	country = SPA
	name = "AI_EVENT"
	desc = "AI_DESC"
	style = 2

	date = { day = 1 month = january year = 1521 }
	offset = 500
	deathdate = { day = 1 month = january year = 1713 }

	action_a ={
		name = "Okay"
                command = { type = ai   which = spain_1521-1713.ai }
	}
}

event = {

	id = 12345729
	trigger = { ai = yes }
	random = no
	country = SPA
	name = "AI_EVENT"
	desc = "AI_DESC"
	style = 2

	date = { day = 1 month = january year = 1713 }
	offset = 500
	deathdate = { day = 1 month = january year = 1860 }

	action_a ={
		name = "Okay"
                command = { type = ai   which = spain_1713-1806.ai }
	}
}

event = {

	id = 12345730
	trigger = { ai = yes }
	random = no
	country = SPA
	name = "AI_EVENT"
	desc = "AI_DESC"
	style = 2

	date = { day = 1 month = january year = 1806 }
	offset = 500
	deathdate = { day = 1 month = january year = 1821 }

	action_a ={
		name = "Okay"
                command = { type = ai   which = spain_1806-1821.ai }
	}
}

event = {

	id = 12345731
	trigger = { monarch = 04147 }
	random = no
	country = SPA
	name = "Fernando VI of Spain"
	desc = "Our king has made a beautiful Royal flag that will now be in use."
	style = 4

	date = { day = 10 month = july year = 1746 }
	offset = 41
	deathdate = { day = 29 month = december year = 1746 }

	action_a ={
		name = "Great"
		command = { type = flagname which = 1748 }
	}


}

event = {

	id = 12345733
	trigger = { monarch = 16614 }
	random = no
	country = SPA
	name = "The First Republic of Spain"
	desc = "The First Spanish Republic started with the abdication on February 10, 1873 of king Amadeo I, mostly as a consequence of the Hidalgo Affair, when he had been required by the radical government to sign a decree against the artillery officers. The next day, February 11, the republic was declared by a parliamentary majority made up of radicals, republicans and democrats."
	style = 4

	date = { day = 12 month = february year = 1873 }
	offset = 2
	deathdate = { day = 17 month = july year = 1873 }

	action_a ={
		name = "Great"
		command = { type = flagname which = _republic }
	}


}

event = {

	id = 12345734
	trigger = { monarch = 16618 }
	random = no
	country = SPA
	name = "The Restoration of Bourbon Monarchs"
	desc = "The First Spanish Republic lasted twenty-three months, between February 11, 1873 and December 29, 1874."
	style = 4

	date = { day = 29 month = december year = 1874 }
	offset = 2
	deathdate = { day = 25 month = november year = 1885 }

	action_a ={
		name = "Great"
		command = { type = flagname which = 1785 }
	}


}

# Colonial revolts are succesful - by Kasperus
event = {

	id = 220002
	trigger = {
		exists = MEX
		vassal = { country = SPA country = MEX }
		OR = {
			owned = { province = 9 data = -1 }
			owned = { province = 10 data = -1 }
			owned = { province = 11 data = -1 }
			owned = { province = 12 data = -1 }
			owned = { province = 13 data = -1 }
			owned = { province = 14 data = -1 }
			owned = { province = 15 data = -1 }
			owned = { province = 16 data = -1 }
			owned = { province = 17 data = -1 }
			owned = { province = 18 data = -1 }
			owned = { province = 19 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 = 33 data = -1 }
			owned = { province = 34 data = -1 }
			owned = { province = 35 data = -1 }
			owned = { province = 36 data = -1 }
			owned = { province = 37 data = -1 }
			owned = { province = 38 data = -1 }
			owned = { province = 40 data = -1 }
			owned = { province = 41 data = -1 }
			owned = { province = 42 data = -1 }
			owned = { province = 822 data = -1 }
			owned = { province = 1476 data = -1 }
			owned = { province = 1477 data = -1 }
			owned = { province = 1478 data = -1 }
			owned = { province = 1479 data = -1 }
			owned = { province = 1480 data = -1 }
			owned = { province = 1875 data = -1 }
			owned = { province = 1878 data = -1 }
			owned = { province = 1879 data = -1 }
			owned = { province = 1880 data = -1 }
			owned = { province = 1889 data = -1 }
			owned = { province = 1899 data = -1 }
			owned = { province = 1900 data = -1 }
			owned = { province = 1909 data = -1 }
			owned = { province = 1910 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 = 9 }
         command = { type = secedeprovince which = MEX value = 10 }
         command = { type = secedeprovince which = MEX value = 11 }
         command = { type = secedeprovince which = MEX value = 12 }
         command = { type = secedeprovince which = MEX value = 13 }
         command = { type = secedeprovince which = MEX value = 14 }
         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 = 18 }
         command = { type = secedeprovince which = MEX value = 19 }
         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 = 33 }
         command = { type = secedeprovince which = MEX value = 34 }
         command = { type = secedeprovince which = MEX value = 35 }
         command = { type = secedeprovince which = MEX value = 36 }
         command = { type = secedeprovince which = MEX value = 37 }
         command = { type = secedeprovince which = MEX value = 38 }
         command = { type = secedeprovince which = MEX value = 40 }
         command = { type = secedeprovince which = MEX value = 41 }
         command = { type = secedeprovince which = MEX value = 42 }
         command = { type = secedeprovince which = MEX value = 822 }
         command = { type = secedeprovince which = MEX value = 1476 }
         command = { type = secedeprovince which = MEX value = 1477 }
         command = { type = secedeprovince which = MEX value = 1478 }
         command = { type = secedeprovince which = MEX value = 1479 }
         command = { type = secedeprovince which = MEX value = 1480 }
         command = { type = secedeprovince which = MEX value = 1875 }
         command = { type = secedeprovince which = MEX value = 1878 }
         command = { type = secedeprovince which = MEX value = 1879 }
         command = { type = secedeprovince which = MEX value = 1880 }
         command = { type = secedeprovince which = MEX value = 1889 }
         command = { type = secedeprovince which = MEX value = 1899 }
         command = { type = secedeprovince which = MEX value = 1900 }
         command = { type = secedeprovince which = MEX value = 1909 }
         command = { type = secedeprovince which = MEX value = 1910 }
         }
}

event = {

	id = 220003
	trigger = {
		exists = U07
		vassal = { country = SPA country = U07 }
		OR = {
			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 = 1168 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 = "Greater Colombian independence"
	desc = "Greater 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 = U07 value = 39 }
         command = { type = secedeprovince which = U07 value = 154 }
         command = { type = secedeprovince which = U07 value = 155 }
         command = { type = secedeprovince which = U07 value = 156 }
         command = { type = secedeprovince which = U07 value = 157 }
         command = { type = secedeprovince which = U07 value = 158 }
         command = { type = secedeprovince which = U07 value = 159 }
         command = { type = secedeprovince which = U07 value = 160 }
         command = { type = secedeprovince which = U07 value = 161 }
         command = { type = secedeprovince which = U07 value = 162 }
         command = { type = secedeprovince which = U07 value = 163 }
         command = { type = secedeprovince which = U07 value = 164 }
         command = { type = secedeprovince which = U07 value = 178 }
         command = { type = secedeprovince which = U07 value = 179 }
         command = { type = secedeprovince which = U07 value = 187 }
         command = { type = secedeprovince which = U07 value = 188 }
         command = { type = secedeprovince which = U07 value = 1168 }
         command = { type = secedeprovince which = U07 value = 1856 }
         command = { type = secedeprovince which = U07 value = 1857 }
         command = { type = secedeprovince which = U07 value = 1858 }
         command = { type = secedeprovince which = U07 value = 1859 }
         command = { type = secedeprovince which = U07 value = 1860 }
         command = { type = secedeprovince which = U07 value = 1861 }
         command = { type = secedeprovince which = U07 value = 1862 }
         }
}

event = {

	id = 220004
	trigger = {
		exists = PEU
		vassal = { country = SPA country = 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 = 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 = 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
		vassal = { country = SPA country = LAP }
		OR = {
                        owned = { province = 175 data = -1 }
                        owned = { province = 215 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 = 225 data = -1 }
                        owned = { province = 226 data = -1 }
                        owned = { province = 227 data = -1 }
                        owned = { province = 228 data = -1 }
                        owned = { province = 229 data = -1 }
                        owned = { province = 230 data = -1 }
                        owned = { province = 1485 data = -1 }
                        owned = { province = 1486 data = -1 }
                        owned = { province = 1826 data = -1 }
                        owned = { province = 1827 data = -1 }
                        owned = { province = 1828 data = -1 }
                        owned = { province = 1829 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 = 175 }
         command = { type = secedeprovince which = LAP value = 215 }
         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 = 225 }
         command = { type = secedeprovince which = LAP value = 226 }
         command = { type = secedeprovince which = LAP value = 227 }
         command = { type = secedeprovince which = LAP value = 228 }
         command = { type = secedeprovince which = LAP value = 229 }
         command = { type = secedeprovince which = LAP value = 230 }
         command = { type = secedeprovince which = LAP value = 1485 }
         command = { type = secedeprovince which = LAP value = 1486 }
         command = { type = secedeprovince which = LAP value = 1826 }
         command = { type = secedeprovince which = LAP value = 1827 }
         command = { type = secedeprovince which = LAP value = 1828 }
         command = { type = secedeprovince which = LAP value = 1829 }
         command = { type = secedeprovince which = LAP value = 1830 }
         command = { type = secedeprovince which = LAP value = 1831 }
         }
}


event = {

	id = 220006
	trigger = {
		exists = U05
		vassal = { country = SPA country = U05 }
		OR = {
			owned = { province = 171 data = -1 }
                        owned = { province = 172 data = -1 }
                        owned = { province = 173 data = -1 }
                        owned = { province = 174 data = -1 }
                        owned = { province = 175 data = -1 }
                        owned = { province = 176 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 = 171 }
         command = { type = secedeprovince which = U05 value = 172 }
         command = { type = secedeprovince which = U05 value = 173 }
         command = { type = secedeprovince which = U05 value = 174 }
         command = { type = secedeprovince which = U05 value = 175 }
         command = { type = secedeprovince which = U05 value = 176 }
         command = { type = secedeprovince which = U05 value = 1832 }
         }
}

event = {

	id = 220007
	trigger = {
		exists = U06
		vassal = { country = SPA country = U06 }
		OR = {
			owned = { province = 1835 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 = 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 = U12
		vassal = { country = SPA country = U12 }
		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 = U12 value = 1846 }
         command = { type = secedeprovince which = U12 value = 1847 }
         }
}


#The Treaty of Paris (1763)#
event = {

	id = 7845301
	random = no
	country = SPA
	name = "The Treaty of Paris (1763)"
	desc = "The war ended France’s power, both in the Americas (where it lost all of its possessions except French Guiana, Guadeloupe, Martinique, Saint-Domingue and Saint Pierre and Miquelon) and in continental Europe, until the time of the French Revolution."
	style = 5

	action_a ={
		name = "Great"
		command = { type = stability value = 1 }
		command = { type = addcore which = 1901 } # Assiniboin
		command = { type = addcore which = 76 } # Wahpeton
		command = { type = addcore which = 1884 } # Iowa
		command = { type = addcore which = 1885 } # Oto
		command = { type = addcore which = 1893 } # Teton
		command = { type = addcore which = 1896 } # Yanktonai
		command = { type = addcore which = 1481 } # Missouri
                command = { type = addcore which = 43 } # Chitimacha
                command = { type = addcore which = 1887 } # Yankton
                command = { type = addcore which = 44 } # Natchez
                command = { type = addcore which = 75 } # Moingwena
                command = { type = addcore which = 1895 } # Apsalookee
                command = { type = addcore which = 1427 } # Adai
                command = { type = addcore which = 1891 } # Pawnee
                command = { type = addcore which = 1892 } # Arapaho
                command = { type = addcore which = 1882 } # Osage
                command = { type = addcore which = 1888 } # Caddo
                command = { type = addcore which = 1886 } # Omaha
		command = { type = addcore which = 1894 } # Cheyenne
		command = { type = addcore which = 1883 } # Kansa
		command = { type = addcore which = 1890 } # Kiowa
		command = { type = addcore which = 1897 } # Pikuni
		command = { type = addcore which = 58 } # Quapaw
	}
}

#The Third Treaty of San Ildefonso#
event = {

	id = 7845304
	trigger = {
			OR = {
					owned = { province = 1901  data = -1 } # Assiniboin
                                        owned = { province = 76  data = -1 } # Wahpeton
                                        owned = { province = 1884  data = -1 } # Iowa
					owned = { province = 1885  data = -1 } # Oto
					owned = { province = 1893  data = -1 } # Teton
					owned = { province = 1896  data = -1 } # Yanktonai
					owned = { province = 1481  data = -1 } # Missouri
					owned = { province = 43  data = -1 } # Chitimacha
					owned = { province = 1887  data = -1 } # Yankton
					owned = { province = 44  data = -1 } # Natchez
					owned = { province = 75  data = -1 } # Moingwena
					owned = { province = 1895  data = -1 } # Apsalookee
					owned = { province = 1427  data = -1 } # Adai
					owned = { province = 1891  data = -1 } # Pawnee
					owned = { province = 1892  data = -1 } # Arapaho
					owned = { province = 1882  data = -1 } # Osage
					owned = { province = 1888  data = -1 } # Caddo
					owned = { province = 1886  data = -1 } # Omaha
					owned = { province = 1894  data = -1 } # Cheyenne
					owned = { province = 1883  data = -1 } # Kansa
					owned = { province = 1890  data = -1 } # Kiowa
					owned = { province = 1897  data = -1 } # Pikuni
					owned = { province = 58  data = -1 } # Quapaw

             			 }
		exists = FRA
		event = 7845301
		}
	random = no
	country = SPA
	name = "The Third Treaty of San Ildefonso"
	desc = "The Third Treaty of San Ildefonso was a secretly negotiated treaty between France and Spain in which Spain returned the colonial territory of Louisiana to France. The treaty was concluded on October 1, 1800 between Louis Alexandre Berthier representing France and Don Mariano Luis de Urquijo for Spain. The treaty was negotiated under some duress, as Spain was under pressure from Napoleon."
	style = 5

	date = { day = 1 month = october year = 1800 }
	offset = 15
	deathdate = { day = 2 month = january year = 1803 }

	action_a ={
		name = "Ask for protection"
		command = { type = trigger which = 7845305 }
		command = { type = stability value = 1 }
	}

	action_b ={
		name = "Ask for nothing"
		command = { type = stability value = 1 }
		command = { type = relation which = FRA value = -50 }
	}
}

#The Third Treaty of San Ildefonso#
event = {

	id = 7845306
	random = no
	country = SPA
	name = "The Third Treaty of San Ildefonso"
	desc = "The Third Treaty of San Ildefonso was a secretly negotiated treaty between France and Spain in which Spain returned the colonial territory of Louisiana to France. The treaty was concluded on October 1, 1800 between Louis Alexandre Berthier representing France and Don Mariano Luis de Urquijo for Spain. The treaty was negotiated under some duress, as Spain was under pressure from Napoleon."
	style = 5

	action_a ={
		name = "Great"
		command = { type = secedeprovince which = FRA value = 1901 } # Assiniboin
		command = { type = secedeprovince which = FRA value = 76 } # Wahpeton
		command = { type = secedeprovince which = FRA value = 1884 } # Iowa
		command = { type = secedeprovince which = FRA value = 1885 } # Oto
		command = { type = secedeprovince which = FRA value = 1893 } # Teton
		command = { type = secedeprovince which = FRA value = 1896 } # Yanktonai
		command = { type = secedeprovince which = FRA value = 1481 } # Missouri
                command = { type = secedeprovince which = FRA value = 43 } # Chitimacha
                command = { type = secedeprovince which = FRA value = 1887 } # Yankton
                command = { type = secedeprovince which = FRA value = 44 } # Natchez
                command = { type = secedeprovince which = FRA value = 75 } # Moingwena
                command = { type = secedeprovince which = FRA value = 1895 } # Apsalookee
                command = { type = secedeprovince which = FRA value = 1427 } # Adai
                command = { type = secedeprovince which = FRA value = 1891 } # Pawnee
                command = { type = secedeprovince which = FRA value = 1892 } # Arapaho
                command = { type = secedeprovince which = FRA value = 1882 } # Osage
                command = { type = secedeprovince which = FRA value = 1888 } # Caddo
                command = { type = secedeprovince which = FRA value = 1886 } # Omaha
		command = { type = secedeprovince which = FRA value = 1894 } # Cheyenne
		command = { type = secedeprovince which = FRA value = 1883 } # Kansa
		command = { type = secedeprovince which = FRA value = 1890 } # Kiowa
		command = { type = secedeprovince which = FRA value = 1897 } # Pikuni
		command = { type = secedeprovince which = FRA value = 58 } # Quapaw
		command = { type = removecore which = 1901 } # Assiniboin
		command = { type = removecore which = 76 } # Wahpeton
		command = { type = removecore which = 1884 } # Iowa
		command = { type = removecore which = 1885 } # Oto
		command = { type = removecore which = 1893 } # Teton
		command = { type = removecore which = 1896 } # Yanktonai
		command = { type = removecore which = 1481 } # Missouri
                command = { type = removecore which = 43 } # Chitimacha
                command = { type = removecore which = 1887 } # Yankton
                command = { type = removecore which = 44 } # Natchez
                command = { type = removecore which = 75 } # Moingwena
                command = { type = removecore which = 1895 } # Apsalookee
                command = { type = removecore which = 1427 } # Adai
                command = { type = removecore which = 1891 } # Pawnee
                command = { type = removecore which = 1892 } # Arapaho
                command = { type = removecore which = 1882 } # Osage
                command = { type = removecore which = 1888 } # Caddo
                command = { type = removecore which = 1886 } # Omaha
		command = { type = removecore which = 1894 } # Cheyenne
		command = { type = removecore which = 1883 } # Kansa
		command = { type = removecore which = 1890 } # Kiowa
		command = { type = removecore which = 1897 } # Pikuni
		command = { type = removecore which = 58 } # Quapaw
	}
}