###########################
# Brazil Events
###########################

add_namespace = JUNO_brazil_news
add_namespace = JUNO_brazil_events

#Fascist march in state - bad
country_event = {
	id = JUNO_brazil_events.10
	title = JUNO_brazil_events.10.t
	desc = JUNO_brazil_events.10.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.10.a
		ai_chance = {
			base = 10
		}
		add_popularity = { ideology = fascism popularity = 0.01 }
		clr_country_flag = BRA_gaining_support_in_progress
	}	
}

#Fascist march in state - average
country_event = {
	id = JUNO_brazil_events.11
	title = JUNO_brazil_events.11.t
	desc = JUNO_brazil_events.11.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.11.a
		ai_chance = {
			base = 10
		}
		add_popularity = { ideology = fascism popularity = 0.03 }
		clr_country_flag = BRA_gaining_support_in_progress
	}	
}

#Fascist march in state - good
country_event = {
	id = JUNO_brazil_events.12
	title = JUNO_brazil_events.12.t
	desc = JUNO_brazil_events.12.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.12.a
		ai_chance = {
			base = 10
		}
		add_popularity = { ideology = fascism popularity = 0.05 }
		clr_country_flag = BRA_gaining_support_in_progress
	}	
}

#MM: Never used. Not localized (title, option, desc)
country_event = {
	id = JUNO_brazil_events.5
	title = JUNO_brazil_events.5.t
	desc = JUNO_brazil_events.5.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.5.a
		ai_chance = {
			base = 10
		}
		create_dynamic_country = {
			original_tag = BRA
			set_politics = {
				ruling_party = neutrality
				last_election = "1934.1.1"
				election_frequency = 4
				elections_allowed = no
			}
			set_popularities = {
				neutrality = 60
				democratic = 10
				fascism = 10
				communism = 20
			}
			BRA = {
				every_owned_state = {
					limit = {
						is_fully_controlled_by = BRA
						has_dynamic_modifier = {
							modifier = BRA_cangaceiro_state
						}
					}
					PREV.PREV = {
						transfer_state = PREV
					} 
				}
			}			
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.13
	title = JUNO_brazil_events.13.t
	desc = JUNO_brazil_events.13.desc
	picture = GFX_report_event_radar_01
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.13.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = FROM
			modifier = BRA_disrupted_bolivar
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.14
	title = JUNO_brazil_events.14.t
	desc = JUNO_brazil_events.14.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.14.a
		ai_chance = {
			base = 10
		}
		trigger = {
			NOT = {
				original_tag = ARG
			}
		}
		add_opinion_modifier = {
			target = FROM
			modifier = BRA_good_neighbor_policy
		}
	}
	option = {
		name = JUNO_brazil_events.14.b
		ai_chance = {
			base = 10
		}
		trigger = {
			original_tag = ARG
		}
		add_opinion_modifier = {
			target = FROM
			modifier = BRA_good_neighbor_policy
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.15
	title = JUNO_brazil_events.15.t
	desc = JUNO_brazil_events.15.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.15.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			modifier = BRA_accepted_washington_accords
			target = FROM
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.16
				hours = 1
			}
		}
	}
	option = {
		name =  JUNO_brazil_events.15.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.17
				hours = 1
			}
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.16
	title = JUNO_brazil_events.16.t
	desc = JUNO_brazil_events.16.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.16.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			modifier = BRA_accepted_washington_accords
			target = FROM
		}
		add_timed_idea = {
			idea = BRA_washington_accords_idea
			days = 730
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.17
	title = JUNO_brazil_events.17.t
	desc = JUNO_brazil_events.17.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.17.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			modifier = BRA_rejected_washington_accords
			target = FROM
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.18
	title = JUNO_brazil_events.18.t
	desc = JUNO_brazil_events.18.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.18.a
		ai_chance = {
			base = 10
		}
		every_other_country = {
			limit = {
				has_war_with = USA
				is_major = yes
			}
			ROOT = {
				declare_war_on = {
					target = PREV
					type = topple_government
				}
			}
		}
		USA = {
			IF = {
				limit = {
					is_in_faction = yes
				}
				add_to_faction = BRA
			}
		}
	}	
	option = {
		name = JUNO_brazil_events.18.b
		ai_chance = {
			base = 0
		}
		USA = {
			country_event = {
				id = JUNO_brazil_events.19
				hours = 1
			}
		}
		custom_effect_tooltip = BRA_war_embargo_with_usa_tt
	}	
}

country_event = {
	id = JUNO_brazil_events.19
	title = JUNO_brazil_events.19.t
	desc = JUNO_brazil_events.19.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.19.a
		ai_chance = {
			base = 10
		}
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}	
	option = {
		name = JUNO_brazil_events.19.b
		ai_chance = {
			base = 5
		}
		send_embargo = FROM
	}	
	option = {
		name = JUNO_brazil_events.19.b
		ai_chance = {
			base = 0
		}
	}
}

country_event = {
	id = JUNO_brazil_events.20
	title = JUNO_brazil_events.20.t
	desc = JUNO_brazil_events.20.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.20.a
		ai_chance = {
			base = 10
		}
	}	
}


# Brazil wants to cooperate with us (GER, ITA)
country_event = {
	id = JUNO_brazil_events.30
	title = JUNO_brazil_events.30.t
	desc = JUNO_brazil_events.30.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.30.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				NOT = {
					OR = {
						has_government = fascism
						has_government = neutrality
					}
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					has_war_with = ROOT
					capital_scope = {
						OR = {
							is_on_continent = north_america
							is_on_continent = south_america
						}
					}
				}
			}
		}
		IF = {
			limit = {
				is_in_faction = yes
			}
			add_to_faction = FROM
		}
		ELSE_IF = {
			limit = {
				FROM = {
					is_in_faction = yes
					NOT = {
						any_other_country = {
							is_in_faction_with = FROM
							has_war_with = ROOT
						}
					}
				}
			}
			FROM = {
				add_to_faction = ROOT
			}
		}
		ELSE = {
			IF = {
				limit = {
					ROOT = {
						original_tag = GER
					}
				}
				create_faction = faction_name_bra_ger
			}
			ELSE_IF = {
				limit = {
					ROOT = {
						original_tag = ITA
					}
				}
				create_faction = faction_name_bra_ita
			}
			add_to_faction = FROM
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_increase 
		}	
	}	
	option = {
		name = JUNO_brazil_events.30.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 100
				AND = {
					NOT = { has_war_with = USA }
					FROM = {
						has_war_with = USA
					}
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.53
				hours = 1
			}
		}
	}
}

# Brazil aids operation Bolivar
country_event = {
	id = JUNO_brazil_events.31
	title = JUNO_brazil_events.31.t
	desc = JUNO_brazil_events.31.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.31.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = BRA
			modifier = BRA_supporting_operation_bolivar
		}
		add_ideas = BRA_aid_operation_bolivar
	}	
}

# Brazil demands in territory in Guyana
country_event = {
	id = JUNO_brazil_events.32
	title = JUNO_brazil_events.32.t
	desc = JUNO_brazil_events.32.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Agree
	option = {
		name = JUNO_brazil_events.32.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_war_with_major = yes
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.33
				days = 1
			}
		}
	}	
	# Refuse
	option = {
		name = JUNO_brazil_events.32.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				has_war = no
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.34
				days = 1
			}
		}
	}	
}


# FROM agrees to transfer territory
country_event = {
	id = JUNO_brazil_events.33
	title = JUNO_brazil_events.33.t
	desc = JUNO_brazil_events.33.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.33.a
		ai_chance = {
			base = 10
		}
		FROM = {
			every_owned_state = {
				limit = {
					is_controlled_by = PREV
					region = 280
				}
				ROOT = {
					transfer_state = PREV
				}
			}
		}
	}	
}

# FROM refuses to give up territory in Guyana
country_event = {
	id = JUNO_brazil_events.34
	title = JUNO_brazil_events.34.t
	desc = JUNO_brazil_events.34.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Back down
	option = {
		name = JUNO_brazil_events.34.a
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.35
				days = 1
			}
		}
	}	
	# wargoal
	option = {
		name = JUNO_brazil_events.34.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				has_war = yes
			}
		}
		FROM = {
			every_owned_state = {
				limit = {
					is_controlled_by = FROM
					region = 280
				}
				ROOT = {
					create_wargoal = {
						type = take_state_focus
						generator = PREV
						target = FROM
					}
				}
			}

			country_event = {
				id = JUNO_brazil_events.36
				days = 1
			}
			
		}
	}	
}

# Brazil backs down
country_event = {
	id = JUNO_brazil_events.35
	title = JUNO_brazil_events.35.t
	desc = JUNO_brazil_events.35.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.35.a
		ai_chance = {
			base = 10
		}
	}	
}


# Brazil is preparing for war
country_event = {
	id = JUNO_brazil_events.36
	title = JUNO_brazil_events.36.t
	desc = JUNO_brazil_events.36.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.36.a
		ai_chance = {
			base = 10
		}
	}	
}

# Brazilian forces acting suspiciously along the border
country_event = {
	id = JUNO_brazil_events.37
	title = JUNO_brazil_events.37.t
	desc = JUNO_brazil_events.37.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Ignore them
	option = {
		name = JUNO_brazil_events.37.a
		ai_chance = {
			base = 3
			modifier = {
				factor = 0
				any_other_country = {
					has_war_with = ROOT
					is_in_faction_with = FROM
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.39
				hours = 1
			}
		}
	}	
	# wargoal
	option = {
		name = JUNO_brazil_events.37.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				has_war = yes
			}
		}
		declare_war_on = {
			target = FROM
			type = puppet_wargoal_focus
		}	
		FROM = {
			country_event = {
				id = JUNO_brazil_events.38
				hours = 1
			}
		}
	}	
}

# Argentina takes the bait
country_event = {
	id = JUNO_brazil_events.38
	title = JUNO_brazil_events.38.t
	desc = JUNO_brazil_events.38.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.38.a
		ai_chance = {
			base = 10
		}
	}	
}

# Argentina ignore the bait
country_event = {
	id = JUNO_brazil_events.39
	title = JUNO_brazil_events.39.t
	desc = JUNO_brazil_events.39.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.39.a
		ai_chance = {
			base = 10
		}
	}	
	option = {
		name = JUNO_brazil_events.39.b
		trigger = {
			NOT = {
				has_country_flag = BRA_already_attempted_to_provoke_arg
			}
		}
		ai_chance = {
			base = 0
		}
		add_political_power = -50
		FROM = {
			country_event = {
				id = JUNO_brazil_events.37
				days = 50
				random_days = 20
			}
			set_country_flag = BRA_already_attempted_to_provoke_arg	
		}
	}
}

# Brazil demands annexation of Uruguay
country_event = {
	id = JUNO_brazil_events.40
	title = JUNO_brazil_events.40.t
	desc = JUNO_brazil_events.40.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Agree
	option = {
		name = JUNO_brazil_events.40.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.41
				days = 1
			}
		}
	}	
	# Refuse
	option = {
		name = JUNO_brazil_events.40.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 100
				is_in_faction = yes
			}
			modifier = {
				factor = 5
				FROM = {
					has_war = yes
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 0.5
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.42
				days = 1
			}
		}
	}	
}


# Uruguay agrees to be annexed
country_event = {
	id = JUNO_brazil_events.41
	title = JUNO_brazil_events.41.t
	desc = JUNO_brazil_events.41.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.41.a
		ai_chance = {
			base = 10
		}
		annex_country = { 
			target = FROM
			transfer_troops = yes
		}
	}	
}

# Uruguay refuses to be annexed
country_event = {
	id = JUNO_brazil_events.42
	title = JUNO_brazil_events.42.t
	desc = JUNO_brazil_events.42.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Back down
	option = {
		name = JUNO_brazil_events.42.a
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.43
				days = 1
			}
		}
	}	
	# wargoal
	option = {
		name =  JUNO_brazil_events.42.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.2
				has_war_with_major = yes
			}
		}
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
	}	
}

# Brazil backs down
country_event = {
	id = JUNO_brazil_events.43
	title = JUNO_brazil_events.43.t
	desc = JUNO_brazil_events.43.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.43.a
		ai_chance = {
			base = 10
		}
	}	
}


# Brazil is preparing for war
country_event = {
	id = JUNO_brazil_events.44
	title = JUNO_brazil_events.44.t
	desc = JUNO_brazil_events.44.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.44.a
		ai_chance = {
			base = 10
		}
	}	
}


# Brazil wants to puppet paraguay
country_event = {
	id = JUNO_brazil_events.45
	title = JUNO_brazil_events.45.t
	desc = JUNO_brazil_events.45.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Agree
	option = {
		name = JUNO_brazil_events.45.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				FROM = {
					has_war = yes
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.46
				days = 1
			}
		}
	}	
	# Refuse
	option = {
		name = JUNO_brazil_events.45.b
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.47
				days = 1
			}
		}
	}	
}


# Uruguay agrees to be annexed
country_event = {
	id = JUNO_brazil_events.46
	title = JUNO_brazil_events.46.t
	desc = JUNO_brazil_events.46.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.46.a
		ai_chance = {
			base = 10
		}
		puppet = FROM
	}	
}

# Uruguay refuses to be annexed
country_event = {
	id = JUNO_brazil_events.47
	title = JUNO_brazil_events.47.t
	desc = JUNO_brazil_events.47.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Back down
	option = {
		name = JUNO_brazil_events.47.a
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.48
				days = 1
			}
		}
	}	
	# wargoal
	option = {
		name = JUNO_brazil_events.47.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				has_war = yes
			}
		}
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.49
				hours = 1
			}
		}
	}	
}

# Brazil backs down
country_event = {
	id = JUNO_brazil_events.48
	title = JUNO_brazil_events.48.t
	desc = JUNO_brazil_events.48.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.48.a
		ai_chance = {
			base = 10
		}
	}	
}


# Brazil is preparing for war
country_event = {
	id = JUNO_brazil_events.49
	title = JUNO_brazil_events.49.t
	desc = JUNO_brazil_events.49.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.49.a
		ai_chance = {
			base = 10
		}
	}	
}


# FROM invites us to Mercosul
country_event = {
	id = JUNO_brazil_events.50
	title = JUNO_brazil_events.50.t
	desc = JUNO_brazil_events.50.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Accept invite
	option = {
		name = JUNO_brazil_events.50.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0.1
				NOT = {
					has_government = FROM
				}
			}
			modifier = {
				factor = 0
				OR = { 
					has_war_with = FROM 
					is_in_faction = yes
					has_opinion = {
						target = FROM
						value < 0
					}
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 50
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.51
				hours = 1
			}
		}
		set_country_flag = BRA_mercosul_member_flag
	}	
	# Reject invite
	option = {
		name = JUNO_brazil_events.50.b
		ai_chance = {
			base = 5
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.52
				hours = 1
			}
		}
	}
}

# FROM accepts invite to MERCOSUL
country_event = {
	id = JUNO_brazil_events.51
	title = JUNO_brazil_events.51.t
	desc = JUNO_brazil_events.51.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = JUNO_brazil_events.51.a
		ai_chance = {
			base = 10
		}
		add_to_faction = FROM
		FROM = {
			add_ai_strategy = { 
				type = alliance 
				id = ROOT
				value = 400
			}
		}
	}	
}

# FROM refuses invite to MERCOSUL
country_event = {
	id = JUNO_brazil_events.52
	title = JUNO_brazil_events.52.t
	desc = JUNO_brazil_events.52.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.52.a
		ai_chance = {
			base = 10
		}
	}	
}

# FROM refuses to cooperate with Brazil
country_event = {
	id = JUNO_brazil_events.53
	title = JUNO_brazil_events.53.t
	desc = JUNO_brazil_events.53.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.53.a
		ai_chance = {
			base = 10
		}
	}	
}

# Brazil requests unification of kingdoms
country_event = {
	id = JUNO_brazil_events.60
	title = JUNO_brazil_events.60.t
	desc = JUNO_brazil_events.60.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Brazil puppets Portugal
	option = {
		name =  JUNO_brazil_events.60.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OR = {
					has_stability < 50
					has_war = yes
				}
			}
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 0
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.61
				hours = 1
			}
		}
		effect_tooltip = {
			FROM = {
				annex_country = { 
					target = PREV 
					transfer_troops = yes 
				}
			}
		}
	}		
	# Propose Portugese Commonwealth
	option = {
		trigger = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
		name =  JUNO_brazil_events.60.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 10
				has_completed_focus = POR_a_royal_wedding
				OR = {
					has_stability < 70
					has_war = yes
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.62
				hours = 1
			}
		}
		event_option_tooltip = JUNO_brazil_events.64.a
	}
	# Reject proposal completely
	option = {
		name =  JUNO_brazil_events.60.c
		ai_chance = {
			base = 3
			modifier = {
				factor = 10
				AND = {
					is_in_faction = yes
					NOT = { is_in_faction_with = ROOT }
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.63
				hours = 1
			}
		}
	}
}

# portugal accepts unification under Brazilian leadership
country_event = {
	id = JUNO_brazil_events.61
	title = JUNO_brazil_events.61.t
	desc = JUNO_brazil_events.61.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# great!
	option = {
		name =  JUNO_brazil_events.61.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				FROM = {
					has_war = yes
				}
			}
			every_other_country = {
				limit = {
					has_war_with = FROM
				}
				declare_war_on = {
					target = ROOT
					type = puppet_wargoal_focus
				}
			}
		}
		FROM = {
			every_owned_state = {
				limit = {
					is_core_of = POR
				}
				add_core_of = ROOT
			}
		}
		annex_country = { 
			target = FROM
			transfer_troops = yes
		}
		drop_cosmetic_tag = yes
		set_cosmetic_tag = BRA_uk_POR
		#FROM = {
		#	drop_cosmetic_tag = yes
		#	set_cosmetic_tag = POR_const_kingdom_neutrality
		#}
		hidden_effect = {
			news_event = { id = JUNO_brazil_news.3 hours = 1 }
		}
	}		
}

# Portugal proposes commonwealth
country_event = {
	id = JUNO_brazil_events.62
	title = JUNO_brazil_events.62.t
	desc = JUNO_brazil_events.62.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Agree to the commonwealth
	option = {
		name =  JUNO_brazil_events.62.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 5
				OR = {
					has_opinion = {
						target = FROM
						value > 50
					}
					is_in_faction_with = FROM
				}
			}
			modifier = {
				factor = 0
				has_war_with = FROM
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.64
				hours = 1
			}
		}
		event_option_tooltip = JUNO_brazil_events.64.a
	}	
	# Reject commonwealth	
	option = {
		name =  JUNO_brazil_events.62.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.65
				hours = 1
			}
		}
	}
}

# Portugal rejects unification
country_event = {
	id = JUNO_brazil_events.63
	title = JUNO_brazil_events.63.t
	desc = JUNO_brazil_events.63.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Unfortunate
	option = {
		name =  JUNO_brazil_events.63.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_decrease
		}
	}		
}

# Brazil agrees to establish commonwealth
country_event = {
	id = JUNO_brazil_events.64
	title = JUNO_brazil_events.64.t
	desc = JUNO_brazil_events.64.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Unfortunate
	option = {
		name =  JUNO_brazil_events.64.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_increase
		}
		add_ideas = BRA_commonwealth_idea
		give_guarantee = FROM
		add_to_tech_sharing_group = BRA_commonwealth_tech_sharing
		FROM = {
			add_ideas = BRA_commonwealth_idea
			give_guarantee = ROOT
			add_to_tech_sharing_group = BRA_commonwealth_tech_sharing
		}
		hidden_effect = {
			news_event = { id = JUNO_brazil_news.4 hours = 1 }
		}
	}		
}

# Brazil rejects commonwealth
country_event = {
	id = JUNO_brazil_events.65
	title = JUNO_brazil_events.65.t
	desc = JUNO_brazil_events.65.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Unfortunate
	option = {
		name =  JUNO_brazil_events.65.a
		ai_chance = {
			base = 10
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_decrease
		}
	}		
}

# Brazil demands portugese colonies
country_event = {
	id = JUNO_brazil_events.70
	title = JUNO_brazil_events.70.t
	desc = JUNO_brazil_events.70.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# surrender territory
	option = {
		name =  JUNO_brazil_events.70.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					has_war_with = ROOT
				}
			}
			modifier = {
				factor = 0.5
				FROM = {
					has_war = yes
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					TAG = FROM
					ratio > 0.8
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.71
				hours = 1
			}
		}
	}		
	# Refuse
	option = {
		name =  JUNO_brazil_events.70.b
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.72
				hours = 1
			}
		}
	}
}

# Portugal transfers colonies to Brazil
country_event = {
	id = JUNO_brazil_events.71
	title = JUNO_brazil_events.71.t
	desc = JUNO_brazil_events.71.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# great
	option = {
		name =  JUNO_brazil_events.71.a
		ai_chance = {
			base = 10
		}
		POR = {
			every_owned_state = {
				limit = {
					is_fully_controlled_by = PREV
					NOT = {
						is_on_continent = europe
						is_core_of = PREV
					}
				}
				ROOT = {
					transfer_state = PREV
				} 
			}
		}
	}		
}

# Portugal refuses to surrender territory
country_event = {
	id = JUNO_brazil_events.72
	title = JUNO_brazil_events.72.t
	desc = JUNO_brazil_events.72.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Oh well
	option = {
		name =  JUNO_brazil_events.72.a
		ai_chance = {
			base = 2
		}
	}		
	# Get wargoal
	option = {
		name =  JUNO_brazil_events.72.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war = yes
			}
		}
		create_wargoal = {
			target = FROM
			type = annex_everything
		}
	}
}


# Brazil demands portugese be annexed
country_event = {
	id = JUNO_brazil_events.73
	title = JUNO_brazil_events.73.t
	desc = JUNO_brazil_events.73.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# surrender 
	option = {
		name =  JUNO_brazil_events.73.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = {
					has_war_with = ROOT
				}
			}
			modifier = {
				factor = 0.5
				FROM = {
					has_war = yes
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					TAG = FROM
					ratio > 0.8
				}
			}
		}
		effect_tooltip = {
			FROM = {
				puppet = ROOT
				ROOT = {
					load_focus_tree = generic_focus
				}
				ROOT = {
					every_owned_state = {
						limit = {
							is_fully_controlled_by = PREV
							NOT = {
								is_on_continent = europe
								is_core_of = PREV
							}
						}
						FROM = {
							transfer_state = PREV
						} 
					}
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.74
				hours = 1
			}
		}
	}		
	# Refuse
	option = {
		name =  JUNO_brazil_events.73.b
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.75
				hours = 1
			}
		}
	}
}

# Portugal transfers colonies to Brazil
country_event = {
	id = JUNO_brazil_events.74
	title = JUNO_brazil_events.74.t
	desc = JUNO_brazil_events.74.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# great
	option = {
		name =  JUNO_brazil_events.74.a
		ai_chance = {
			base = 10
		}
		puppet = FROM
		FROM = {
			load_focus_tree = generic_focus
			set_politics = {
				ruling_party = neutrality
				#elections_allowed = no
			}
			remove_ideas = POR_estado_novo
			swap_ideas = {
				remove_idea = POR_unstable_republic
				add_idea = POR_unstable_monarchy
			}
			set_country_flag = KOP_kingdom_of_portugal_flag
			set_cosmetic_tag = KOP_kingdom_portugal
			create_country_leader = {
				name = "Duke Duarte Nuno"
				desc = "POLITICS_DOM_DUARTE_NUNO_DESC"
				picture = GFX_portrait_Dom_Duarte_Nuno
				expire = "1976.12.24"
				ideology = despotism
				traits = { 
					#constitutional_monarch_minor
				}
			}
		}
		FROM = {
			every_owned_state = {
				limit = {
					is_fully_controlled_by = PREV
					NOT = {
						is_on_continent = europe
						is_core_of = PREV
					}
				}
				ROOT = {
					transfer_state = PREV
				} 
			}
		}
	}		
}

# Portugal refuses to surrender territory
country_event = {
	id = JUNO_brazil_events.75
	title = JUNO_brazil_events.75.t
	desc = JUNO_brazil_events.75.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Oh well
	option = {
		name =  JUNO_brazil_events.75.a
		ai_chance = {
			base = 2
		}
	}		
	# Get wargoal
	option = {
		name =  JUNO_brazil_events.75.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war = yes
			}
		}
		create_wargoal = {
			target = FROM
			type = annex_everything
		}
	}
}


# Brazil Expands Rio Protocol
country_event = {
	id = JUNO_brazil_events.80
	title = JUNO_brazil_events.80.t
	desc = JUNO_brazil_events.80.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Agree
	option = {
		name =  JUNO_brazil_events.80.a
		ai_chance = {
			base = 2
		}
		diplomatic_relation = {
			country = FROM
			relation = guarantee
			active = yes
		}
		FROM = {
			diplomatic_relation = {
				country = PREV
				relation = guarantee
				active = yes
			}
			country_event = {
				id = JUNO_brazil_events.81
				hours = 1
			}
		}

	}		
	# Reject
	option = {
		name =  JUNO_brazil_events.80.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war = yes
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.82
				hours = 1
			}
		}
	}
}

# FROM Agrees
country_event = {
	id = JUNO_brazil_events.81
	title = JUNO_brazil_events.81.t
	desc = JUNO_brazil_events.81.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Great
	option = {
		name =  JUNO_brazil_events.81.a
		ai_chance = {
			base = 2
		}
	}		
}

# FROM Refuses
country_event = {
	id = JUNO_brazil_events.82
	title = JUNO_brazil_events.82.t
	desc = JUNO_brazil_events.82.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Sad times
	option = {
		name =  JUNO_brazil_events.82.a
		ai_chance = {
			base = 2
		}
	}		
}

country_event = { #FROM invites us to the Organization of American States
	id = JUNO_brazil_events.83
	title = JUNO_brazil_events.83.t
	desc = JUNO_brazil_events.83.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { #Sure
		name = JUNO_brazil_events.83.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 10 
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_opinion = {
						target = FROM
						value < 0
					}
					has_war_with = FROM
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.85
				hours = 1 
			}
		}
		ROOT = {
			add_ideas = SMB_organization_of_american_states_member
			set_country_flag = BRA_organization_of_american_states_member
		}
	}

	option = { #No
		name = JUNO_brazil_events.83.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.84
				hours = 1 
			}
		}
		ROOT = {
			set_country_flag = BRA_rejected_organization_of_american_states
		}
	}
}

country_event = { #FROM rejects
	id = JUNO_brazil_events.84
	title = JUNO_brazil_events.84.t
	desc = JUNO_brazil_events.84.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { #Unfortunate
		name = JUNO_brazil_events.84.a
		ai_chance = {
			base = 1
		}
	}
}

country_event = { #FROM accepts
	id = JUNO_brazil_events.85
	title = JUNO_brazil_events.85.t
	desc = JUNO_brazil_events.85.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { #Splendid!
		name = JUNO_brazil_events.85.a
		ai_chance = {
			base = 1
		}
	}
}

country_event = { #FROM requests SOV aid
	id = JUNO_brazil_events.86
	title = JUNO_brazil_events.86.t
	desc = JUNO_brazil_events.86.desc
	picture = GFX_report_event_stalin_02
	is_triggered_only = yes

	option = { #Sure, we'll help
		name = JUNO_brazil_events.86.a 
		ai_chance = {
			base = 5
			modifier = {
				factor = 0 
				NOT = {
					has_government = communism
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_civil_war = yes
					has_war_with_major = yes
				}
			}
		}

		SOV = {
			add_timed_idea = { 
				idea = BRA_aid_brazilian_communists 
				days = 730 
			}
			add_ai_strategy = {
				type = send_volunteers_desire
				id = BRA
				value = 200
			}
		}

		BRA = {
			country_event = {
				id = JUNO_brazil_events.87
				hours = 3
			}
		}
	}

	option = { #We have better things to do
		name = JUNO_brazil_events.86.b 
		ai_chance = {
			base = 1
		}

		BRA = {
			country_event = {
				id = JUNO_brazil_events.88
				hours = 3 
			}

			add_opinion_modifier = {
				target = SOV
				modifier = medium_decrease
			}
		}
	}
}

country_event = { #SOV accepts call for help
	id = JUNO_brazil_events.87
	title = JUNO_brazil_events.87.t
	desc = JUNO_brazil_events.87.desc
	picture = GFX_report_event_soviet_soldiers
	is_triggered_only = yes

	option = { #We knew they'd help us!
		name = JUNO_brazil_events.87.a 
		ai_chance = {
			base = 1
		}

		BRA = {
			add_opinion_modifier = {
				target = SOV
				modifier = medium_increase
			}
		}

		custom_effect_tooltip = JUNO_brazil_events.87.tt
	}
}

country_event = { #SOV rejects call for help
	id = JUNO_brazil_events.88
	title = JUNO_brazil_events.88.t
	desc = JUNO_brazil_events.88.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes

	option = { #So much for comraderie...
		name = JUNO_brazil_events.88.a 
		ai_chance = {
			base = 1
		}

		custom_effect_tooltip = JUNO_brazil_events.88.tt
	}
}

country_event = { #BRA requests tech sharing
	id = JUNO_brazil_events.120
	title = JUNO_brazil_events.120.t
	desc = JUNO_brazil_events.120.desc
	picture = GFX_report_event_physics_lab_01
	is_triggered_only = yes
	# Sure
	option = { 
		name = JUNO_brazil_events.120.a 
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.121
				hours = 1
			}
		}
		effect_tooltip = {
			IF = {
				limit = {
					FROM = {
						has_completed_focus = BRA_us_brazil_technology_exchange
					}
				}
			
				add_to_tech_sharing_group = BRA_USA_tech_sharing_group
				FROM = {
					add_to_tech_sharing_group = BRA_USA_tech_sharing_group
				}
			}
			IF = {
				limit = {
					FROM = {
						has_completed_focus = BRA_south_american_research_cooperation
					}
				}
				add_to_tech_sharing_group = BRA_south_american_tech_sharing_group
				FROM = {
					add_to_tech_sharing_group = BRA_south_american_tech_sharing_group
				}
			}
		}
	}

	# Nope
	option = { 
		name = JUNO_brazil_events.120.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.122
				hours = 1
			}
		}
		effect_tooltip = {
			FROM = {
				add_cic = 1000
			}
		}
	}
}

country_event = { #USA agrees to share tech
	id = JUNO_brazil_events.121
	title = JUNO_brazil_events.121.t
	desc = JUNO_brazil_events.121.desc
	picture = GFX_report_event_physics_lab_01
	is_triggered_only = yes

	# Sure
	option = { 
		name = JUNO_brazil_events.121.a 
		ai_chance = {
			base = 1
		}
		IF = {
			limit = {
				FROM = {
					has_completed_focus = BRA_us_brazil_technology_exchange
				}
			}
		
			add_to_tech_sharing_group = BRA_USA_tech_sharing_group
			FROM = {
				add_to_tech_sharing_group = BRA_USA_tech_sharing_group
			}
		}
		IF = {
			limit = {
				FROM = {
					has_completed_focus = BRA_south_american_research_cooperation
				}
			}
			add_to_tech_sharing_group = BRA_south_american_tech_sharing_group
			FROM = {
				add_to_tech_sharing_group = BRA_south_american_tech_sharing_group
			}
		}
	}
}

country_event = { #USA refuses to share tech
	id = JUNO_brazil_events.122
	title = JUNO_brazil_events.122.t
	desc = JUNO_brazil_events.122.desc
	picture = GFX_report_event_physics_lab_01
	is_triggered_only = yes

	# Better than nothing
	option = { 
		name = JUNO_brazil_events.122.a
		ai_chance = {
			base = 1
		}
		add_cic = 1000
	}
}


country_event = { #Org member is under attack, should we help?
	id = JUNO_brazil_events.130
	title = JUNO_brazil_events.130.t
	desc = JUNO_brazil_events.130.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes



	option = { # Of course!
		name = JUNO_brazil_events.130.a 
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				OR = {
					any_other_country = {
						has_war_with = FROM
						is_in_faction_with = ROOT
					}
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value > 40
				}
			}
			modifier = {
				factor = 10
				has_government = FROM
			}
		}
		# FROM = attacker
		# global.org_africa_attacked_country is defender
		# ROOT = called country (i.e. the one getting the event)
		var:global.org_american_unity_attacked_country = {
			ROOT = {
				add_to_war = {
					targeted_alliance = PREV
					enemy = FROM 
					hostility_reason = ally
				}
			}
			country_event = {
				id = JUNO_brazil_events.131
				hours = 1
			}
		}
	}
	option = { # We can not
		name = JUNO_brazil_events.130.b
		ai_chance = {
			base = 3
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		var:global.org_american_unity_attacked_country = {
			country_event = {
				id = JUNO_brazil_events.132
				hours = 1
			}
		}
		remove_ideas = SMB_organization_of_american_states_member
	}
}




country_event = { #Org member comes to our aid
	id = JUNO_brazil_events.131
	title = JUNO_brazil_events.131.t
	desc = JUNO_brazil_events.131.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { # Of course they did!
		name = JUNO_brazil_events.131.a 
		ai_chance = {
			base = 1
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_increase
		}
	}
}

country_event = { #Org member refuses to come to our aid
	id = JUNO_brazil_events.132
	title = JUNO_brazil_events.132.t
	desc = JUNO_brazil_events.132.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { # How rude!
		name = JUNO_brazil_events.132.a 
		ai_chance = {
			base = 1
		}
		add_opinion_modifier = {
			target = FROM
			modifier = large_decrease
		}
	}
}


country_event = { #Kicked from org for declaring war on another state
	id = JUNO_brazil_events.133
	title = JUNO_brazil_events.133.t
	desc = JUNO_brazil_events.133.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = { # How rude!
		name = JUNO_brazil_events.133.a 
		ai_chance = {
			base = 1
		}
		every_other_country = {
			limit = {
				has_idea = SMB_organization_of_american_states_member
			}
			add_opinion_modifier = {
				target = ROOT
				modifier = large_decrease
			}
		}
		remove_ideas = SMB_organization_of_american_states_member
	}
}

country_event = { #Brazil requests economic aid from the Soviets
	id = JUNO_brazil_events.134
	title = JUNO_brazil_events.134.t
	desc = JUNO_brazil_events.134.desc
	picture = GFX_report_event_stalin_02
	is_triggered_only = yes

	option = { # Sure
		name = JUNO_brazil_events.134.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 29
				}
			}
			modifier = {
				factor = 2
				has_government = communism
			}

			modifier = {
				factor = 0
				SOU = {
					OR = {
						has_war_with_major = yes
						has_civil_war = yes
					}
				}
			}
		}

		add_political_power = -25

		BRA = {
			
			country_event = {
				id = JUNO_brazil_events.135
				hours = 3 
			}
			add_opinion_modifier = {
				target = SOU
				modifier = large_increase
			}
		}

		custom_effect_tooltip = JUNO_brazil_events.134.tt
	}

	option = { # why bother?
		name = JUNO_brazil_events.134.b
		ai_chance = {
			base = 1
		}

		
		BRA = {
			country_event = {
				id = JUNO_brazil_events.136
				hours = 3 
			}
			add_opinion_modifier = {
				target = SOU
				modifier = large_decrease
			}
		}
	}
}

country_event = { #Soviet agrees
	id = JUNO_brazil_events.135
	title = JUNO_brazil_events.135.t
	desc = JUNO_brazil_events.135.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = JUNO_brazil_events.135.a
		ai_chance = {
			base = 1
		}

		add_ideas = BRA_license_soviet_designs

		custom_effect_tooltip = JUNO_brazil_events.135.tt
	}
}

country_event = { #Soviet rejects
	id = JUNO_brazil_events.136
	title = JUNO_brazil_events.136.t
	desc = JUNO_brazil_events.136.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes

	option = {
		name = JUNO_brazil_events.136.a
		ai_chance = {
			base = 1
		}

		custom_effect_tooltip = JUNO_brazil_events.136.tt
	}
}

country_event = { #Brazil demands FROM releases territories in SA
	id = JUNO_brazil_events.137
	title = JUNO_brazil_events.137.t
	desc = JUNO_brazil_events.137.desc
	picture = GFX_report_event_communist_leader
	is_triggered_only = yes

	option = { #Fine
		name = JUNO_brazil_events.137.a
		ai_chance = {
			base = 1
			modifier = { #communists don't usually want colonies, and they stick together I guess?
				factor = 10
				has_government = communism
			}
			modifier = {
				factor = 10
				has_government = democratic
			}
			modifier = {
				factor = 5
				has_war_with_major = yes
			}
			modifier = {
				factor = 0.5
				has_government = neutrality
			}
			modifier = { #fascist countries wouldn't do this
				factor = 0.1
				OR = {
					has_government = fascism
					#has_government = neutrality
				}
			}
		}

		ROOT = { #the country getting the demand
			release = event_target:BRA_country_to_be_liberated #the event target is saved from the FROM tag in the decision			
		}

		FROM = {
			country_event = {
				id = JUNO_brazil_events.138
				hours = 3
			}
		}
	}

	option = { #nope. whatcha gonna do bout it?
		name = JUNO_brazil_events.137.b
		ai_chance = {
			base = 1
		}

		custom_effect_tooltip = JUNO_brazil_events.137.b.tt

		FROM = {
			country_event = {
				id = JUNO_brazil_events.139
				hours = 3
			}
		}
	}
}

country_event = { #FROM accepts
	id = JUNO_brazil_events.138
	title = JUNO_brazil_events.138.t
	desc = JUNO_brazil_events.138.desc
	picture = GFX_report_event_communists_cheer
	is_triggered_only = yes

	option = { #Good boi
		name = JUNO_brazil_events.138.a
		
		event_target:BRA_country_to_be_liberated = {
			add_ideas = BRA_liberated_by_communist_brazil
		}
	}
}
			
country_event = { #FROM rejects
	id = JUNO_brazil_events.139
	title = JUNO_brazil_events.139.t
	desc = JUNO_brazil_events.139.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = { #so they want to die?
		name = JUNO_brazil_events.139.a
		create_wargoal = {
			type = liberate_wargoal
			target = FROM
		}
	}
}

country_event = { #Brazilian diplomatic mission
	id = JUNO_brazil_events.140
	title = JUNO_brazil_events.140.t
	desc = JUNO_brazil_events.140.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# Agree to agreement
	option = {
		name = JUNO_brazil_events.140.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				OR = {
					is_in_faction_with = FROM
					has_war_with_major = yes
					AND = {
						any_country = {
							has_war_with = FROM
							has_war_with = ROOT
						}
					}
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_war_with = FROM
					any_country = {
						is_in_faction_with = ROOT
						has_war_with = FROM
					}
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 50
				}
			}
		}
		set_country_flag = BRA_jaguar_diplomacy_enacted
		FROM = {
			country_event = {
				id = JUNO_brazil_events.141
				hours = 1
			}
		}
		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BRA_jaguar_diplomacy_political
			}
			add_opinion_modifier = {
				target = FROM
				modifier = BRA_jaguar_diplomacy_economic
			}
			diplomatic_relation = { 
				country = FROM #target country
				relation = non_aggression_pact
				active = yes #yes to add relation, no to cancel existing one
			}
		}
	}

	# Reject agreement
	option = {
		name = JUNO_brazil_events.140.b
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.142
				hours = 1
			}
		}
	}
}

country_event = { #good mission
	id = JUNO_brazil_events.141
	title = JUNO_brazil_events.141.t
	desc = JUNO_brazil_events.141.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# Excellent!
	option = {
		name = JUNO_brazil_events.141.a
		ai_chance = {
			base = 1
		}
		clr_country_flag = BRA_jaguar_diplomacy_in_progress
		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BRA_jaguar_diplomacy_political
			}
			add_opinion_modifier = {
				target = ROOT
				modifier = BRA_jaguar_diplomacy_economic
			}
			diplomatic_relation = { 
				country = ROOT #target country
				relation = non_aggression_pact
				active = yes #yes to add relation, no to cancel existing one
			}
		}
	}
}

country_event = { #Bad mission
	id = JUNO_brazil_events.142
	title = JUNO_brazil_events.142.t
	desc = JUNO_brazil_events.142.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# A pity
	option = {
		name = JUNO_brazil_events.142.a
		ai_chance = {
			base = 1
		}
		clr_country_flag = BRA_jaguar_diplomacy_in_progress
	}
}

country_event = { #Brazil promoting communism
	id = JUNO_brazil_events.143
	title = JUNO_brazil_events.143.t
	desc = JUNO_brazil_events.143.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# worrying
	option = {
		name = JUNO_brazil_events.143.a
		ai_chance = {
			base = 1
		}
		custom_effect_tooltip = brazil_promoting_communism_tt
		set_country_flag = BRA_influencing_us
	}
}

country_event = { #FROM countering communism influence
	id = JUNO_brazil_events.144
	title = JUNO_brazil_events.144.t
	desc = JUNO_brazil_events.144.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# unfortunate
	option = {
		name = JUNO_brazil_events.144.a
		ai_chance = {
			base = 1
		}
	}
}

country_event = { #cangaceiro raid/spread
	id = JUNO_brazil_events.150
	title = JUNO_brazil_events.150.t
	desc = {
		text = JUNO_brazil_events.150.desc.a
		trigger = {
			OR = {
				has_country_flag = BRA_cangaceiro_small_raid_flag
				has_country_flag = BRA_cangaceiro_big_raid_flag
			}
		}
	}
	desc = {
		text = JUNO_brazil_events.150.desc.b
		trigger = {
			has_country_flag = BRA_cangaceiro_spread_flag
		}
	}
	picture = GFX_report_event_BRA_cangaco
	is_triggered_only = yes

	option = {
		name = JUNO_brazil_events.150.a
		trigger = {
			has_country_flag = BRA_cangaceiro_small_raid_flag
		}
		ai_chance = {
			base = 1
		}
		add_stability = -0.02
		clr_country_flag = BRA_cangaceiro_small_raid_flag
		hidden_effect = {
			activate_mission = BRA_cangaceiro_mission
		}
	}
	option = {
		name = JUNO_brazil_events.150.b
		trigger = {
			has_country_flag = BRA_cangaceiro_big_raid_flag
		}
		ai_chance = {
			base = 1
		}
		add_stability = -0.05
		clr_country_flag = BRA_cangaceiro_big_raid_flag
		hidden_effect = {
			activate_mission = BRA_cangaceiro_mission
		}
	}
	option = {
		name = JUNO_brazil_events.150.c
		trigger = {
			has_country_flag = BRA_cangaceiro_spread_flag
		}
		ai_chance = {
			base = 1
		}
		random_owned_controlled_state = {
			limit = {
				OR = {
					state = 937
					state = 935
					state = 498
					state = 936
					state = 499
				}
				NOT = {
					has_dynamic_modifier = {
						modifier = BRA_cangaceiro_state
					}
				}
			}
			add_dynamic_modifier = {
				modifier = BRA_cangaceiro_state
			}
		}
		clr_country_flag = BRA_cangaceiro_spread_flag
		hidden_effect = {
			activate_mission = BRA_cangaceiro_mission
		}
	}
}

country_event = { #Anti-cangaceiro operation success
	id = JUNO_brazil_events.151
	title = JUNO_brazil_events.151.t
	desc = JUNO_brazil_events.151.desc
	picture = GFX_report_event_BRA_cangaco
	is_triggered_only = yes

	# great
	option = {
		name = JUNO_brazil_events.151.a
		ai_chance = {
			base = 1
		}
	}
}

country_event = {
	id = JUNO_brazil_events.152
	title = JUNO_brazil_events.152.t
	desc = JUNO_brazil_events.152.desc
	picture = GFX_report_event_BRA_cangaco
	is_triggered_only = yes

	# great
	option = {
		name = JUNO_brazil_events.152.a
		ai_chance = {
			base = 1
		}
		custom_effect_tooltip = BRA_end_of_cangaco_tt
		add_stability = 0.500
		add_political_power = 1000.000
		army_experience = 500.000
	}
}

country_event = {
	id = JUNO_brazil_events.153
	title = JUNO_brazil_events.153.t
	desc = JUNO_brazil_events.153.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# ok
	option = {
		name = JUNO_brazil_events.153.a
		ai_chance = {
			base = 1
		}
		custom_effect_tooltip = JUNO_brazil_events_153_tt
	}
}

#Brazil wants MIO
country_event = {
	id = JUNO_brazil_events.160
	title = JUNO_brazil_events.160.t
	desc = JUNO_brazil_events.160.desc
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes

	# yes
	option = {
		name = JUNO_brazil_events.160.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				is_in_faction_with = FROM
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.161
				hours = 1
			}
		}	
		add_offsite_building = { type = industrial_complex level = 10.000 }
		effect_tooltip = {
			IF = {
				limit = {
					original_tag = USA
				}
				custom_effect_tooltip = JUNO_brazil_events_160_tt
				show_mio_tooltip = USA_marmon_herrington_organization
				show_mio_tooltip = USA_north_american_aviation_organization
				show_mio_tooltip = USA_newport_news_shipbuilding_organization
			}
			IF = {
				limit = {
					original_tag = ENG
				}
				custom_effect_tooltip = JUNO_brazil_events_160_tt
				show_mio_tooltip = ENG_vauxhall_organization
				show_mio_tooltip = ENG_cammell_laird_organization
				show_mio_tooltip = ENG_avro_organization
			}
			IF = {
				limit = {
					original_tag = FRA
				}
				custom_effect_tooltip = JUNO_brazil_events_160_tt
				show_mio_tooltip = FRA_acf_organization
				show_mio_tooltip = FRA_bloch_organization
				show_mio_tooltip = FRA_renault_organization
			}
			IF = {
				limit = {
					original_tag = SWE
				}
				custom_effect_tooltip = JUNO_brazil_events_160_tt
				show_mio_tooltip = SWE_saab_organization			
				show_mio_tooltip = SWE_landsverk_organization
				show_mio_tooltip = SWE_gotaverken_organization
				show_mio_tooltip = SWE_scania_vabis_organization
			}
		}
	}
	# no
	option = {
		name = JUNO_brazil_events.160.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.162
				hours = 1
			}
		}		
	}
}

country_event = {
	id = JUNO_brazil_events.161
	title = JUNO_brazil_events.161.t
	desc = JUNO_brazil_events.161.desc
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes

	# army
	option = {
		name = JUNO_brazil_events.161.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_completed_focus = SMB_foreign_advisors
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = USA
				}
			}
		}
		clr_country_flag = BRA_invite_company_in_progress
		BRA_mio_military_factory = yes
		IF = {
			limit = {
				FROM = {
					original_tag = USA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_marmon_herrington_mio_flag
			show_mio_tooltip = USA_marmon_herrington_organization
			mio:USA_marmon_herrington_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = ENG
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_vauxhall_mio_flag
			show_mio_tooltip = ENG_vauxhall_organization
			mio:ENG_vauxhall_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = FRA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_renault_mio_flag
			show_mio_tooltip = FRA_renault_organization
			mio:FRA_renault_organization = {
				add_mio_size = 20.000
			}
		}
		IF ={
			limit = {
				FROM = {
					original_tag = SWE
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_landsverk_mio_flag
			show_mio_tooltip = SWE_landsverk_organization
			mio:SWE_landsverk_organization = {
				add_mio_size = 20.000
			}
		}
	}
	# airforce
	option = {
		name = JUNO_brazil_events.161.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5 
				has_completed_focus = SMB_flying_fortress
			}
		}
		clr_country_flag = BRA_invite_company_in_progress
		BRA_mio_military_factory = yes
		IF = {
			limit = {
				FROM = {
					original_tag = USA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_invited_north_american_aviation_mio_flag
			show_mio_tooltip = USA_north_american_aviation_organization
			mio:USA_north_american_aviation_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = ENG
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_avro_mio_flag
			show_mio_tooltip = ENG_avro_organization
			mio:ENG_avro_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = FRA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_bloch_mio_flag
			show_mio_tooltip = FRA_bloch_organization
			mio:FRA_bloch_organization = {
				add_mio_size = 20.000
			}
		}
		IF ={
			limit = {
				FROM = {
					original_tag = SWE
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_saab_mio_flag
			show_mio_tooltip = SWE_saab_organization
			mio:SWE_saab_organization = {
				add_mio_size = 20.000
			}
		}
	}
	# navy
	option = {
		name = JUNO_brazil_events.161.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_completed_focus = SMB_reescalate_the_naval_arms_race
			}
		}
		clr_country_flag = BRA_invite_company_in_progress
		random_owned_controlled_state = {
			limit = { 
				is_coastal = yes 
				free_building_slots = {
					building = dockyard
					size > 1
					include_locked = yes
				}
				NOT = {
					has_dynamic_modifier = {
						modifier = BRA_neglected_state_dynamic_modifier
					}
				}
			}
			add_building_construction = {
				type = dockyard
				level = 10.000
				instant_build = yes
			}
			add_extra_state_shared_building_slots = 10.000
		}
		IF = {
			limit = {
				FROM = {
					original_tag = USA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_newport_news_shipbuilding_mio_flag
			show_mio_tooltip = USA_newport_news_shipbuilding_organization
			mio:USA_newport_news_shipbuilding_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = ENG
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_cammell_laird_mio_flag
			show_mio_tooltip = ENG_cammell_laird_organization
			mio:ENG_cammell_laird_organization = {
				add_mio_size = 20.000
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = FRA
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_acf_mio_flag
			show_mio_tooltip = FRA_acf_organization
			mio:FRA_acf_organization = {
				add_mio_size = 20.000
			}
		}
		IF ={
			limit = {
				FROM = {
					original_tag = SWE
				}
			}
			FROM = {
				set_country_flag = BRA_already_sent_mio
			}
			set_country_flag = has_gotaverken_mio_flag
			show_mio_tooltip = SWE_gotaverken_organization
			mio:SWE_gotaverken_organization = {
				add_mio_size = 20.000
			}
		}
	}

	# armored car
	option = {
		name = JUNO_brazil_events.161.d
		trigger = {
			has_dlc = "La Resistance"
			FROM = {
				original_tag = SWE
			}
		}
		ai_chance = {
			base = 1
		}
		clr_country_flag = BRA_invite_company_in_progress
		BRA_mio_military_factory = yes
		FROM = {
			set_country_flag = BRA_already_sent_mio
		}
		set_country_flag = has_scania_vabis_mio_flag
		show_mio_tooltip = SWE_scania_vabis_organization
		mio:SWE_scania_vabis_organization = {
			add_mio_size = 20.000
		}		
	}
}

country_event = {
	id = JUNO_brazil_events.162
	title = JUNO_brazil_events.162.t
	desc = JUNO_brazil_events.162.desc
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes

	# ok
	option = {
		name = JUNO_brazil_events.162.a
		ai_chance = {
			base = 1
		}
	}
}

country_event = {
	id = JUNO_brazil_events.163
	title = JUNO_brazil_events.163.t
	desc = JUNO_brazil_events.163.desc
	picture = GFX_report_event_worker_protests
	is_triggered_only = yes

	# pro-labor
	option = {
		name = JUNO_brazil_events.163.a
		ai_chance = {
			base = 1
		}
		add_ideas = BRA_pro_labor_agreement
	}
	# anti-labor
	option = {
		name = JUNO_brazil_events.163.b
		ai_chance = {
			base = 1
		}
		BRA_mio_military_factory = yes
		BRA_mio_military_factory = yes
		add_war_support = 1.500
		add_stability = -0.05
	}
}

country_event = { #FROM wants us to join USSA
	id = JUNO_brazil_events.170
	title = JUNO_brazil_events.170.t
	desc = JUNO_brazil_events.170.desc
	picture = GFX_report_event_generic_sign_treaty3
	is_triggered_only = yes

	option = {
		name = JUNO_brazil_events.170.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				OR = {
					has_war_with = FROM
					capital_scope = {
						NOT = {
							is_on_continent = south_america
						}
					}
					NOT = {
						is_in_faction_with = FROM
					}
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value > 80
				}
			}
		}
		effect_tooltip = {
			FROM = {
				annex_country = {
					target = ROOT
					transfer_troops = yes
				}
			}
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.171
				hours = 1
			}
		}
	}
	option = {
		name = JUNO_brazil_events.170.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = JUNO_brazil_events.172
				hours = 1
			}
		}
	}
}

country_event = {
	id = JUNO_brazil_events.171
	title = JUNO_brazil_events.171.t
	desc = JUNO_brazil_events.171.desc
	picture = GFX_report_event_generic_sign_treaty3
	is_triggered_only = yes

	# annex them
	option = {
		name = JUNO_brazil_events.171.a
		ai_chance = {
			base = 1
		}
		FROM = {
			every_owned_state = {
				limit = {
					is_core_of = PREV
				}
				add_core_of = ROOT
			}
			clr_country_flag = BRA_target_which_is_currently_being_integrated
		}
		annex_country = {
			target = FROM
			transfer_troops = yes
		}
		clr_country_flag = BRA_invite_country_in_progress
	}
}

country_event = {
	id = JUNO_brazil_events.172
	title = JUNO_brazil_events.172.t
	desc = JUNO_brazil_events.172.desc
	picture = GFX_report_event_generic_sign_treaty3
	is_triggered_only = yes

	# oh no
	option = {
		name = JUNO_brazil_events.172.a
		ai_chance = {
			base = 1
		}
		FROM = {
			clr_country_flag = BRA_target_which_is_currently_being_integrated
		}
		clr_country_flag = BRA_invite_country_in_progress
	}
}

#US goes communist
country_event = {
	id = JUNO_brazil_events.180
	title = JUNO_brazil_events.180.t
	desc = JUNO_brazil_events.180.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	immediate = {
		set_country_flag = BRA_ford_event_has_happened
	}
	option = {
		name =  JUNO_brazil_events.180.a
		ai_chance = {
			base = 10
		}
		set_country_flag = BRA_ford_settled_here_flag
		show_ideas_tooltip = BRA_henry_ford

		mio:USA_ford_motor_company_organization = {
			add_mio_size = 20.000
		}
	}
	option = {
		name =  JUNO_brazil_events.180.b
		ai_chance = {
			base = 10
		}		
		#No thanks 
		add_stability = 0.500
	}
}

#Portugal attempting to promote monarchism
country_event = {
	id = JUNO_brazil_events.190
	title = JUNO_brazil_events.190.t
	desc = JUNO_brazil_events.190.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	# This is in our interests
	option = {
		name =  JUNO_brazil_events.190.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_government = communism
			}
		}
		add_timed_idea = {
		    idea = POR_monarchists_on_the_rise
		    days = 730
		}
		set_party_name = { 
		    ideology = neutrality
		    long_name = BRA_monarchy_party_long
		    name = BRA_monarchy_party
		}
		set_party_name = { 
		    ideology = fascism
		    long_name = BRA_antimonarchist_coalition_long
		    name = BRA_antimonarchist_coalition
		}
		BRA_getulio_vargas = {
			remove_country_leader_role = {
				ideology = despotism
			}
			add_country_leader_role = {
				country_leader = {
					expire = "1954.8.24"
					ideology = fascism_ideology
					traits = {
						BRA_reluctant_integralist
					}
				}
				promote_leader = yes
			}
		}
		promote_character = BRA_arlindo_veiga_dos_santos

	}
	# crack down on monarchism
	option = {
		name =  JUNO_brazil_events.190.b
		ai_chance = {
			base = 0
			modifier = {
				add = 1
				has_government = communism
			}
		}		
		#There's nothing we can do 
		add_stability = 0.200
		set_country_flag = BRA_rejected_monarchism
		FROM = {
			country_event = {
				id = JUNO_brazil_events.191
				days = 7
			}
		}
	}
}

#Brazil clamps down on monarchism
country_event = {
	id = JUNO_brazil_events.191
	title = JUNO_brazil_events.191.t
	desc = JUNO_brazil_events.191.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  JUNO_brazil_events.191.a
		ai_chance = {
			base = 10
		}
	}
}

country_event = {
	id = JUNO_brazil_events.200
	title = JUNO_brazil_events.200.t
	desc = JUNO_brazil_events.200.desc
	picture = GFX_report_event_election_vote
	is_triggered_only = yes
	# BRA_ansio_teixeira
	immediate = {
		BRA_select_leader_flag = yes
		hidden_effect = {
			set_politics = {
				ruling_party = democratic
				election_frequency = 48
				elections_allowed = yes
			}
			country_event = {
				id = JUNO_brazil_events.202
				months = 48
			}
		}
	}
	option = {
		name = JUNO_brazil_events.200.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = BRA_anisio_teixeira
					}
				}
			}
			add_country_leader_role = {
				character = BRA_anisio_teixeira
				promote_leader = yes
				country_leader = {
					ideology = liberalism
					expire = "1965.1.1"
					traits =  { BRA_education_pioneer }
				}
			}
			BRA_clr_country_leader_role = yes
			BRA_clear_leader_flags = yes
	
		}
	}
	# BRA_armando_de_sales_oliveira
	option = {
		name = JUNO_brazil_events.200.b
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = BRA_armando_de_sales_oliveira
					}
				}
			}

			add_country_leader_role = {
				character = BRA_armando_de_sales_oliveira
				promote_leader = yes
				country_leader = {
					ideology = liberalism
					expire = "1965.1.1"
					traits =  { BRA_democratic_engineer }
				}
			}
			BRA_clr_country_leader_role = yes
			BRA_clear_leader_flags = yes

		}
	}	
	# BRA_minervino_de_oliveira
	option = {
		name = JUNO_brazil_events.200.c
		trigger = {
			OR = {
				has_completed_focus = BRA_free_speech
				has_completed_focus = BRA_prepare_for_second_intentona
			}
		}
		ai_chance = {
			base = 0
		}
		IF = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = BRA_minervino_de_oliveira
					}
				}
			}
			add_country_leader_role = {
				character = BRA_minervino_de_oliveira
				promote_leader = yes
				country_leader = {
					ideology = socialism
					expire = "1965.1.1"
					traits =  { ICE_trade_unionist }
				}
			}
			BRA_clr_country_leader_role = yes
			BRA_clear_leader_flags = yes
		}
	}	
	# BRA_lindolfo_collor
	option = {
		name = JUNO_brazil_events.200.d
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = BRA_lindolfo_collor
					}
				}
			}
			add_country_leader_role = {
				character = BRA_lindolfo_collor
				promote_leader = yes
				country_leader = {
					ideology = liberalism
					expire = "1965.1.1"
					traits =  { BRA_anti_authoritarian }
				}
			}
			BRA_clr_country_leader_role = yes
			BRA_clear_leader_flags = yes
		}
	}
	# BRA_eurico_gaspar_dutra
	option = {
		name = JUNO_brazil_events.200.e
		trigger = {
			has_completed_focus = BRA_posts_for_generals
		}
		ai_chance = {
			base = 0
		}
		IF = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = BRA_eurico_gaspar_dutra
					}
				}
			}
			add_country_leader_role = {
				character = BRA_eurico_gaspar_dutra
				promote_leader = yes
				country_leader = {
					ideology = conservatism
					expire = "1965.1.1"
					traits =  { war_industrialist }
				}
			}
			BRA_clr_country_leader_role = yes
			BRA_clear_leader_flags = yes
		}
	}	
}

country_event = {
	id = JUNO_brazil_events.201
	title = JUNO_brazil_events.201.t
	desc = JUNO_brazil_events.201.d
	picture = GFX_report_event_election_vote

	trigger = {
		has_dlc = "Trial of Allegiance"
		original_tag = BRA
		# Testing Date		
		#date > 1936.02.01

		# Actual Date
		date > 1938.07.01

		has_government = democratic
		has_completed_focus	= BRA_repeal_the_national_security_law
		NOT = {
			OR = {
				has_completed_focus = BRA_romanticize_the_old_empire
				has_completed_focus = BRA_tribunal_de_seguranca_nacional
				has_completed_focus = BRA_launch_the_revolution
			}
		}
	}

	mean_time_to_happen = { days = 1 }

	hidden = yes

	fire_only_once = yes

	immediate = {
		country_event = {
			id = JUNO_brazil_events.200
			days = 1
			#random_days = 5
		}
	}
}

country_event = {
	id = JUNO_brazil_events.202
	title = JUNO_brazil_events.202.t
	desc = JUNO_brazil_events.202.d
	picture = GFX_report_event_election_vote

	mean_time_to_happen = { days = 1 }

	hidden = yes

	fire_only_once = no
	is_triggered_only = yes

	immediate = {
		IF = {
			limit = {
				has_government = democratic
				has_completed_focus = BRA_repeal_the_national_security_law
			}
			country_event = {
				id = JUNO_brazil_events.200
				days = 1
			}
		}
	}
}

# Brazil taking dominate americas path - news
news_event = {
	id = JUNO_brazil_news.1
	title = JUNO_brazil_news.1.t
	desc = JUNO_brazil_news.1.d
	picture = GFX_news_event_german_speech
	
	major = no
	
	is_triggered_only = yes
	
	option = {
		name = JUNO_brazil_news.1.a
	}
} 

news_event = { # Brazil finishes Constitutional Monarchy focus
	id = JUNO_brazil_news.2
	title = JUNO_brazil_news.2.t
	desc = JUNO_brazil_news.2.d
	picture = GFX_news_event_por_return_of_monarchy

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

news_event = {
	id = JUNO_brazil_news.3
	title = JUNO_brazil_news.3.t
	desc = JUNO_brazil_news.3.d
	picture = GFX_news_event_por_return_of_monarchy

	major = yes

	is_triggered_only = yes

	option = {
		name = JUNO_brazil_news.3.a
	}

}

news_event = {
	id = JUNO_brazil_news.4
	title = JUNO_brazil_news.4.t
	desc = JUNO_brazil_news.4.d
	picture = GFX_news_event_por_return_of_monarchy

	major = yes

	is_triggered_only = yes

	option = {
		name = JUNO_brazil_news.4.a
	}
}

news_event = {
	id = JUNO_brazil_news.5
	title = JUNO_brazil_news.5.t
	desc = JUNO_brazil_news.5.d
	picture = GFX_news_event_soviet_soldiers_ruins

	major = yes

	is_triggered_only = yes

	option = {
		name = JUNO_brazil_news.5.a
	}
}

news_event = {
	id = JUNO_brazil_news.6
	title = JUNO_brazil_news.6.t
	desc = JUNO_brazil_news.6.d
	picture = GFX_news_event_soviet_soldiers_ruins

	major = yes

	is_triggered_only = yes

	option = {
		name = JUNO_brazil_news.6.a
	}
}

