focus_tree = {
	id = brazil_focus
	
	country = {
		factor = 0
		
		modifier = {
			add = 10
			tag = BRA
	    }
	}
	
	default = no

	continuous_focus_position = { x = 50 y = 1900 }



	############################
	#### INDUSTRIAL SECTION ####
	############################

    focus = {
		id = BRA_fin
		icon = GFX_goal_generic_production2
		x = 1
		y = 0
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = industrial_bonus
				bonus = 0.5
				uses = 3
				category = industry
			}
		}
    }

    focus = {
		id = BRA_rare
		icon = GFX_goal_generic_construction2
		prerequisite = { focus = BRA_fin }
		x = 5
		y = 1
		cost = 10
		available = {
			OR = {
				has_full_control_of_state = 496
				has_full_control_of_state = 501
			}
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = yes

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = {
					has_full_control_of_state = 496
				}
				496 = {
					add_resource = {
						type = steel
						amount = 14
					}
				}
			}

			if = {
				limit = {
					has_full_control_of_state = 501
				}
				501 = {
					add_resource = {
						type = chromium
						amount = 9
					}
				}
			}
		}
	}

	focus = {
		id = BRA_oill
		icon = GFX_goal_generic_oil_refinery
		prerequisite = { focus = BRA_rare }
		x = 5
		y = 2
		cost = 10
		available = {
			has_full_control_of_state = 501
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = yes

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = {
					has_full_control_of_state = 501
				}
				501 = {
					add_resource = {
						type = oil
						amount = 21
					}
				}
			}
		}
	}

	focus = {
		id = BRA_steel_1
		icon = GFX_goal_generic_construction2
		prerequisite = { focus = BRA_oill }
		x = 5
		y = 3
		cost = 10
		available = {
			has_full_control_of_state = 501
		}

		bypass = {

		}

		cancel_if_invalid = yes
		continue_if_invalid = no
		available_if_capitulated = yes

		complete_tooltip = {

		}

		completion_reward = {
			if = {
				limit = {
					has_full_control_of_state = 501
				}
				501 = {
					add_resource = {
						type = steel
						amount = 45
					}
				}
			}
		}
	}

	focus = {
		id = BRA_sao_paulo
		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = BRA_invenstment }
		x = 1
		y = 2
		cost = 10

		ai_will_do = {
			factor = 10
		}

		available_if_capitulated = yes

		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_sao_paulo }
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			#	Adds a civilian Factory (Sao Paulo)
			random_owned_controlled_state = {
				prioritize = { 501 }
				limit = {									
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
				set_state_flag = BRA_sao_paulo
			}
		}
	}

	focus = {
		id = BRA_military
		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = BRA_fin }
		x = -1
		y = 2
		cost = 10

		ai_will_do = {
			factor = 10
		}
		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_military }
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				prioritize = { 500 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
				set_state_flag = BRA_military
			}			
		}

	}

	focus = {
		id = BRA_rail
		icon = GFX_goal_generic_construct_infrastructure
		prerequisite = { focus = BRA_fin }
		x = 3
		y = 2
		cost = 10

		ai_will_do = {
			factor = 10
		}

		bypass = {
			custom_trigger_tooltip = {
				tooltip = infrastructure_effort_tt
				all_owned_state = {
					free_building_slots = {
						building = infrastructure
						size < 1
					}
				}
			}
		}

		available_if_capitulated = yes

		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_rail_1 }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}	
			}
			random_state = {
				limit = { has_state_flag = BRA_rail_2 }
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}	
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									free_building_slots = {
										building = infrastructure
										size > 0
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				set_state_flag = BRA_rail_1
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 0
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									free_building_slots = {
										building = infrastructure
										size > 0
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				set_state_flag = BRA_rail_2
			}
		}
	}

	focus = {
		id = BRA_military_expand
		icon = GFX_goal_generic_build_tank
		prerequisite = { focus = BRA_military }
		x = -1
		y = 3
		cost = 10

		ai_will_do = {
			factor = 10
		}
		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_military_expand }
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				prioritize = { 502 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = BRA_military_expand_1
			}
		}
	}

	focus = {
		id = BRA_northeastern_investment
		icon = GFX_goal_generic_construction
		prerequisite = { focus = BRA_rail }
		x = 3
		y = 3
		cost = 10

		ai_will_do = {
			factor = 10
		}

		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_northeastern_investment_1 }
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				prioritize = { 489 }
				limit = {
					free_building_slots = {
						building = infrastructure
						size > 2
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
				set_state_flag = BRA_northeastern_investment_1
			}
		}
		
	}

	focus = {
		id = BRA_sao_paulo2
		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = BRA_sao_paulo }
		x = 1
		y = 3
		cost = 10

		ai_will_do = {
			factor = 10
		}

		available_if_capitulated = yes

		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_sao_paulo2 }
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			#	Adds a civilian Factory (Sao Paulo)
			random_owned_controlled_state = {
				prioritize = { 501 }
				limit = {									
					free_building_slots = {
						building = industrial_complex
						size > 2
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
				set_state_flag = BRA_sao_paulo2
			}
		}
	}

	focus = {
		id = BRA_extra_tech_slot
		icon = GFX_focus_research
		prerequisite = { focus = BRA_sao_paulo2 }
		prerequisite = { focus = BRA_northeastern_investment }
		prerequisite = { focus = BRA_military_expand }
		cancel_if_invalid = no
		continue_if_invalid = yes
		x = 1
		y = 5
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_research_slot = 1
			remove_ideas = bra_aa
		}
	}

	focus = {
		id = BRA_nuclear
		icon = GFX_focus_wonderweapons
		prerequisite = { focus = BRA_extra_tech_slot }
		x = 1
		y = 6
		cost = 10

		ai_will_do = {
			factor = 10
		}

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = POL_atomic_physics_institute
				bonus = 0.5
				uses = 1
				category = nuclear
			}
		}
	}

	focus = {
		id = BRA_polaca
		icon = GFX_goal_generic_demand_territory
		
		x = 12
		y = 0
		cost = 10

		ai_will_do = {
			factor = 10
		}

		available_if_capitulated = yes

		completion_reward = {
			add_political_power = 200
			#PP +200
		}
	}

	focus = {
		id = BRA_plinio_salgado
		icon = GFX_goal_support_fascism #icon = GFX_goal_tripartite_pact
		prerequisite = { focus = BRA_polaca }
		mutually_exclusive = { focus = BRA_getulio focus = BRA_luis }
		available = {
			OR = {
				has_government = fascism
				has_government = neutrality
			}
			OR = {
				is_historical_focus_on = no
				is_ai = no
			}
		}
		x = 9
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
		    if = {
				limit = {
					has_country_leader = { id = 550 }
				}
				retire_country_leader = yes
			}
			if = {
				limit = {
					NOT = { has_government = fascism }
				}
				set_politics = {
					ruling_party = fascism
					elections_allowed = no
				}
			}
		    add_popularity = {
				popularity = 0.40
				ideology = fascism
		    }
			add_ideas = nationalism
			add_manpower = 50000
			add_named_threat = { threat = 2 name = bra_plinio_salgado }
		}
	}

	focus = {
		id = BRA_getulio
		icon = GFX_goal_generic_neutrality_focus
		prerequisite = { focus = BRA_polaca }
		mutually_exclusive = { focus = BRA_plinio_salgado focus = BRA_luis }
		available = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
		x = 12
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			if = {
				limit = { NOT = { has_idea = neutrality_idea } }
				add_ideas = neutrality_idea
			}
			add_political_power = 150
			add_national_unity = 0.10
		}
	}

	focus = {
		id = BRA_luis
		icon = GFX_goal_support_communism #icon = GFX_goal_tripartite_pact
		prerequisite = { focus = BRA_polaca }
		mutually_exclusive = { focus = BRA_plinio_salgado focus = BRA_getulio }
		available = {
			if = {
				has_government = communism
				else = {
					OR = {
						has_government = communism
						has_government = neutrality
					}
				}
			}
			OR = {
				is_historical_focus_on = no
				is_ai = no
			}
		}
		x = 15
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
		    if = {
				limit = {
					has_country_leader = { id = 550 }
				}
				retire_country_leader = yes
			}
			if = {
				limit = {
					NOT = { has_government = communism }
				}
				set_politics = {
					ruling_party = communism
					elections_allowed = no
				}
			}
		    add_popularity = {
				popularity = 0.40
				ideology = communism
			}	
			add_ideas = internationalism
            add_ideas = workers_culture
		}
	}

	focus = {
		id =BRA_arg
		will_lead_to_war_with = ARG
		prerequisite = { focus = BRA_par }
		icon = GFX_goal_generic_major_war
		x = 9
		y = 4
		cost = 20
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = ARG
			} 
		}
	}

	focus = {
		id =BRA_urg
		will_lead_to_war_with = URG
		available = {
	 		is_puppet = no
	 		is_in_faction = no
	 		OR = {
	 			has_government = fascism
	 		}
		}	
		prerequisite = { focus = BRA_plinio_salgado }
		icon = GFX_goal_generic_major_war
		x = 9
		y = 2
		cost = 10
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = URG
			} 
		}
	}

	focus = {
		id =BRA_par
		will_lead_to_war_with = PAR
		prerequisite = { focus = BRA_urg }
		icon = GFX_goal_generic_major_war
		x = 9
		y = 3
		cost = 10
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = PAR
			} 
		}
	}

	focus = {
		id = BRA_war
		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = BRA_plinio_salgado }
		x = 7
		y = 2
		cost = 10

		ai_will_do = {
			factor = 10
		}
		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_war }
				add_building_construction = {
					type = arms_factory
					level = 4
					instant_build = yes
				}
			}
		}

		completion_reward = {
			add_ideas = warrior_traditions_idea
			random_owned_controlled_state = {
				prioritize = { 501 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 3
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = arms_factory
					level = 4
					instant_build = yes
				}
				set_state_flag = BRA_military
			}			
		}

	}

    focus = {
		id = BRA_political_effo
		icon = GFX_goal_support_fascism
		prerequisite = { focus = BRA_oil }
		available = {
		    OR = {
				has_government = fascism
			}
			GER = { is_faction_leader = yes }
			is_in_faction = no
			NOT = { has_war_with = GER }
			is_subject = no
			NOT = {
				any_other_country = {
					is_in_faction_with = GER
					has_war_with = BRA
				}
			}
		}
		x = 6
		y = 5
		cost = 10

		available_if_capitulated = yes 

		completion_reward = {
			GER = {
				country_event = generic.2
			}
		}
	}

	focus = {
		id = BRA_all
		icon = GFX_goal_generic_propaganda
		prerequisite = { focus = BRA_war }
		x = 7
		y = 3
		cost = 10
		ai_will_do = {
			factor = 1
		}

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = spiritual_mobilization_idea	 
		}			
    } 

    focus = {
		id = BRA_oil
		prerequisite = { focus = BRA_all }
		x = 7
		y = 4
		cost = 10
		icon = GFX_goal_generic_oil_refinery
		ai_will_do = {
			factor = 1
		}

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = synth_bonus
				bonus = 0.75
				uses = 1
				category = synth_resources
			}
			custom_effect_tooltip = BRA_oil
		}
	}

	focus = {
		id =BRA_usa
		will_lead_to_war_with = USA
		prerequisite = { focus = BRA_oil }
		prerequisite = { focus = BRA_arg }
		icon = GFX_goal_generic_major_war
		x = 8
		y = 5
		cost = 10
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = USA
			} 
		}
	}

	focus = {
		id = BRA_invenstment
		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = BRA_fin }
		x = 1
		y = 1
		cost = 10

		ai_will_do = {
			factor = 10
		}

		available_if_capitulated = yes

		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_invenstment }
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		} 

		completion_reward = {
			#	Adds a civilian Factory (Santa Catarina)
			random_owned_controlled_state = {
				prioritize = { 503 }
				limit = {									
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				set_state_flag = BRA_invenstment
			}
		}
	}

	focus = {
		id = BRA_trade
		icon = GFX_goal_support_democracy
		prerequisite = { focus = BRA_getulio }
		available = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
		x = 12
		y = 2
		cost = 10

		available_if_capitulated = yes


		ai_will_do = {
			factor = 95
			modifier = {
				factor = 0.1
				any_neighbor_country = {
					is_major = yes
					OR = {
						has_government = communism
						has_government = fascism
					}
				}
				NOT = {
					any_neighbor_country = {
						is_major = yes
						has_government = democratic
					}
				}
			}
		}

		completion_reward = {
			add_ideas = liberty_ethos_focus
		}
	}

	focus = {
		id = BRA_defense
		icon = GFX_goal_generic_defence
		prerequisite = { focus = BRA_trade }
		x = 12
		y = 3
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = deterrence
		}
	}

	focus = {
		id = BRA_volunteer
		available = { 
			OR = {
				threat > 1.0
			}
		}

		continue_if_invalid = yes
		available_if_capitulated = yes

		icon = GFX_goal_generic_allies_build_infantry
		prerequisite = { focus = BRA_defense }
		x = 12
		y = 4
		cost = 15

		available_if_capitulated = yes

		completion_reward = {
		    set_rule = { can_send_volunteers = yes }
			add_ideas = volunteer_corps_focus
		}
	}

	focus = {
		id = BRA_cult
		icon = GFX_goal_generic_scientific_exchange
		prerequisite = { focus = BRA_luis }
		x = 15
		y = 2
		cost = 10
		ai_will_do = {
			factor = 1
		}

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = progress_cult_focus
		}
	}

	focus = {
		id = BRA_indocnation
		icon = GFX_goal_generic_propaganda
		prerequisite = { focus = BRA_cult }
		x = 15
		y = 3
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = indoctrination_focus
		}
	}

	focus = {
		id = BRA_slot
		icon = GFX_focus_research
		prerequisite = { focus = BRA_indocnation }
		available = {
			num_of_factories > 10
		}
		cancel_if_invalid = no
		continue_if_invalid = yes
		x = 15
		y = 4
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = BRA_power
		icon = GFX_goal_generic_demand_territory
		prerequisite = { focus = BRA_luis }
		mutually_exclusive = { focus = BRA_comunista }
		available = {
	 		is_puppet = no
	 		is_in_faction = no
	 		OR = {
	 			has_government = communism
	 		}
		}	
		x = 17
		y = 2
		cost = 20

		available_if_capitulated = yes

		completion_reward = {
		    add_named_threat = { threat = 6 name = BRA_power }
			add_ideas = ideological_fanaticism_focus
			set_rule = { can_create_factions = yes }
			create_faction = braz_faction
		}
	}

    focus = {
		id = BRA_comunista
		icon = GFX_goal_support_communism
		prerequisite = { focus = BRA_luis }
		mutually_exclusive = { focus = BRA_power }
		available = {
		    SOV = {
 				exists = yes
 				has_government = communism
 				is_faction_leader = yes
 			}
	 		is_puppet = no
	 		is_in_faction = no
	 		OR = {
	 			has_government = communism
	 		}
		}
		x = 19
		y = 2
		cost = 10

		available_if_capitulated = yes 

		completion_reward = {
			SOV = {
				country_event = generic.2
			}
		}
	}


	focus = {
		id = BRA_ven
		icon = GFX_goal_generic_major_war
		prerequisite = { focus = BRA_power }
		available = {
			is_puppet = no			
		}
		x = 17
		y = 3
		cost = 10
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = VEN
			} 
		}
	}

	focus = {
		id =BRA_eua
		will_lead_to_war_with = USA
		prerequisite = { focus = BRA_ven }
		mutually_exclusive = { focus = BRA_ger }
		icon = GFX_goal_generic_major_war
		x = 17
		y = 4
		cost = 10
		
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = USA
			} 
		}
	}

	focus = {
		id = BRA_army
		icon = GFX_goal_generic_allies_build_infantry
		x = 24
		y = 0
		cost = 5

		available_if_capitulated = yes

		completion_reward = {
			army_experience = 20
			air_experience = 20
			navy_experience = 20
		}
	}

	focus = {
		id = BRA_minas
		icon = GFX_goal_generic_build_navy
		prerequisite = { focus = BRA_army }
		x = 21
		y = 2
		cost = 10

		available_if_capitulated = yes


		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				all_owned_state = {
					OR = {
						is_coastal = no
						dockyard < 1
					}
				}
			}
		}

		completion_reward = {
			add_tech_bonus = {
				name = sub_op_bonus
				bonus = 0.5
				uses = 2
				technology = convoy_interdiction_ti
				technology = unrestricted_submarine_warfare
				technology = wolfpacks
				technology = advanced_submarine_warfare
				technology = combined_operations_raiding
			}
		}
	}

	focus = {
		id = BRA_gerais
		icon = GFX_goal_generic_navy_cruiser
		prerequisite = { focus = BRA_minas }
		x = 21
		y = 3
		cost = 10

		available_if_capitulated = yes


		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				all_owned_state = {
					OR = {
						is_coastal = no
						dockyard < 1
					}
				}
			}
		}

		completion_reward = {
			add_tech_bonus = {
				name = cr_bonus
				bonus = 0.5
				ahead_reduction = 1
				uses = 1
				technology = improved_light_cruiser
				technology = advanced_light_cruiser
				technology = improved_heavy_cruiser
				technology = advanced_heavy_cruiser
			}
		}
	}

	focus = {
		id = BRA_consit
		icon = GFX_goal_generic_construct_naval_dockyard
		prerequisite = { focus = BRA_gerais }
		x = 21
		y = 4
		cost = 10

		available_if_capitulated = yes


		available = {
			any_state = {
				is_coastal = yes
				is_controlled_by = ROOT
			}
		}

		complete_tooltip = {
			navy_experience = 25
			add_extra_state_shared_building_slots = 5
			add_building_construction = {
				type = dockyard
				level = 5
				instant_build = yes
			}
		}
		
		completion_reward = {
			navy_experience = 50
			if = {
				limit = {
					NOT = {
						any_owned_state = {
							dockyard > 0
							free_building_slots = {
								building = dockyard
								size > 4
								include_locked = yes
							}
						}
					}
					any_owned_state = {
						is_coastal = yes
					}
				}
				random_owned_controlled_state = {
					limit = {
						is_coastal = yes
						free_building_slots = {
							building = dockyard
							size > 4
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 5
					add_building_construction = {
						type = dockyard
						level = 5
						instant_build = yes
					}
				}
				set_country_flag = naval_effort_built
			}
			if = {
				limit = {
					NOT = { has_country_flag = naval_effort_built }
					any_owned_state = {
						dockyard > 0
						free_building_slots = {
							building = dockyard
							size > 5
							include_locked = yes
						}
					}
				}
				random_owned_controlled_state = {
					limit = {
						dockyard > 0
						free_building_slots = {
							building = dockyard
							size > 4
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 5
					add_building_construction = {
						type = dockyard
						level = 5
						instant_build = yes
					}
				}
				set_country_flag = naval_effort_built
			}
			if = {
				limit = {
					NOT = { has_country_flag = naval_effort_built }
					NOT = {
						any_owned_state = {
							free_building_slots = {
								building = dockyard
								size > 2
								include_locked = yes
							}
						}
					}
				}
				random_state = {
					limit = {
						controller = { tag = ROOT }
						free_building_slots = {
							building = dockyard
							size > 4
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 5
					add_building_construction = {
						type = dockyard
						level = 5
						instant_build = yes
					}
				}
			}			
		}
	}

	focus = {
		id = BRA_rifless
		icon = GFX_goal_generic_small_arms
		prerequisite = { focus = BRA_army }
		x = 24
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = infantry_weapons_bonus
				bonus = 0.5
				uses = 1
				category = infantry_weapons
				category = artillery
			}
		}
	}

	focus = {
		id = BRA_doctrin
		icon = GFX_goal_generic_army_doctrines
		prerequisite = { focus = BRA_rifless }
		x = 24
		y = 2
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			army_experience = 5
			add_tech_bonus = {
				name = land_doc_bonus
				bonus = 0.75
				uses = 3
				category = land_doctrine
			}
		}
	}

	focus = {
		id = BRA_iiii
		icon = GFX_goal_generic_construct_mil_factory
		prerequisite = { focus = BRA_doctrin }
		x = 24
		y = 3
		cost = 10

		ai_will_do = {
			factor = 10
		}
		complete_tooltip = {
			random_state = {
				limit = { has_state_flag = BRA_iiii }
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}

		completion_reward = {
			random_owned_controlled_state = {
				prioritize = { 500 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = BRA_iiii
			}			
		}

	}

	focus = {
		id = BRA_trem
		icon = GFX_goal_generic_army_tanks
		prerequisite = { focus = BRA_iiii }
		x = 24
		y = 4
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = armor_bonus
				bonus = 0.75
				uses = 2
				category = armor
			}
		}
	}

	focus = {
		id = BRA_special
		icon = GFX_goal_generic_special_forces
		prerequisite = { focus = BRA_trem }
		x = 24
		y = 5
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = special_forces_bonus
				bonus = 0.6
				uses = 2
				technology = paratroopers
				technology = paratroopers2
				technology = marines
				technology = marines2
				technology = tech_mountaineers
				technology = tech_mountaineers2
			}
		}
	}

	focus = {
		id = BRA_avi
		icon = GFX_goal_generic_build_airforce
		prerequisite = { focus = BRA_army }
		x = 27
		y = 2
		cost = 10

		available_if_capitulated = yes


		complete_tooltip = {
			air_experience = 25
			if = { limit = { has_country_flag = aviation_effort_AB }
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
			}			
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}			
		}

		completion_reward = {
			air_experience = 25

			if = {
				limit = {
					capital_scope = {
						NOT = {
							free_building_slots = {
								building = air_base
								size > 1
							}
						}
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			if = {
				limit = {
					capital_scope = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
				}
				capital_scope = {
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}
		}
	}

	focus = {
		id = BRA_fighte
		icon = GFX_goal_generic_air_fighter
		prerequisite = { focus = BRA_avi }
		x = 27
		y = 3
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_tech_bonus = {
				name = fighter_bonus
				bonus = 0.5
				uses = 2
				technology = early_fighter
				technology = fighter1
				technology = fighter2
				technology = fighter3
				technology = heavy_fighter1
				technology = heavy_fighter2
				technology = heavy_fighter3
			}
		}
	}

	focus = {
		id = BRA_socialist_science
		icon = GFX_goal_generic_national_unity
		prerequisite = { focus = BRA_slot }
		x = 15
		y = 5
		cost = 10
		ai_will_do = {
			factor = 1
		}

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = socialist_science_focus
		}
	}

	focus = {
		id =BRA_ger
		will_lead_to_war_with = GER
		prerequisite = { focus = BRA_ven }
		icon = GFX_goal_generic_major_war
		x = 19
		y = 4
		cost = 10
		
		ai_will_do = {
			factor = 1
		}	
		completion_reward = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = GER
			} 
		}
	}

	focus = {
		id = BRA_ati
		icon = GFX_goal_generic_build_airforce
		prerequisite = { focus = BRA_fighte }
		x = 27
		y = 4
		cost = 10

		available_if_capitulated = yes


		complete_tooltip = {
			air_experience = 25
			if = { limit = { has_country_flag = aviation_effort_AB }
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
			}			
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}			
		}

		completion_reward = {
			air_experience = 25

			if = {
				limit = {
					capital_scope = {
						NOT = {
							free_building_slots = {
								building = air_base
								size > 1
							}
						}
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			if = {
				limit = {
					capital_scope = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
				}
				capital_scope = {
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}
		}
	}

	focus = {
		id = BRA_arg_friend
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = BRA_slot }
		x = 15
		y = 5
		cost = 10
		ai_will_do = {
			factor = 2.5
			modifier = {
				factor = 0
				ARG = {
					has_opinion = {
						target = BRA
						value < 0
					}
				}
			}
			modifier = {
				factor = 5
				ARG = {
					has_opinion = {
						target = BRA
						value > 20
					}
				}
			}
		}		
		completion_reward = {
			ARG = {
				add_opinion_modifier = { target = BRA modifier = BRA_opnion }
				if = {
					limit = {
						BRA = {
							has_government = fascism
						}
					}
					add_ideas = fascist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = communism
						}
					}
					add_ideas = communist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = democratic
						}
					}
					add_ideas = democratic_influence
				}
				country_event = { id = generic.1 }
			}
			hidden_effect = {
				
			}
		}
	}

	focus = {
		id = BRA_urg_friend
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = BRA_arg_friend }
		x = 13
		y = 6
		cost = 10
		ai_will_do = {
			factor = 2.5
			modifier = {
				factor = 0
				ARG = {
					has_opinion = {
						target = BRA
						value < 0
					}
				}
			}
			modifier = {
				factor = 5
				URG = {
					has_opinion = {
						target = BRA
						value > 20
					}
				}
			}
		}		
		completion_reward = {
			URG = {
				add_opinion_modifier = { target = BRA modifier = BRA_opnion }
				if = {
					limit = {
						BRA = {
							has_government = fascism
						}
					}
					add_ideas = fascist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = communism
						}
					}
					add_ideas = communist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = democratic
						}
					}
					add_ideas = democratic_influence
				}
				country_event = { id = generic.1 }
			}
			hidden_effect = {
				
			}
		}
	}

	focus = {
		id = BRA_PAR_friend
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = BRA_arg_friend }
		x = 15
		y = 6
		cost = 10
		ai_will_do = {
			factor = 2.5
			modifier = {
				factor = 0
				PAR = {
					has_opinion = {
						target = BRA
						value < 0
					}
				}
			}
			modifier = {
				factor = 5
				PAR = {
					has_opinion = {
						target = BRA
						value > 20
					}
				}
			}
		}		
		completion_reward = {
			PAR = {
				add_opinion_modifier = { target = BRA modifier = BRA_opnion }
				if = {
					limit = {
						BRA = {
							has_government = fascism
						}
					}
					add_ideas = fascist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = communism
						}
					}
					add_ideas = communist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = democratic
						}
					}
					add_ideas = democratic_influence
				}
				country_event = { id = generic.1 }
			}
			hidden_effect = {
				
			}
		}
	}

	focus = {
		id = BRA_PRU_friend
		icon = GFX_goal_generic_improve_relations
		prerequisite = { focus = BRA_arg_friend }
		x = 17
		y = 6
		cost = 10
		ai_will_do = {
			factor = 2.5
			modifier = {
				factor = 0
				PRU = {
					has_opinion = {
						target = BRA
						value < 0
					}
				}
			}
			modifier = {
				factor = 5
				PRU = {
					has_opinion = {
						target = BRA
						value > 20
					}
				}
			}
		}		
		completion_reward = {
			PRU = {
				add_opinion_modifier = { target = BRA modifier = BRA_opnion }
				if = {
					limit = {
						BRA = {
							has_government = fascism
						}
					}
					add_ideas = fascist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = communism
						}
					}
					add_ideas = communist_influence
				}
				if = {
					limit = {
						BRA = {
							has_government = democratic
						}
					}
					add_ideas = democratic_influence
				}
				country_event = { id = generic.1 }
			}
			hidden_effect = {
				
			}
		}
	}

	focus = {
		id = BRA_trade_in_world
		icon = GFX_goal_generic_demand_territory
		x = 33
		y = 0
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_political_power = 150
		}
	}

	focus = {
		id = BRA_usa_trade
		icon = GFX_goal_usa_bandeira
		prerequisite = { focus = BRA_trade_in_world }
		mutually_exclusive = { focus = BRA_mercosul_trade }
		x = 31
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
		    add_ideas = democratic_influence
			USA = {
				add_opinion_modifier = { target = BRA modifier = BRA_usaa }
		    }
		}
	}

	focus = {
		id = BRA_mercosul_trade
		icon = GFX_goal_mercosul_bandeira
		prerequisite = { focus = BRA_trade_in_world }
		mutually_exclusive = { focus = BRA_usa_trade }
		x = 35
		y = 1
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			ARG = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    PRU = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    URG = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    PAR = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    CHL = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    VEN = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    COL = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		    ECU = {
				add_opinion_modifier = { target = BRA modifier = BRA_mercosul }
		    }
		}
	}

	focus = {
		id = BRA_opt_industry
		icon = GFX_goal_generic_construct_civ_factory
		prerequisite = { focus = BRA_mercosul_trade focus = BRA_usa_trade }
		mutually_exclusive = { focus = BRA_opt_tech }
		x = 35
		y = 2
		cost = 10

		available_if_capitulated = yes


		
		ai_will_do = {
			factor = 2
		}

		bypass = {
			custom_trigger_tooltip = {
				tooltip = construction_effort_tt
				all_owned_state = {
					free_building_slots = {
						building = industrial_complex
						size < 3
						include_locked = yes
					}					
				}
			}
		}

		complete_tooltip = {
			add_extra_state_shared_building_slots = 3
			add_building_construction = {
				type = industrial_complex
				level = 3
				instant_build = yes
			}			
		}

		completion_reward = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 2
						include_locked = yes
					}
					OR = {
						is_in_home_area = yes
						NOT = {
							owner = {
								any_owned_state = {
									free_building_slots = {
										building = industrial_complex
										size > 2
										include_locked = yes
									}
									is_in_home_area = yes
								}
							}
						}
					}
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = BRA_opt_tech
		icon = GFX_focus_research
		prerequisite = { focus = BRA_mercosul_trade focus = BRA_usa_trade }
		mutually_exclusive = { focus = BRA_opt_industry }
		x = 31
		y = 2
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_research_slot = 1
		}
	}

	focus = {
		id = BRA_opt_igualdade
		icon = GFX_goal_generic_national_unity #icon = GFX_goal_tripartite_pact
		prerequisite = { focus = BRA_opt_tech focus = BRA_opt_industry }
		mutually_exclusive = { focus = BRA_opt_state }
		x = 31
		y = 3
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			remove_ideas = bra_national
		}
	}

	focus = {
		id = BRA_opt_state
		icon = GFX_goal_generic_political_pressure
		prerequisite = { focus = BRA_opt_tech focus = BRA_opt_industry }
		mutually_exclusive = { focus = BRA_opt_igualdade }
		x = 35
		y = 3
		cost = 10

		available_if_capitulated = yes

		completion_reward = {
			add_ideas = bra_state
		}
	}

	focus = {
		id = BRA_army_primancy_focus
		text = army_primancy_focus
		prerequisite = { focus = BRA_opt_state focus = BRA_opt_igualdade }
		mutually_exclusive = { focus = BRA_navy_primancy_focus }
		mutually_exclusive = { focus = BRA_opt_aviation }
		x = 35
		y = 4
		cost = 10
		icon = GFX_goal_generic_axis_build_infantry
		ai_will_do = {
			factor = 2
		}

		available_if_capitulated = yes

		completion_reward = {
			army_experience = 5


			random_owned_controlled_state = {
				limit = {
					is_in_home_area = yes
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
	
			random_owned_controlled_state = {
				limit = {
					is_in_home_area = yes
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}
	
	focus = {
		id = BRA_navy_primancy_focus
		text = navy_primancy_focus
		prerequisite = { focus = BRA_opt_state focus = BRA_opt_igualdade }
		mutually_exclusive = { focus = BRA_army_primancy_focus }
		mutually_exclusive = { focus = BRA_opt_aviation }
		x = 31
		y = 4
		cost = 10
		icon = GFX_goal_generic_build_navy
		ai_will_do = {
			factor = 2
		}

		available_if_capitulated = yes

		completion_reward = {
			navy_experience = 25
			random_owned_controlled_state = {
				limit = {
					is_in_home_area = yes
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_in_home_area = yes
					free_building_slots = {
						building = dockyard
						size > 0
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
	}

	focus = {
		id = BRA_opt_aviation
		icon = GFX_goal_generic_build_airforce
		prerequisite = { focus = BRA_opt_state focus = BRA_opt_igualdade }
		mutually_exclusive = { focus = BRA_army_primancy_focus }
		mutually_exclusive = { focus = BRA_navy_primancy_focus }
		x = 33
		y = 4
		cost = 10

		available_if_capitulated = yes


		complete_tooltip = {
			air_experience = 25
			if = { limit = { has_country_flag = aviation_effort_AB }
				add_building_construction = {
					type = air_base
					level = 2
					instant_build = yes
				}
			}			
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}			
		}

		completion_reward = {
			air_experience = 25

			if = {
				limit = {
					capital_scope = {
						NOT = {
							free_building_slots = {
								building = air_base
								size > 1
							}
						}
					}
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			if = {
				limit = {
					capital_scope = {
						free_building_slots = {
							building = air_base
							size > 1
						}
					}
				}
				capital_scope = {
					add_building_construction = {
						type = air_base
						level = 2
						instant_build = yes
					}
					ROOT = { set_country_flag = aviation_effort_AB }
				}
			}
			add_tech_bonus = {
				name = air_doc_bonus
				bonus = 0.5
				uses = 1
				category = air_doctrine
			}
		}
	}

	



    



			