add_namespace = brazil

# Eneas dies
country_event = {
	id = brazil.1
	title = brazil.1.t
	desc = brazil.1.d
	picture = GFX_report_event_eneas_dead
	
	trigger = {
		tag = BRA
		date > 2007.5.06
		date < 2007.5.31
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.1.a
	        set_party_name = { ideology = nationalist long_name = "Alto Comando do Exército Brasileiro" name = "ACEB" }
		create_country_leader = {
			name = "Eduardo Dias Villas Boas"
			desc = ""
			picture = "generals/Portrait_Eduardo_Villas_Boas.dds"
			expire = "2020.1.1"
			ideology = autocrat
			traits = { military_theorist }
		}		
		}
	}
	
country_event = {
	id = brazil.2
	title = brazil.2.t
	desc = brazil.2.d
	picture = GFX_report_event_brizola_dead
	
	trigger = {
		tag = BRA
		date > 2004.6.21
		date < 2004.7.21
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.2.a
		create_country_leader = {
			name = "Ciro Gomes"
			desc = ""
			picture = "Portrait_Brazil_Ciro2.dds"
			expire = "2020.1.1"
			ideology = social_democrat_ideology
			traits = { smooth_talking_charmer }
		}		
		}
	}
	
country_event = {            #PSDB 
	id = brazil.3
	title = brazil.3.t
	desc = brazil.3.d
	picture = GFX_report_event_PSDB_2018
	
	trigger = {
		tag = BRA
		date > 2017.6.6
		date < 2017.7.6
	}	

	fire_only_once = yes

	#mean_time_to_happen = { days = 7 }
	
	option = {
		name = brazil.3.a
		ai_chance = {
		factor = 25
	}			
		create_country_leader = {
			name = "Joao Doria"
			desc = ""
			picture = "Portrait_Brazil_Doria.dds"
			expire = "2020.1.1"
			ideology = liberalist
			traits = { smooth_talking_charmer }
		}		
	}
		
	option = {
		name = brazil.3.b
		ai_chance = {
		factor = 25
	}			
		create_country_leader = {
			name = "Geraldo Alckmin"
			desc = ""
			picture = "Portrait_Brazil_Alckmin.dds"
			expire = "2020.1.1"
			ideology = liberalist
			traits = {  }
		}		
	}

    option = {
		name = brazil.3.c
		ai_chance = {
		factor = 25
	}			
		create_country_leader = {
			name = "Jose Serra"
			desc = ""
			picture = "Portrait_Brazil_Serra.dds"
			expire = "2020.1.1"
			ideology = liberalist
			traits = {  }
		}		
	}
    option = {
		name = brazil.3.e
		ai_chance = {
		factor = 25
	}			
		create_country_leader = {
			name = "Aécio Neves"
			desc = ""
			picture = "Portrait_Brazil_Serra.dds"
			expire = "2020.1.1"
			ideology = liberalist
			traits = {  }
		}		
	}	
    }
	
country_event = {            #PT
	id = brazil.4
	title = brazil.4.t
	desc = brazil.4.d
	picture = GFX_report_event_PT_2018
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		date > 2017.7.6
		date < 2017.8.6
	}	

	fire_only_once = yes

	#mean_time_to_happen = { days = 7 }
	
	option = {
		name = brazil.4.a
		ai_chance = {
		factor = 25
	}	
		create_country_leader = {
			name = "Luiz Inacio Lula da Silva"
			desc = ""
			picture = "Portrait_Brazil_Lula.dds"
			expire = "2020.1.1"
			ideology = democratic_socialist_ideology
			traits = { }
		}		
	}
		
	option = {
		name = brazil.4.b
		ai_chance = {
		factor = 25
	}		
		create_country_leader = {
			name = "Fernando Haddad"
			desc = ""
			picture = "Portrait_Brazil_Haddad.dds"
			expire = "2020.1.1"
			ideology = democratic_socialist_ideology
			traits = {  }
		}		
	}

    option = {
		name = brazil.4.c
		ai_chance = {
		factor = 25
	}		
		create_country_leader = {
			name = "Fernando Pimentel"
			desc = ""
			picture = "Pimentel.dds"
			expire = "2020.1.1"
			ideology = democratic_socialist_ideology
			traits = {  }
		}		
	}	
}
	

country_event = {            #MONARCHY
	id = brazil.6
	title = brazil.6.t
	desc = brazil.6.d
	picture = GFX_report_event_monarquia
	
	is_triggered_only = no
	fire_only_once = yes
	
	trigger = {
		tag = BRA
		monarchist > 0.25
		NOT = {
			has_government = monarchist
			has_idea = BRA_monarchy
		}
		is_puppet = no
	}
	
	# mean_time_to_happen = {
	# 	days = 14
	# }
	
	option = {
		name = brazil.6.a
		ai_chance = {
		factor = 40
	    }	

        if = {
		custom_effect_tooltip = BRA_monarquia_1
		add_ideas = BRA_monarchy
		remove_ideas = BRA_1993
		country_event = { days = 14 id = brazil.7 }	
		hidden_effect = { set_cosmetic_tag = BRA_Empire }	
		}
    }
		
	option = {
		name = brazil.6.b
		ai_chance = {
		factor = 25
	}		
        if = {
		custom_effect_tooltip = BRA_monarquia_2
		add_ideas = BRA_monarchy
		remove_ideas = BRA_1993
		country_event = { days = 14 id = brazil.8 }
		hidden_effect = { set_cosmetic_tag = BRA_Empire }
		set_politics = {
			ruling_party = monarchist
			elections_allowed = no
		}		
    }
}	

    option = {
		name = brazil.6.c
		ai_chance = {
		factor = 35
	}		

        if = {
		custom_effect_tooltip = BRA_monarquia_3
		add_political_power = -250
    }
	
	}	
}	

country_event = {            #ABSOLUTE KING
	id = brazil.7
	title = brazil.7.t
	desc = brazil.7.d
	picture = GFX_report_event_imperador	

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = brazil.7.a
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Bertrand I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Bertrand.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = { }
		}		
     		add_ideas = dom_bertrand
	   }
	}
		
	option = {
		name = brazil.7.b
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Antônio I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Antonio.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}	
      		add_ideas = dom_antonio		
	}
}	

    option = {
		name = brazil.7.c
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Luiz I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Ludwig.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}	
      		add_ideas = dom_luiz		
	}
}	
    option = {
		name = brazil.7.e
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Rafael I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Rafael.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}
       		add_ideas = dom_rafael		
	}	
    }
}

country_event = {            #ABSOLUTE KING
	id = brazil.8
	title = brazil.8.t
	desc = brazil.8.d
	picture = GFX_report_event_imperador
	
	trigger = {
	}	

	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = brazil.8.a
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Bertrand I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Bertrand.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = { }
		}		
     		add_ideas = dom_bertrand
	   }
	}
		
	option = {
		name = brazil.8.b
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Antônio I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Antonio.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}	
      		add_ideas = dom_antonio		
	}
}	

    option = {
		name = brazil.8.c
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Luiz I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Ludwig.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}	
      		add_ideas = dom_luiz		
	}
}	
    option = {
		name = brazil.8.e
		ai_chance = {
		factor = 25
	}			
	if = {
		create_country_leader = {
			name = "S.M.I. Dom Rafael I de Órleans e Bragança"
			desc = ""
			picture = "Portrait_Brazil_Rafael.dds"
			expire = "2020.1.1"
			ideology = absolute_monarchist
			traits = {  }
		}
       		add_ideas = dom_rafael	
	}	
    }
}	

country_event = {            #Renuncia
	id = brazil.9
	title = brazil.9.t
	desc = brazil.9.d
	picture = GFX_report_event_impeachment
	
	trigger = {
		tag = BRA
		date > 2017.5.18
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.9.a
		ai_chance = {
		factor = 25
	}
		create_country_leader = {
			name = "Congresso Federal"
			desc = ""
			picture = "Portrait_Brazil_Congresso.dds"
			expire = "2020.1.1"
			ideology = liberalist
			#traits = { smooth_talking_charmer }
		}		
	}
		
	option = {
		name = brazil.9.b
		ai_chance = {
		factor = 75
	}			
		add_political_power = 200
		add_timed_idea = {
		    idea = BRA_temer_fica
			days = 180
		}
		add_timed_idea = {
		    idea = BRA_downfall
			days = 180
		}
	}

    		
}

country_event = {            #EB nas ruas
	id = brazil.10
	title = brazil.10.t
	desc = brazil.10.d
	picture = GFX_report_event_impeachment
	
	trigger = {
		tag = BRA
		date > 2017.5.27
		date < 2017.8.1
		has_idea = BRA_temer_fica
		has_government = market_liberal
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.10.a
		ai_chance = {
		factor = 75
	}
		add_ideas = BRA_exercito_ruas
        add_popularity = { ideology = nationalist  popularity = 0.05 }		
	}
		
	option = {
		name = brazil.10.b
		ai_chance = {
		factor = 25
	}			
		add_political_power = -100
	}

    		
}

country_event = {            #Escoria Mundial
	id = brazil.11
	title = brazil.11.t
	desc = brazil.11.d
	picture = GFX_report_event_delcy
	
	trigger = {
		tag = BRA
		date > 2017.3.7
		has_government = market_liberal
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.11.a
		ai_chance = {
		factor = 75
	}
		VEN = {
		    add_opinion_modifier = {
				modifier = recent_actions_negative
				target = BRA
			}
		}
		add_opinion_modifier = {
				modifier = recent_actions_negative
				target = VEN
			}
		create_wargoal = {
		    type = annex_everything
			target = VEN
		}	
	}
		
	option = {
		name = brazil.11.b
		ai_chance = {
		factor = 25
	}			
		add_political_power = 250
	}

    		
}

country_event = {            #Intervencao
	id = brazil.12
	title = brazil.12.t
	desc = brazil.12.d
	picture = GFX_report_event_grevepm
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		has_government = market_liberal
		has_idea = BRA_exercito_ruas
		has_idea = BRA_temer_fica
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.12.a
		ai_chance = {
		factor = 65
	}
		set_politics = {
			ruling_party = nationalist
			elections_allowed = yes
		}
		add_popularity = { ideology = nationalist popularity = 0.35 }
		add_political_power = 250
		remove_ideas = BRA_temer_fica
		remove_ideas = BRA_downfall
	}
	
	option = {
		name = brazil.12.b
		ai_chance = {
		factor = 35
	}
		add_political_power = -500
		remove_ideas = BRA_exercito_ruas
	}

    		
}

country_event = {            #Eleicoes 2002
	id = brazil.13
	title = brazil.13.t
	desc = brazil.13.d
	picture = GFX_report_event_eleicao2002
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		date > 2002.10.26
		date < 2002.11.10
		has_government = social_liberal
	}	

	fire_only_once = yes
	
	option = {             #Lula
		name = brazil.13.a
		ai_chance = {
		factor = 65
	}
		set_politics = {
			ruling_party = democratic_socialist
			elections_allowed = yes
		}
	}
	
	option = {
		name = brazil.13.b
		ai_chance = {
		factor = 35
	}
		create_country_leader = {
			name = "Jose Serra"
			desc = ""
			picture = "Portrait_Brazil_Serra.dds"
			expire = "2020.1.1"
			ideology = liberalist
			traits = {  }
		}
	}

    		
}

country_event = {            #Bolsonaro
	id = brazil.14
	title = brazil.14.t
	desc = brazil.14.d
	picture = GFX_report_event_jair
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		date > 2006.1.1
		date < 2007.1.1
	}	

	fire_only_once = yes
	
	option = {             #Maluf Alles
		name = brazil.14.a
		ai_chance = {
		factor = 5
	}
		add_political_power = 100
	}
	
	option = {           #Jair Bolsonaro
		name = brazil.14.b
		ai_chance = {
		factor = 95
	}
	    retire_country_leader = yes
		create_country_leader = {
			name = "Jair M. Bolsonaro"
			desc = ""
			picture = "Portrait_Brazil_Bolsonaro.dds"
			expire = "2020.1.1"
			ideology = counter_progressive_democrat
			traits = { inexperienced_administrator }
		}
	}

    		
}

country_event = {            #Bolsonaro
	id = brazil.15
	title = brazil.15.t
	desc = brazil.15.d
	picture = GFX_report_event_jair
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		date > 2016.11.7
		date < 2018.1.1
	}	

	fire_only_once = yes
	
	option = {             #Silenciar
		name = brazil.15.a
		ai_chance = {
		factor = 5
	}
		add_political_power = -250
		add_popularity = { ideology = reactionary popularity = -0.30 }
		random_list = {
	
        60 = {	
		hidden_effect = {
		create_country_leader = {
			name = "Eduardo Bolsonaro"
			desc = ""
			picture = "Portrait_Brazil_Eduardo_Bolsonaro.dds"
			expire = "2020.1.1"
			ideology = counter_progressive_democrat
			traits = {  }
		   }
		start_civil_war = { ideology = reactionary size = 0.6 }		   
        }
		
		custom_effect_tooltip = BRA_bolsomitic_war

        }
		
		40 = { add_political_power = 100 }
	}
	}
	
	option = {           #Concorrer
		name = brazil.15.b
		ai_chance = {
		factor = 90
	}
	    add_ideas = { BRA_bolsonarism }
		add_political_power = 250
	}
	
	option = {           #Entregar
		name = brazil.15.c
		ai_chance = {
		factor = 5
	}
	    set_politics = {
		    ruling_party = reactionary
			elections_allowed = yes
		}
	}

    		
}

country_event = {
	id = brazil.16
	title = brazil.16.t
	desc = brazil.16.d
	picture = GFX_report_event_cisplatina
	
	trigger = {
		tag = BRA
		BRA = { controls_state = 300 }
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.16.a
	        300 = { set_state_name = "Cisplatina" }				
		}
	}
	
country_event = {  #REBELIíO NO SUL
	id = brazil.17
	title = brazil.17.t
	desc = brazil.17.d
	picture = GFX_report_event_southbrazil
	
	trigger = {
	    tag = BRA
		date > 2016.10.06
		date < 2016.10.31		
	}	

	fire_only_once = yes
	
	option = {
		name = brazil.17.a
		}

	option = {
		name = brazil.17.b
		hidden_effect = {
		}	
	}
	option = {
		name = brazil.17.c
		if = {
	        add_political_power = -500		
            add_stability = -0.15				
	}
		}		
		
	}
	
country_event = {  #Operation Caracas
	id = brazil.18
	title = brazil.18.t
	desc = brazil.18.d
	picture = GFX_report_event_grevepm

	is_triggered_only = yes
	
	option = {    #provide help to brazil
		name = brazil.18.a
		    BRA = {
			    add_opinion_modifier = {
				    modifier = declaration_of_friendship
					target = USA
				}
			}
			USA = { send_equipment = { target = BRA type = infantry_equipment amount = 2500 }
			diplomatic_relation = { country = BRA relation = non_aggression_pact }
			BRA = { country_event = brazil.19 }
		}
    }
	option = {       #nope
		name = brazil.18.b		
		    BRA = {
			    country_event = brazil.20
			}
		}		
		
	}
	
	country_event = {  #USA Accepts
	id = brazil.19
	title = brazil.19.t
	desc = brazil.19.d
	picture = GFX_report_event_grevepm

	is_triggered_only = yes
	
	option = {    #provide help to brazil
		name = brazil.19.a
		    declare_war_on = {
			    target = VEN
				type = puppet_wargoal_focus
			}
			USA = {
			
				add_to_war = {
					targeted_alliance = BRA
					enemy = VEN
				}
		}
    }
}	

country_event = {  #USA Denies
	id = brazil.20
	title = brazil.20.t
	desc = brazil.20.d
	picture = GFX_report_event_grevepm

	is_triggered_only = yes
	
	option = {    #provide help to brazil
		name = brazil.20.a
		    declare_war_on = {
			    target = VEN
				type = puppet_wargoal_focus
			}
    }
}

country_event = {  #BolsoPEN
	id = brazil.21
	title = brazil.21.t
	desc = brazil.21.d
	picture = GFX_report_event_jair

	is_triggered_only = no
	
	trigger = {
	    tag = BRA
		date > 2017.7.23
		date < 2017.8.5
		NOT = {
		    has_government = reactionary
		}
	}

	fire_only_once = yes
	
	option = {    #dur
		name = brazil.21.a
	        set_party_name = { ideology = reactionary long_name = "Patriotic Brazilian Party" name = "PATRIOTA51" }		
    }
}

country_event = {  #PACO
	id = brazil.22
	title = brazil.22.t
	desc = brazil.22.d
	picture = GFX_report_event_impeachment

	is_triggered_only = no
	
	trigger = {
	    tag = BRA
		date > 2017.2.1
		date < 2018.2.1
	}

	fire_only_once = yes
	
	option = {    #PACO-Tasso
		name = brazil.22.a
	        set_party_name = { ideology = conservative long_name = "Partido Conservador" name = "PACO" }		
	        create_country_leader = {
			name = "Edson Navarro Tasso"
			desc = ""
			picture = "Portrait_Brazil_Tasso.dds"
			expire = "2020.1.1"
			ideology = fiscal_conservative
			traits = { }
		}
    }
	
	option = {    #PACO-Justus
		name = brazil.22.b
	        set_party_name = { ideology = conservative long_name = "Partido Conservador" name = "PACO" }		
    }
}

country_event = {            #Eleicoes 2018
	id = brazil.23
	title = brazil.23.t
	desc = brazil.23.d
	picture = GFX_report_event_2018
	
	is_triggered_only = no
	
	trigger = {
		tag = BRA
		date > 2018.10.1
		date < 2018.11.30
        has_democratic_form_of_government = yes
	}	

	fire_only_once = yes
	
	option = {             #Bolsonaro
		name = brazil.23.a
		ai_chance = {
		factor = 25
	}
		set_politics = {
			ruling_party = reactionary
			elections_allowed = yes
		}
	}
	
	option = {             #ciro
		name = brazil.23.b
		ai_chance = {
		factor = 25
	}
		
		set_politics = {
		    ruling_party = social_democrat
			elections_allowed = yes
		}
	}
	
	option = {             #psdb
		name = brazil.23.c
		ai_chance = {
		factor = 25
	}
		
		set_politics = {
		    ruling_party = social_liberal
			elections_allowed = yes
		}
	}
	
	option = {             #pt
		name = brazil.23.od
		ai_chance = {
		factor = 10
	}
		
		set_politics = {
		    ruling_party = democratic_socialist
			elections_allowed = yes
		}
	}
	
	option = {             #alvaro
		name = brazil.23.e
		ai_chance = {
		factor = 15
	}
	    set_party_name = { ideology = conservative long_name = "Partido Podemos" name = "PODEMOS" }
		
		set_politics = {
		    ruling_party = conservative
			elections_allowed = yes
		}
		
		create_country_leader = {
			name = "Álvaro Dias"
			desc = ""
			picture = "Portrait_Brazil_Alvaro.dds"
			expire = "2020.1.1"
			ideology = constitutionalist
			traits = {  }
		}
	}

    		
}


