#Ask peacefully if they want to secede our reclamations
country_event = {
	id = 112890
	title = "EVTNAME112890" 
	desc = "EVTDESC112890"

	fire_only_once = yes

	trigger = {
		tag = CHL
		year = 1879
		BOL = {
			exists = yes
		}
		CHL = { NOT = { owns = 2305 } }
		NOT = { has_country_flag = yes_claim }
	}

	mean_time_to_happen = { months = 1 }

	option = {
		name = "EVT112890OPTA"
		set_country_flag = yes_claim
			2305 = { add_core = CHL }
			2309 = { add_core = CHL }
			2307 = { add_core = CHL }
			2308 = { add_core = CHL }
			2578 = { add_core = CHL }
		BOL = { country_event = 112891 }
		PEU = { country_event = 112894 }
		ai_chance = {
			factor = 100
		}
	}
}
country_event = {
	id = 112891
	title = "EVTNAME112891"
	desc = "EVTDESC112891"
	picture = "expansion"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTB112891"
		CHL = { country_event = 112892 }		
		ai_chance = {
			factor = 0.1
            modifier = {
                factor = 100000
                2305 = { owned_by = THIS }
            }
		}
	}
	option = {
		2305 = { secede_province = CHL }
		2309 = { secede_province = CHL }
		2505 = { remove_core = BOL }
		2509 = { remove_core = BOL }
		name = "EVTOPTA112891"
		ai_chance = {
			factor = 0.1
            modifier = {
                factor = 100000
                THIS = { NOT = { owns = 2305 } }
            }
		}
	}
}
country_event = {
	id = 112894
	title = "EVTNAME112891"
	desc = "EVTDESC112891"
	picture = "expansion"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTB112891"
		CHL = { country_event = 112895 }		
		ai_chance = {
			factor = 0.1
            modifier = {
                factor = 100000
                2308 = { owned_by = THIS }
            }
		}
	}
	option = {
		2307 = { secede_province = CHL }
		2308 = { secede_province = CHL }
		2578 = { remove_core = CHL }
		2507 = { remove_core = PEU }
		2508 = { remove_core = PEU }
		name = "EVTOPTA112891"
		ai_chance = {
			factor = 0.1
            modifier = {
                factor = 100000
                THIS = { NOT = { owns = 2308 } }
            }
		}
	}
}
country_event = {
	id = 112892
	title = "EVTNAME112892"
	desc = "EVTDESC112892"
	picture = "expansion"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTB112892"
		USA = {
		diplomatic_influence = {
			who = BOL
			value = -400
		}
		relation = {
			who = BOL
			value = -200
		}
		diplomatic_influence = {
			who = PEU
			value = -400
		}
		relation = {
			who = PEU
			value = -200
		} }

		SPA = {
		diplomatic_influence = {
			who = BOL
			value = -400
		}
		relation = {
			who = BOL
			value = -200
		}
		diplomatic_influence = {
			who = PEU
			value = -400
		}
		relation = {
			who = PEU
			value = -200
		} }

		FRA = {
		diplomatic_influence = {
			who = BOL
			value = -400
		}
		relation = {
			who = BOL
			value = -200
		}
		diplomatic_influence = {
			who = PEU
			value = -400
		}
		relation = {
			who = PEU
			value = -200
		} }
		war = {
			target = BOL
			attacker_goal = {
					casus_belli = acquire_core_state
					state_province_id = 2305
			}
			
			defender_goal = {
				casus_belli = demand_reperations
			}
		}
	}
}
country_event = {
	id = 112895
	title = "EVTNAME112892"
	desc = "EVTDESC112892"
	picture = "expansion"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTB112892"
		war = {
			target = PEU
			attacker_goal = {
					casus_belli = acquire_core_state
					state_province_id = 2307 }
			attacker_goal = {
					casus_belli = acquire_core_state
					state_province_id = 2578 
			}
			
			defender_goal = {
				casus_belli = demand_reperations
			}
		}
	}
}
country_event = {
	id = 112896
	title = "EVTNAME112896"
	desc = "EVTDESC112896"
	picture = "expansion"
	
	trigger = {
	tag = CHL
			CHL = { owns = 2304 }
			NOT = { owns = 2302 }
			}
	
	option = {
		name = "EVTOPTB112896"
		2304 = { secede_province = PEU }
		2303 = { secede_province = PEU }
	}
}
country_event = {
	id = 112897
	title = "EVTNAME112897"
	desc = "EVTDESC112897"
	picture = "expansion"
	
	trigger = {
	tag = CHL
			CHL = { owns = 2578 }
			year = 1908 }
	
	option = {
		name = "EVTOPTB112897"
		2578 = { secede_province = PEU }
		2578 = { remove_core = CHL }
		2308 = { remove_core = PEU }
		2307 = { remove_core = PEU }
	}
	option = {
		name = "No deal can be reached."
	}
}
#Triple Alianza War Declaration
country_event = {
	id = 2
	title = "EVTNAME2"
	desc = "EVTDESC2"
	major = yes

	trigger = {
		tag = PRG
		has_country_flag = triple_war_corrientes
		NOT = { has_global_flag = triple_war_starts }
		AND = {
			exists = URU
			exists = BRZ
			exists = ARG
		}
	}

	immediate = {
		any_country = {
			limit = {
				alliance_with = URU
			}
			leave_alliance = URU
		}
	}
	immediate = {
		any_country = {
			limit = {
				alliance_with = BRZ
			}
			leave_alliance = BRZ
		}
	}
	immediate = {
		any_country = {
			limit = {
				alliance_with = ARG
			}
			leave_alliance = ARG
		}
	}
	immediate = {
		any_country = {
			limit = {
				alliance_with = PRG
			}
			leave_alliance = PRG
		}
	}
	immediate = { URU = { create_alliance = BRZ } }
	immediate = { URU = { create_alliance = ARG } }

	mean_time_to_happen = {
		months = 1
	}

	option = {
		name = "EVTOPTA2"
		set_global_flag = triple_war_starts
		badboy = -10
		any_country = {
			limit = {
				OR = {
					TAG = URU
					TAG = BRZ
				}
			}
			casus_belli = {
				target = PRG
				type = liberate_country
				months = 48
			}
		}
		any_country = {
			limit = {
				tag = PRG
			}
			casus_belli = {
				target = BRZ
				type = humiliate	
				months = 48
			}
		}
		ARG = {
			relation = {
				who = URU
				value = 250
			}
		}
		BRZ = {
			relation = {
				who = URU
				value = 250
			}
		}
		war = {
			target = URU
			attacker_goal = { casus_belli = paraguayan_war_PRG }
			defender_goal = { casus_belli = paraguayan_war_ARG }
			call_ally = yes
		}
            add_country_modifier = {
                name = small_country_draft
                duration = 30
            }
		PRG_2343 = { fort = 1 }
		2462 = { add_core = ARG }
		2365 = { add_core = ARG }
		2366 = { add_core = ARG }
		2367 = { add_core = ARG }
		2554 = { add_core = ARG }
		2462 = { add_core = BRZ }
		2420 = { add_core = BRZ }
		any_pop = {
			dominant_issue = {
				factor = 0.4
				value = jingoism
			}
		}
		PRG = {
			any_pop = {
				dominant_issue = {
					factor = 0.4
					value = jingoism
				}
			}
		}
		URU = {
			any_pop = {
				dominant_issue = {
					factor = 0.4
					value = jingoism
				}
			}
		}
	}
}

#triple alianza first
country_event = {
	id = 3
	title = "EVTNAME3"
	desc = "EVTDESC3"
	picture = "meeting3"

	trigger = {
		tag = PRG
		NOT = { has_global_flag = triple_war_starts }
		AND = {
			exists = URU
			exists = BRZ
			exists = ARG
		}
		NOT = { has_country_flag = triple_first }
		URU = {
			NOT = { has_country_flag = triple_war_has_happened }
		}
		OR = {
			NOT = { has_country_flag = triple_first }
			NOT = { has_country_flag = triple_step_aside }
		}
		URU = { NOT = { government = absolute_monarchy } }
	}

	mean_time_to_happen = {
		months = 1
	}
	
	fire_only_once = yes

	option = {
		name = "EVTOPTA3"
		set_country_flag = triple_first
		prestige = 10
		money = 20000
		government = presidential_dictatorship
		political_reform = yes_slavery
		political_reform = party_appointed
		political_reform = none_voting
		political_reform = yes_meeting
		political_reform = state_press
		political_reform = no_trade_unions
		political_reform = first_past_the_post
		political_reform = underground_parties
		2420 = {
			remove_core = BRZ
			secede_province = PRG
		}
		BRZ = {
			money = -20000
			relation = {
				who = ARG
				value = 200
			}
			relation = {
				who = URU
				value = 200
			}
		}
		ai_chance = {
			factor = 95
		}
	}

	option = {
		name = "EVTOPTB3"
		set_country_flag = triple_step_aside
		prestige = -20
		badboy = 5
		2420 = {
			add_core = BRZ
		relation = {
			who = URU
			value = -200
		}
		any_pop = {
			ideology = {
				factor = 0.35
				value = liberal }
		}
		any_pop = {
			scaled_militancy = {
				ideology = liberal
				factor = 3 }
		}
		URU = {
			any_pop = {
				ideology = {
					factor = 0.35
					value = liberal }
			}
		}
		ai_chance = {
			factor = 5
		}
		}
	}
}

#triple war second part
country_event = {
	id = 4
	title = "EVTNAME4"
	desc = "EVTDESC4"
	picture = "BurkeandWills"

	trigger = {
		tag = PRG
		NOT = { has_global_flag = triple_war_starts }
		NOT = { has_country_flag = triple_second }
		has_country_flag = triple_first
		AND = {
			exists = URU
			exists = BRZ
			exists = ARG
		}
		URU = { NOT = { government = absolute_monarchy } }
	}
	fire_only_once = yes

	mean_time_to_happen = {
		months = 2
	}

	option = {
		name = "EVTOPTA4"
		set_country_flag = triple_second
		prestige = 10
		money = 20000
		2365 = { remove_core = ARG }
		2365 = { secede_province = PRG }
		ARG = { money = -10000 }
		BOL = { money = -10000 }
	}
}

#triple war fourth part
country_event = {
	id = 5
	title = "EVTNAME5"
	desc = "EVTDESC5"
	picture = "colonial_uprising"

	trigger = {
		tag = BRZ
		NOT = { has_global_flag = triple_war_starts }
		PRG = { has_country_flag = triple_second }
		PRG = { NOT = { has_country_flag = triple_four } }
		AND = {
			exists = URU
			exists = ARG
			exists = PRG
		}
	}
	fire_only_once = yes

	mean_time_to_happen = {
		months = 2
	}

	option = {
		name = "EVTOPTA5"
		PRG = { set_country_flag = triple_four }
		prestige = 5
		money = -15000
		PRG = { prestige = 10 }
		any_country = {
			limit = {
				continent = south_america
				NOT = { tag = BRZ }
				NOT = { tag = ARG }
			}
			relation = {
				who = URU
				value = -100
			}
		}
		any_country = {
			limit = {
				continent = south_america
			}
			relation = {
				who = PRG
				value = -180
			}
		}
		PRG = {
			any_pop = {
			scaled_militancy = {
				ideology = liberal
				factor = 4 }
			}
		}
		BRZ = {
			small_arms = 20
			canned_food = 30
			artillery = 10
			luxury_clothes = 10
			wine = 10
			liquor = 10
			ammunition = 20
		}
		URU = {
			small_arms = 10
			canned_food = 30
			artillery = 5
			luxury_clothes = 5
			wine = 5
			liquor = 5
			ammunition = 10
		}
		ARG = {
			small_arms = 20
			canned_food = 30
			artillery = 10
			luxury_clothes = 10
			wine = 10
			liquor = 10
			ammunition = 20
		}
	}
}
#triple war invasion
country_event = {
	id = 6
	title = "EVTNAME6"
	desc = "EVTDESC6"
	picture = "ship_attacked"

	trigger = {
		tag = PRG
		NOT = { has_global_flag = triple_war_starts }
		has_country_flag = triple_four
		NOT = { has_country_flag = triple_war_corrientes }
		AND = {
			exists = URU
			exists = BRZ
			exists = ARG
		}
	}
	fire_only_once = yes

	mean_time_to_happen = {
		months = 2
	}

	option = {
		name = "EVTOPTA6"
		set_country_flag = triple_war_corrientes
		URU = { prestige = 10 }
		small_arms = 50
		canned_food = 100
		artillery = 25
		luxury_clothes = 25
		wine = 25
		liquor = 25
		ammunition = 50
	}
}

#by rejecting the alliance in Triple Alianza War
country_event = {
	id = 7
	title = "EVTNAME7"
	desc = "EVTDESC7"
	
	major = yes

	trigger = {
		OR = { tag = ARG
			tag = BRZ }
		URU = { war_with = PRG }
		PRG = { has_country_flag = triple_war_starts }
		URU = {
			NOT = { has_country_flag = triple_war_has_happened }
		}
		war = no
		BOL = {
			
			NOT = { has_country_flag = triple_war_bol }
		}
		NOT = { truce_with = PRG }
		NOT = { tag = URU }
		NOT = { has_country_flag = triple_war_coward }
	}
	fire_only_once = yes

	mean_time_to_happen = {
		months = 2
		modifier = {
			factor = 0.1
			NOT = { alliance_with = URU }
		}
	}

	option = {
		name = "EVTOPTA7"
		set_country_flag = triple_war_coward
		badboy = 45
		prestige = -175
		any_country = {
			limit = {
				alliance_with = THIS
			}
			leave_alliance = THIS
		}
		any_greater_power = {
			diplomatic_influence = {
				who = THIS
				value = -400
			}
		}
	}
}

#Paraguay wins
country_event = {
	id = 1502000
	title = "We lost"
	desc = "With the surprising and decisive vitory of Paraguay over the coalition, we have no other choice but to obey her demands"
	
	major = yes

	is_triggered_only = yes

	option = {
		ARG = { country_event = 150201 }
		BRZ = { country_event = 150202 }
		PRG = { create_vassal = URU }
	}
}

country_event = {
	id = 150201
	title = "We lost"
	desc = "EVTDESC7"
	

	is_triggered_only = yes

	option = {
		2554 = { secede_province = PRG remove_core = THIS }
		2356 = { secede_province = PRG }
		2357 = { secede_province = PRG }
		2358 = { secede_province = PRG }
		2359 = { secede_province = PRG }
		2360 = { secede_province = PRG }
		2365 = { remove_core = THIS }
		2366 = { remove_core = THIS }
		2367 = { remove_core = THIS }
		2462 = { remove_core = THIS }
	}
}

country_event = {
	id = 150202
	title = "EVTNAME7"
	desc = "EVTDESC7"
	

	is_triggered_only = yes

	option = {
		2416 = { secede_province = PRG remove_core = THIS add_core = PRG }
		2465 = { secede_province = PRG remove_core = THIS }
		2466 = { secede_province = PRG }
		2467 = { secede_province = PRG }
		2464 = { secede_province = PRG }
		2463 = { secede_province = PRG }
		2462 = { secede_province = PRG remove_core = THIS }
		2420 = { secede_province = PRG remove_core = THIS }
	}
}

#Triple alliance wins
country_event = {
	id = 1503000
	title = "we won"
	desc = "Paraguay will no more be a threat to the stabiliy of the region."
	

	is_triggered_only = yes

	option = {
		name = "EVTOPTA7"
		prestige = -20
		2420 = { secede_province = BRZ remove_core = THIS }
		2554 = { secede_province = ARG remove_core = THIS}
		2462 = { secede_province = ARG remove_core = THIS}
		2366 = { secede_province = ARG remove_core = THIS}
		2367 = { secede_province = ARG remove_core = THIS}
		2365 = { secede_province = ARG remove_core = THIS}
		2364 = { secede_province = ARG remove_core = THIS}
	}
}