﻿add_namespace = brazil

#Amazonian Development Project
country_event = {
	id = brazil.3
	title = brazil.3.t
	desc = brazil.3.d
	picture = GFX_mining
	
	is_triggered_only = yes
	
	option = {
		name = brazil.3.a
		log = "[GetDateText]: [This.GetName]: brazil.3.a executed"
		add_stability = -0.10
		set_country_flag = amazonian_development_project
		add_ideas = BRA_idea_amazonian_development_project
		if = {
			limit = { has_idea = industrial_conglomerates }
			visually_display_opinion_rise_industrial_conglomerates = yes
			set_country_flag = current_industrial_conglomerates
			increase_internal_faction_opinion = yes
		}
	}
	
	option = {
		name = brazil.3.b
		log = "[GetDateText]: [This.GetName]: brazil.3.b executed"
		add_stability = 0.075
		set_country_flag = denied_amazonian_development_project
		if = {
			limit = { has_idea = industrial_conglomerates }
			visually_display_opinion_fall_industrial_conglomerates = yes
			set_country_flag = current_industrial_conglomerates
			decrease_internal_faction_opinion = yes
		}
	}
}
#Project Devastate the Amazon
country_event = { 
	id = brazil.6
	title = brazil.6.t
	desc = brazil.6.d
	picture = country_event_amazon_rainforest_devastation
	
	is_triggered_only = yes
	
	option = {
		name = brazil.6.a
		log = "[GetDateText]: [This.GetName]: brazil.6.a executed"
		add_political_power = 25
		add_stability = -0.05
		if = {
			limit = { has_idea = industrial_conglomerates }
			visually_display_opinion_rise_industrial_conglomerates = yes
			set_country_flag = current_industrial_conglomerates
			increase_internal_faction_opinion = yes
		}
	}
	
	option = {
		name = brazil.6.b
		log = "[GetDateText]: [This.GetName]: brazil.6.b executed"
		add_stability = 0.10
		add_to_variable = {
			var = Neutral_Green
			value = 0.05
		}
		recalculate_party = yes
		custom_effect_tooltip = BRA_event_brazil.6_tt
	}
}
#Lula is Elected
country_event = {
	id = brazil.4
	title = brazil.4.t
	desc = brazil.4.d
	picture = country_event_lula
	
	is_triggered_only = yes
	
	option = {
		name = brazil.4.a
		log = "[GetDateText]: [This.GetName]: brazil.4.a executed"
		add_political_power = 50
		add_ideas = BRA_idea_well_balanced
	}
}

#Workers Alignment Scripted Variable Events Neo Comunista
country_event = {
	id = brazil.7
	title = brazil.7.t
	desc = brazil.7.d
	picture = GFX_politics_communism_lenin
	
	trigger = {
		tag = BRA
		has_idea = BRA_idea_radical_leftist
		check_variable = { var = BRA_brazilian_party_alignment value = 10 compare = less_than_or_equals }		
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.7.a
		log = "[GetDateText]: [This.GetName]: brazil.7.a executed"
		swap_ideas = {
			add_idea = BRA_idea_neo_comunista
			remove_idea = BRA_idea_radical_leftist
		}
	}

}
#Party - Aligned - Radical Leftist
country_event = {
	id = brazil.8
	title = brazil.8.t
	desc = brazil.8.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		OR = {
			has_idea = BRA_idea_neo_comunista
			has_idea = BRA_idea_slightly_radical
		}
		check_variable = { var = BRA_brazilian_party_alignment value = 10 compare = greater_than_or_equals }
		check_variable = { var = BRA_brazilian_party_alignment value = 30 compare = less_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.8.a
		log = "[GetDateText]: [This.GetName]: brazil.8.a executed"
		if = {
			limit = {
				has_idea = BRA_idea_slightly_radical
			}
			swap_ideas = {
				add_idea = BRA_idea_radical_leftist
				remove_idea = BRA_idea_slightly_radical
			}
		}
		if = {
			limit = {
				has_idea = BRA_idea_neo_comunista
			}
			swap_ideas = {
				add_idea = BRA_idea_radical_leftist
				remove_idea = BRA_idea_neo_comunista
			}
		
		}
	}
}
#Party - Slightly Radicalized Government
country_event = {
	id = brazil.9
	title = brazil.9.t
	desc = brazil.9.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		OR = {
			has_idea = BRA_idea_radical_leftist
			has_idea = BRA_idea_well_balanced
		}
		check_variable = { var = BRA_brazilian_party_alignment value = 30 compare = greater_than_or_equals }
		check_variable = { var = BRA_brazilian_party_alignment value = 45 compare = less_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.9.a
		log = "[GetDateText]: [This.GetName]: brazil.9.a executed"
		if = {
			limit = {
				has_idea = BRA_idea_well_balanced
			}
			swap_ideas = {
				add_idea = BRA_idea_slightly_radical
				remove_idea = BRA_idea_well_balanced
			}
		}
		if = {
			limit = {
				has_idea = BRA_idea_radical_leftist
			}
			swap_ideas = {
				add_idea = BRA_idea_slightly_radical
				remove_idea = BRA_idea_radical_leftist
			}
		}
	}
}
#Well Balanced
country_event = {
	id = brazil.10
	title = brazil.10.t
	desc = brazil.10.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		OR = {
			has_idea = BRA_idea_slightly_radical
			has_idea = BRA_idea_slightly_reformist
		}
		check_variable = { var = BRA_brazilian_party_alignment value = 45 compare = greater_than_or_equals }
		check_variable = { var = BRA_brazilian_party_alignment value = 55 compare = less_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.10.a
		log = "[GetDateText]: [This.GetName]: brazil.10.a executed"
		if = {
			limit = {
				has_idea = BRA_idea_slightly_radical
			}
			swap_ideas = {
				add_idea = BRA_idea_well_balanced
				remove_idea = BRA_idea_slightly_radical
			}
		}
		if = {
			limit = {
				has_idea = BRA_idea_slightly_reformist
			}
			swap_ideas = {
				add_idea = BRA_idea_well_balanced
				remove_idea = BRA_idea_slightly_reformist
			}
		}
	}
}
#Party Slightly Reformist Government
country_event = {
	id = brazil.11
	title = brazil.11.t
	desc = brazil.11.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		OR = {		
			has_idea = BRA_idea_well_balanced
			has_idea = BRA_idea_modern_reformist
		}
		check_variable = { var = BRA_brazilian_party_alignment value = 55 compare = greater_than_or_equals }
		check_variable = { var = BRA_brazilian_party_alignment value = 70 compare = less_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.11.a
		log = "[GetDateText]: [This.GetName]: brazil.11.a executed"
		if = {
			limit = {
				has_idea = BRA_idea_well_balanced
			}
			swap_ideas = {
				add_idea = BRA_idea_slightly_reformist
				remove_idea = BRA_idea_well_balanced
			}
		}
		if = {
			limit = {
				has_idea = BRA_idea_modern_reformist
			}
			swap_ideas = {
				add_idea = BRA_idea_slightly_reformist
				remove_idea = BRA_idea_modern_reformist
			}
		}
	}
}
#Party Reformist Government
country_event = {
	id = brazil.12
	title = brazil.12.t
	desc = brazil.12.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		OR = {	
			has_idea = BRA_idea_slightly_reformist
			has_idea = BRA_idea_party_of_progress
		}
		check_variable = { var = BRA_brazilian_party_alignment value = 70 compare = greater_than_or_equals }
		check_variable = { var = BRA_brazilian_party_alignment value = 90 compare = less_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.12.a
		log = "[GetDateText]: [This.GetName]: brazil.12.a executed"
		if = {
			limit = {
				has_idea = BRA_idea_slightly_reformist
			}
			swap_ideas = {
				add_idea = BRA_idea_modern_reformist
				remove_idea = BRA_idea_slightly_reformist
			}
		}
		if = {
			limit = {
				has_idea = BRA_idea_party_of_progress
			}
			swap_ideas = {
				add_idea = BRA_idea_modern_reformist
				remove_idea = BRA_idea_party_of_progress
			}
		}
	}
}
#Party Party of Progress
country_event = {
	id = brazil.13
	title = brazil.13.t
	desc = brazil.13.d
	picture = GFX_politics_left_wing
	
	trigger = {
		tag = BRA
		has_idea = BRA_idea_modern_reformist
		check_variable = { var = BRA_brazilian_party_alignment value = 90 compare = greater_than_or_equals }
	}
	
	mean_time_to_happen = {
		days = 21
		modifier = {
			factor = 0.25
			is_ai = no
		}
	}
	
	option = {
		name = brazil.13.a
		log = "[GetDateText]: [This.GetName]: brazil.13.a executed"
		swap_ideas = {
			add_idea = BRA_idea_party_of_progress
			remove_idea = BRA_idea_modern_reformist
		}
	}
}

#Exports
country_event = {
	id = brazil.5
	title = brazil.5.t
	desc = brazil.5.d
	picture = GFX_trade_agreement
	
	is_triggered_only = yes
	
	option = {
		name = brazil.5.a
		log = "[GetDateText]: [This.GetName]: brazil.5.a executed"
		add_ideas = BRA_idea_brazilian_exports
	}
	
	option = {
		name = brazil.5.b
		log = "[GetDateText]: [This.GetName]: brazil.5.b executed"
		add_political_power = -25
	}
}
#March of the Excluded
country_event = {
	id = brazil.14
	title = brazil.14.t
	desc = brazil.14.d
	picture = GFX_politics_protest
	
	is_triggered_only = yes
	
	option = {
		name = brazil.14.a
		log = "[GetDateText]: [This.GetName]: brazil.14.a executed"
		add_political_power = -75
		add_stability = -0.005
		
	}
}
#French Naval Studies
country_event = {
	id = brazil.15
	title = brazil.15.t
	desc = brazil.15.d
	picture = country_event_french_navy
	
	is_triggered_only = yes
	
	option = {
		name = brazil.15.a
		log = "[GetDateText]: [This.GetName]: brazil.15.a executed"
		if = {
			limit = {
				country_exists = BRA
				NOT = { has_war_with = BRA }
			}
			BRA = {
				add_ideas = BRA_idea_french_naval_studies
				add_opinion_modifier = { target = ROOT modifier = french_naval_studies }
			}
			add_opinion_modifier = { target = BRA modifier = french_naval_studies }
		}
	}
	
	option = {
		name = brazil.15.b
		log = "[GetDateText]: [This.GetName]: brazil.15.b executed"
		BRA = {
			add_political_power = -25
			add_opinion_modifier = { target = ROOT modifier = france_denies_studies }
		}
	}
}
#Should we join the MERCOSUR?
country_event = {
	id = brazil.16
	title = brazil.16.t
	desc = brazil.16.d
	picture = country_event_mercosur
	
	is_triggered_only = yes
	
	option = {
		name = brazil.16.a
		log = "[GetDateText]: [This.GetName]: brazil.16.a executed"
		add_ideas = BRA_idea_mercosur_member_state
		if = {
			limit = {
				country_exists = BRA 
				NOT = { has_war_with = BRA }
			}
			BRA = {
				random_owned_controlled_state = {
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				add_opinion_modifier = { target = ROOT modifier = mercosur_focus_tt }
			}
			random_owned_controlled_state = {
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			add_to_variable = { influence_array_val^0 = 5 }
			custom_effect_tooltip = BRA_event_brazil.16_tt
			add_opinion_modifier = { target = BRA modifier = mercosur_focus_tt }
		}
		
	}
	
	option = {
		name = brazil.16.b
		log = "[GetDateText]: [This.GetName]: brazil.16.b executed"
		add_opinion_modifier = { target = BRA modifier = mercosur_rejected }
		BRA = {
			add_political_power = -25
			add_opinion_modifier = { target = ROOT modifier = mercosur_rejected }
		}
	}
}