### search_filters = {FOCUS_FILTER_POLITICAL}
### search_filters = {FOCUS_FILTER_RESEARCH}
### search_filters = {FOCUS_FILTER_INDUSTRY}
### search_filters = {FOCUS_FILTER_STABILITY}
### search_filters = {FOCUS_FILTER_WAR_SUPPORT}
### search_filters = {FOCUS_FILTER_MANPOWER}
### search_filters = {FOCUS_FILTER_ANNEXATION}

focus_tree = {
	id = german_focus_empire
	
	country = {
		factor = 0
		
		modifier = {
			add = 40
			tag = GER
			OR = {
				date < 1936.2.1
				has_country_flag = newempire
			}
		}
	}

	continuous_focus_position = { x = 125 y = 350 }
	
	default = no
	

	######################### Femboyvaria Foci ############################

	focus = {
		id = GER_the_bavarian_crisis
		icon = the_bavarian_crisis

		x = 13
		y = 0

		cost = 0

		ai_will_do = {
			factor = 80
		}

		bypass = {
			OR = {
				has_global_flag = GER_bavarian_crisis
				has_civil_war = yes
			}
		}

		available = {
			NOT = {
				has_global_flag = GER_bavarian_crisis
				has_civil_war = yes
			}
		}

		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_RESEARCH }

		completion_reward = {
			add_war_support = 0.05
		}
	}

	focus = {
		id = GER_resecure_germany
		icon = GFX_goal_generic_construction2
		prerequisite = { focus = GER_the_bavarian_crisis }
		x = 0
		y = 1
		relative_position_id = GER_the_bavarian_crisis
		cost = 25

		available = {
			has_civil_war = no
			has_war = no
		}

		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_stability = 0.15
		}
	}

	focus = {
		id = GER_old_man_wil
		icon = old_man_will
		prerequisite = { focus = GER_resecure_germany }
		mutually_exclusive = { focus = GER_return_of_the_liberals }

		available = {
			NOT = {
				has_global_flag = wilhelms_regent
			}
		}

		x = -3
		y = 2
		relative_position_id = GER_the_bavarian_crisis
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			if = {
				limit = {
					has_global_flag = wilhelms_promise
				}
				BVR = {
					BVR = { country_event = { id = fbavaria.67 } }
				}
			}
			add_country_leader_role = {
				character = GER_wilhelm_ii_new
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {

					}
				}
				promote_leader = yes
			}
		}
	}

	focus = {
		id = GER_return_of_the_liberals
		icon = new_germany_return_of_the_liberals
		prerequisite = { focus = GER_resecure_germany }
		mutually_exclusive = { focus = GER_old_man_wil }

		available = {
			has_global_flag = wilhelms_regent
		}

		x = 3
		y = 2
		relative_position_id = GER_the_bavarian_crisis
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			set_politics = {
				ruling_party = democratic
		        elections_allowed = no
		        last_election = "1935.12.17"
		        election_frequency = 48
			}
		}
	}

	# Mean

	focus = {
		id = GER_denounce_the_femboys
		icon = GFX_focus_wonderweapons
		prerequisite = { focus = GER_return_of_the_liberals focus = GER_old_man_wil }
		mutually_exclusive = { focus = GER_normalize_relations }

		x = -2
		y = 1
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		bypass = {
			OR = {
				NOT = {
					country_exists = BVR
				}
				has_war_with = BVR
			}
		}

		available = {
			NOT = {
				has_global_flag = wilhelms_heir
				has_global_flag = wilhelms_promise
			}
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.59 } }
		}
	}

	focus = {
		id = GER_reenforce_the_border
		icon = GFX_goal_fortify_the_westwall
		prerequisite = { focus = GER_denounce_the_femboys }

		x = -2
		y = 2
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		bypass = {
			OR = {
				NOT = {
					country_exists = BVR
				}
				has_war_with = BVR
			}
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			60 = {
				add_building_construction = {
				    type = bunker
				    level = 3
				    instant_build = yes
				    province = 3500
				}
				add_building_construction = {
				    type = bunker
				    level = 3
				    instant_build = yes
				    province = 482
				}
				add_building_construction = {
				    type = bunker
				    level = 3
				    instant_build = yes
				    province = 9497
				}
			}
			65 = {
				add_building_construction = {
				    type = bunker
				    level = 3
				    instant_build = yes
				    province = 9491
				}
			}
			55 = {
				add_building_construction = {
				    type = bunker
				    level = 5
				    instant_build = yes
				    province = 6488
				}
			}
		}
	}

	focus = {
		id = GER_demand_economic_subjugation
		icon = GFX_goal_generic_forceful_treaty
		prerequisite = { focus = GER_reenforce_the_border }
		x = -2
		y = 3
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available = {
			has_army_manpower = { size > 449999 }
		}

		bypass = {
			OR = {
				NOT = {
					country_exists = BVR
				}
				has_war_with = BVR
			}
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.60 } }
		}
	}

	focus = {
		id = GER_strike_at_the_rebels
		icon = GFX_goal_generic_territory_or_war
		prerequisite = { focus = GER_demand_economic_subjugation }

		x = -2
		y = 4
		relative_position_id = GER_return_of_the_liberals
		cost = 25

		ai_will_do = {
			factor = 80
		}

		available = {
			has_army_manpower = { size > 649999 }
			NOT = {
				has_idea = BVR_tribute_from_bavaria
			}
		}

		bypass = {
			OR = {
				NOT = {
					country_exists = BVR
				}
				has_war_with = BVR
			}
		}

		available_if_capitulated = yes

		will_lead_to_war_with = BVR

		completion_reward = {
			create_wargoal = {
			    type = annex_everything
			    target = BVR
			}
		}
	}

	# Nice

	focus = {
		id = GER_normalize_relations
		icon = normalize_relations
		prerequisite = { focus = GER_old_man_wil }
		mutually_exclusive = { focus = GER_denounce_the_femboys }

		available = {
			NOT = {
				has_war_with = BVR
			}
		}

		available = {
			OR = {
				has_global_flag = wilhelms_heir
				has_global_flag = wilhelms_promise
			}
		}

		bypass = {
			has_war_with = BVR
		}

		x = -4
		y = 1
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.55 } }
		}
	}

	focus = {
		id = GER_german_cooperation
		icon = GFX_goal_generic_construct_civilian
		prerequisite = { focus = GER_normalize_relations }

		available = {
			NOT = {
				has_war_with = BVR
			}
		}

		bypass = {
			has_war_with = BVR
		}

		x = -4
		y = 2
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 8
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.56 } }
		}
	}

	focus = {
		id = GER_wurttemburg_negotiations
		icon = GFX_goal_rhineland
		prerequisite = { focus = GER_german_cooperation }

		available = {
			NOT = {
				has_war_with = BVR
			}
			has_idea = BVR_german_ecnomic_cooperation_0
		}

		bypass = {
			has_war_with = BVR
		}

		x = -4
		y = 3
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 4
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.57 } }
		}
	}

	focus = {
		id = GER_the_german_alliance
		icon = GFX_goal_generic_military_deal
		prerequisite = { focus = GER_wurttemburg_negotiations }

		available = {
			NOT = {
				has_war_with = BVR
			}
			has_idea = BVR_german_ecnomic_cooperation_0
			is_in_faction = no
			BVR = {
				is_in_faction = no
			}
		}

		bypass = {
			has_war_with = BVR
		}

		x = -4
		y = 4
		relative_position_id = GER_return_of_the_liberals
		cost = 25

		ai_will_do = {
			factor = 4
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			BVR = { country_event = { id = fbavaria.58 } }
		}
	}

	#Cult

	focus = {
		id = GER_strengthen_the_cult
		icon = strengthen_the_cult
		prerequisite = { focus = GER_old_man_wil }

		x = 0
		y = 1
		relative_position_id = GER_old_man_wil
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_stability = 0.15
			add_war_support = 0.05
		}
	}

	focus = {
		id = GER_warsaw_berlin_axis
		icon = GFX_goal_poland_goal
		prerequisite = { focus = GER_strengthen_the_cult }

		available = {
			has_army_manpower = { size > 549999 }
		}

		x = 0
		y = 2
		relative_position_id = GER_old_man_wil
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_state_core = 85
			add_state_core = 807
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = POL
			}
		}
	}

	focus = {
		id = GER_strike_at_the_baltics
		icon = GFX_goal_generic_more_territorial_claims
		prerequisite = { focus = GER_warsaw_berlin_axis }

		available = {
			has_army_manpower = { size > 749999 }
		}

		x = 0
		y = 3
		relative_position_id = GER_old_man_wil
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = LIT
			}
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = LAT
			}
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = EST
			}
		}
	}

	focus = {
		id = GER_take_two
		icon = GFX_focus_attack_france
		prerequisite = { focus = GER_strike_at_the_baltics }

		available = {
			has_army_manpower = { size > 949999 }
		}

		x = 0
		y = 4
		relative_position_id = GER_old_man_wil
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = FRA
			}
		}
	}

	#Democracy
	
	focus = {
		id = GER_the_imperial_diet
		icon = GFX_focus_usa_voter_registration_act
		prerequisite = { focus = GER_return_of_the_liberals }

		x = 0
		y = 1
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			add_stability = 0.15
		}
	}

	focus = {
		id = GER_the_northern_block
		icon = GFX_goal_generic_army_tanks
		prerequisite = { focus = GER_the_imperial_diet }

		x = 0
		y = 2

		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available = {
			has_army_manpower = { size > 549999 }
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			set_rule = {
			    can_create_factions = yes
			}
			create_faction = GER_DEM_BLOCK
			SWE = { country_event = { id = fbavaria.61 } }
			NOR = { country_event = { id = fbavaria.61 } }
			DEN = { country_event = { id = fbavaria.61 } }
		}
	}

	focus = {
		id = GER_negotiations_with_czechoslovakia
		icon = GFX_focus_generic_treaty
		prerequisite = { focus = GER_the_northern_block }

		x = 0
		y = 3

		bypass = {
			OR = {
				NOT = {
					country_exists = CZE
				}
				CZE = {
					has_war = yes
				}
				CZE = {
					NOT = {
						owns_state = 69
					}
				}
			}
		}
		
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available = {
			has_army_manpower = { size > 749999 }
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			transfer_state = 69
			add_state_core = 69
			give_guarantee = CZE
		}
	}

	focus = {
		id = GER_alsace_or_war
		icon = GFX_goal_generic_dangerous_deal
		prerequisite = { focus = GER_negotiations_with_czechoslovakia }

		x = 0
		y = 4
		
		relative_position_id = GER_return_of_the_liberals
		cost = 25
		ai_will_do = {
			factor = 80
		}

		available = {
			has_army_manpower = { size > 949999 }
		}

		available_if_capitulated = yes
		search_filters = { FOCUS_FILTER_RESEARCH }
		completion_reward = {
			create_wargoal = {
			    type = puppet_wargoal_focus
			    target = FRA
			}
		}
	}
}
