#################################
##### Malacca Flavor Events ##### 
#####      By Suleyman      #####
#####       and Crook	    #####
#################################

#Prime Minister Tun Perak - 1st term - Edited by Crook #
event = { 
        id = 60000 
        random = no 
        country = MLC 
        name = "EVENTNAME60000" 
        desc = "EVENTHIST60000"
        style = 1 
        date = { day = 1 month = march year = 1456 }  

        action_a ={
        name = "ACTIONNAME60000A" 
        command = { type = stability value = 1 } 
        command = { type = domestic which = land value = -1 } 
        command = { type = galleys which = -1 value = 10 } 
        command = { type = naval value = 250 } 
        command = { type = ADM which = 2 value = 34 } 
        command = { type = MIL which = 2 value = 34 } 
	} 
} 
#Prime Minister Tun Perak - 2nd term - Added by Crook #
event = { 
        id = 60009 
        random = no 
        country = MLC 
        name = "EVENTNAME60000" 
        desc = "EVENTHIST60000"
        style = 1 
        date = { day = 1 month = january year = 1459 }  

        action_a ={
        name = "ACTIONNAME60000A" 
        command = { type = ADM which = 2 value = 225 } 
        command = { type = MIL which = 1 value = 225 } 
	} 
} 
#Prime Minister Tun Perak - 3rd term - Added by Crook # 
event = { 
        id = 60010 
        random = no 
        country = MLC 
        name = "EVENTNAME60000" 
        desc = "EVENTHIST60000"
        style = 1 
        date = { day = 1 month = october year = 1477 }  

        action_a ={
        name = "ACTIONNAME60000A" 
        command = { type = ADM which = 1 value = 123 } 
	command = { type = DIP which = 1 value = 123 }
	} 
} 
#Prime Minister Tun Perak - 4th term - Added by Crook # 
event = { 
        id = 60011 
        random = no 
        country = MLC 
        name = "EVENTNAME60000" 
        desc = "EVENTHIST60000"
        style = 1 
        date = { day = 1 month = january year = 1488 }  

        action_a ={
        name = "ACTIONNAME60000A" 
        command = { type = ADM which = 1 value = 124 } 
	command = { type = DIP which = 1 value = 124 }
	command = { type = domestic which = mercantilism value = 1 }
	} 
} 

#The Chinese Wedding Planner# 
event = { 
         id = 60001 
         random = no 
         country = MLC 
         name = "EVENTNAME60001" 
         desc = "EVENTHIST60001"
         style = 1 

         trigger = { 
                   NOT = { war = { country = MLC country = CHI } 
                   } 
         } 

         date = { day = 1 month = april year = 1458 } 
         offset = 10 
         deathdate = { day = 1 month = april year = 1462 } 

         action_a ={ #Ok# 
                   name = "ACTIONNAME60001A" 
                   command = { type = dynastic which = CHI } 
                   command = { type = relation which = CHI value = 50 } 
                   command = { type = DIP which = 2 value = 36 } 
                   command = { type = treasury value = 100 } 
                   } 

        action_b ={ #Ok# 
                   name = "ACTIONNAME60001B" 
                   command = { type = relation which = CHI value = -35 } 
                   command = { type = treasury value = 250 } 
                   } 
} 

#The traitor Hang Jebat# 
event = { 
	id = 60002 
	random = no 
	country = MLC 
	name = "EVENTNAME60002" 
	desc = "EVENTHIST60002"
	style = 1 
	trigger = { leader = 08911 }
	date = { day = 1 month = march year = 1472 } 
	offset = 20 

	action_a ={ #Ok# 
		name = "ACTIONNAME60002A" 
		command = { type = stability value = -1 } 
		} 
	action_b ={ #Ok# 
		name = "ACTIONNAME62002B" 
		command = { type = stability value = -3 } 
		command = { type = revolt which = -1 } 
		command = { type = wakeleader which = 08916 }
		} 
	action_c ={ #Ok# 
		name = "ACTIONNAME62002C" 
		command = { type = treasury value = -150 } 
		command = { type = revoltrisk value = 2 } 
		command = { type = wakeleader which = 08916 }
		} 
} 

#The Portuguese covet Malacca!# 
event = { 
	id = 60003 
	random = no 
	country = MLC 
	trigger = { event = 18012 }
	name = "EVENTNAME60003" 
	desc = "EVENTHIST60003" 
	style = 2 
	date = { day = 1 month = january year = 1498 } 
	offset = 10 
	deathdate = { day = 1 month = january year = 1680 } 
	action_a ={ #Ok# 
		name = "ACTIONNAME60003A" 
		command = { type = casusbelli which = POR value = 600 }
		command = { type = war which = POR }
		command = { type = sleepevent which = 18104 }
		} 
	action_b ={ #Ok# 
		name = "ACTIONNAME60003B" 
		command = { type = stability value = -3 }
		command = { type = revoltrisk which = 24 value = 4 }
		command = { type = capital which = 678 } #Johor#
		command = { type = provincetax which = 678 value = 2 }
		command = { type = secedeprovince which = POR value = 677 }
		command = { type = sleepevent which = 60008 }
		command = { type = sleepevent which = 18103 }
		} 
} 

#St. Francis Xavier visits Malacca# 
event = { 
         id = 60004 
         random = no 
         country = MLC 
         name = "EVENTNAME60004" 
         desc = "EVENTHIST60004" 
         style = 2 
         trigger = { religion = sunni 
			exists = POR } 
	 date = { day = 1 month = june year = 1545 } 
         offset = 10 

         action_a ={ #Ok# 
                   name = "ACTIONNAME60004A" 
                   command = { type = relation which = POR value = -40 } 
                   command = { type = domestic which = innovative value = -1 } 
                   command = { type = stability value = 2 } 
                   } 

        action_b ={ #Ok# 
                   name = "ACTIONNAME60004B" 
                   command = { type = domestic which = innovative value = 1 } 
                   command = { type = relation which = POR value = 40 } 
                   command = { type = stability value = -1 } 
                   command = { type = revoltrisk value = 3 } 
                   } 
} 

#Settlement of the Malay islands# 
event = { 
         id = 60005 
         random = no 
         country = MLC 
	 trigger = { owned = { province = 681 data = -1 }
			owned = { province = 682 data = -1 } }
         name = "EVENTNAME60005" 
         desc = "EVENTHIST60005"
         style = 1 
         date = { day = 1 month = march year = 1435 } 
         offset = 15 

         action_a ={ #Ok# 
                   name = "ACTIONNAME60005A" 
                   command = { type = transports which = -1 value = 6 } 
                   command = { type = colonists value = 4 } 
                   command = { type = addcore which = 681 } 
                   command = { type = addcore which = 682 } 
                   } 
} 

#Tun Seri Lanang writes the Malay Annals# 
event = { 
         id = 60006 
         random = no 
         country = MLC 
         name = "EVENTNAME60006" 
         desc = "EVENTHIST60006"
         style = 3 
         date = { day = 13 month = may year = 1612 } 
         offset = 20 

         action_a ={ #Ok# 
                   name = "ACTIONNAME60006A" 
                   command = { type = stability value = 1 } 
                   command = { type = gainmanufactory which = -1 value = luxury } 
                   command = { type = infra value = 300 } 
                   } 
}

##### Events by Crook #####

event = {
	id = 60007
	random = no
	country = MLC
	trigger = { 
			NOT = { 
				domestic = { type = innovative value = 5 }
				}
	}
	name = "EVENTNAME60007"
	desc = "EVENTHIST60007"
	date = { day = 1 month = january year = 1445 }
	offset = 300
	deathdate = { day = 30 month = december year = 1446 }
	action_a = {
		name = "ACTIONNAME65152A"
		command = { type = revolt which = -1 }
		command = { type = stability value = -1 }
		}
	}

#Prime Minister Tun Mutahir# 
event = { 
        id = 60012 
        random = no 
        country = MLC 
        name = "EVENTNAME60012" 
        desc = "EVENTHIST60012"
        style = 1 
        date = { day = 1 month = january year = 1500 }  

        action_a ={
        name = "ACTIONNAME60000A" 
        command = { type = ADM which = 2 value = 124 } 
	command = { type = DIP which = 1 value = 124 }
	command = { type = stability value = -2 }
	command = { type = domestic which = mercantilism value = 1 }
	command = { type = trade value = -250 }
	command = { type = infra value = 250 }
	command = { type = inflation value = 6 }
	} 
} 

####################################
####     The Fall of Malacca    ####
##  Idea: Demetrios and Suleyman  ##
####     Scripting by Havard    ####
####################################

event = {
	id = 60008
	trigger = {
			OR = { 
				control = { province = 677 data = POR }
				control = { province = 677 data = HOL }
				control = { province = 677 data = ENG }
				}
			owned = { province = 678 data = -1 }	
		}
	random = no
	country = MLC
	name = "EVENTNAME60008"
	desc = "EVENTHIST60008"
	style = 2

	date = { day = 1 month = january year = 1500 }
	deathdate = { day = 1 month = january year = 1820 }

	action_a ={		#Move to Johor#
		name = "ACTIONNAME60008A"
		command = { type = capital which = 678 } #Johor#
		command = { type = provincetax which = 678 value = 1 }
		command = { type = domestic  which = centralization value = 1 }
            	command = { type = cash value = -50 }
		command = { type = independence which = U06 }
	}
	action_b ={		#Stay in Malacca#
		name = "ACTIONNAME60008B"
		command = { type = stability value = -3 } 
		command = { type = desertion which = -1 value = 5000 }
	}
}

event = {
	id = 60013
	trigger = { exists = U06 }
	random = no
	country = U06
	name = "EVENTNAME60013"
	desc = "EVENTHIST60013"
	style = 2

	date = { day = 1 month = january year = 1500 }
	deathdate = { day = 1 month = january year = 1820 }

	action_a ={	
		name = "ACTIONNAME60013A"
		command = { type = inf which = -2 value = 5000 } 
		command = { type = cav which = -3 value = 3000 }
		command = { type = provincetax which = -2 value = 1 }
		command = { type = domestic  which = centralization value = 1 }
            	command = { type = cash value = 100 }
	}
}