the_second_weltkrieg_decision_cat = {

	LSM_HUN_YUG_ROM_issue = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			GER = { has_war_with = HUN }
		}

		visible = {
			OR = { 
				tag = YUG 
				tag = ROM
			}
			has_global_flag = empire_war
		}

		days_remove = 30

		complete_effect = {
			add_ai_strategy = {
				type = prepare_for_war
				id = HUN
				value = 999
			}
			if = { 
				limit = { 
					tag = YUG
				}
				remove_ideas = anti_german_military
			}
		}

		remove_effect = {
			add_ai_strategy = {
				type = prepare_for_war
				id = HUN
				value = -999
			}
			declare_war_on = {
				target = HUN
				type = take_core_state
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	LSM_GER_HUN_border_issue = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			is_in_faction_with = HUN
		}

		visible = {
			tag = GER
			GER = {
				controls_state = 74 
				controls_state = 69
			}
			is_in_faction_with = HUN
			has_global_flag = empire_war
		}

		complete_effect = {
			75 = { 
				add_core_of = GER
			}
			9 = {
				add_core_of = GER
			}
			GER = {
				transfer_state = 75
				transfer_state = 9
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	LSM_GER_HUN_border_issue_2 = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			is_in_faction_with = HUN
		}

		visible = {
			tag = GER
			has_global_flag = empire_war
			is_in_faction_with = HUN
			OR = {
				HUN = { surrender_progress > 0.2 }
				GER = { surrender_progress > 0.2 }
			}
		}

		complete_effect = {
			annex_country = { target = HUN transfer_troops = yes }
			every_state = {
				limit = {
					is_core_of = HUN
				}
				add_core_of = GER
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	LSM_HUN_claim_GER = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			GER = {
				surrender_progress > 0.5
			}
		}

		visible = {
			tag = HUN
			has_war_with = GER
			has_global_flag = empire_war
		}

		complete_effect = {
			every_state = { 
				limit = { 
					is_core_of = GER
					NOT = { is_core_of = FRA }
				}
				add_core_of = HUN
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	LSM_HUN_claim_ITA = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			ITA = {
				surrender_progress > 0.5
			}
		}

		visible = {
			tag = HUN
			has_war_with = ITA
			has_global_flag = empire_war
		}

		complete_effect = {
			160 = { add_core_of = HUN }
			736 = { add_core_of = HUN }
			852 = { add_core_of = HUN }
			39 = { add_core_of = HUN }
			850 = { add_core_of = HUN }
			HUN = {
				transfer_state = 160
				transfer_state = 736
				transfer_state = 852
				transfer_state = 39
				transfer_state = 850
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	LSM_GER_HUN_border_issue_alternate = {
	
		icon = generic_research

		fire_only_once = yes

		allowed = {
			always = yes
		}

		available = {
			OR = {
				NOT = { country_exists = HUN }
				HUN = { has_capitulated = yes }
			}
		}

		visible = {
			tag = GER
			GER = {
				controls_state = 74 
				controls_state = 69
			}
			has_global_flag = empire_war
		}

		complete_effect = {
			every_state = {
				limit = {
					is_core_of = HUN
					is_controlled_by = GER
				}
				add_core_of = GER
			}
			every_state = {
				limit = {
					is_core_of = HUN
					NOT = { is_controlled_by = GER }
					controller = { NOT = { is_in_faction_with = GER } }
				}
				add_claim_by = GER
			}
		}

		ai_will_do = {
			factor = 9999
		}
	}

	graveyard_of_empire = {

		icon = generic_research

		allowed = {
			always = yes
		}

		available = {
			is_ai = no
		}

		visible = {
			date < 1936.1.2
			is_ai = no
			not = { has_global_flag = empire_war }
			has_global_flag = flavour_is_allowed
		}

		complete_effect = {
			custom_effect_tooltip = "Suspiciously familiar borders will be drawn over the world"
			hidden_effect = {
				every_country = {
					add_ideas = preparing_for_the_weltkrieg
				}
				set_global_flag = supply_hub_spawn	
				every_state = {
					add_building_construction = {
						type = supply_node
						level = 1
						instant_build = yes
						province = {
							all_provinces = yes
							limit_to_victory_point > 0
						}
					}
				}
				set_global_flag = empire_war
				284 = { 
					add_core_of = AST
				}
				629 = {
					add_core_of = AST
				}
				630 = {
					add_core_of = AST
				}
				631 = {
					add_core_of = AST
				}
				632 = {
					add_core_of = AST
				}
				633 = {
					add_core_of = AST
				}
				634 = {
					add_core_of = AST
				}
				635 = {
					add_core_of = AST
				}
				636 = {
					add_core_of = AST
				}
				638 = {
					add_core_of = AST
				}
				639 = {
					add_core_of = AST
				}
				641 = {
					add_core_of = AST
				}
				642 = {
					add_core_of = AST
				}
				643 = {
					add_core_of = AST
				}
				646 = {
					add_core_of = AST
				}
				647 = {
					add_core_of = AST
				}
				648 = { 
					add_core_of = AST 
				}
				684 = {
					add_core_of = AST
				}
				723 = {
					add_core_of = AST
				}
				725 = {
					add_core_of = AST
				}
				726 = {
					add_core_of = AST
				}
				727 = {
					add_core_of = AST
				}
				734 = {
					add_core_of = AST
				}
				645 = {
					add_core_of = AST
				}
				524 = {
					add_core_of = AST
				}
				ENG = {
					release = AST
				}
				USA = {
					delete_unit = { state = 629 }
					delete_unit = { state = 630 }
					delete_unit = { state = 631 }
					delete_unit = { state = 632 }
					delete_unit = { state = 638 }
					delete_unit = { state = 642 }
					delete_unit = { state = 727 }
					release = AST
				}
				FRA = {
					release = AST
				}
				AST = {
					change_tag_from = NZL
				}
				AST = {
					annex_country = { target = NZL transfer_troops = yes }
					NZL = {
						every_unit_leader = {
							set_nationality = AST
						}
					}
				}
				AST = {
					every_owned_state = { add_core_of = AST }
				}
				BUL = {
					transfer_state = 77
					transfer_state = 803
					transfer_state = 106
					transfer_state = 731
					transfer_state = 184
					set_party_name = {
						ideology = neutrality
						long_name = BUL_ferdinand_loyalists_party_long
						name = BUL_ferdinand_loyalists_party
					}
					set_country_flag = BUL_tbe_flag
					BUL_set_appropriate_cosmetic_tag = yes
					add_country_leader_role = {
						character = BUL_ferdinand_i
						country_leader = {
							expire = "1965.1.1"
							ideology = despotism
							traits = {
								dreams_of_a_new_byzantium
								railroad_enthusiast
							}
						}
						promote_leader = yes
					}
					every_owned_state = { add_core_of = BUL }
					remove_ideas = BUL_army_restrictions
				}
				HOL = {
					annex_country = { target = BEL transfer_troops = yes }
					set_cosmetic_tag = UNL_UNIFIED
					every_owned_state = { add_core_of = HOL }
				}
				HOL = {
					change_tag_from = BEL
					every_country = {
						limit = {
							tag = BEL
						}
						every_unit_leader = {
							set_nationality = HOL
						}
					}
				}
				PER = {
					annex_country = { target = AFG transfer_troops = yes }
					annex_country = { target = IRQ transfer_troops = yes }
					transfer_state = 799
					transfer_state = 677
					transfer_state = 680
					transfer_state = 554
					transfer_state = 553
					transfer_state = 444
					transfer_state = 445
					transfer_state = 442
					transfer_state = 656
					set_cosmetic_tag = PER_UNIFIED
					add_country_leader_trait = caliph
					add_country_leader_trait = man_of_the_nation
					every_owned_state = { add_core_of = PER }
					diplomatic_relation = {
						country = SAU
						relation = guarantee
						active = yes
					}
					AFG = {
						every_unit_leader = {
							set_nationality = PER
						}
					}
					IRQ = {
						every_unit_leader = {
							set_nationality = PER
						}
					}
				}
				PER = {
					change_tag_from = AFG
				}
				PER = {
					change_tag_from = IRQ
				}
				SAU = {
					annex_country = { target = YEM transfer_troops = yes }
					annex_country = { target = OMA transfer_troops = yes }
					transfer_state = 765
					transfer_state = 658
					transfer_state = 659
					transfer_state = 455
					transfer_state = 454
					transfer_state = 453
					transfer_state = 446
					set_cosmetic_tag = ARA_UNIFIED
					add_country_leader_trait = the_statist
					add_country_leader_trait = the_academic
					every_owned_state = { add_core_of = SAU }
					diplomatic_relation = {
						country = PER
						relation = guarantee
						active = yes
					}
					YEM = {
						every_unit_leader = {
							set_nationality = SAU
						}
					}
					OMA = {
						every_unit_leader = {
							set_nationality = SAU
						}
					}
				}
				SAU = {
					change_tag_from = YEM
				}
				SAU = {
					change_tag_from = OMA
				}
				RAJ = {
					annex_country = { target = NEP transfer_troops = yes }
					annex_country = { target = BHU transfer_troops = yes }
					transfer_state = 321
					transfer_state = 320
					transfer_state = 422
					set_country_flag = RAJ_civil_war
					add_country_leader_trait = indomitable_perseverance
					add_country_leader_trait = generallissimo
					every_owned_state = { add_core_of = RAJ }
				}
				RAJ = {
					change_tag_from = NEP
				}
				RAJ = {
					change_tag_from = NEP
				}
				CAN = {
					transfer_state = 332
					transfer_state = 331
					transfer_state = 463
				}
				ELS = {
					set_cosmetic_tag = USC_UNIFIED
					every_country = {
						limit = {
							OR = {
								tag = NIC
								tag = GUA
								tag = HON
								tag = COS
								tag = PAN
								tag = HAI
								tag = DOM
								tag = CUB
							}
						}
						every_unit_leader = {
							set_nationality = ELS
						}
					}
					transfer_state = 311
					transfer_state = 685
					transfer_state = 689
					transfer_state = 690
					transfer_state = 693
					transfer_state = 686
					transfer_state = 694
					transfer_state = 308
					transfer_state = 692
					annex_country = { target = NIC transfer_troops = yes }
					annex_country = { target = GUA transfer_troops = yes }
					annex_country = { target = HON transfer_troops = yes }
					annex_country = { target = COS transfer_troops = yes }
					annex_country = { target = PAN transfer_troops = yes }
					annex_country = { target = HAI transfer_troops = yes }
					annex_country = { target = DOM transfer_troops = yes }
					annex_country = { target = CUB transfer_troops = yes }
					every_owned_state = { add_core_of = ELS }
				}
				ELS = {
					change_tag_from = NIC
				}
				ELS = {
					change_tag_from = GUA
				}
				ELS = {
					change_tag_from = HON
				}
				ELS = {
					change_tag_from = COS
				}
				ELS = {
					change_tag_from = PAN
				}
				ELS = {
					change_tag_from = HAI
				}
				ELS = {
					change_tag_from = DOM
				}
				ELS = {
					change_tag_from = CUB
				}
				PRU = {
					set_cosmetic_tag = GCO_UNIFIED
					every_country = {
						limit = {
							OR = {
								tag = ECU
								tag = COL
								tag = VEN
							}
						}
						every_unit_leader = {
							set_nationality = PRU
						}
					}
					transfer_state = 695
					transfer_state = 691
					annex_country = { target = ECU transfer_troops = yes }
					annex_country = { target = COL transfer_troops = yes }
					annex_country = { target = VEN transfer_troops = yes }
					every_owned_state = { add_core_of = PRU }
				}
				PRU = {
					change_tag_from = ECU
				}
				PRU = {
					change_tag_from = PRU
				}
				PRU = {
					change_tag_from = VEN
				}
				ARG = {
					every_country = {
						limit = {
							OR = {
								tag = BOL
								tag = CHL
								tag = PAR
							}
						}
						every_unit_leader = {
							set_nationality = ARG
						}
					}
					annex_country = { target = BOL transfer_troops = yes }
					annex_country = { target = CHL transfer_troops = yes }
					annex_country = { target = PAR transfer_troops = yes }
					transfer_state = 299
					transfer_state = 720
					every_owned_state = { add_core_of = ARG }
				}
				ARG = {
					change_tag_from = BOL
				}
				ARG = {
					change_tag_from = CHL
				}
				ARG = {
					change_tag_from = PAR
				}
				BRA = {
					every_country = {
						limit = {
							OR = {
								tag = URG
							}
						}
						every_unit_leader = {
							set_nationality = BRA
						}
					}
					transfer_state = 687
					transfer_state = 309
					transfer_state = 310
					annex_country = { target = URG transfer_troops = yes }
					every_owned_state = { add_core_of = BRA }
				}
				BRA = {
					change_tag_from = URG
				}
				FRA = {
					remove_ideas = FRA_disjointed_government
					if = {
						limit = { is_ai = yes }
						load_oob = "FRA_1939"
					}
				}
				ENG = {
					remove_ideas = ENG_the_war_to_end_all_wars
					if = {
						limit = { is_ai = yes }
						load_oob = "ENG_1939"
					}
				}
				HOL = {
					remove_ideas = HOL_aloof_neutrality 
					remove_ideas = HOL_shell_shocked_spectator_5
				}
				GER = { transfer_state = 8 }
				GER = { transfer_state = 28 }
				GER = { transfer_state = 86 }
				GER = { transfer_state = 807 }
				GER = { transfer_state = 762 }
				GER = { transfer_state = 807 }
				GER = { transfer_state = 85 }
				GER = { transfer_state = 188 }
				GER = {
					change_tag_from = LUX
				}
				GER = {
					every_owned_state = { add_core_of = GER }
					complete_national_focus = GER_bulwark_against_bolshevism
					if = {
						limit = { is_ai = yes }
						load_oob = "GER_1939_nsb"
					}
				}
				FIN = {
					annex_country = { target = SWE transfer_troops = yes }
					annex_country = { target = DEN transfer_troops = yes }
					annex_country = { target = NOR transfer_troops = yes }
					annex_country = { target = ICE transfer_troops = yes }
					complete_national_focus = FIN_a_new_course_for_kokoomus
					complete_national_focus = FIN_the_finnish_throne
					set_cosmetic_tag = NDC_UNIFIED				
					add_popularity = {
						ideology = neutrality
						popularity = 1
					}
					every_owned_state = { add_core_of = FIN }
					SWE = {
						every_unit_leader = {
							set_nationality = FIN
						}
					}
					DEN = {
						every_unit_leader = {
							set_nationality = FIN
						}
					}
					NOR = {
						every_unit_leader = {
							set_nationality = FIN
						}
					}
					ICE = {
						every_unit_leader = {
							set_nationality = FIN
						}
					}
				}
				FIN = {
					change_tag_from = SWE
				}
				FIN = {
					change_tag_from = DEN
				}
				FIN = {
					change_tag_from = NOR
				}
				FIN = {
					change_tag_from = ICE
				}
				ENG = {
					annex_country = { target = IRE transfer_troops = yes }
					every_state = {
						limit = { 
							is_core_of = IRE
						}
						add_core_of = ENG
					}
				}
				HUN = {
					change_tag_from = AUS
				}
				HUN = {
					change_tag_from = CZE
				}
				HUN = {
					complete_national_focus = HUN_proclaim_greater_hungary
					remove_ideas = HUN_treaty_of_triannon
					remove_ideas = HUN_treaty_of_triannon_aat
					complete_national_focus = HUN_proclaim_greater_hungary
					create_country_leader = {
						name = "Otto von Habsburg"
						picture = GFX_Portrait_hungary_otto_von_hapsburg
						expire = "1965.1.1"
						ideology = nazism
						traits = {
							dictator
						}
					}
					create_country_leader = {
						name = "Otto von Habsburg"
						picture = GFX_Portrait_hungary_otto_von_hapsburg
						expire = "1965.1.1"
						ideology = despotism
						traits = {
							dictator
						}
					}
					if = {
						limit = { is_ai = yes }
						load_oob = "HUN_1939"
					}
					AUS = {
						every_unit_leader = {
							set_nationality = HUN
						}
					}
					CZE = {
						every_unit_leader = {
							set_nationality = HUN
						}
					}
					transfer_state = 102
					transfer_state = 103
					transfer_state = 104
					transfer_state = 804
					transfer_state = 109
					transfer_state = 45
					transfer_state = 83
					transfer_state = 76
					transfer_state = 84
					transfer_state = 764
					transfer_state = 82	
					transfer_state = 88
					transfer_state = 91	
					transfer_state = 89	
					transfer_state = 80	
					transfer_state = 853	
					transfer_state = 163
					annex_country = { target = CZE transfer_troops = yes }
					annex_country = { target = AUS transfer_troops = yes }
					set_cosmetic_tag = HUN_EMPIRE
					every_owned_state = { add_core_of = HUN }
				}
				SOV = {
					transfer_state = 78
					transfer_state = 766
					annex_country = { target = POL transfer_troops = yes }
					annex_country = { target = LIT transfer_troops = yes }
					annex_country = { target = LAT transfer_troops = yes }
					annex_country = { target = EST transfer_troops = yes }
					annex_country = { target = TAN transfer_troops = yes }
					every_owned_state = { add_core_of = SOV }
					LIT = {
						every_unit_leader = {
							set_nationality = GER #we dont like commie
						}
					}
					LAT = {
						every_unit_leader = {
							set_nationality = GER #we dont like commie
						}
					}
					EST = {
						every_unit_leader = {
							set_nationality = GER #we dont like commie
						}
					}
					POL = {
						every_unit_leader = {
							set_nationality = ENG #we like neither commie or germans
						}
					}
				}
				SOV = {
					change_tag_from = POL
					change_tag_from = LIT
					change_tag_from = LAT
					change_tag_from = EST
					change_tag_from = TAN
				}
				FRA = { give_guarantee = HOL }
				ENG = { give_guarantee = HOL }
				GER = { give_guarantee = HOL }
				GER = { give_guarantee = HUN }
				HUN = { give_guarantee = GER }
			}
		}
	}
}