# Spain

#########################################################################
#  The Carlist War
#########################################################################
event = {
	id = 7700
	random = no
	country = SPA

	name = "EVT_7700_NAME"
	desc = "EVT_7700_DESC"
	style = 0

	picture = carlist

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

	action_a = {
		name = "ACTIONNAME7700A" # Support Isabella II
		command = { type = constitution which = constitutional_monarchy }
		command = { type = executive_designation which = hms_government }
		command = { type = party_system which = multi_party }
		command = { type = national_value which = liberty }
		command = { type = set_ruling_party which = 7701 }
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = pop_consciousness which = aristocrats value = 2  }
		command = { type = pop_consciousness which = officers value = 2 }
		command = { type = pop_consciousness which = clergymen value = 2  }
		command = { type = pop_consciousness which = capitalists value = 0  }
		command = { type = pop_consciousness which = clerks value = 0 }
		command = { type = pop_consciousness which = craftsmen value = 0  }
		command = { type = pop_consciousness which = soldiers value = 5  }
		command = { type = pop_consciousness which = farmers value = 5 }
		command = { type = pop_consciousness which = labourers value = 5  }
		command = { type = pop_militancy which = aristocrats value = 5  }
		command = { type = pop_militancy which = officers value = 5  }
		command = { type = pop_militancy which = clergymen value = 5  }
		command = { type = pop_militancy which = capitalists value = 0  }
		command = { type = pop_militancy which = clerks value = 0  }
		command = { type = pop_militancy which = craftsmen value = 0  }
		command = { type = pop_militancy which = soldiers value = 2  }
		command = { type = pop_militancy which = farmers value = 2  }
		command = { type = pop_militancy which = labourers value = 2  }
		command = { type = sleepevent which = 7701 }
		command = { type = sleepevent which = 7702 }
	}
	action_b = {
		name = "ACTIONNAME7700B" # Support Carlos V
		command = { type = constitution which = monarchy }
		command = { type = executive_designation which = laws_by_decree }
		command = { type = party_system which = one_party }
		command = { type = national_value which = order }
		command = { type = set_ruling_party which = 7703 }
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = pop_consciousness which = aristocrats value = 0  }
		command = { type = pop_consciousness which = officers value = 0 }
		command = { type = pop_consciousness which = clergymen value = 0  }
		command = { type = pop_consciousness which = capitalists value = 2  }
		command = { type = pop_consciousness which = clerks value = 2 }
		command = { type = pop_consciousness which = craftsmen value = 2  }
		command = { type = pop_consciousness which = soldiers value = 5  }
		command = { type = pop_consciousness which = farmers value = 5 }
		command = { type = pop_consciousness which = labourers value = 5  }
		command = { type = pop_militancy which = aristocrats value = 0  }
		command = { type = pop_militancy which = officers value = 0  }
		command = { type = pop_militancy which = clergymen value = 0  }
		command = { type = pop_militancy which = capitalists value = 5  }
		command = { type = pop_militancy which = clerks value = 5  }
		command = { type = pop_militancy which = craftsmen value = 5  }
		command = { type = pop_militancy which = soldiers value = 2  }
		command = { type = pop_militancy which = farmers value = 2  }
		command = { type = pop_militancy which = labourers value = 2  }
		command = { type = sleepevent which = 7703 }
		command = { type = sleepevent which = 7704 }
		command = { type = flagname which = "carlist" }
	}
}

#########################################################################
#  The End of the First Carlist War
#########################################################################
event = {
	id = 7701
	random = no
	country = SPA

	picture = carlist

	trigger = {
		constitution = { country = SPA type = monarchy }
		control = { province = 708 data = SPA } # Madrid
		control = { province = 347 data = SPA } # Barcelona
		control = { province = 663 data = SPA } # Valencia
		control = { province = 707 data = SPA } # Toledo
		control = { province = 1281 data = SPA } # Sevilla
	}

	name = "EVT_7701_NAME"
	desc = "EVT_7701_DESC"
	style = 0

	date = { day = 1 month = january year = 1839 }
	offset = 15
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7701A" # Victory for the Carlistas
		command = { type = pop_consciousness which = aristocrats value = -5  }
		command = { type = pop_consciousness which = officers value = -5 }
		command = { type = pop_consciousness which = clergymen value = -5  }
		command = { type = pop_consciousness which = capitalists value = -5  }
		command = { type = pop_consciousness which = clerks value = -5 }
		command = { type = pop_consciousness which = craftsmen value = -5  }
		command = { type = pop_consciousness which = soldiers value = -7  }
		command = { type = pop_consciousness which = farmers value = -7 }
		command = { type = pop_consciousness which = labourers value = -7  }
		command = { type = pop_militancy which = aristocrats value = -1  }
		command = { type = pop_militancy which = officers value = -1  }
		command = { type = pop_militancy which = clergymen value = -1  }
		command = { type = pop_militancy which = capitalists value = -7  }
		command = { type = pop_militancy which = clerks value = -7  }
		command = { type = pop_militancy which = craftsmen value = -7  }
		command = { type = pop_militancy which = soldiers value = -5  }
		command = { type = pop_militancy which = farmers value = -5  }
		command = { type = pop_militancy which = labourers value = -5  }
		command = { type = sleepevent which = 7702  }
	}
}

#########################################################################
#  The End of the First Carlist War
#########################################################################
event = {
	id = 7702
	random = no
	country = SPA

	picture = carlist

	trigger = {
#		constitution = { country = SPA type = constitutional_monarchy }
		NOT = {
			OR = {
				control = { province = 708 data = SPA } # Madrid
				control = { province = 347 data = SPA } # Barcelona
				control = { province = 663 data = SPA } # Valencia
				control = { province = 707 data = SPA } # Toledo
				control = { province = 1281 data = SPA } # Sevilla
			}
		}
	}

	name = "EVT_7701_NAME"
	desc = "EVT_7702_DESC"
	style = 0

	date = { day = 1 month = january year = 1839 }
	offset = 15
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7702A" # Victory for the Cristinos
		command = { type = constitution which = constitutional_monarchy }
		command = { type = executive_designation which = hms_government }
		command = { type = party_system which = multi_party }
		command = { type = national_value which = liberty }
		command = { type = set_ruling_party which = 7701 }
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = pop_consciousness which = aristocrats value = -5  }
		command = { type = pop_consciousness which = officers value = -5 }
		command = { type = pop_consciousness which = clergymen value = -5  }
		command = { type = pop_consciousness which = capitalists value = -5  }
		command = { type = pop_consciousness which = clerks value = -5 }
		command = { type = pop_consciousness which = craftsmen value = -5  }
		command = { type = pop_consciousness which = soldiers value = -7  }
		command = { type = pop_consciousness which = farmers value = -7 }
		command = { type = pop_consciousness which = labourers value = -7  }
		command = { type = pop_militancy which = aristocrats value = -7  }
		command = { type = pop_militancy which = officers value = -7  }
		command = { type = pop_militancy which = clergymen value = -7  }
		command = { type = pop_militancy which = capitalists value = -1  }
		command = { type = pop_militancy which = clerks value = -1  }
		command = { type = pop_militancy which = craftsmen value = -1  }
		command = { type = pop_militancy which = soldiers value = -5  }
		command = { type = pop_militancy which = farmers value = -5  }
		command = { type = pop_militancy which = labourers value = -5  }
		command = { type = sleepevent which = 7701  }
		command = { type = flagname which = "" }
	}
}

#########################################################################
#  The End of the First Carlist War
#########################################################################
event = {
	id = 7703
	random = no
	country = SPA

	picture = carlist

	trigger= {
		constitution = { country = SPA type = constitutional_monarchy }
		control = { province = 708 data = SPA } # Madrid
		control = { province = 347 data = SPA } # Barcelona
		control = { province = 663 data = SPA } # Valencia
		control = { province = 707 data = SPA } # Toledo
		control = { province = 1281 data = SPA } # Sevilla
	}

	name = "EVT_7701_NAME"
	desc = "EVT_7702_DESC"
	style = 0

	date = { day = 1 month = january year = 1839 }
	offset = 15
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7701A" # Victory for the Cristinos
		command = { type = pop_consciousness which = aristocrats value = 5  }
		command = { type = pop_consciousness which = officers value = 5 }
		command = { type = pop_consciousness which = clergymen value = 5  }
		command = { type = pop_consciousness which = capitalists value = 5  }
		command = { type = pop_consciousness which = clerks value = 5 }
		command = { type = pop_consciousness which = craftsmen value = 5  }
		command = { type = pop_consciousness which = soldiers value = 7  }
		command = { type = pop_consciousness which = farmers value = 7 }
		command = { type = pop_consciousness which = labourers value = 7  }
		command = { type = pop_militancy which = aristocrats value = -7  }
		command = { type = pop_militancy which = officers value = -7  }
		command = { type = pop_militancy which = clergymen value = -7  }
		command = { type = pop_militancy which = capitalists value = -1  }
		command = { type = pop_militancy which = clerks value = -1  }
		command = { type = pop_militancy which = craftsmen value = -1  }
		command = { type = pop_militancy which = soldiers value = -5  }
		command = { type = pop_militancy which = farmers value = -5  }
		command = { type = pop_militancy which = labourers value = -5  }
		command = { type = sleepevent which = 7704  }
	}
}

#########################################################################
#  The End of the First Carlist War
#########################################################################
event = {
	id = 7704
	random = no
	country = SPA

	picture = carlist

	trigger = {
		NOT = {
			OR = {
				control = { province = 708 data = SPA } # Madrid
				control = { province = 347 data = SPA } # Barcelona
				control = { province = 663 data = SPA } # Valencia
				control = { province = 707 data = SPA } # Toledo
				control = { province = 1281 data = SPA } # Sevilla
			}
		}
	}

	name = "EVT_7701_NAME"
	desc = "EVT_7701_DESC"
	style = 0

	date = { day = 1 month = january year = 1839 }
	offset = 15
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7702A" # Victory for the Carlistas
		command = { type = constitution which = monarchy }
		command = { type = executive_designation which = laws_by_decree }
		command = { type = party_system which = one_party }
		command = { type = national_value which = order }
		command = { type = set_ruling_party which = 7703 }
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = add_division which = infantry when = 708 } # Madrid
		command = { type = pop_consciousness which = aristocrats value = 5  }
		command = { type = pop_consciousness which = officers value = 5 }
		command = { type = pop_consciousness which = clergymen value = 5  }
		command = { type = pop_consciousness which = capitalists value = 5  }
		command = { type = pop_consciousness which = clerks value = 5 }
		command = { type = pop_consciousness which = craftsmen value = 5  }
		command = { type = pop_consciousness which = soldiers value = 7  }
		command = { type = pop_consciousness which = farmers value = 7 }
		command = { type = pop_consciousness which = labourers value = 7  }
		command = { type = pop_militancy which = aristocrats value = -7  }
		command = { type = pop_militancy which = officers value = -7 }
		command = { type = pop_militancy which = clergymen value = -7  }
		command = { type = pop_militancy which = capitalists value = -1  }
		command = { type = pop_militancy which = clerks value = -1  }
		command = { type = pop_militancy which = craftsmen value = -1  }
		command = { type = pop_militancy which = soldiers value = -5  }
		command = { type = pop_militancy which = farmers value = -5  }
		command = { type = pop_militancy which = labourers value = -5  }
		command = { type = sleepevent which = 7703  }
		command = { type = flagname which = "carlist" }
	}
}

#########################################################################
#  The Spanish Succession Crisis
#########################################################################
event = {
	id = 7705
	random = no
	country = SPA

	picture = 7705

	trigger = {
		exists = PRU
		NOT = {
			atwar = PRU
		}
	}

	name = "EVT_4631_NAME"
	desc = "EVT_4631_DESC"
	style = 0

	date = { day = 1 month = june year = 1870 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7705A" # Offer the throne to a Hohenzollern
		ai_chance = 99
		command = { type = prestige value = 50 }
		command = { type = trigger which = 4631 }
	}
	action_b = {
		name = "ACTIONNAME7705B" # Offer the throne to an Italian
		ai_chance = 1
		command = { type = prestige value = -50 }
	}
}
#########################################################################
#  European Intervention in Mexico
#########################################################################
event = {
	id = 7708
	random = no
	country = SPA

	trigger = {
		event = 14810 # MEX
		event = 7200 #France intervenes in MEX (France spearheaded the idea)
		atwar = no
		war = { country = FRA country = MEX }
		NOT = {
			relation = { country = MEX data = 0 }
		}
		NOT = {
			peace_treaty = { country = SPA country = MEX }
		}
	}

	name = "EVT_1500_NAME"
	desc = "EVT_7708_DESC"#Spain was also one of the countries that found its debts unpayed by Mexico, and searching for an adventure and recovering the money they prepared their intervention in Mexico#
	style = 0

	date = { day = 5 month = january year = 1861 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME1500B" # Intervene
		command = { type = war which = MEX }
	}
	action_b = {
		name = "IGNORE" # Ignore
		command = { type = relation which = MEX value = 100 }
	}
}
#########################################################################
#  Nationalism in the Philippines
#########################################################################
event = {
 id = 7706
 random = no
 country = SPA

 trigger = {
  			OR = {
  			owned = { province = 2040  }
  			owned = { province = 2039  }
  			owned = { province = 2038  }
  			owned = { province = 2340  }
  			owned = { province = 2341  }
  			owned = { province = 2342  }
  			}
 }

 name = "EVT_7706_NAME"
 desc = "EVT_7706_DESC"
 style = 0

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

 action_a = {
  name = "ACTIONNAME7706A" # Appease
  command = { type = treasury value = -50000 }
  command = { type = prestige value = -50 }
  command = { type = pop_militancy which = cultural_minority value = -1 where = 2040 }
 }
 action_b = {
  name = "ACTIONNAME7706B" # Put down rebellion
  command = { type = pop_militancy which = cultural_minority value = 3 where = 2040 }
  command = { type = revolt which = -2 value = infantry where = 2040 }
  command = { type = revolt which = -2 value = infantry where = 2039 }
  command = { type = revolt which = -2 value = infantry where = 2340 }
 }
}
#########################################################################
#  Yellow Press and the sinking of BB Maine
#########################################################################
event = {
	id = 7707
	random = no
	country = SPA

	trigger = {
		OR = {
			# Cuban provinces
			owned = { province = 1728 data = SPA }
			owned = { province = 1729 data = SPA }
			owned = { province = 1730 data = SPA }
		}
	}

	name = "EVT_7706_NAME"
	desc = "EVT_7706_DESC"
	style = 0

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

	action_a = {
		name = "ACTIONNAME7707A" # But we did not do anything!
		command = { type = relation which = USA value = -150 }
		command = { type = relation which = CSA value = -150 }
	}
} 