#####Aragon Major Events#####
#By Joakim 'Greven' Bergqwist   #
#   Thomas 'Besuchov' Johansson #
#   Henrik 'Doomdark' Fåhraeus  #
#################################
#modified by Hive

#The Aragon Inheritance of Sicily#
event = {
	id = 15467				#Triggered by SIC15466#
	random = no
	country = ARG
	name = "The Aragon Inheritance of Sicily"
	desc = "A conflict between the Hohenstaufen house and the Papacy in 1266 led to Sicily's conquest by Charles I, duke of Anjou. But the Sicilians were unhappy with French officialdom and taxation, and offered the throne to Peter III of Aragon, who gladly accepted and thus invaded Sicily in 1282. These events are known as the Sicilian Vespers. Sicily was ruled as an independent branch of the Aragon dynasty untill 1409, when the Sicilian branch became extinct. Sicily was then returned to the main Aragonese line."
	style = 1

	action_a ={
		name = "Rule it as an autonomous part of Aragon"
		command = { type = add_countryculture which = italian }
		command = { type = addcore which = 395 }
		command = { type = addcore which = 396 }
		command = { type = addcore which = 819 }
		command = { type = inherit which = SIC }
		command = { type = stability value = 1 }
	}

	action_b ={
		name = "Rule it as an independent Kingdom"
		command = { type = vassal which = SIC }
		command = { type = stability value = 3 }
	}
}

event = {
	id = 48645100
	trigger = {
		exists = MLL
	}
	random = no
	country = ARG
	name = "The invasion of the Kingdom of Majorca"
	desc = "In 1341, Peter IV of Aragon closed relations with the Kingdom of Majorca as a prelude to invasion."
	style = 2

	date = { year = 1341 }
	offset = 300
	deathdate = { year = 1342 }

	action_a ={
		name = "Prepare for invasion"
                command = { type = casusbelli   which = MLL value = 24 }
                command = { type = relation   which = MLL value = -200 }
                command = { type = trigger which = 48645101 }
	}

	action_b ={
		name = "Keep them as vassals"
		command = { type = dynastic   which = MLL }
		command = { type = alliance   which = MLL }
                command = { type = relation   which = MLL value = 50 }
	}
}

event = {
	id = 48645102
	trigger = {
                event = 48645101
		NOT = { war = { country = ARG country = MLL } }
	}
	random = no
	country = ARG
	name = "The begining of the end of the Kingdom of Majorca"
	desc = "In May 1343, Peter IV invaded the Balearic Islands, and followed that in 1344 with the invasions of the counties of Roussillon and Cerdanya."
	style = 2

	date = { month = may year = 1343 }
	offset = 28
	deathdate = { month = june year = 1343 }

	action_a ={
		name = "Invade!"
                command = { type = casusbelli   which = MLL value = 60 }
                command = { type = relation   which = MLL value = -200 }
                command = { type = war  which = MLL }
	}

	action_b ={
		name = "Change minds"
                command = { type = relation   which = MLL value = 75 }
	}
}

event = {
	id = 48645103
	trigger = {
	war = { country = ARG country = MLL }
	        OR = {
		   control = { province = 397 data = -1 }
		   control = { province = 426 data = -1 }
		   control = { province = 821 data = -1 }
		   control = { province = 1394 data = -1 }
		}
	}
	random = no
	country = ARG
	name = "The end of the Kingdom of Majorca"
	desc = "James III left for Majorca. He was defeated and killed at the Battle of Llucmajor on 25 October 1349. With this, the Kingdom of Majorca was definitively incorporated into the Crown of Aragon."
	style = 2

	date = { year = 1341 }
	offset = 30
	deathdate = { year = 1914 }

	action_a ={
		name = "Great emerge with the crown"
                command = { type = addcore which = 397 }
                command = { type = addcore which = 426 }
                command = { type = addcore which = 821 }
                command = { type = addcore which = 1394 }
                command = { type = inherit which = MLL }
	}

}

#The Iberian Wedding#
event = {

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

	date = { day = 1 month = october year = 1469 }
	offset = 30
	deathdate = { day = 30 month = december year = 1491 }

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

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

#Viva España#
event = {

	id = 3554
	trigger = {
		owned = {
			province = 436
			data = -1
		}
		NOT = {
			exists = SPA
			exists = CAS
		}
	}
	random = no
	country = ARG
	name = "EVENTNAME3554"
	desc = "EVENTHIST3554"
	style = 2

	date = { day = 16 month = january year = 1479 }
	offset = 30
	deathdate = { day = 29 month = december year = 1491 }

	action_a ={				#Let us claim the name Kingdom of Spain#
		name = "ACTIONNAME3554A"
		command = { type = country which = SPA }
		command = { type = addcore which = 431 }
		command = { type = addcore which = 432 }
		command = { type = addcore which = 433 }
		command = { type = addcore which = 435 }
		command = { type = addcore which = 436 }
		command = { type = addcore which = 438 }
		command = { type = addcore which = 439 }
		command = { type = addcore which = 440 }
		command = { type = addcore which = 443 }
		command = { type = addcore which = 444 }
		command = { type = addcore which = 445 }
		command = { type = addcore which = 817 }
		command = { type = addcore which = 917 }
		command = { type = addcore which = 921 }
		command = { type = addcore which = 1948 }
		command = { type = flagname which = "" }
		command = { type = add_countryculture   which = iberian } 
	}

	action_b ={				#Let us keep the name Kingdom of Aragon instead#
		name = "ACTIONNAME3554B"
		command = { type = stability value = -2 }
		command = { type = relation which = PAP value = -100 }
		command = { type = relation which = GEN value = 100 }
		command = { type = relation which = VEN value = 100 }
		command = { type = relation which = POR value = -100 }
		command = { type = domestic which = CENTRALIZATION value = -5 }
		command = { type = desertion which = -1 value = 5000 }
	}
}

# The Ascendancy of Carlos I #
event = {
	id = 3850
	trigger = {
		event = 3717
		exists = CAS
                OR = {
		       owned = {
		             	province = 436
			        data = -1
		       }
		       ai = no
                }
		NOT = {
			exists = SPA
			event = 3849
		}
	}
	random = no
	country = ARG
	name = "EVENTNAME3850"
	desc = "EVENTHIST3850"
	style = 2

	date = { day = 20 month = january year = 1479 }
	offset = 30
	deathdate = { day = 29 month = december year = 1491 }

	
	action_a ={				#Let us claim the name Kingdom of Spain#
		name = "ACTIONNAME3554A"
		command = { type = country which = SPA }
		command = { type = addcore which = 431 }
		command = { type = addcore which = 432 }
		command = { type = addcore which = 433 }
		command = { type = addcore which = 435 }
		command = { type = addcore which = 436 }
		command = { type = addcore which = 438 }
		command = { type = addcore which = 439 }
		command = { type = addcore which = 440 }
		command = { type = addcore which = 443 }
		command = { type = addcore which = 444 }
		command = { type = addcore which = 445 }
		command = { type = addcore which = 817 }
		command = { type = addcore which = 917 }
		command = { type = addcore which = 921 }
		command = { type = addcore which = 1948 }
		command = { type = flagname which = "" }
		command = { type = add_countryculture   which = iberian } 
		command = { type = trigger which = 15013 }
	}

	action_b ={				#Let us keep the name Kingdom of Aragon instead#
		name = "ACTIONNAME3554B"
		command = { type = stability value = -2 }
		command = { type = relation which = PAP value = -100 }
		command = { type = relation which = GEN value = 100 }
		command = { type = relation which = VEN value = 100 }
		command = { type = relation which = POR value = -100 }
		command = { type = domestic which = CENTRALIZATION value = -5 }
		command = { type = desertion which = -1 value = 5000 }
	}
}

# The Ascendancy of Carlos I #
event = {
	id = 15014
	random = no
	country = ARG
	name = "EVENTNAME3850"
	desc = "EVENTHIST3850"
	style = 2

	action_a = { #The Kingdoms are one!#
		name = "ACTIONNAME3850A"
		command = { type = trigger which = 3848 } # Spain inherits Aragon
	}
	action_b = { #No! Let us elect our own king instead.#
		name = "ACTIONNAME3850C"
		command = { type = stability value = -3 }
		command = { type = relation which = SPA value = -150 }
		command = { type = relation which = HAB value = -150 }
		command = { type = relation which = FRA value = 50 }
	} 
}

#The Aragon Inheritance of Napoli#
event = {

	id = 3555				#Triggered by NAP3660#
	random = no
	country = ARG
	name = "EVENTNAME3555"
	desc = "EVENTHIST3555"
	style = 1

	action_a ={				#Rule it as an independent Kingdom#
		name = "ACTIONNAME3555A"
		command = { type = vassal which = NAP }
		command = { type = stability value = 2 }
		command = { type = relation which = PAP value = 100 }
		command = { type = relation which = TOS value = 100 }
		command = { type = relation which = VEN value = 100 }
		command = { type = relation which = GEN value = 100 }
		command = { type = relation which = FRA value = -50 }
		command = { type = relation which = PRO value = -100 }
	}

	action_b ={				#Rule it as an autonomous part of Aragon#
		name = "ACTIONNAME3555B"
		command = { type = add_countryculture which = italian }
		command = { type = addcore which = 393 }
		command = { type = addcore which = 394 }
		command = { type = inherit which = NAP }
		command = { type = stability value = -2 }
		command = { type = relation which = PAP value = -100 }
		command = { type = relation which = TOS value = -100 }
		command = { type = relation which = VEN value = -100 }
		command = { type = relation which = GEN value = -100 }
		command = { type = relation which = FRA value = -150 }
		command = { type = relation which = PRO value = -200 }
	}
}

event = {
	id = 8733801
	trigger = { ai = yes }
	random = no
	country = ARG
	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 = 8733802
	trigger = { ai = yes }
	random = no
	country = ARG
	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 = 8733803
	trigger = { ai = yes }
	random = no
	country = ARG
	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 }
	}
}