
form_germany_category = {

	unite_germany = { 

		ai_will_do = {
			factor = 50
		}

		icon = generic_form_nation
		cost = 100
		allowed = {
			OR = {
				original_tag = GHG
				original_tag = GHM
				original_tag = GSP
				original_tag = GHH
			}
		}

		available = {
		    is_subject = no
			owns_state = 42
            owns_state = 50
            owns_state = 51
            owns_state = 52
            owns_state = 53
            owns_state = 54
            owns_state = 55
            owns_state = 56
            owns_state = 57
            owns_state = 58
            owns_state = 59
            owns_state = 60	
            owns_state = 61
            owns_state = 62
            owns_state = 63
            owns_state = 64
            owns_state = 65
            owns_state = 66
            owns_state = 67
            owns_state = 68
			owns_state = 763
		}

		visible = {
			OR = {
				original_tag = GHG
				original_tag = GHM
				original_tag = GSP
				original_tag = GHH
			}	
		}
		fire_only_once = yes

		complete_effect = {

			GER = {    
				set_country_flag = wrw_germany_united
			}
				
			if = {
			
				limit = {
					original_tag = GSP 
				}
			
				GER = {
					hidden_effect = {
					create_country_leader = {
							name = GER_albert_speer_wrwf
							desc = ""
							picture = "gfx/leaders/RUS/Portrait_Germany_Albert_Speer_fascist.dds"
							expire = "1953.3.1"
							ideology = nazism
							traits = {
								armaments_organizer 
							}
					}
				
					GER_albert_speer_wrwf = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = 1965.1.1
									traits = { armaments_organizer } 
								}
							}
						} 
					}
					retire_character = GER_reinhard_heydrich
					retire_character = GER_martin_bormann
					retire_character = GER_hermann_goring
					retire_character = GER_heinrich_himmler
					retire_character = GER_albert_speer
				}
			}
			
			if = {
			
				limit = {
					original_tag = GHM 
				}
			
				GER = {
				
					hidden_effect = {

					create_country_leader = {
							name = GER_martin_bormann_wrwf
							desc = ""
							picture = "gfx/leaders/RUS/Portrait_Germany_Martin_Bormann.dds"
							expire = "1953.3.1"
							ideology = nazism
							traits = {
								armaments_organizer 
							}
					}
				
					GER_martin_bormann_wrwf = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = 1965.1.1
									traits = { armaments_organizer } 
								}
							}
					}

					retire_character = GER_reinhard_heydrich
					retire_character = GER_martin_bormann
					retire_character = GER_hermann_goring
					retire_character = GER_heinrich_himmler
					retire_character = GER_albert_speer
				}
			}
			}
			if = {
			
				limit = {
					original_tag = GHH
				}
			hidden_effect = {
				GER = {
				
					create_country_leader = {
							name = GER_reinhard_heydrich_wrwf
							desc = ""
							picture = "gfx/leaders/RUS/Portrait_GER_Reinhard_Heydrich.dds"
							expire = "1953.3.1"
							ideology = nazism
							traits = {
								armaments_organizer 
							}
					}
				
					GER_reinhard_heydrich_wrwf = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = 1965.1.1
									traits = { armaments_organizer } 
								}
							}
					}

					retire_character = GER_reinhard_heydrich
					retire_character = GER_martin_bormann
					retire_character = GER_hermann_goring
					retire_character = GER_heinrich_himmler
					retire_character = GER_albert_speer
					}
				}
			}
			
			if = {
			
				limit = {
					original_tag = GHG
				}
			
				GER = {
				
				hidden_effect = {	

					create_country_leader = {
							name = GER_Hermann_Goring_wrwf
							desc = ""
							picture = GFX_portrait_GER_hermann_goring
							expire = "1953.3.1"
							ideology = nazism
							traits = {
								armaments_organizer 
							}
					}
				
					GER_Hermann_Goring_wrwf = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = 1965.1.1
									traits = { armaments_organizer } 
								}
							}
					}

					retire_character = GER_reinhard_heydrich
					retire_character = GER_martin_bormann
					retire_character = GER_hermann_goring
					retire_character = GER_heinrich_himmler
					retire_character = GER_albert_speer
				}
				}
			}
			every_state = {
					limit = {
							OR = {
								is_core_of = GHG
								is_core_of = GSP
								is_core_of = GHM
								is_core_of = GHH
							}
					}	
					add_core_of = GER
			}
			hidden_effect = {
				GER = {
						load_focus_tree = Post_War_focus_tree
						annex_country = { target = ROOT }
						change_tag_from = ROOT
				}
			}
		}
	}
}