###########################
# News Events
###########################

add_namespace = south_american_news
add_namespace = south_american_events
add_namespace = TOA_ven_blockade

# War Between Ecuador and Peru
news_event = {
	id = south_american_news.1
	title = south_american_news.1.t
	desc = south_american_news.1.d
	picture = GFX_news_event_034
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.1.a
		trigger = {
			NOT = {
				OR = {
					TAG = PRU
					TAG = ECU
				}
			}
		}
	}
	option = {
		name = south_american_news.1.b
		trigger = { TAG = PRU }
	}
	option = {
		name = south_american_news.1.c
		trigger = { TAG = ECU }
	}
} 

# Terra Steps Down
country_event = {
	id = south_american_events.1
	title = south_american_events.1.t
	desc = south_american_events.1.desc
	picture = GFX_report_event_election_vote

	trigger = {
		tag = URG
		tag = CHI
		date > 1938.6.16
		is_subject = no

		has_dlc = "Trial of Allegiance"
		NOT = { has_completed_focus = URG_establish_the_german_uruguayan_cultural_center }
	}

	mean_time_to_happen = { days = 3 }

	hidden = no

	fire_only_once = yes

	option = {
		name = south_american_events.1.a
		ai_chance = {
			base = 100

			modifier = {
				OR = {
					has_country_flag = URG_AI_RANDOM_DEMOCRATIC_ALT
					
					has_game_rule = {
						rule = URG_AI_BEHAVIOR
						option = DEMOCRATIC_ALT
					}

					has_country_flag = URG_AI_RANDOM_FASCIST
					
					has_game_rule = {
						rule = URG_AI_BEHAVIOR
						option = FASCIST
					}		
				}
				factor = 0
			}
		}
		if = {
			limit = {
				has_country_leader = {
					ruling_only = yes# default = yes
					character = URG_gabriel_terra # recommended<bool>
				}
			}
			retire_character = URG_gabriel_terra
			remove_ideas = {	
				URG_terra_dictatorship
			}
		}


		drop_cosmetic_tag = yes
		complete_national_focus = URG_colorado_victory
		news_event = { 
			id = south_american_news.2 
			days = 2
			random_days = 5
		}
		set_politics = {
			ruling_party = democratic
		    elections_allowed = yes
		    last_election = "1938.6.15"
		    election_frequency = 48
		}
	}

	option = {
		name = south_american_events.1.b
		ai_chance = {
			base = 0
			
			modifier = {
				add = 100
				OR = {
					has_country_flag = URG_AI_RANDOM_DEMOCRATIC_ALT
					
					has_game_rule = {
						rule = URG_AI_BEHAVIOR
						option = DEMOCRATIC_ALT
					}	
				}	
			}
			
		}
		complete_national_focus = URG_blanco_victory
		if = {
			limit = {
				has_country_leader = {
					ruling_only = yes# default = yes
					character = URG_gabriel_terra # recommended<bool>
				}
			}
			retire_character = URG_gabriel_terra
			remove_ideas = {	
				URG_terra_dictatorship
			}
		}
		drop_cosmetic_tag = yes

		set_politics = {
			ruling_party = neutrality
		    elections_allowed = yes
		    last_election = "1938.6.15"
		    election_frequency = 48
		}

		add_popularity = {
			ideology = neutrality
			popularity = 0.1
		}

		news_event = { 
			id = south_american_news.3 
			days = 2
			random_days = 5
		}

	}

	#option = {
	#	name = south_american_events.1.c
	#	ai_chance = {
	#		base = 0
	#		
	#		modifier = {
	#			add = 30
	#			is_historical_focus_on = no
	#		}
	#		
	#	}
#
	#	retire_character = URG_gabriel_terra
	#	remove_ideas = {	
	#		URG_terra_dictatorship
	#	}
	#	complete_national_focus = URG_
	#	drop_cosmetic_tag = yes
#
	#	set_politics = {
	#		ruling_party = communism
	#	    elections_allowed = no
	#	    last_election = "1938.6.15"
	#	    election_frequency = 48
	#	}
#
	#	add_popularity = {
	#		ideology = communism
	#		popularity = 0.4
	#	}
#
	#	add_stability = -0.3
#
	#	news_event = { 
	#		id = south_american_news.4 
	#		days = 2
	#		random_days = 5
	#	}
	#}

	option = {
		name = south_american_events.1.d
		ai_chance = {
			base = 0
			
			modifier = {
				OR = {

					has_country_flag = URG_AI_RANDOM_FASCIST
					
					has_game_rule = {
						rule = URG_AI_BEHAVIOR
						option = FASCIST
					}		
				}
				add = 100
			}
			
		}

		if = {
			limit = {
				has_country_leader = {
					ruling_only = yes# default = yes
					character = URG_gabriel_terra # recommended<bool>
				}
			}
			retire_character = URG_gabriel_terra
			remove_ideas = {	
				URG_terra_dictatorship
			}
		}
		#complete_national_focus = URG_establish_the_german_uruguayan_cultural_center
		drop_cosmetic_tag = yes

		add_popularity = {
			ideology = fascism
			popularity = 0.08
		}

		#add_stability = -0.3

		#news_event = { 
		#	id = south_american_news.4 
		#	days = 2
		#	random_days = 5
		#}
	}

}

# Terra steps down in favor of mister ferrari
news_event = {
	id = south_american_news.2
	title = south_american_news.2.t
	desc = south_american_news.2.d
	picture = GFX_news_event_generic_read_write
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.2.a
		trigger = {
			NOT = {
				TAG = URG
			}
		}
	}
	option = {
		name = south_american_news.2.b
		trigger = { TAG = URG }
	}
}

# Terra steps down in favor of Luis Alberto de Herrera
news_event = {
	id = south_american_news.3
	title = south_american_news.3.t
	desc = south_american_news.3.d
	picture = GFX_news_event_generic_read_write
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.3.a
		trigger = {
			NOT = {
				TAG = URG
			}
		}
	}
	option = {
		name = south_american_news.3.b
		trigger = { TAG = URG }
	}
}

# Terra steps down and communists take over
news_event = {
	id = south_american_news.4
	title = south_american_news.4.t
	desc = south_american_news.4.d
	picture = GFX_news_event_generic_read_write
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.4.a
		trigger = {
			NOT = {
				TAG = URG
			}
		}
	}
	option = {
		name = south_american_news.4.b
		trigger = { TAG = URG }
	}
}

# The Peru-Bolivian Confederation reuinified
news_event = {
	id = south_american_news.5
	title = south_american_news.5.t
	desc = south_american_news.5.d
	picture = GFX_news_event_journalists_speech
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.5.a
		trigger = {
			NOT = {
				OR = {
					original_tag = PRU
					original_tag = BOL
				}
			}
		}
	}
	option = {
		name = south_american_news.5.b
		trigger = { 
			OR = {
				original_tag = PRU
				original_tag = BOL
			}
		}
	}
} 

# Hispaniola United
news_event = {
	id = south_american_news.6
	title = south_american_news.6.t
	desc = south_american_news.6.d
	picture = GFX_news_event_journalists_speech
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.6.a
		trigger = {
			NOT = {
				OR = {
					original_tag = HAI
					original_tag = DOM
				}
			}
		}
	}
	option = {
		name = south_american_news.6.b
		trigger = { 
			OR = {
				original_tag = HAI
				original_tag = DOM
			}
		}
	}
} 

# Specializing the National Heavy Guns Department
country_event = {
	id = south_american_events.2
	title = south_american_events.2.t
	desc = south_american_events.2.desc 
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	fire_only_once = no

	# Artillery is the obvious choice
	option = {
		name = south_american_events.2.a 
		ai_chance = {  
			base = 55
		} 
		IF = {
			limit = {
				original_tag = CHL
			}
			custom_effect_tooltip = CHL_modify_chilean_army_ns_intro
			add_to_variable = { JUNO_army_modifier_army_artillery_attack_factor = 0.1 tooltip = artillery_attack_factor_tt }
			add_to_variable = { JUNO_army_modifier_army_artillery_defence_factor = 0.15 tooltip = army_artillery_defence_factor_tt }
		}
		ELSE_IF = {
			limit = {
				original_tag = BRA
			}
			custom_effect_tooltip = BRA_modify_brazilian_army_ns_intro
			add_to_variable = { JUNO_army_modifier_army_artillery_attack_factor = 0.1 tooltip = artillery_attack_factor_tt }
			add_to_variable = { JUNO_army_modifier_army_artillery_defence_factor = 0.15 tooltip = army_artillery_defence_factor_tt }
		}
		ELSE_IF = {
			limit = {
				original_tag = ARG
			}
			custom_effect_tooltip = ARG_modify_argentine_army_ns_intro
			add_to_variable = { JUNO_army_modifier_army_artillery_attack_factor = 0.1 tooltip = artillery_attack_factor_tt }
			add_to_variable = { JUNO_army_modifier_army_artillery_defence_factor = 0.15 tooltip = army_artillery_defence_factor_tt }
		}
		ELSE = {
			custom_effect_tooltip = JUNO_modify_south_american_army_ns_intro
			add_to_variable = { JUNO_army_modifier_army_artillery_attack_factor = 0.1 tooltip = artillery_attack_factor_tt }
			add_to_variable = { JUNO_army_modifier_army_artillery_defence_factor = 0.15 tooltip = army_artillery_defence_factor_tt }
		}
	}  

	# I think the air is scary
	option = {
		name = south_american_events.2.b 
		ai_chance = {  
			base = 30
		} 
		IF = {
			limit = {
				original_tag = CHL
			}
			custom_effect_tooltip = CHL_modify_chilean_army_ns_intro
			add_to_variable = { JUNO_army_modifier_production_speed_anti_air_building_factor = 0.15 tooltip = production_speed_anti_air_building_factor_tt }
		}
		ELSE_IF = {
			limit = {
				original_tag = BRA
			}
			custom_effect_tooltip = BRA_modify_brazilian_army_ns_intro
			add_to_variable = { JUNO_army_modifier_production_speed_anti_air_building_factor = 0.15 tooltip = production_speed_anti_air_building_factor_tt }
		}
		ELSE_IF = {
			limit = {
				original_tag = ARG
			}
			custom_effect_tooltip = ARG_modify_argentine_army_ns_intro
			add_to_variable = { JUNO_army_modifier_production_speed_anti_air_building_factor = 0.15 tooltip = production_speed_anti_air_building_factor_tt }
		}
		ELSE = {
			custom_effect_tooltip = JUNO_modify_south_american_army_ns_intro
			add_to_variable = { JUNO_army_modifier_production_speed_anti_air_building_factor = 0.15 tooltip = production_speed_anti_air_building_factor_tt }
		}

		add_ideas = JUNO_hidden_aa_production_ns
	} 

	# I want to shoot in a straight line
	option = {
		name = south_american_events.2.c 
		ai_chance = {  
			base = 15
		} 
		add_ideas = JUNO_hidden_at_production_ns
	} 
}

# The Guianas United
news_event = {
	id = south_american_news.7
	title = south_american_news.7.t
	desc = south_american_news.7.d
	picture = GFX_news_event_journalists_speech
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.7.a
		trigger = {
			NOT = {
				OR = {
					original_tag = GYA
					original_tag = SUR
					original_tag = CAY
				}
			}
		}
	}
	option = {
		name = south_american_news.7.b
		trigger = { 
			OR = {
				original_tag = GYA
				original_tag = SUR
				original_tag = CAY
			}
		}
	}
} 


# Naval Arms Race in South America
news_event = {
	id = south_american_news.10
	title = south_american_news.10.t
	desc = south_american_news.10.d
	picture = GFX_news_event_generic_south_american_dreadnought_race
	
	major = no
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.10.a
		trigger = {
			has_government = democratic
		}
	}
	option = {
		name = south_american_news.10.b
		trigger = {
			NOT = { has_government = democratic }
		}
	}
} 

# X country restarts the Naval Arms Race in South America
country_event = {
	id = south_american_events.10
	title = south_american_events.10.t
	desc = south_american_events.10.d
	picture = GFX_report_event_ast_navy

	hidden = no
	is_triggered_only = yes
	fire_only_once = no

	# drop idea
	option = {
		name = south_american_events.10.a
		ai_chance = {
			base = 10
		}
		remove_ideas = SMB_MTG_naval_arms_race_legacy
	}
}


# The February Revolution (Paraguay)
country_event = {
	id = south_american_events.11
	title = south_american_events.11.t
	desc = south_american_events.11.d
	picture = GFX_report_event_gre_militaristic_march

	trigger = {
		tag = PAR
		has_government = democratic
		date > 1936.2.16
		is_subject = no
		has_civil_war = no
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 1 }

	hidden = no

	fire_only_once = yes

	option = {
		name = south_american_events.11.a
		ai_chance = {
			base = 100
			modifier = {
				has_game_rule = {
					rule = PAR_AI_BEHAVIOR
					option = DEMOCRATIC
				}
				factor = 0
			}
		}

		#add_war_support = -0.1

		#add_stability = -0.1

		set_politics = {
			ruling_party = communism
			elections_allowed = no
		}

		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}

		add_popularity = {
			ideology = communism
			popularity = 0.07
		}

		#custom_effect_tooltip = higinio_and_estigarrabia_wont_cooperate



		add_manpower = 120000

		PAR_rafael_franco = {
			promote_leader = yes
		}

		news_event = { 
			id = south_american_news.8 
			days = 3
			random_days = 6
		}
	}

	option = {
		name = south_american_events.11.b
			ai_chance = {
				base = 0
				
				modifier = {
					add = 50
					is_historical_focus_on = no
				}

				modifier = {
					has_game_rule = {
						rule = PAR_AI_BEHAVIOR
						option = DEMOCRATIC
					}
					add = 500
				}
				
				modifier = {
					OR = {
						has_game_rule = {
							rule = PAR_AI_BEHAVIOR
							option = DEFAULT
						}

						has_game_rule = {
							rule = PAR_AI_BEHAVIOR
							option = HISTORICAL
						}
					}
					factor = 0	
				}
			}

			add_war_support = -0.25

			add_stability = -0.3

			add_popularity = {
				ideology = communism
				popularity = -0.1
			}

			add_popularity = {
				ideology = fascism
				popularity = 0.1
			}

			division_template = {
				name = "Anti-Socialist Militia"
				is_locked = no
				#division_names_group = NAMELIST_ID # optional
				priority = 2 # optional 
				#template_counter = <INT> # optional
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 0 y = 2 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
					militia = { x = 1 y = 2 }
					
				}
				support = {
					
				}
			}

			start_civil_war = {
				ideology = communism
				ruling_party = democratic
				size = 0.9 # (0-1) Size modifier of the revolt. Affects stockpile, army, air and navy as well
				
				division_template = {
					name = "Peasant Militia"
					is_locked = no
					#division_names_group = NAMELIST_ID # optional
					priority = 2 # optional 
					#template_counter = <INT> # optional
					regiments = {
						militia = { x = 0 y = 0 }
						militia = { x = 0 y = 1 }
						militia = { x = 0 y = 2 }
						
					}
					support = {
						
					}
				}
				random_core_state = {
					limit = {
						is_controlled_by = PREV
					}
					create_unit = {
						division = "name = \"Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.1 start_equipment_factor = 1 start_manpower_factor = 1"
						owner = PREV
						#prioritize_location = province_id # optional 
						allow_spawning_on_enemy_provs = no 
						count = 10
					}
				}
			}

			random_core_state = {
				limit = { is_controlled_by = ROOT }
				create_unit = {
					division = "name = \"Anti-Socialist Militia\" division_template = \"Anti-Socialist Militia\" start_experience_factor = 0.05 start_equipment_factor = 0.2 start_manpower_factor = 0.8"
					owner = PAR
					#prioritize_location = province_id # optional 
					allow_spawning_on_enemy_provs = no 
					count = 4
				}
			}

			random_other_country = {
				limit = {
					original_tag = PAR
					has_government = communism		
				}
				PAR_rafael_franco = { set_nationality = PREV } 
				add_country_leader_role = {		
					character =  PAR_rafael_franco # optional if inside character scope
					promote_leader = yes
			 		country_leader = {
			 			ideology =marxism
			 			expire = 1950.1.1
			 			#traits = {  } 
			 		}
				}
			}

			hidden_effect = {
				PAR_Jose_Felix_Estigarribia = { set_nationality = ROOT } 
				set_country_flag = PAR_is_going_democratic
			}

			swap_ideas = { remove_idea = BOL_toll_of_the_chaco_war add_idea = BOL_toll_of_the_chaco_war_2 }

			#news_event = { 
			#	id = south_american_news.9 
			#	days = 3
			#	random_days = 6
			#}
		}
}

# The February Revolution
news_event = {
	id = south_american_news.8
	title = south_american_news.8.t
	desc = south_american_news.8.d
	picture = GFX_news_event_generic_chaco_war
	
	major = no
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.8.a
		trigger = {
			NOT = {
				TAG = PAR
			}
		}
	}
	option = {
		name = south_american_news.8.b
		trigger = { TAG = PAR }
	}
}

# Paraguayan officer's revolt crushed
news_event = {
	id = south_american_news.9
	title = south_american_news.9.t
	desc = south_american_news.9.d
	picture = GFX_news_event_generic_chaco_war
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.9.a
		trigger = {
			NOT = {
				TAG = PAR
			}
		}
	}
	option = {
		name = south_american_news.9.b
		trigger = { TAG = PAR }
	}
}


# The Socialist Revolution of 1936 (Bolivia)
country_event = {
	id = south_american_events.12
	title = south_american_events.12.t
	desc = south_american_events.12.d
	picture = GFX_report_event_BOL_bolivian_socialist_revolution

	trigger = {
		tag = BOL
		tag = CHI
		has_government = democratic
		date > 1936.5.14
		is_subject = no

		# TODO JA, set to require the correct DLC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 1 }

	hidden = no

	fire_only_once = yes

	option = {
		name = south_american_events.12.a
		ai_chance = {
			base = 100
		}

		add_war_support = -0.15

		add_stability = -0.1

		set_politics = {
			ruling_party = neutrality
			elections_allowed = yes
		}

		add_popularity = {
			ideology = neutrality
			popularity = 0.3
		}

		add_popularity = {
			ideology = communism
			popularity = 0.15
		}

		BOL_german_busch_beccera = {
			promote_leader = yes
		}

		add_manpower = 500

		news_event = { 
			id = south_american_news.11 
			days = 3
			random_days = 6
		}
	}

	option = {
		name = south_american_events.12.b
		ai_chance = {
			base = 0
			
			modifier = {
				add = 50
				is_historical_focus_on = no
			}
			
		}

		add_war_support = -0.2

		add_stability = -0.3

		add_popularity = {
			ideology = neutrality
			popularity = -0.1
		}

		custom_effect_tooltip = german_busch_and_gualberto_imprisoned

		hidden_effect = {
			retire_character = BOL_gualberto_villarroel_lopez
			retire_character = BOL_german_busch_beccera
		}

		add_manpower = -500

		swap_ideas = {
		    remove_idea = BOL_toll_of_the_chaco_war
		    add_idea = BOL_toll_of_the_chaco_war_2
		}

		news_event = { 
			id = south_american_news.12 
			days = 3
			random_days = 6
		}

	}

}

# The 1936 Bolivian coup d'etat
news_event = {
	id = south_american_news.11
	title = south_american_news.11.t
	desc = south_american_news.11.d
	picture = GFX_news_event_BOL_bolivian_socialist_revolution
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.11.a
		trigger = {
			NOT = {
				TAG = BOL
			}
		}
	}
	option = {
		name = south_american_news.11.b
		trigger = { TAG = BOL }
	}
}

# Failed Military Coup Attempt in Bolivia
news_event = {
	id = south_american_news.12
	title = south_american_news.12.t
	desc = south_american_news.12.d
	picture = GFX_news_event_BOL_bolivian_socialist_revolution
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.12.a
		trigger = {
			NOT = {
				TAG = BOL
			}
		}
	}
	option = {
		name = south_american_news.12.b
		trigger = { TAG = BOL }
	}
}


# The 1939 Chillan earthquake (Usually Chile)
country_event = {
	id = south_american_events.13
	title = south_american_events.13.t
	desc = south_american_events.13.d
	picture = GFX_report_event_CHL_chillan_earthquake
	
	trigger = {
		controls_state = 279
		
		date > 1939.1.18
		tag = CHI
		tag = PRC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 2 }

	hidden = no

	fire_only_once = yes 

	option = {
		name = south_american_events.13.a
		ai_chance = {
			base = 100
		}

		add_stability = -0.05

		add_manpower = -4000

		add_timed_idea = {
			idea = CHL_relief_efforts_idea
			days = 360
		}
		custom_effect_tooltip = CHL_relief_efforts_idea_tt
		effect_tooltip = {
			CHL_anarchic_society_level_down = yes
		}

		IF = {
			limit = {
				original_tag = CHL
			}
			CHL_anarchic_society_level_up = yes
		}

		news_event = { 
			id = south_american_news.13 
			days = 3
			random_days = 6
		}
	}

	option = {
		name = south_american_events.13.b
		ai_chance = {
			base = 0
			
			modifier = {
				add = 100
				is_historical_focus_on = no
			}
			
		}

		add_stability = -0.15

		add_manpower = -4000

		add_command_power = 25

		IF = {
			limit = {
				original_tag = CHL
			}
			CHL_anarchic_society_level_up = yes
		}

		news_event = { 
			id = south_american_news.13 
			days = 3
			random_days = 6
		}

	}

}

# Aftermath of the Chillan Earthquake
news_event = {
	id = south_american_news.13
	title = south_american_news.13.t
	desc = south_american_news.13.d
	picture = GFX_news_event_CHL_chillan_earthquake
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.13.a
		
	}
}

# The 1938 Presidential Election
country_event = {
	id = south_american_events.14
	title = south_american_events.14.t
	desc = south_american_events.14.d
	picture = GFX_report_event_election_vote

	trigger = {
		original_tag = CHL
		
		date > 1938.10.20

		has_government = democratic

		NOT = {
			OR = {
				has_completed_focus = CHL_denounce_the_anarchy
				has_completed_focus = CHL_look_to_tradition
				has_country_flag = CHL_1939_flag
			}
		}

		NOT = {
			has_country_flag = CHL_demanded_snap_election_flag
		}

		# TODO JA, set to require the correct DLC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 2 }

	hidden = no

	fire_only_once = yes

	# Pedro Aguirre Cerda (historical)
	option = {
		name = south_american_events.14.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_country_flag = CHL_AI_RANDOM_COMMUNIST
					has_game_rule = {
						rule = CHL_ai_behavior
						option = COMMUNIST
					}
				}
			}
		}

		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		}

		hidden_effect = {
			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_policies_of_arturo_alessandri
					}
				}
				unlock_national_focus = CHL_policies_of_arturo_alessandri
			}

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				unlock_national_focus = CHL_inflation_control_by_the_central_bank
			}
		}
		
		complete_national_focus = CHL_1938_chilean_presidential_election

		custom_effect_tooltip = CHL_skip_one_line_tt
		
		custom_effect_tooltip = left_wing_tt
		# Popular Front
		add_ideas = CHL_popular_front_in_power

		add_country_leader_role  = {
			character = CHL_pedro_aguirre_cerda
		    promote_leader = yes
		    country_leader = {
		        ideology = socialism
		        expire = "1965.1.1.1"
		        traits = { JUNO_gobernar_es_educar }
		    }
		}
		retire_character = CHL_arturo_alessandri

		country_event = {
			id = CHL_political_events.18
			days = 1
			random_days = 3
		}		

		hidden_effect = {
			set_party_name = {
			    ideology = democratic
			    name = CHL_frente_popular_party
			}
		}
		
	}

	# Gustavo Ross
	option = {
		name = south_american_events.14.b
		ai_chance = {
			base = 0
			
			modifier = {
				add = 100
				is_historical_focus_on = no
			}
			
		}

		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		}

		hidden_effect = {
			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_policies_of_arturo_alessandri
					}
				}
				unlock_national_focus = CHL_policies_of_arturo_alessandri
			}

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				unlock_national_focus = CHL_inflation_control_by_the_central_bank
			}
		}
		
		complete_national_focus = CHL_1938_chilean_presidential_election

		custom_effect_tooltip = CHL_skip_one_line_tt
		
		custom_effect_tooltip = right_wing_tt
		# Liberal
		add_ideas = CHL_liberal_party_in_power

		add_country_leader_role  = {
			character = CHL_gustavo_ross_santa_maria
		    promote_leader = yes
		    country_leader = {
		        ideology = liberalism
		        expire = "1965.1.1.1"
		        traits = { JUNO_stock_market_financier }
		    }
		}
		retire_character = CHL_arturo_alessandri

		IF = {
			limit = {
				has_completed_focus = CHL_prop_up_gustavo_ross
			}
			add_stability = 0.05

			add_political_power = 75

			add_trait = {
			    character = CHL_gustavo_ross_santa_maria
			    ideology = liberalism
			    trait = JUNO_popular_among_the_people
			}
		}

		country_event = {
			id = CHL_political_events.18
			days = 1
			random_days = 3
		}

	}

	# Carlos Ibanez del Campo
	option = {
		name = south_american_events.14.c
		ai_chance = {
			base = 0
			
			modifier = {
				add = 100
				is_historical_focus_on = no
			}
			
		}

		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		}

		hidden_effect = {
			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_policies_of_arturo_alessandri
					}
				}
				unlock_national_focus = CHL_policies_of_arturo_alessandri
			}

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				unlock_national_focus = CHL_inflation_control_by_the_central_bank
			}
		}
		
		complete_national_focus = CHL_1938_chilean_presidential_election

		custom_effect_tooltip = CHL_skip_one_line_tt
		
		custom_effect_tooltip = right_wing_tt
		# Popular Freedom Alliance
		add_ideas = CHL_popular_freedom_alliance_in_power

		add_country_leader_role  = {
			character = CHL_carlos_ibanez
		    promote_leader = yes
		    country_leader = {
		        ideology = conservatism
		        expire = "1965.1.1.1"
		        traits = { JUNO_the_general_president }
		    }
		}
		retire_character = CHL_arturo_alessandri

		country_event = {
			id = CHL_political_events.18
			days = 1
			random_days = 3
		}

		hidden_effect = {
			set_party_name = {
			    ideology = democratic
			    name = CHL_popular_freedom_alliance_party
			}
		}

	}

	# Elias Lafertte Gavino
	option = {
		name = south_american_events.14.e
		ai_chance = {
			base = 0
			
			modifier = {
				add = 100
				is_historical_focus_on = no
			}

			modifier = {
				add = 1000
				OR = {
					has_country_flag = CHL_AI_RANDOM_COMMUNIST
					has_game_rule = {
						rule = CHL_ai_behavior
						option = COMMUNIST
					}
				}
			}
			
		}

		IF = {
			limit = {
				NOT = {
					has_completed_focus = CHL_endorse_the_constitution
				}
			}
			complete_national_focus = CHL_endorse_the_constitution
		}

		hidden_effect = {
			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_policies_of_arturo_alessandri
					}
				}
				unlock_national_focus = CHL_policies_of_arturo_alessandri
			}

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				unlock_national_focus = CHL_inflation_control_by_the_central_bank
			}
		}
		
		complete_national_focus = CHL_1938_chilean_presidential_election

		custom_effect_tooltip = CHL_skip_one_line_tt
		
		custom_effect_tooltip = left_wing_tt
		# Communist Party
		add_ideas = CHL_communist_party_in_power

		add_country_leader_role  = {
			character = CHL_elias_lafertte_gavino
		    promote_leader = yes
		    country_leader = {
		        ideology = socialism
		        expire = "1965.1.1.1"
		        traits = { JUNO_the_workers_president }
		    }
		}
		retire_character = CHL_arturo_alessandri

		country_event = {
			id = CHL_political_events.18
			days = 1
			random_days = 3
		}

		hidden_effect = {
			set_party_name = {
			    ideology = democratic
			    name = CHL_communist_but_democratic_party
			}
		}

	}

}

news_event = {
	id = south_american_news.50
	title = south_american_news.50.t
	desc = south_american_news.50.d
	# TODO_JUNO: set correct image
	picture = GFX_news_event_generic_read_write
	
	major = no
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.50.a
		trigger = {
			OR = {
				has_government = fascism
				has_government = neutrality
			}
		}
	}
	option = {
		name = south_american_news.50.b
		trigger = {
			has_government = democratic
		}
		
	}
	option = {
		name = south_american_news.50.c
		trigger = {
			has_government = communism
		}
	}
}

news_event = {
	id = south_american_news.51
	title = south_american_news.51.t
	desc = south_american_news.51.d
	# TODO_JUNO: set correct image
	picture = GFX_news_event_generic_read_write
	
	major = no
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.51.a
		trigger = {
			OR = {
				has_government = fascism
				has_government = neutrality
			}
		}
	}
	option = {
		name = south_american_news.51.b
		trigger = {
			has_government = democratic
		}
		
	}
	option = {
		name = south_american_news.51.c
		trigger = {
			has_government = communism
		}
	}
}


country_event = {
	id = south_american_events.61
	title = south_american_events.61.t
	desc =south_american_events.61.desc
	# TODO_JUNO: set correct image
	picture = GFX_report_event_usa_heavy_cruiser
	
	major = yes
	

	trigger = {
		original_tag = URG
		ENG = {
			has_war_with = GER
			OR = {
				ships_in_area = {
					area = 64
					size > 0
				}

				ships_in_area = {
					area = 63
					size > 0
				}
			}
		}

		GER = {
			has_war_with = ENG
			OR = {
				ships_in_area = {
					area = 64
					size > 0
				}

				ships_in_area = {
					area = 63
					size > 0
				}
			}
		}

		# TODO_JUNO: set to require the correct DLC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 3 }

	fire_only_once = yes
	
	option = {


		name = south_american_events.61.a

		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}

		add_political_power = 45
		ai_chance = {
			base = 1
			modifier = {
				has_government = fascism 
				factor = 0
			}
		}
	}
	option = {
		name = south_american_events.61.b

		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}

		add_war_support = 0.05

		if = {
			limit = { has_dlc = "By Blood Alone" }

			if = {
				limit = {
					USA = { 
						OR = { 
							has_war_with = GER 
							has_government = democratic
						} 
					}
				}
				USA = { send_embargo = ROOT }
			}

			GER = {
				every_enemy_country = { send_embargo = ROOT }
			}

		}
		ai_chance = {
			base = 0
			modifier = {
				has_government = fascism 
				add = 1
			}
		}

	}
}

#BATTLE OF THE RIVER PLATE Will be fixed after file changes
country_event = {
	id = south_american_events.62
	title = south_american_events.62.t
	desc =south_american_events.62.desc
	# TODO_JUNO: set correct image
	picture = GFX_report_event_usa_heavy_cruiser
	
	major = yes

	trigger = {

		ENG = {
			has_war_with = GER
			OR = {
				ships_in_area = {
					area = 64
					size > 0
				}

				ships_in_area = {
					area = 63
					size > 0
				}
			}
		}

		GER = {
			has_war_with = ENG
			OR = {
				ships_in_area = {
					area = 64
					size > 0
				}

				ships_in_area = {
					area = 63
					size > 0
				}
			}
		}

		# TODO_JUNO: set to require the correct DLC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 3 }

	fire_only_once = yes
	
	option = {
		name = south_american_events.62.a
	}
}

# The Army Revolts (Paraguay)
# TODO JA, Should be in 1937 if we want to make this mroe complivated with the 3 years of Liberal rule, but 1940 if we go for the simplified version of going to Marinigo directly
country_event = {
	id = south_american_events.15
	title = south_american_events.15.t
	desc = south_american_events.15.desc
	picture = GFX_report_event_spr_army_of_africa
	is_triggered_only = yes
	#trigger = {
	#	tag = PAR
	#	has_government = communism
	#	date > 1939.8.30
	#	is_subject = no
#
	#	has_dlc = "Trial of Allegiance"
	#	NOT = { 
	#		has_country_leader = {
	#		 	ruling_only = yes # default = yes
	#		 	character = PAR_higinio_morinigo # 
	#		 }
	#	}

	#}

	#mean_time_to_happen = { days = 3 }

	hidden = no

	fire_only_once = yes

	# There is no use trying to stop them
	option = {
		name = south_american_events.15.a
		ai_chance = {
			base = 100
		}

		add_stability = -0.05

		set_politics = {
			ruling_party = neutrality
			elections_allowed = no
		}

		add_popularity = {
			ideology = neutrality
			popularity = 0.2
		}

		add_popularity = {
			ideology = fascism
			popularity = 0.1
		}

		remove_ideas = PAR_febrerista_land_reform

		custom_effect_tooltip = rafael_franco_is_exiled

		hidden_effect = {
			retire_character = PAR_rafael_franco
		}

		news_event = { 
			id = south_american_news.14 
			days = 3
			random_days = 6
		}
	}

	# Crush their revolt! CM: Triggered via focus now
	#option = {
	#	name = south_american_events.15.b
	#	ai_chance = {
	#		base = 0
	#		
	#		modifier = {
	#			add = 50
	#			is_historical_focus_on = no
	#		}
	#		
	#	}
#
	#	add_war_support = -0.15
#
	#	add_stability = -0.15
#
	#	add_popularity = {
	#		ideology = communism
	#		popularity = -0.05
	#	}
#
	#	
	#	add_equipment_to_stockpile = { 
	#		type = infantry_equipment
	#		amount = -400
	#		producer = PAR
	#	}
#
	#	add_manpower = -800
#
	#	add_country_leader_trait = dictator
#
	#}

}

# Higinio Morinigio Takes Power in Paraguay
news_event = {
	id = south_american_news.14
	title = south_american_news.14.t
	desc = south_american_news.14.desc
	picture = GFX_news_event_german_speech
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		trigger = {
			NOT = {
				TAG = PAR
			}
			TAG = PAR
		}
		name = south_american_news.14.a
		
	}
	option = {
		name = south_american_news.14.b
		trigger = { TAG = PAR }
	}
}

# Dia del Mar (Bolivia)
country_event = {
	id = south_american_events.16
	title = south_american_events.16.t
	desc = south_american_events.16.desc
	picture = GFX_report_event_gathering_protest

	trigger = {
		original_tag = BOL
		NOT = {
			OR = {
				owns_state = 951
				owns_state = 506
			}
		}
		date > 1936.3.22
		is_subject = no

		# TODO JA, set to require the correct DLC
		has_dlc = "Trial of Allegiance"
	}

	mean_time_to_happen = { days = 1 }

	hidden = no

	fire_only_once = yes

	# Let the people do what they want
	option = {
		name = south_american_events.16.a
		ai_chance = {
			base = 100
		}

		add_political_power = 25

		add_popularity = {
			ideology = neutrality
			popularity = 0.02
		}	

		add_popularity = {
			ideology = democratic
			popularity = 0.02
		}	
		
	}

	# We must suppress this idiocy
	option = {
		name = south_american_events.16.b
		ai_chance = {
			base = 0
			
			modifier = {
				add = 50
				is_historical_focus_on = no
			}
			
		}

		add_war_support = -0.02

		add_stability = 0.05

		add_political_power = 10

		add_popularity = {
			ideology = ROOT
			popularity = -0.02
		}	

	}

	# They are on to something
	option = {
		name = south_american_events.16.c
		ai_chance = {
			base = 0
			
			modifier = {
				add = 50
				is_historical_focus_on = no
			}
			
		}

		951 = {
			add_claim_by = ROOT
		}

		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}

		add_war_support = 0.03

		add_stability = -0.02

	}

}

country_event = { #Peru offers peace for the state they claim
	id = south_american_events.17
	title = south_american_events.17.t
	desc = south_american_events.17.desc
	picture = GFX_report_event_defensive_preparations



	is_triggered_only = yes

	option = { #Let them have their claim
		name = south_american_events.17.a
		ai_chance = {
			base = 2
			modifier = {
				surrender_progress < 0.12 #looks like not a lot but if your capital is like 60% of your VPs it kinda is, only pastaza seems to be 14%
				factor = 10
			}
		}

		effect_tooltip = {

			every_country = {
				limit = {
					has_idea = PRU_amazonian_war
				}
				remove_ideas = PRU_amazonian_war
			}
	
			every_country = {
				limit = {
					OR = {
						AND = {
							owns_state = 490
							has_war_with = PRU
						}
						AND = {
							is_ally_with = ECU
							has_war_with = PRU
						}
						AND = {
							is_subject_of = ECU
							has_war_with = PRU
						}
						AND = {
							has_subject = ECU
							has_war_with = PRU
						}
					}
				}
				white_peace = PRU
			}
	
			IF = {
				limit = {
					490 = {
						is_core_of = ECU
					}
				}
				490 = {
					remove_core_of = ECU
				}
			}
	
			PRU = {
				transfer_state = 490
			}

		}
		

		PRU = {
			country_event = {
				id = south_american_events.18
				hours = 3 
			}
			hidden_effect = {
				set_country_flag = PRU_has_ended_their_invasion_won
			}
		}


	}

	option = { #We fight on!
		name = south_american_events.17.b
		ai_chance = {
			base = 1
		}

		add_war_support = 0.1

		PRU = {
			country_event = {
				id = south_american_events.19
				hours = 3 # optional - can take hours/days/months
			}	
		}
		
	}
}

country_event = { #FROM accepts
	id = south_american_events.18
	title = south_american_events.18.t
	desc = south_american_events.18.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	option = { #good
		name = south_american_events.18.a

		every_country = {
			limit = {
				has_idea = PRU_amazonian_war
			}
			remove_ideas = PRU_amazonian_war
		}

		every_country = {
			limit = {
				OR = {
					AND = {
						owns_state = 490
						has_war_with = PRU
					}
					AND = {
						is_ally_with = ECU
						has_war_with = PRU
					}
					AND = {
						is_subject_of = ECU
						has_war_with = PRU
					}
					AND = {
						has_subject = ECU
						has_war_with = PRU
					}
				}
			}
			white_peace = PRU
		}

		IF = {
			limit = {
				490 = {
					is_core_of = ECU
				}
			}
			490 = {
				remove_core_of = ECU
			}
		}

		PRU = {
			transfer_state = 490
		}

		
	}
}

country_event = { #From Rejects
	id = south_american_events.19
	title = south_american_events.19.t
	desc = south_american_events.19.desc
	picture = GFX_report_event_chinese_soldiers_running



	is_triggered_only = yes

	option = { #then we'll take it all instead
		name = south_american_events.19.a
		add_war_support = 0.15
	}
}

country_event = { #Peru requests a white peace in return for Loreto
	id = south_american_events.20
	title = south_american_events.20.t
	desc = south_american_events.20.desc
	picture = GFX_report_event_defensive_preparations	



	is_triggered_only = yes

	option = { #Haha! Off you go, Loreto is ours!
		name = south_american_events.20.a
		ai_chance = {
			base = 1
			modifier = {
				surrender_progress < 0.1 #you literally can't beat us
				factor = 10
			}
		}

		effect_tooltip = {
			every_country = { 
				limit = {
					has_idea = PRU_amazonian_war
				}
				remove_ideas = PRU_amazonian_war
			}

			IF = {
				limit = {
					490 = {
						is_core_of = PRU
					}
				}
				490 = {
					remove_core_of = PRU
				}
			}

			IF = {
				limit = {
					has_war_with = ECU
				}
				ECU = {
					transfer_state = 491
				}
				491 = {
					add_core_of = ECU
					remove_core_of = PRU
				}
			}
			
			every_country = {
				limit = {
					OR = {
						AND = {
							owns_state = 490
							has_war_with = PRU
						}
						AND = {
							is_ally_with = ECU
							has_war_with = PRU
						}
						AND = {
							is_subject_of = ECU
							has_war_with = PRU
						}
						AND = {
							has_subject = ECU
							has_war_with = PRU
						}
					}
				}
				white_peace = PRU
			}
		}

		PRU = {
			country_event = {
				id = south_american_events.21
				hours = 3 # optional - can take hours/days/months
			}
		}


	}

	option = { #No. We want MORE!
		name = south_american_events.20.b
		ai_chance = {
			base = 1
		}

		add_war_support = 0.1


		PRU = {
			country_event = {
				id = south_american_events.22
				hours = 3 # optional - can take hours/days/months
			}
		}
	}		
}

country_event = { #From accepts
	id = south_american_events.21
	title = south_american_events.21.t
	desc = south_american_events.21.desc
	picture = GFX_report_event_generic_sign_treaty1



	is_triggered_only = yes

	option = { #thank goodness
		name = south_american_events.21.a
		ai_chance = {
			base = 1
		}

		
		every_country = { 
			limit = {
				has_idea = PRU_amazonian_war
			}
			remove_ideas = PRU_amazonian_war
		}
		IF = {
			limit = {
				490 = {
					is_core_of = PRU
				}
			}
			490 = {
				remove_core_of = PRU
			}
		}
		IF = {
			limit = {
				has_war_with = ECU
			}
			ECU = {
				transfer_state = 491
			}
			491 = {
				add_core_of = ECU
				remove_core_of = PRU
			}
		}
		
		every_country = {
			limit = {
				OR = {
					AND = {
						owns_state = 490
						has_war_with = PRU
					}
					AND = {
						is_ally_with = ECU
						has_war_with = PRU
					}
					AND = {
						is_subject_of = ECU
						has_war_with = PRU
					}
					AND = {
						has_subject = ECU
						has_war_with = PRU
					}
				}
			}
			white_peace = PRU
		}
	}
}

country_event = { #From Rejects
	id = south_american_events.22
	title = south_american_events.22.t
	desc = south_american_events.22.desc
	picture = GFX_report_event_chinese_soldiers_running

	is_triggered_only = yes

	option = { #so that is kinda bad...
		name = south_american_events.22.a
		add_political_power = -50
	}
}

country_event = { #FROM has gone communist, should we embargo/remove protection?
	id = south_american_events.30
	title = south_american_events.30.t
	desc = south_american_events.30.desc
	picture = GFX_report_event_generic_communist_congress

	is_triggered_only = yes

	option = { #completely cut ties
		name = south_american_events.30.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0 
				has_government = communism
			}
		}
		add_war_support = 0.1
		IF = {
			limit = {
				has_dlc = "By Blood Alone"
			}
			send_embargo = FROM 
		}
		ELSE = {
			add_opinion_modifier = {
				target = FROM # target of the relation
				modifier = USA_embargoed_us
			}
			add_opinion_modifier = {
				target = FROM # target of the relation
				modifier = USA_isolating_us
			}
		}
		FROM = {
			country_event = {
				id = south_american_events.31
				days = 1
			}
		}
	}
	#option = { #cut protection
	#	name = south_american_events.30.b
	#	ai_chance = {
	#		base = 5
	#		modifier = {
	#			factor = 0 
	#			has_government = communism
	#		}
	#	}
	#	add_war_support = 0.05
	#	diplomatic_relation = {
	#	    country = FROM
	#	    relation = guarantee
	#	    active = no
	#	} 
	#	FROM = {
	#		country_event = {
	#			id = south_american_events.31
	#			days = 1
	#		}
	#	}
	#}
	option = { #no thanks
		name = south_american_events.30.c
		ai_chance = {
			base = 0
			modifier = {
				add = 1 
				has_government = communism
			}
		}
		add_stability = -0.05
	}
}	


country_event = { #FROM has gone communist, should we embargo/remove protection?
	id = south_american_events.31
	title = south_american_events.31.t
	# embargo and diplo cut
	desc = {
		text = south_american_events.31.desc.a
		trigger = {
			is_embargoed_by = FROM
		}
	}
	# only diplo cut
	desc = {
		text = south_american_events.31.desc.b
		trigger = {
			NOT = {
				is_embargoed_by = FROM
			}
		}
	}
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #how dare they
		name = south_american_events.31.a
		add_war_support = 0.01
	}
}	

country_event = { #FROM has CW against communists, should we support the democratic/fascist/neutral side
	id = south_american_events.32
	title = south_american_events.32.t
	desc = south_american_events.32.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #send support
		name = south_american_events.32.a
		ai_chance = {
			base = 1
		}
		add_timed_idea = { 
			idea = ToA_aid_against_communists 
			days = 365 
		}
		hidden_effect = {
			set_rule = {
				can_send_volunteers = yes
			}
			add_ai_strategy = {
				type = send_volunteers_desire
				id = FROM
				value = 200
			}
		}
		IF = {
			limit = {
				has_idea = undisturbed_isolation
			}
			custom_effect_tooltip = south_american_events_32_tt
		}
	}

	option = { #do nothing
		name = south_american_events.32.b
		ai_chance = {
			base = 10
		}
	}
}

#country_event = { #FROM saber rattling
#	id = south_american_events.33
#	title = south_american_events.33.t
#	desc = south_american_events.33.desc
#	picture = GFX_report_event_usa_election_generic
#
#	is_triggered_only = yes
#
#	option = { #Rattle back
#		name = south_american_events.33.a
#		ai_chance = {
#			base = 1
#		}
#		FROM = {
#			country_event = {
#				id = south_american_events.34
#				days = 1
#			}
#		}
#		add_ideas = TOA_saber_rattling
#	}
#
#	option = { #ignore them
#		name = south_american_events.33.b
#		ai_chance = {
#			base = 10
#		}
#		add_ideas = TOA_navy_humiliated
#		FROM = {
#			country_event = {
#				id = south_american_events.35
#				days = 1
#			}
#		}
#	}
#}
#
#country_event = { #FROM rattles back
#	id = south_american_events.34
#	title = south_american_events.34.t
#	desc = south_american_events.34.desc
#	picture = GFX_report_event_usa_election_generic
#
#	is_triggered_only = yes
#
#	option = { #Escalate the situation
#		name = south_american_events.34.a
#		ai_chance = {
#			base = 1
#		}
#		FROM = {
#			country_event = {
#				id = south_american_events.36
#				days = 1
#			}
#		}
#		custom_effect_tooltip = naval_arms_race_war_tt
#	}
#
#	option = { #back down
#		name = south_american_events.34.b
#		ai_chance = {
#			base = 10
#		}
#		FROM = {
#			country_event = {
#				id = south_american_events.35
#				days = 1
#			}
#		}
#		swap_ideas = {
#			remove_idea = TOA_saber_rattling
#			add_idea = TOA_navy_humiliated
#		}
#	}
#}
#
#country_event = { #FROM backs down
#	id = south_american_events.35
#	title = south_american_events.35.t
#	desc = south_american_events.35.desc
#	picture = GFX_report_event_usa_election_generic
#
#	is_triggered_only = yes
#
#	option = { #great!
#		name = south_american_events.35.a
#		ai_chance = {
#			base = 1
#		}
#		swap_ideas = {
#			remove_idea = TOA_saber_rattling
#			add_idea = TOA_asserted_naval_dominance
#		}
#	}
#}
#
#country_event = { #FROM backs down
#	id = south_american_events.36
#	title = south_american_events.36.t
#	desc = south_american_events.36.desc
#	picture = GFX_report_event_usa_election_generic
#
#	is_triggered_only = yes
#
#	option = { #refuse to back down
#		name = south_american_events.36.a
#		ai_chance = {
#			base = 1
#		}
#		FROM = {
#			country_event = {
#				id = south_american_events.37
#				days = 1
#			}
#		}
#	}
#
#	option = { #back down
#		name = south_american_events.36.b
#		ai_chance = {
#			base = 1
#		}
#		FROM = {
#			country_event = {
#				id = south_american_events.35
#				days = 1
#			}
#		}
#		swap_ideas = {
#			remove_idea = TOA_saber_rattling
#			add_idea = TOA_navy_humiliated
#		}
#	}
#}
#
#country_event = { #FROM backs down
#	id = south_american_events.37
#	title = south_american_events.37.t
#	desc = south_american_events.37.desc
#	picture = GFX_report_event_usa_election_generic
#
#	is_triggered_only = yes
#
#	option = { #attack
#		name = south_american_events.37.a
#		ai_chance = {
#			base = 1
#		}
#		declare_war_on = { 
#			target = FROM
#			type = puppet_wargoal_focus
#		}
#	}
#
#	option = { #back down
#		name = south_american_events.37.b
#		ai_chance = {
#			base = 1
#		}
#		add_stability = -0.1
#		add_war_support = -0.1
#		FROM = {
#			country_event = {
#				id = south_american_events.35
#				days = 1
#			}
#		}
#		swap_ideas = {
#			remove_idea = TOA_saber_rattling
#			add_idea = TOA_navy_humiliated
#		}
#	}
#}

country_event = { #Monroe Doctrine Triggered
	id = south_american_events.50
	title = south_american_events.50.t
	desc = south_american_events.50.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Demand end of war
		name = south_american_events.50.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				# Shouldn't need this, putting here for safety
				OR = {
					is_in_faction_with = FROM
					has_war_with = FROM.FROM
				}
			}
			modifier = {
				factor = 10
				FROM = {
					OR = {
						has_government = fascism
						has_government = communism
					}
				}
			}
			modifier = {
				factor = 10
				FROM.FROM = {
					has_government = ROOT
				}
			}
		}
		FROM = {
			country_event = {
				id = south_american_events.51
				days = 5
				random_days = 3
			}
			hidden_effect = { set_country_flag = monroe_aggressor_originator } #this is the originator or the war/aggressor in the conflict
			set_variable = { monroe_defender = PREV.monroe_defender } #this is the country that is defender in the conflict
		}
		FROM.FROM = {
			country_event = {
				id = south_american_events.54
				days = 2
			}
		}
		custom_effect_tooltip = south_american_events_50_war_tt
	}

	option = { #ignore the issue
		name = south_american_events.50.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				NOT = { has_government = communism }
				FROM.FROM = {
					has_government = communism
				}
			}
		}
		FROM.FROM = {
			country_event = {
				id = south_american_events.55
				days = 2
			}
		}
	}
}

country_event = { #USA demands we end war in SA/NA
	id = south_american_events.51
	title = south_american_events.51.t
	desc = south_american_events.51.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Agree to end war
		name = south_american_events.51.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				OR = {
					has_war_with_major = yes
					strength_ratio = {
					    tag = FROM
					    ratio < 0.75
					}
				}
			}
			modifier = {
				factor = 0
				has_war_with = FROM
			}
		}

		if = {
			limit = {
				has_country_flag = propagate_monroe_along_allies ##this event is sent from the monroe aggressor to its allies - hand me down event
			}
			hidden_effect = { clr_country_flag = propagate_monroe_along_allies }
			ROOT = {
				white_peace = var:monroe_defender
			}
			USA = { #always go for USA in this case
				country_event = {
					id = south_american_events.52
					hours = 1
				}
			}
			clear_variable = monroe_defender
		}
		else = {
			FROM.FROM.FROM = {
				ROOT = {
					white_peace = PREV
				}
				country_event = {
					id = south_american_events.52
					hours = 1
				}
			}
		}


		if = {
			limit = {
				is_in_faction = yes
				has_country_flag = monroe_aggressor_originator
			}
		 	hidden_effect = { clr_country_flag = monroe_aggressor_originator }
			every_other_country = {
				limit = {
					is_in_faction_with = PREV
					has_war_with = FROM.FROM.FROM
				}
				hidden_effect = {
					set_country_flag = propagate_monroe_along_allies
				}
				set_variable = { monroe_defender = ROOT.monroe_defender } 
				country_event = {
					id = south_american_events.51
					hours = 1
					#andom_days = 3
				}
			}

			clear_variable = monroe_defender
		}
	}

	option = { #refuse to end war
		name = south_american_events.51.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				# This shouldn't be needed but I'm putting it here for safety. No more USA defending fascism from the Allies -_-
				OR = {
					has_government = FROM
					is_in_faction_with = FROM
				}
			}
		}
		USA = {
			country_event = {
				id = south_american_events.53
				days = 2
			}
			effect_tooltip = {
				declare_war_on = {
					target = ROOT
					type = puppet_wargoal_focus
				} 
			}
		}
	}
}

country_event = { #FROM Agrees to end war in SA/NA
	id = south_american_events.52
	title = south_american_events.52.t
	desc = south_american_events.52.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #US option
		name = south_american_events.52.a
		trigger = {
			tag = USA
		}
		ai_chance = {
			base = 10
		}
		add_war_support = 0.05
		add_political_power = 50
		FROM = {
			add_opinion_modifier = {
				target = USA
				modifier = USA_monroe_interfered_with_us
			}
		}
	}

	option = { #Defender option
		name = south_american_events.52.b
		trigger = {
			NOT = {
				tag = USA
			}
		}
		ai_chance = {
			base = 1
		}
		add_opinion_modifier = {
			target = USA
			modifier = USA_monroe_defended_us
		}
	}
}

country_event = { #FROM refuses to end war in SA/NA
	id = south_american_events.53
	title = south_american_events.53.t
	desc = south_american_events.53.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Declare war on FROM
		name = south_american_events.53.a
		ai_chance = {
			base = 10
		}
		declare_war_on = {
			target = FROM
			type = puppet_wargoal_focus
		} 
	}
}

country_event = { #USA will defend us
	id = south_american_events.54
	title = south_american_events.54.t
	desc = south_american_events.54.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Great!
		name = south_american_events.54.a
		ai_chance = {
			base = 10
		}
		add_war_support = 0.05
		add_stability = 0.03
	}
}

country_event = { #USA ignores us
	id = south_american_events.55
	title = south_american_events.55.t
	desc = south_american_events.55.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Not good
		name = south_american_events.55.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = USA
			modifier = USA_monroe_abandoned_us
		}
	}
}

country_event = { 
	id = south_american_events.56
	title = south_american_events.56.t
	desc = south_american_events.56.desc
	#picture = GFX_report_event_worker_protests
	is_triggered_only = yes
	hidden = yes

	immediate = {
		IF = {
			limit = {
				has_country_flag = PAR_revenge_flag
			}
			clr_country_flag = PAR_revenge_flag
		}
	}
}

# Military Coup in Brazil
news_event = {
	id = south_american_news.60
	title = south_american_news.60.t
	desc = south_american_news.60.desc
	picture = GFX_news_event_ger_civil_war
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = south_american_news.60.a
	}
} 

country_event = {
	id = TOA_ven_blockade.1
	title = TOA_ven_blockade.1.t
	desc = TOA_ven_blockade.1.desc
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = { #Stand down
		ai_chance = {
			base = 10
		}
		name = TOA_ven_blockade.1.a
		add_ideas = idea_VEN_defensive_posture

	}

	option = { #War
		ai_chance = {
			base = 0
			modifier = {
				is_historical_focus_on = no
				add = 2
			}
		}
		name = TOA_ven_blockade.1.b
		create_wargoal = {
			type = annex_everything	
			target = FROM
		}

		add_ideas = idea_VEN_defensive_posture
	}
}

news_event = {
	id = TOA_ven_blockade.2
	title = TOA_ven_blockade.2.t
	desc = TOA_ven_blockade.2.desc
	picture = GFX_news_event_strasbourg

	is_triggered_only = yes
	major = no
	option = {
		name = TOA_ven_blockade.2.a
	}
}

#Fires off when Mexico starts to send National Spirits to change countries to Communism
country_event = {
	id = south_american_events.60
	title = south_american_events.60.t
	desc = south_american_events.60.desc
	picture = GFX_report_event_communists_cheer

	is_triggered_only = yes

	option = { #Accept Communism
		ai_chance = {
			base = 100
		}
		name = south_american_events.60.a

		add_timed_idea = {
				idea = MEX_bolivarian_agitation
				days = 720
			}
		set_country_flag = received_MEX_bolivarian_agitation
	}

	option = { #Clamp Down on Communism
		ai_chance = {
			base = 0
		}
		name = south_american_events.60.b
		
		add_political_power = -20
		add_stability = 0.1
	}
}



# Carnival is cancelled - disabling for now, may move to Brazil only event
#news_event = {
#	id = south_american_news.52
#	title = south_american_news.52.t
#	desc = south_american_news.52.desc
#	picture = GFX_news_event_BRA_carnival
#	
#	major = yes
#	mean_time_to_happen = {
#		days = 10
#	}
#	trigger = {
#		any_country = {
#			is_major = yes
#			has_war_with_major = yes
#		}
#	}
#
#	#is_triggered_only = yes
#	#fire_only_once = yes
#
#	option = {
#		name = south_american_news.52.a
#		trigger = {
#			
#			OR = {
#				has_government = democratic
#				has_government = communism
#			}
#		}
#	}
#	option = {
#		name = south_american_news.52.b
#		trigger = {
#			OR = {
#				has_government = fascism
#				has_government = neutrality
#			}
#		}
#	}
#} 