#####Portuguese Major Events#####
###By Joakim 'Greven' Bergqwist##
#################################

#The Social Revolution of Joo I#
event = {

	id = 3265
	random = no
	country = POR
	name = "EVENTNAME3265"
	desc = "EVENTHIST3265"
	style = 1

	date = { day = 1 month = january year = 1419 }
	offset = 60
	deathdate = { day = 1 month = january year = 1433 }


	action_a ={		#For the trade & people!#
		name = "ACTIONNAME3265A"
		command = { type = domestic which = centralization	value = 3 }
		command = { type = domestic  which = ARISTOCRACY  value = -2 }
		command = { type = domestic  which = SERFDOM  value = -1 }
		command = { type = trade  value = 250 }
		command = { type = revoltrisk  value = 3 }
	}

	action_b ={		#Support the Aristocracy#
		name = "ACTIONNAME3265B"
		command = { type = domestic  which = ARISTOCRACY  value = 1 }
		command = { type = domestic  which = QUALITY  value = 1 }
		command = { type = land  value = 250 }
	}

}

#The Afonsine Ordinances#
event = {

	id = 3266
	random = no
	country = POR
	name = "EVENTNAME3266"
	desc = "EVENTHIST3266"
	style = 1

	date = { day = 1 month = january year = 1446 }
	offset = 60
	deathdate = { day = 1 month = january year = 1481 }

	action_a ={		#Every man make his own fortune#
		name = "ACTIONNAME3266A"
		command = { type = domestic  which = centralization  value = -2 }
		command = { type = stability  value = 2 }
	}

	action_b ={		#Demand less corruption#
		name = "ACTIONNAME3266B"
		command = { type = domestic  which = centralization  value = 2 }
		command = { type = revoltrisk  value = 5 }
		command = { type = stability  value = -2 }
		command = { type = provincetax  which = -1 value = 1 }
		command = { type = provincetax  which = -1 value = 1 }
	}

}


#The Duke of Coimbra#
event = {

	id = 3267
	random = no
	country = POR
	name = "EVENTNAME3267"
	desc = "EVENTHIST3267"
	style = 1

	date = { day = 1 month = january year = 1448 }
	offset = 60
	deathdate = { day = 1 month = january year = 1450 }

	action_a ={				#King is tricked#
		name = "ACTIONNAME3267A"
		
		command = { type = domestic which = centralization value = -1 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
		command = { type = domestic which = SERFDOM value = 1 }
		command = { type = stability value = 1 }
	}

	action_b ={				#Duke survives & assists king#
		name = "ACTIONNAME3267B"
		command = { type = domestic which = centralization value = 1 }
		command = { type = domestic which = ARISTOCRACY value = -1 }
		command = { type = domestic which = SERFDOM value = -1 }
		command = { type = stability value = -1 }
	}
}

#Commercial Conflict in the Indian Ocean#
event = {

	id = 3268
	random = no
	country = POR
	name = "EVENTNAME3268"
	desc = "EVENTHIST3268"
	style = 2

	date = { day = 1 month = january year = 1500 }
	offset = 60
	deathdate = { day = 1 month = january year = 1513 }

	action_a ={		#Forcefully control spice trade#
		name = "ACTIONNAME3268A"
		command = { type = gainbuilding which = 441 value = shipyard }
		command = { type = relation  which = OMA  value = -400 }
		command = { type = relation  which = TUR  value = -100 }
		command = { type = relation  which = GUJ  value = -100 }
		command = { type = domestic  which = MERCANTILISM  value = 2 }
		command = { type = addcore which = 504 } #Mascate - so that Oman and Portugal will always have reason to be at war.#
	}

	action_b ={		#Negotiate trading rights#
		name = "ACTIONNAME3268B"
		command = { type = gainbuilding which = 441 value = shipyard }
		command = { type = relation  which = OMA  value = 50 }
		command = { type = relation  which = TUR  value = 50 }
		command = { type = relation  which = GUJ  value = 50 }
		command = { type = domestic  which = MERCANTILISM  value = -2 }
	}

}

#The Holy Inquisition#
event = {

	id = 3269
	random = no
	country = POR
	name = "EVENTNAME3269"
	desc = "EVENTHIST3269"
	style = 1

	date = { day = 1 month = january year = 1536 }
	offset = 60
	deathdate = { day = 1 month = january year = 1668 }

	action_a ={		#Institute them!#
		name = "ACTIONNAME3269A"
		command = { type = domestic  which = INNOVATIVE  value = -3 }
	}

	action_b ={		#Do not institute them!#
		name = "ACTIONNAME3269B"
		command = { type = domestic  which = INNOVATIVE  value = 1 }
		command = { type = relation  which = SPA  value = -75 }
		command = { type = relation  which = PAP  value = -75 }
	}

}

#Governor Martim Afonso de Sousa in Brazil#
event = {

	id = 3271
	random = no
	country = POR
	name = "EVENTNAME3271"
	desc = "EVENTHIST3271"
	style = 2

	date = { day = 1 month = january year = 1531 }
	offset = 60
	deathdate = { day = 1 month = january year = 1560 }

	action_a ={		#Appoint de Sousa#
		name = "ACTIONNAME3271A"
		command = { type = stability  value = 2 }
		command = { type = conquistador  which = -1 }
		command = { type = warships  which = -1  value = 10 }
	}

}

#The Societas Jesu#
event = {

	id = 3270
	random = no
	country = POR
	name = "EVENTNAME3270"
	desc = "EVENTHIST3270"
	style = 2

	date = { day = 1 month = january year = 1540 }
	offset = 60
	deathdate = { day = 1 month = january year = 1541 }

	action_a ={				#Institute them!#
		name = "ACTIONNAME3270A"
		command = { type = domestic which = INNOVATIVE value = -1 }
		command = { type = colonists  value = 4 }
		command = { type = missionaries  value = 4 }
	}

	action_b ={				#Do not institute them!#
		name = "ACTIONNAME3270B"
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = relation  which = SPA  value = -50 }
		command = { type = relation  which = PAP  value = -50 }
		command = { type = relation  which = NAP  value = -50 }
	}
}

event = {

	id = 765401
	random = no
	country = POR
	name = "The conversion of Daimyos"
	desc = "The Spanish Jesuit missionary Francis Xavier arrived in another part of the territory in 1549, but left for China in 1551 and died soon afterwards. His followers who remained behind converted a number of daimyo (feudal lords). The most notable among them was Omura Sumitada, who derived great profit from his conversion through an accompanying deal to receive a portion of the trade from Portuguese ships at a port they established in Nagasaki in 1571 with his assistance."
	style = 2

        date = { day = 15 month = august year = 1549 }
	offset = 30

        action_a = {
		name = "Try to convert them"
                 command = { type = cash value = -100 }
	         command = { type = trigger   which = 765402 }
	}
        action_b = {
		name = "Let them alone"
                 command = { } # Just to make the option visible
	}
}

event = {

	id = 765402
	random = no
	country = POR
	name = "The conversion of Daimyos"
	desc = "Now we just have to wait for the missionaries to do their job."
	style = 2

        action_a = {
		name = "Try to convert them"
                 command = { type = missionaries   value = -1 }
	}
}

event = {
	id = 98874006  #Triggered by CHI3704 Anno 1557
	random = no
	country = POR
	name = "EVENTNAME3704"
	desc = "EVENTHIST3704"
	style = 5 

	action_a ={ 
		name = "Good"
		 command = { type = addcore which = 1807 }
		command = { type = fortress   which = 1807 value = 1 }
		command = { type = gainbuilding   which = 1807 value = bailiff }
		command = { type = provinceculture   which = 1807 value = canary }
		command = { type = provincereligion   which = 1807 value = catholic }
	}
}

#King Sebastio's Expedition to North Africa#
event = {

	id = 3272
	random = no
	trigger = {
			OR = {
				exists = MOR
				exists = FEZ
				exists = ALD
				}
		}
	country = POR
	name = "EVENTNAME3272"
	desc = "EVENTHIST3272"
	style = 2

	date = { day = 4 month = august year = 1578 }
	offset = 0
	deathdate = { day = 5 month = august year = 1578 }

	action_a ={			#A Crusade against the Heretics in Africa#
		name = "ACTIONNAME3272A"
		command = { type = sleepevent which = 3163 }
		command = { type = casusbelli which = MOR value = 12 }
		command = { type = casusbelli which = FEZ value = 12 }
		command = { type = casusbelli which = ALD value = 12 }
		command = { type = treasury value = 300 }
		command = { type = INF which = -1 value = 10000 }
		command = { type = CAV which = -3 value = 5000 }
		command = { type = ART which = -3 value = 10 }
		command = { type = stability value = 1 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = domestic which = ARISTOCRACY value = -3 }
	}

	action_b ={			#Declare the King insane and lock him up for good#
		name = "ACTIONNAME3272B"
		command = { type = wakemonarch which = 06768 }
		command = { type = sleepevent which = 3162 }
		command = { type = trade value = 800 }
		command = { type = naval value = 800 }
		command = { type = stability value = 1 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
	}
}

#Epidemic Plague#
event = {

	id = 3273			#Triggered by SPA3165#
	random = no
	country = POR
	name = "EVENTNAME3273"
	desc = "EVENTHIST3273"
	style = 3

	action_a ={				#Arrgh!#
		name = "ACTIONNAME3273A"
		command = { type = stability 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 }
	}
}

#Filipe II Claim to the Throne# 
event = {

	id = 3274
	random = no
	trigger = {
		OR = { event = 3162 event = 3163 }
	}
	country = POR
	name = "EVENTNAME3274"
	desc = "EVENTHIST3274"
	style = 2

	date = { day = 2 month = february year = 1580 }
	offset = 0
	deathdate = { day = 3 month = april year = 1621 }

	action_a ={				#Accept the New Government#
		name = "ACTIONNAME3274A"
		command = { type = stability value = 1 }
		command = { type = relation which = SPA value = 100 }
	}

	action_b ={				#Accept the King, but not the government#
		name = "ACTIONNAME3274B"
		command = { type = stability value = -2 }
		command = { type = breakvassal which = SPA }
		command = { type = relation which = SPA value = -200 }
		command = { type = casusbelli which = SPA value = 6 }
	}
}

event = {

	id = 765404     #Triggered by NIP765403 Anno 1587
	random = no
	country = POR
	name = "The conversion of Omura Sumitada"
	desc = "Omura Sumitada converted and will now trade with us in Nagasaki."
	style = 2

        action_a = {
		name = "Great"
 	       	 command = { type = relation which = NIP value = 50 }
                 command = { type = gainbuilding   which = 1414 value = bailiff }
                 command = { type = merchants   value = 6 }
                 command = { type = sleepevent which = 78793733 }
	}
}

event = {

	id = 765406
	trigger = { OR = { event = 3878 event = 3879 } }
	random = no
	country = POR
	name = "The Shimabara Rebellion"
	desc = "The rebellion broke out on December 17, 1637, when peasants rose against their daimyo Matsukura Shigeharu. Most rebels were Japanese converted to Christianity, but a primary reason for the revolt was the very heavy tax burden; many rebels took the mantle of Christianity later. The rebellion included up to 23,000 peasants and ronin, including many women, in Shimabara and nearby Amakusa Islands under the leadership of Amakusa Shiro (also named Masuda Tokisada) who used a Christian name Jerome. Both areas had been under the rule of the previous Christian daimyo Konishi Yukinaga. Terazawa Hirotaka, governor of Nagasaki, dispatched an army of 3,000 samurai to Amakusa but rebels defeated them on December 27, 1637, with 2,800 casualties. Survivors retreated to Nagasaki and the governor asked the shogunate for reinforcements. However, in battle on January 3, 1638, shogunate warriors defeated the rebels who lost about 1,000. They retreated to Shimabara."
	style = 2
	
	date = { day = 17 month = december year = 1637 }

        action_a = {
		name = "Fund it"
                 command = { type = cash value = -100 }
 	       	 command = { type = relation which = NIP value = -100 }
 	       	 command = { type = population   which = 1414 value = -500 } #Merchants fleeing
                 command = { type = merchants   value = -2 }
                 command = { type = trigger   which = 765407 }
	}
        action_b = {
		name = "Tell the Tokugawa"
                 command = { type = cash value = 50 }
 	       	 command = { type = relation which = NIP value = 50 }
	}
}

event = {

	id = 765409     #Triggered by NIP765408 Anno 1639
	random = no
	country = POR
	name = "The Dutch traders"
	desc = "The Shimabara rebellion also convinced many policy-makers that foreign influences were more trouble than they were worth. The Portuguese, who had been previously living on a specially-constructed island-prison in Nagasaki harbor called Deshima, were expelled from the archipelago altogether, and the Dutch were moved from their base at Hirado into the trading island. In 1720 the ban on Dutch books was lifted, causing hundreds of scholars to flood into Nagasaki to study European science and art. Consequently, Nagasaki became a major center of rangaku, or 'Dutch Learning'. During the Edo period, the Tokugawa shogunate governed the city, appointing a hatamoto, the Nagasaki bugyo, as its chief administrator."
	style = 2

        action_a = {
		name = "We will be back!!"
		 command = { type = secedeprovince which = HOL value = 1414 }
	         command = { type = relation which = HOL value = -100 }
	         command = { type = relation which = NIP value = -100 }
                 command = { type = merchants   value = -6 }
	         command = { type = trigger   which = 765410 }
	}
}

#Count da Ericeira#
event = {

	id = 3276
	random = no
	country = POR
	name = "EVENTNAME3276"
	desc = "EVENTHIST3276"
	style = 4

	date = { day = 1 month = january year = 1676 }
	offset = 10
	deathdate = { day = 1 month = january year = 1706 }

	action_a ={				#An Excellent Minister!#
		name = "ACTIONNAME3276A"
		command = { type = domestic which = MERCANTILISM value = 3 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		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 = 3 }
	}
}

#The Meuthen Agreement#
event = {

	id = 3275
	random = no
	country = POR
	name = "EVENTNAME3275"
	desc = "EVENTHIST3275"
	style = 4

	date = { day = 1 month = january year = 1703 }
	offset = 10
	deathdate = { day = 1 month = july year = 1750 }


	action_a ={			#Offer the Agreement#
		name = "ACTIONNAME3275A"
		command = { type = trigger which = 3093 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = relation which = ENG value = 150 }
		command = { type = gainmanufactory which = -1 value = refinery }
		command = { type = gainmanufactory which = -1 value = refinery }
		command = { type = gainmanufactory which = -1 value = refinery }
		command = { type = gainmanufactory which = -1 value = goods }
		command = { type = stability value = -1 }
	}

	action_b ={			#Don't Offer the Agreement#
		name = "ACTIONNAME3275B"
		command = { type = domestic which = MERCANTILISM value = -3 }
		command = { type = relation which = ENG value = -100 }
		command = { type = stability value = 2 }
	}
}


#The Effects of the Pragmatic Sanction#
event = {

	id = 3277
	random = no
	country = POR
	name = "EVENTNAME3277"
	desc = "EVENTHIST3277"
	style = 4

	date = { day = 1 month = january year = 1742 }
	offset = 10
	deathdate = { day = 1 month = april year = 1742 }


	action_a ={				#Neutral#
		name = "ACTIONNAME3277A"
		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 = 50 }
		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 = 50 }

	}

	action_b ={				#Pro-Habsburg#
		name = "ACTIONNAME3277B"
		command = { type = casusbelli which = SPA value = 36 }
		command = { type = relation which = BAY value = -100 }
		command = { type = relation which = SAC value = -100 }
		command = { type = relation which = PRU value = -100 }
		command = { type = relation which = FRA value = -100 }
		command = { type = relation which = HOL value = 150 }
		command = { type = relation which = ENG value = 150 }
		command = { type = relation which = RUS value = 50 }
		command = { type = relation which = HES value = 100 }
		command = { type = relation which = HAN value = 100 }
		command = { type = relation which = HAB value = 150 }
		command = { type = stability value = -1 }

	}
	action_c ={				#Anti-Habsburg#
		name = "ACTIONNAME3277C"
		command = { type = casusbelli which = HOL value = 12 }
		command = { type = casusbelli which = ENG value = 12 }
		command = { type = relation which = BAY value = 150 }
		command = { type = relation which = SAC value = 150 }
		command = { type = relation which = PRU value = 150 }
		command = { type = relation which = FRA value = 150 }
		command = { type = relation which = SPA value = 150 }
		command = { type = relation which = HOL value = -150 }
		command = { type = relation which = RUS value = -50 }
		command = { type = relation which = ENG value = -150 }
		command = { type = relation which = HES value = -100 }
		command = { type = relation which = HAN value = -100 }
		command = { type = relation which = HAB value = -150 }
		command = { type = stability value = -1 }

	}
}

#Marquis de Pombal#
event = {

	id = 3279
	random = no
	country = POR
	name = "EVENTNAME3279"
	desc = "EVENTHIST3279"
	style = 4

	date = { day = 3 month = august year = 1750 }
	offset = 10
	deathdate = { day = 1 month = april year = 1777 }

	action_a ={				#An Excellent Minister!#
		name = "ACTIONNAME3279A"
		command = { type = DIP which = 3 value = 240 }
		command = { type = ADM which = 4 value = 240 }
		command = { type = MIL which = 2 value = 240 }
		command = { type = domestic which = CENTRALIZATION value = 2 }
		command = { type = domestic which = ARISTOCRACY value = -2 }
		command = { type = domestic which = SERFDOM value = -2 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = domestic which = MERCANTILISM value = 3 }
		command = { type = domestic which = QUALITY value = 1 }
		command = { type = land value = 750 }
		command = { type = naval value = 750 }
		command = { type = stability value = 3 }
	}
}

#Earthquake destroy Lisboa#

event = {

	id = 3278
	random = no
	country = POR
	name = "EVENTNAME3278"
	desc = "EVENTHIST3278"
	style = 4

	date = { day = 1 month = january year = 1755 }
	offset = 10
	deathdate = { day = 1 month = january year = 1756 }

	action_a ={
		name = "ACTIONNAME3278A"
		command = { type = population  which = 441 value = -30000 }
		command = { type = provincetax  which = 441 value = -4 }
		command = { type = stability  value = -3 }
	}
}

#The Tavoras Conspiracy#
event = {

	id = 3280
	random = no
	country = POR
	name = "EVENTNAME3280"
	desc = "EVENTHIST3280"
	style = 4

	date = { day = 3 month = september year = 1758 }
	offset = 0
	deathdate = { day = 4 month = september year = 1758 }

	action_a ={				#Crush the Opposition#
		name = "ACTIONNAME3280A"
		command = { type = domestic which = CENTRALIZATION value = 2 }
		command = { type = domestic which = ARISTOCRACY value = -2 }
		command = { type = domestic which = SERFDOM value = 1 }
		command = { type = domestic which = INNOVATIVE value = -3 }
		command = { type = revoltrisk which = 60 value = 3 }
		command = { type = stability value = 1 }
	}

	action_b ={				#Be Lenient#
		name = "ACTIONNAME3280B"
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = domestic which = ARISTOCRACY value = 1 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = stability value = -1 }
	}
}

#The Expulsion of Marquis Jos da Pombal#
event = {

	id = 3281
	random = no
	country = POR
	name = "EVENTNAME3281"
	desc = "EVENTHIST3281"
	style = 4

	date = { day = 24 month = february year = 1777 }
	offset = 10
	deathdate = { day = 24 month = february year = 1778 }

	action_a ={				#Expell him#
		name = "ACTIONNAME3281A"
		command = { type = domestic which = CENTRALIZATION value = -2 }
		command = { type = domestic which = ARISTOCRACY value = 2 }
		command = { type = domestic which = SERFDOM value = -1 }
		command = { type = domestic which = INNOVATIVE value = -3 }
		command = { type = treasury value = 500 }
		command = { type = stability value = 2 }
	}

	action_b ={				#Let the 'Great Marquis' rule#
		name = "ACTIONNAME3281B"
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = domestic which = ARISTOCRACY value = -1 }
		command = { type = domestic which = INNOVATIVE value = 1 }
		command = { type = DIP which = 3 value = 60 }
		command = { type = ADM which = 4 value = 60 }
		command = { type = MIL which = 2 value = 60 }
		command = { type = revoltrisk which = 60 value = 3 }
		command = { type = stability value = -1 }
	}
}

#Portuguese events by Hive

#In the Face of Napoleon# #build on the Russian event by the same name
event = {

	id = 15131
	trigger = {	
			owned = {
				province = 210
				data = -1
				}
			owned = {
				province = 441
				data = -1
				}
			war = {
				country = POR
				country = FRA
				}
			event = 3148
		}
	random = no
	country = POR
	name = "In the Face of Napoleon"
	desc = "Portugal had been an ally of England for a long time, which was not looked kindly apon by neither France nor Spain. With the Spanish King's permission, a French army under General Andoche Junot crossed Spain into Portugal and occupied Lisbon by December 1807. The royal family, having fled to Brazil from Napoleon's army, established the seat of Portuguese Government in Rio de Janeiro. Your Excellency, shall we move our capital to Rio de Janeiro?"
	style = 5

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

	action_a ={
		name = "Rio de Janeiro shall be our new capital"
		command = { type = capital which = 210 }
		command = { type = stability value = -1 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
		command = { type = setflag which = Fled_To_Brazil }
	}

	action_b ={
		name = "Lisbon shall remain as our capital"
		command = { type = capital which = 441 }
		command = { type = stability value = 1 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
	}
}

#The Liberal Opposition#
event = {

	id = 3282
	random = no
	country = POR
	name = "EVENTNAME3282"
	desc = "EVENTHIST3282"
	style = 5

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

	action_a ={		#Growing opposition#
		name = "ACTIONNAME3282A"
		command = { type = stability  value = -3 }
		command = { type = revoltrisk  value = 5 }
	}

	action_b ={		#King consede to liberal ideas#
		name = "ACTIONNAME3282B"
		command = { type = stability  value = -2 }
		command = { type = revoltrisk  value = 2 }
		command = { type = domestic  which = ARISTOCRACY  value = -2 }
		command = { type = domestic  which = INNOVATIVE  value = 1 }
		command = { type = domestic  which = SERFDOM  value = -2 }
	}

}

#Portuguese events from AoN modified by Hive

#The Return to Portugal#
event = {

	id = 15132
	trigger = {	
			owned = {
				province = 210
				data = -1
				}
			owned = {
				province = 441 
				data = -1
				}
			NOT = { 
				war = {
				country = POR
				country = FRA
				}
			}
			event = 15131
			flag = Fled_To_Brazil
		}
	random = no
	country = POR
	name = "The Return to Portugal"
	desc = "Portugal was drawn into the revolutionary wars through their allegiance to England, and when the French occupied the country the royal family fled to Brazil and ruled in exile from Rio de Janeiro. The French was later driven away by the English, who thereafter had the de facto power in European Portugal. In 1820 the English were expelled, and the Portuguese royal family could return to Lisbon the following year. Your Excellency, shall we return to Lisbon?"
	style = 5

	date = { day = 1 month = january year = 1821 }
	offset = 150
	deathdate = { day = 1 month = january year = 1822 }

	action_a ={
		name = "Lisbon shall once again be our capital"
		command = { type = capital which = 441 }
		command = { type = stability value = 2 }
		command = { type = domestic which = CENTRALIZATION value = 1 }
		command = { type = setflag which = Back_To_Portugal }
		command = { type = clrflag which = Fled_To_Brazil }
	}

	action_b ={
		name = "Rio de Janeiro shall remain our capital"
		command = { type = capital which = 210 }
		command = { type = stability value = -1 }
		command = { type = domestic which = CENTRALIZATION value = -1 }
	}
}

#The Empire of Brazil# 
event = {
    id = 15133
    trigger = {
        owned = {
            province = 210
            data = -1
        }
        NOT = {
            exists = BRZ
        }
        event = 15132
        flag = Back_To_Portugal
    }
    random = no
    country = POR
    name = "The Empire of Brazil"
    desc = "Brazil was claimed for Portugal in 1500 by Pedro Alvares Cabral. It was ruled from Lisbon as a colony until 1808, when the royal family, having fled from Napoleon's army, established the seat of Portuguese Government in Rio de Janeiro. Brazil became a kingdom under Joo VI, who returned to Portugal in 1821. His son Pedro declared Brazil's independence on September 7, 1822, and became emperor with the title of Pedro I."
    style = 5

    date = { day = 7 month = september year = 1822 }
    offset = 100

    action_a ={
        name = "Long live Pedro I of Brazil"
        command = { type = independence which = BRZ }
        command = { type = domestic which = CENTRALIZATION value = -1 }
	command = { type = stability value = 1 }
	command = { type = capital which = 434 }
	command = { type = capital which = 442 }
	command = { type = capital which = 441 }
     }
    action_b ={
        name = "Brazil belongs to the Crown of Portugal"
        command = { type = revolt which = 210 }
        command = { type = revolt which = 210 }
        command = { type = revolt which = 210 }
        command = { type = revoltrisk which = 120 value = 5 }
        command = { type = stability value = -2 }
    }
}

############################
####         AI         ####
############################

event = {

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

	date = { day = 1 month = january year = 1494 }

	action_a ={
		name = "Ok"
                command = { type = ai   which = portugal_1494-1580.ai }
	}
}
event = {

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

	date = { day = 1 month = january year = 1580 }

	action_a ={
		name = "Ok"
                command = { type = ai   which = portugal_1580-1640.ai }
	}
}
event = {

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

	date = { day = 1 month = january year = 1640 }

	action_a ={
		name = "Ok"
                command = { type = ai   which = portugal_1640-1822.ai }
	}
}
event = {

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

	date = { day = 1 month = january year = 1822 }

	action_a ={
		name = "Ok"
                command = { type = ai   which = portugal_1822-1914.ai }
	}
}

############################
####       FLAGS        ####
############################

event = {

	id = 98874100
	random = no
	country = POR
	name = "New National Ensign"
	desc = "Now that sounds good"
	style = 4

	date = { day = 1 month = january year = 1495 }
	offset = 360
	deathdate = { day = 1 month = january year = 1496 }

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

event = {

	id = 98874101
	random = no
	country = POR
	name = "New National Ensign"
	desc = "Now that sounds good"
	style = 4

	date = { day = 1 month = january year = 1830 }
	offset = 360
	deathdate = { day = 1 month = january year = 1831 }

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

event = {

	id = 98874102
	random = no
	country = POR
	name = "New National Ensign"
	desc = "Now that sounds good"
	style = 4

	date = { day = 1 month = january year = 1910 }
	offset = 360
	deathdate = { day = 1 month = january year = 1911 }

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