GER_oberkommando = {

	GER_battle_of_vienna_decision = {
		icon = GFX_decision_generic_ignite_civil_war

		available = {
			has_completed_focus = GER_battle_of_vienna
		}

		fire_only_once = yes
		allowed = {
			tag = GER
		}

		days_remove = 15

		visible = {
			has_completed_focus = GER_battle_of_vienna
			controls_state = 4
			has_war = yes
			has_start_date < 1945.4.1
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 4
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			custom_effect_tooltip = GER_visible_on_map_tt
			hidden_effect = {
				GER = {
					country_event = { id = offensives.10 }		
				}
			}		
		}
	}

	GER_armee_ostpreussen_decision = {
		icon = GFX_decision_generic_ignite_civil_war

		available = {
			has_completed_focus = GER_armee_ostpreussen
		}

		fire_only_once = yes
		allowed = {
			tag = GER
		}

		days_remove = 50

		visible = {
			has_completed_focus = GER_armee_ostpreussen
			controls_state = 763
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 763
        		state = 85
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			custom_effect_tooltip = GER_visible_on_map_tt
			hidden_effect = {
				GER = {
					country_event = { id = offensives.11 }		
				}
			}		
		}
	}

	GER_festung_ruhr_decision = {
		icon = GFX_decision_generic_ignite_civil_war

		available = {
			has_completed_focus = GER_festung_ruhr
		}

		fire_only_once = yes
		allowed = {
			tag = GER
		}

		days_remove = 25

		visible = {
			has_completed_focus = GER_festung_ruhr
			OR = {
				controls_state = 42
				controls_state = 51				
			}
			has_war = yes
			has_start_date < 1945.4.1
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 42
        		state = 51
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			custom_effect_tooltip = GER_visible_on_map_tt
			hidden_effect = {
				GER = {
					country_event = { id = offensives.12 }		
				}				
			}
		}
	}

	GER_battle_of_remagen_decision = {
		icon = GFX_decision_generic_ignite_civil_war

		available = {
			has_completed_focus = GER_battle_of_remagen
		}

		fire_only_once = yes
		allowed = {
			tag = GER
		}

		days_remove = 25

		visible = {
			has_completed_focus = GER_battle_of_remagen
			OR = {
				controls_state = 42
			}
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 42
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			custom_effect_tooltip = GER_visible_on_map_tt
			hidden_effect = {
				GER = {
					country_event = { id = offensives.13 }		
				}				
			}
		}
	}
	GER_operation_solstice_decision = {
		icon = GFX_decision_generic_ignite_civil_war

		available = {
			has_completed_focus = GER_operation_solstice
		}

		fire_only_once = yes
		allowed = {
			tag = GER
		}

		days_remove = 9

		visible = {
			has_start_date < 1945.3.5
			has_completed_focus = GER_operation_solstice
			OR = {
				controls_state = 63
			}
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 63
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			custom_effect_tooltip = GER_visible_on_map_tt
			hidden_effect = {
				GER = {
					country_event = { id = offensives.17 }		
				}				
			}
		}
	}


	##########################
	##### TIMED MISSIONS #####
	##########################

	GER_operation_hannibal = {
		icon = GFX_decision_generic_human_torpedo

		available = {
			hidden_trigger = {
				has_war = yes
			army_manpower_in_state = {
    			type = infantry
    			amount > 1500000
    			state = 190		
			}
			army_manpower_in_state = {
    			type = infantry
    			amount > 1500000
    			state = 763		
				}			
			}
		}

		fire_only_once = yes
		is_good = yes
		days_mission_timeout = 60
		allowed = {
			tag = GER
		}
		activation = {
			army_manpower_in_state = {
    			type = infantry
    			amount > 15000
    			state = 190
			}		
		}

		visible = {
			tag = GER
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 763
        		state = 190
    		}
    		highlight_color_while_active = 3
		}

		complete_effect = {
			#custom_effect_tooltip = operation_hannibal_tt
		}		
		
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05		
		}
	}
	GER_hold_holland = {
		icon = GFX_decision_generic_mountain_fortification

		available = {
			HOL = {
				NOT = { controls_state = 7 }	
			}
		}

		fire_only_once = yes
		is_good = yes
		days_mission_timeout = 65
		allowed = {
			tag = GER
		}
		activation = {
			HOL = {
				controls_state = 7			
			}		
		}

		visible = {
			tag = GER
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 7
    		}
    		highlight_color_while_active = 3
		}

		# Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}	

		# Failure
		complete_effect = {
			add_war_support = -0.05
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_ruhr_pocket = {

		icon = GFX_decision_generic_ignite_civil_war

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			NOT = { 
				controls_state = 57
				controls_state = 51
				}
		}

		days_mission_timeout = 15

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 51
        		state = 57
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_start_date > 1945.4.1
			has_civil_war = no
			4 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
			GER = {
				country_event = { id = scenario.1 days = 1 }		
			}
		}
	}
	GER_hold_vienna = {

		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			NOT = { controls_state = 4 }
		}

		days_mission_timeout = 20

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 4
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_civil_war = no
			4 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
			set_country_flag = GER_held_vienna
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_hold_berlin = {

		icon = GFX_decision_generic_nationalism

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			NOT = { 
				controls_state = 64 
			}
		}

		days_mission_timeout = 45

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 64
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_civil_war = no
			OR = {
			64 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}			
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_hold_stuttgart = { #Heilbronn

		icon = GFX_decision_generic_ignite_civil_war

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			NOT = { controls_province = 3530 }
		}

		days_mission_timeout = 15

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 50
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_civil_war = no
			50 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_hold_italy = { #Operation Grapeshot

		icon = GFX_decision_border_war

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			ITA = {
				NOT = { controls_state = 159 }
			}
		}

		days_mission_timeout = 45

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			date > 1945.4.8
			159 = {
				is_controlled_by = ITA
			}
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 159
    		}
    		highlight_color_while_active = 3
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}	
	GER_hold_munich = { 

		icon = GFX_decision_generic_nationalism

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			GER = {
				NOT = { controls_state = 52 }
			}
		}

		days_mission_timeout = 40

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			52 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
			52 = {
				is_controlled_by = GER
			}
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 52
    		}
    		highlight_color_while_active = 3
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}	
	GER_hold_warschau = {

		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			NOT = { controls_state = 10 }
		}

		days_mission_timeout = 35

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 10
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_start_date < 1945.1.15
			has_civil_war = no
			10 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_hold_budapest = {

		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			HUN = {
				NOT = { controls_province = 9660 }
			}
		}

		days_mission_timeout = 35

		fire_only_once = yes

		is_good = yes

		highlight_states = {
    		highlight_state_targets = {
        		state = 155
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_start_date < 1945.1.15
			has_civil_war = no
			HUN = {
				controls_province = 9660			
			}
		}

		#Success
		timeout_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}

		# Failure
		complete_effect = {
			add_war_support = -0.02
			GER_scenario_wehrmacht_level_up = yes
			GER_scenario_disloyalty_level_up = yes
		}
	}
	GER_wacht_am_rhein = {

		icon = GFX_decision_border_war

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			controls_state = 6
		}

		days_mission_timeout = 16

		fire_only_once = yes

		is_good = no

		highlight_states = {
    		highlight_state_targets = {
        		state = 8
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_start_date < 1945.1.15
		}

		#Success
		complete_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			add_command_power = 30
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}
	}
	GER_operation_nordwind = {

		icon = GFX_decision_border_war

		allowed = {
			original_tag = GER
		}

		#Fail trigger
		available = {
			controls_province = 9503
		}

		days_mission_timeout = 13

		fire_only_once = yes

		is_good = no

		highlight_states = {
    		highlight_state_targets = {
        		state = 28
    		}
    		highlight_color_while_active = 3
		}

		activation = {
			has_war = yes
			has_start_date < 1945.1.15
		}
		#Success
		complete_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			add_command_power = 30
			GER_scenario_wehrmacht_level_down = yes
			GER_scenario_disloyalty_level_down = yes
		}
	}
}

#NOTE: Revisit timed mission logic
JAP_hold_territory = {
	JAP_conquer_chongqing = {
		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			controls_state = 605
		}

		days_mission_timeout = 120

		fire_only_once = yes

		is_good = yes

		activation = {
			JAP = { has_completed_focus = JAP_the_scramble_for_chongqing }
				CHI = {
					controls_state = 605
				}
			has_war = yes
			has_civil_war = no
			605 = {
				is_controlled_by = CHI
			}
		}

		#Success
		timeout_effect = {
			add_war_support = -0.05
			add_stability = -0.05
		}
		#Fail
		complete_effect = {
			add_stability = 0.05
			add_war_support = 0.05
			JAP = { country_event = { id = scenario.33 } }
		}	
	}
	JAP_operation_ten_go = {
		icon = GFX_decision_generic_human_torpedo 

		available = {
			JAP = {
				has_war_with = USA
			}
			526 = {	
				NOT = { is_fully_controlled_by = JAP }
			}
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
			has_start_date < 1945.3.13
		}

		fire_only_once = yes

		custom_cost_trigger = {
			has_political_power > 14
			has_navy_experience > 9
		}
		custom_cost_text = decision_cost_pp_15_NavXP_10

		complete_effect = {
			hidden_effect = {
				add_political_power = -15
				navy_experience = -10
			}
		}

		complete_effect = {
			random_list = {
				60 = {
					JAP = {
						country_event = { id = scenario.20 days = 3 } 
					}						
				}
				30 = {
					random_other_country = {
						limit = {
							original_tag = USA
						}
						hidden_effect = {
							JAP = {
								country_event = { id = scenario.21 days = 3 } 
							}						
						}
						destroy_ships = {
							type = ship_hull_carrier
							count = 1
						}
						destroy_ships = {
							type = ship_hull_heavy
							count = 1
						}
					}
				}
				10 = {
					random_other_country = {
						limit = {
							original_tag = USA
						}
						hidden_effect = {
							JAP = {
								country_event = { id = scenario.21 days = 3 } 
							}						
						}
						destroy_ships = {
							type = ship_hull_carrier
							count = 2
						}
						destroy_ships = {
							type = ship_hull_heavy
							count = 1
						}
					}
				}
			}
		}		
	}
	JAP_operation_sho_go = {
		icon = GFX_decision_generic_operation 

		available = {
			JAP = {
				has_war_with = USA
				526 = {
					NOT = { is_fully_controlled_by = JAP }
				}
			}
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
			has_start_date < 1945.3.13
		}

		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 24
		}
		custom_cost_text = decision_cost_CP_25


		complete_effect = {
			hidden_effect = {
				add_command_power = -25
			}
			if = {
				limit = { has_idea = JAP_sho_go_1 }
				swap_ideas = {
    				remove_idea = JAP_sho_go_1
    				add_idea = JAP_sho_go_2
				}
			}
		}		
	}
	JAP_operation_meigo_sakusen = {
		icon = GFX_decision_generic_army_support 

		available = {
			JAP = {
				has_war_with = FRA
				has_full_control_of_state = 741
				has_full_control_of_state = 671
				has_full_control_of_state = 286
				has_full_control_of_state = 670
			}
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
			has_start_date < 1945.1.13
			has_completed_focus = JAP_move_against_garde_indochinoise
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			#custom_effect_tooltip = 
			CAM = {
				transfer_state = 741
			}
			VIN = {
				transfer_state = 671
				transfer_state = 286
			}
			LAO = {
				transfer_state = 670
			}
			hidden_effect = {
		VIN = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = USA
			}
		}
		CAM = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = USA
			}
		}
		LAO = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = USA
			}
		}
		VIN = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = CHI
			}
		}
		CAM = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = CHI
			}
		}
		LAO = {
			add_to_war = {
				targeted_alliance = JAP
				enemy = CHI
			}
		}			
			}
		
		}	
	}
	# Japanese Offensive
	JAP_west_henan_north_hubei_offensive = {
		icon = GFX_decision_generic_operation

		ai_will_do = {
			base = 0.5
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		available = {
			tag = JAP
			command_power > 24
			JAP = {
				NOT = { has_full_control_of_state = 607 }
			}
		}

		visible = {
			original_tag = JAP
			JAP = {
				NOT = { has_full_control_of_state = 607 }
			}
		}

		ai_hint_pp_cost = 15
		custom_cost_trigger = {
			command_power > 24
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_25_pp_15

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -15
			}
			# CHECK 
			JAP = {
				set_country_flag = JAP_military_offensive_in_progress_flag # CHECK
			}
			custom_effect_tooltip = JAP_military_offensive_scope_tt # CHECK
			hidden_effect = {
				JAP_set_military_offensive_effect = yes
			}
			activate_mission = JAP_west_henan_north_hubei_offensive_ongoing
		}

		remove_effect = {

		}
	}

	# Japanese West Hunan Counteroffensive
	JAP_west_hunan_offensive = {
		icon = GFX_decision_generic_operation

		ai_will_do = {
			base = 1000
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		available = {
			tag = JAP
			command_power > 24
			JAP = {
				NOT = { has_full_control_of_state = 602 }
			}
		}

		visible = {
			original_tag = JAP
			JAP = {
				NOT = { has_full_control_of_state = 602 }
			}
		}

		ai_hint_pp_cost = 15
		custom_cost_trigger = {
			command_power > 24
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_25_pp_15

		complete_effect = {
			hidden_effect = {
				add_command_power = -24
				add_political_power = -15
			}
			# CHECK 
			JAP = {
				set_country_flag = JAP_military_offensive_in_progress_flag # CHECK
			}
			custom_effect_tooltip = JAP_military_offensive_scope_tt # CHECK
			hidden_effect = {
				JAP_set_military_offensive_effect_hunan = yes
			}
			activate_mission = JAP_west_hunan_offensive_ongoing
		}
	}

	# Japanese Second Guanxi Campaign
	JAP_second_guanxi_offensive = {
		icon = GFX_decision_generic_operation

		ai_will_do = {
			base = 100
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		available = {
			# CHECK
			tag = JAP
			command_power > 24 # FIX 
			JAP = {
				NOT = { controls_province = 7137 } # Nanning
			}
		}

		visible = {
			original_tag = JAP
			JAP = {
				NOT = { controls_province = 7137 } # Nanning
			}
		}

		ai_hint_pp_cost = 15
		custom_cost_trigger = {
			command_power > 24
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_25_pp_15

		complete_effect = {
			hidden_effect = {
				add_command_power = -24
				add_political_power = -15
			}
			# CHECK 
			JAP = {
				set_country_flag = JAP_military_offensive_in_progress_flag # CHECK
			}
			custom_effect_tooltip = JAP_military_offensive_scope_tt # CHECK
			hidden_effect = {
				JAP_set_military_offensive_effect_guanxi = yes
			}
			activate_mission = JAP_second_guanxi_offensive_ongoing
		}
	}
}

JAP_operation_ketsugo_cat = {
	JAP_operation_ketsu_go = {
		icon = GFX_decision_generic_army_support 

		available = {
			JAP = {
				has_war_with = USA
			}
			has_global_flag = JAP_operation_downfall_underway
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_remove = 30

		custom_cost_trigger = {
			command_power > 24
		}
		custom_cost_text = decision_cost_CP_25

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
			}
		}

		modifier = {
			army_core_defence_factor = 0.1
			army_morale_factor = 0.07
		}	
	}
	JAP_the_glorious_death_of_one_million = {
		icon = GFX_decision_generic_military 

		available = {
			JAP = {
				has_war_with = USA
			}
			has_global_flag = JAP_operation_downfall_underway
			has_completed_focus = JAP_kyushu_coastal_wall
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_remove = 180

		custom_cost_trigger = {
			has_political_power > 14
			has_army_experience > 9
		}
		custom_cost_text = decision_cost_pp_15_ArmXP_10

		complete_effect = {
			hidden_effect = {
				add_political_power = -15
				army_experience = -10
			}
		}

		modifier = {
			army_breakthrough_against_major_factor = -0.2
			org_loss_when_moving = 0.1			
			dig_in_speed_factor = 0.15
			pocket_penalty = -0.15
			weekly_manpower = 12500
		}	
	}
	JAP_establish_the_vfc_decision = {
		icon = GFX_decision_generic_military 

		available = {
			JAP = {
				has_war_with = USA
			}
			has_completed_focus = JAP_establish_the_vfc
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
			has_completed_focus = JAP_establish_the_vfc
			check_variable = { var = JAP_vfc value = 12 compare = less_than_or_equals }
		}

		fire_only_once = no

		days_remove = 60

		custom_cost_trigger = {
			has_political_power > 14
			has_army_experience > 9
		}
		custom_cost_text = decision_cost_pp_15_ArmXP_10

		complete_effect = {
			hidden_effect = {
				add_political_power = -15
				army_experience = -10
				add_to_variable = { var = JAP_vfc value = 3 }
			}
		}	

		remove_effect = {
			custom_effect_tooltip = JAP_vfc_var_value_tt
		}
	}
	JAP_evacuate_the_ighq_underground = {
		icon = GFX_decision_generic_operation 

		available = {
			JAP = {
				has_war_with = USA
			}
			has_global_flag = JAP_operation_downfall_underway
		}

		allowed = {
			original_tag = JAP
		}

		visible = {
			original_tag = JAP
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_ideas = JAP_relocated_government
			custom_effect_tooltip = JAP_ighq_underground_tt
		}	
	}
	JAP_fortify_kyushu = {
		icon = GFX_decision_generic_mountain_fortification

		ai_will_do = {
			base = 1
		}

		available = {
			has_completed_focus = JAP_kyushu_coastal_wall
		}

		visible = {
			528 = { #
				any_province_building_level = {
					province = {
						id = 1020
						id = 4102
						id = 9950
						id = 12032
						id = 11949
						id = 1183
					}
					building = coastal_bunker
					level < 5
				}
			}
		}

		available = {
			has_full_control_of_state = 528 #
		}

		days_remove = 90

		fire_only_once = yes

		ai_hint_pp_cost = 15
		custom_cost_trigger = {
			command_power > 24
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_25_pp_15

		modifier = {
			civilian_factory_use = 2
		}

		cancel_trigger = {
			NOT = { has_full_control_of_state = 528 }
		}

		cancel_effect = {
			#clr_country_flag = ITA_vallo_alpino_project_ongoing_flag
		}

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -15
			}
		}

		remove_effect = {
			#clr_country_flag = ITA_vallo_alpino_project_ongoing_flag

			custom_effect_tooltip = JAP_fortify_kyushu_tt
			hidden_effect = {
				528 = { #
					add_building_construction = {
						type = coastal_bunker
						level = 2
						province = {
							id = 1020
							id = 4102
							id = 9950
							id = 12032
							id = 11949
							id = 1183
						}
						instant_build = yes
					}
				}
			}
		}
	}
	JAP_fortify_tokyo = {
		icon = GFX_decision_generic_mountain_fortification

		ai_will_do = {
			base = 1
		}

		available = {
			has_completed_focus = JAP_fortify_tokyo_beachheads_focus
		}

		visible = {
			528 = { #
				any_province_building_level = {
					province = {
						id = 1020
						id = 4102
						id = 9950
						id = 12032
						id = 11949
						id = 1183
					}
					building = coastal_bunker
					level < 5
				}
			}
		}

		available = {
			has_full_control_of_state = 528 #
		}

		days_remove = 90

		fire_only_once = yes

		ai_hint_pp_cost = 15
		custom_cost_trigger = {
			command_power > 24
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_25_pp_15

		modifier = {
			civilian_factory_use = 2
		}

		cancel_trigger = {
			NOT = { has_full_control_of_state = 528 }
		}

		cancel_effect = {
			#clr_country_flag = ITA_vallo_alpino_project_ongoing_flag
		}

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -15
			}
		}

		remove_effect = {
			#clr_country_flag = ITA_vallo_alpino_project_ongoing_flag

			custom_effect_tooltip = JAP_fortify_tokyo_tt
			hidden_effect = {
				528 = { #
					add_building_construction = {
						type = coastal_bunker
						level = 2
						province = {
							id = 1020
							id = 4102
							id = 9950
							id = 12032
							id = 11949
							id = 1183
						}
						instant_build = yes
					}
				}
			}
		}
	}
}

JAP_allied_chinese_support = {
	JAP_burma_road_closed = {
		icon = GFX_decision_generic_trucks

		available = {
			CHI = { is_puppet = no }
			JAP = {
				controls_province = 12464
				controls_state = 999
			}
			hidden_trigger = { always = no tag = JAP } 
			hidden_trigger = { always = no tag = CHI } 
		}

		allowed = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
		}

		visible = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
			JAP = {
				controls_state = 999
			}
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = { tag = JAP }
				custom_effect_tooltip = JAP_burma_road_effects_tt
			}
			if = {
				limit = { tag = CHI }
				custom_effect_tooltip = CHI_burma_road_effects_tt
			}
			effect_tooltip = {
				CHI = {
					show_ideas_tooltip = CHI_burma_closed
					}
				}
			}		
		}
	JAP_burma_road_opened = {
		icon = GFX_decision_generic_trucks 

		available = {
			CHI = { is_puppet = no }
			JAP = {
				NOT = {
					controls_state = 999
				}
			}
			hidden_trigger = { always = no tag = JAP } 
			hidden_trigger = { always = no tag = CHI } 
		}

		allowed = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
		}

		visible = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
			JAP = {
				NOT = {
					controls_state = 999
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = { tag = JAP }
				custom_effect_tooltip = JAP_burma_road_open_effects_tt
			}
			if = {
				limit = { tag = CHI }
				custom_effect_tooltip = CHI_burma_road_open_effects_tt
			}
			effect_tooltip = {
				CHI = {
					show_ideas_tooltip = CHI_burma_open
					}
				}
			}		
		}	
	JAP_stilwell_road_closed = {
		icon = GFX_decision_generic_trucks 

		available = {
			CHI = { is_puppet = no }
			JAP = {
				OR = {
					has_full_control_of_state = 998
					has_full_control_of_state = 747
				}
			}
			hidden_trigger = { always = no tag = JAP } 
			hidden_trigger = { always = no tag = CHI } 
		}

		allowed = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
		}

		visible = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
			JAP = {
				OR = {
					has_full_control_of_state = 998
					has_full_control_of_state = 747
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = { tag = JAP }
				custom_effect_tooltip = JAP_stilwell_road_closed_effects_tt

			}
			if = {
				limit = { tag = CHI }
				custom_effect_tooltip = CHI_stilwell_road_closed_effects_tt

			}
			effect_tooltip = {
				CHI = {
					show_ideas_tooltip = CHI_stilwell_road_closed 
					}
				}
			}		
		}
	JAP_stilwell_road_opened = {
		icon = GFX_decision_generic_trucks 

		available = {
			JAP = {
				OR = {
					NOT = {
						has_full_control_of_state = 998
						has_full_control_of_state = 747					
					}
				}
			}
			hidden_trigger = {
				always = no
				CHI = { is_puppet = no }				
			}
		}

		allowed = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
		}

		visible = {
			OR = {
				original_tag = JAP
				original_tag = CHI
			}
			JAP = {
				OR = {
					NOT = {
						has_full_control_of_state = 998
						has_full_control_of_state = 747					
					}
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = { tag = JAP }
				custom_effect_tooltip = JAP_stilwell_road_effects_tt
				} 
			if = {
				limit = { tag = CHI }
				custom_effect_tooltip = CHI_stilwell_road_open_effects_tt

			}
			effect_tooltip = {
				CHI = {
					show_ideas_tooltip = CHI_stilwell_road
					}
				}				
			}		
		}	
}

JAP_asiatic_land_war = {
	JAP_indochinoise_uprising_desc = {

		allowed = { tag = JAP }

		icon = POL_looming_peasants_strike #GFX_decision_generic_disband_irregulars

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 270
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			has_completed_focus = JAP_move_against_garde_indochinoise
		}
		
		activation = {
			has_war = yes
			has_civil_war = no
			671 = {
				is_controlled_by = ROOT
			}
		}
		
		cancel_effect = {
		
		}

		timeout_effect = {
			custom_effect_tooltip = JAP_indochinoise_uprising_tt
			hidden_effect = {
				FRA = {
					load_oob = "indochinoise_uprising"
				}
			}
		}
	}

	JAP_hold_burma = {

		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			NOT = { controls_province = 1330 }
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = yes

		activation = {
			OR = {  
				has_country_flag = JAP_hold_mandalay_flag
				BRM = {
					OR = {
						controls_province = 10182
						controls_province = 12284
						controls_province = 10344
						controls_province = 12256
						controls_province = 4654
					}
				}
			}
			has_war = yes
			has_civil_war = no
			995 = {
				is_controlled_by = ROOT
			}
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
			}
		}
	}
	JAP_hold_mandalay = {

		icon = GFX_decision_generic_disband_irregulars

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			NOT = { controls_province = 1492 }
		}

		days_mission_timeout = 90

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			has_civil_war = no
			640 = {
				is_controlled_by = ROOT
				OR = {
					any_neighbor_state = {
						CONTROLLER = {
							has_war_with = ROOT
						}
						OWNER = { tag = ROOT }
					}
					NOT = { is_fully_controlled_by = ROOT }
				}
			}
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
				set_country_flag = JAP_hold_mandalay_flag
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
				set_country_flag = JAP_hold_mandalay_flag
			}
		}
	}
	JAP_hold_phi = {

		icon = GFX_decision_hol_draw_up_staff_plans

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			NOT = { 
				controls_state = 627 
				controls_state = 623 
			}
		}

		days_mission_timeout = 105

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			has_civil_war = no
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
			}
		}
	}
	JAP_hold_okinawa = {

		icon = GFX_decision_border_war

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			NOT = { 
				controls_province = 11932 
				controls_province = 10124 
				controls_province = 7115 
			}
		}

		days_mission_timeout = 50

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			has_civil_war = no
			526 = {
				NOT = { is_fully_controlled_by = JAP }
			}
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
				JAP_clean_military_offensive_effect = yes
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
				JAP_clean_military_offensive_effect = yes
			}
		}
	}
	JAP_allied_invasion_of_borneo = {
		icon = hol_draw_up_staff_plans

		available = { #Conditions to succeed in the offensive
			NOT = {
				controls_state = 333
				controls_state = 334				
			}
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_mission_timeout = 120

		is_good = yes

		activation = {
			has_war = yes
			has_civil_war = no
			OR = {
				333 = {
					NOT = { is_fully_controlled_by = JAP }
				}
				334 = {
					NOT = { is_fully_controlled_by = JAP }
				}
			}
		}

		visible = {
			TAG = JAP
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 333
        		state = 334
    		}
    		highlight_color_while_active = 2
		}

		timeout_effect = { 	#Success
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt		
			add_war_support = 0.05
			add_stability = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
			}
		}

		complete_effect = { #Fail
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.1
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
			}
		}
	}
	JAP_hold_tokyo = {

		icon = GFX_decision_border_war

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			NOT = { controls_state = 282 }
		}

		days_mission_timeout = 180

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war = yes
			has_civil_war = no
			has_global_flag = JAP_operation_downfall_underway
			282 = {
				is_controlled_by = ROOT
			}
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
			}
		}
	}
	JAP_hold_manchuria = {
		icon = GFX_decision_generic_cavalry

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			MAN = {
				NOT = { controls_state = 328 }
			}
		}

		days_mission_timeout = 45

		fire_only_once = yes

		is_good = yes

		activation = {
			has_war_with = SOV
			has_civil_war = no
			328 = {
				is_controlled_by = MAN
			}
		}

		#Success
		timeout_effect = {
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			add_stability = 0.05
			add_war_support = 0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_down = yes
				set_country_flag = JAP_hold_mandalay_flag
			}
		}
		#Fail
		complete_effect = {
			custom_effect_tooltip = JAP_worsen_effects_of_setting_sun_tt
			add_war_support = -0.05
			add_stability = -0.05
			hidden_effect = {
				JAP_scenario_setting_sun_level_up = yes
				set_country_flag = JAP_hold_mandalay_flag
			}
		}
	}
	#Flavour, doesn't affect spirits
	JAP_south_china_sea_air_raid = {

		icon = GFX_decision_generic_human_torpedo

		allowed = {
			original_tag = JAP
		}

		#Fail trigger
		available = {
			original_tag = JAP
		}

		visible = {
			has_start_date < 1945.1.13
		}

		days_remove = 8

		fire_only_once = yes

		is_good = no

		modifier = {
			air_defence_factor = -0.15
			air_intercept_efficiency = -0.15
			air_power_projection_factor = -0.1
			air_untrained_pilots_penalty_factor = 0.25
			air_escort_efficiency = -0.1	
			screening_efficiency = -0.2
		}
	}

	JAP_west_henan_north_hubei_offensive_ongoing = {
		icon = hol_draw_up_staff_plans

		available = { #Conditions to succeed in the offensive
			JAP = { has_full_control_of_state = 607 }
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_mission_timeout = 50

		is_good = no

		activation = {
			always = no
		}

		visible = {
			TAG = JAP
			JAP = {
				has_country_flag = JAP_military_offensive_in_progress_flag
			}	
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 607
    		}
    		highlight_color_while_active = 3
		}

		timeout_effect = { 	#FAIL
			add_war_support = -0.05
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}

		complete_effect = { #SUCCESS
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt			
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}
	}

	JAP_west_hunan_offensive_ongoing = {
		icon = hol_draw_up_staff_plans

		available = { #Conditions to succeed in the offensive
			JAP = { has_full_control_of_state = 602 }
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_mission_timeout = 50

		is_good = no

		activation = {
			always = no
		}

		visible = {
			TAG = JAP
			JAP = {
				has_country_flag = JAP_military_offensive_in_progress_flag
			}	
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 602
    		}
    		highlight_color_while_active = 3
		}

		timeout_effect = { 	#FAIL
			add_war_support = -0.05
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}

		complete_effect = { #SUCCESS
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}
	}

	JAP_second_guanxi_offensive_ongoing = {
		icon = hol_draw_up_staff_plans

		available = { #Conditions to succeed in the offensive
			JAP = {
				controls_province = 7137 # Nanning
			}
		}

		allowed = {
			original_tag = JAP
		}

		fire_only_once = yes

		days_mission_timeout = 30

		is_good = no

		activation = {
			always = no
		}

		visible = {
			TAG = JAP
			JAP = {
				has_country_flag = JAP_military_offensive_in_progress_flag
			}	
			has_war = yes
		}

		highlight_states = {
    		highlight_state_targets = {
        		state = 599
    		}
    		highlight_color_while_active = 3
		}

		timeout_effect = { 	#FAIL
			add_war_support = -0.05
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}

		complete_effect = { #SUCCESS
			custom_effect_tooltip = JAP_lessen_effects_of_setting_sun_tt
			hidden_effect = {
				JAP_clean_military_offensive_effect = yes
			}
		}
	}
}

scenario_settings = {
	GER_scenario_settings = {
		icon = GFX_decision_generic_army_support 

		available = {
			tag = GER
			NOT = {
				is_ai = yes
			}
		}

		allowed = {
			tag = GER
		}

		visible = {
			tag = GER
		}

		fire_only_once = yes

		complete_effect = {
			remove_ideas = GER_shattered_wehrmacht
			remove_ideas = GER_endsiegmod
			remove_ideas = GER_totalen_krieg_doctrine
			remove_ideas = GER_economic_collapse
			remove_ideas = GER_scenario_volkssturm
			remove_ideas = GER_disloyalty_4
				hidden_effect = {
					FRA = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					ENG = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					USA = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					GER = {
						set_global_flag = scenario_debuffs_off
					}
					SOV = {
						remove_dynamic_modifier = { modifier = SOV_soviet_airforce_dynamic_modifier } 
						remove_dynamic_modifier = { modifier = SOV_the_red_army_dynamic_modifier }
					}
				}
		}		
	}	
	GER_scenario_settings_negative = {
		icon = GFX_decision_generic_army_support 

		available = {
			tag = GER
			NOT = {
				is_ai = yes
			}
		}

		allowed = {
			tag = GER
		}

		visible = {
			tag = GER
		}

		fire_only_once = yes

		complete_effect = {
			remove_ideas = GER_shattered_wehrmacht
			remove_ideas = GER_economic_collapse
			remove_ideas = GER_disloyalty_4
				hidden_effect = {
					FRA = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					ENG = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					USA = {
						remove_ideas = the_united_nations
						remove_ideas = ENG_europe_first_strat
					}
					GER = {
						set_global_flag = scenario_debuffs_off
					}
					SOV = {
						remove_dynamic_modifier = { modifier = SOV_soviet_airforce_dynamic_modifier } 
						remove_dynamic_modifier = { modifier = SOV_the_red_army_dynamic_modifier }
					}
				}
		}		
	}	
	JAP_scenario_settings = {
		icon = GFX_decision_generic_army_support 

		available = {
			tag = JAP
			NOT = {
				is_ai = yes
			}
		}

		allowed = {
			tag = JAP
		}

		visible = {
			tag = JAP
		}

		fire_only_once = yes

		complete_effect = {
			remove_ideas = JAP_shattered_army
			remove_ideas = JAP_economic_collapse
		}		
	}	
	JAP_scenario_settings_scripted_invasions = {
		icon = GFX_decision_generic_army_support 

		available = {
			tag = JAP
			NOT = {
				is_ai = yes
			}
		}

		allowed = {
			tag = JAP
		}

		visible = {
			tag = JAP
		}

		fire_only_once = yes

		complete_effect = {
			#custom_effect_tooltip = JAP_scripted_invasions_tt
			set_global_flag = scenario_scripted_invasions_disabled
		}		
	}	
	JAP_scenario_surrender_japan = {

		available = {
			tag = JAP
			NOT = {
				is_ai = yes
			}
		}

		allowed = {
			tag = JAP
		}

		visible = {
			always = no
		}

		cost = 0

		days_remove = -1
		ai_will_do = {
			factor = 10
			modifier = {
				NOT = {
					controls_state = 525
					controls_state = 527
				}
				factor = 10
			}
		}

		modifier = {
			forced_surrender_limit = -1.0
		}

		remove_effect = {

		}

		remove_trigger = {
			has_war = no
		}
	}
	GER_scripted_peace = {
		icon = GFX_decision_generic_army_support 

		available = {
			NOT = {
				is_ai = yes
				GER = {
					has_war = yes
				}		
			}
		}

		allowed = {
			OR = {
				tag = GER
				tag = JAP		
			}
		}

		visible = {
			OR = {
				tag = GER
				tag = JAP		
			}
		}

		fire_only_once = yes

		complete_effect = {
			GER = {
				country_event = { id = scenario.13 }		
			}
		}		
	}
}

USA_scenario_war_department = {
	USA_elbe_mission = {
		icon = GFX_decision_generic_army_support 

		available = {
			USA = {
				controls_province = 3522
			}
			NOT = {
				has_start_date > 1945.4.26
			}
		# Blocked out incase we want to use this instead
		#	date > 1945.8.1
		#	has_war = yes
		#	OR = {
		#		controls_state = 59
		#		controls_state = 64
		#	}
		#	GER = {
		#		OR = {
		#			controls_state = 58
		#			controls_state = 61
		#			controls_state = 970
		#		}
		#	}
		}

		allowed = {
			tag = USA
		}

		visible = {
			tag = USA
		}

		ai_will_do = {
    		base = 0
    		modifier = {
        		add = 10
        		controls_province = 3522
    		}
		}

		fire_only_once = yes

		complete_effect = {
			USA = {
				add_timed_idea = {
					idea = USA_elbe_mission
					days = 7
				}	
			}
		}		
	}	
}

SOV_stavka = {
	SOV_invasion_of_manchuria = {
	    activation = {
	    	SOV = {
	    		NOT = {
	    			has_global_flag = SOV_manchurian_war_flag
	    			has_war_with = GER
	    		}	    	
	    	}
	    }
	    available = {
	    	SOV = {
	    		has_war_with = JAP
	    	}
	    }
	    visible = {
			OR = {
				original_tag = JAP
				original_tag = SOV
			}	    
	    }
	    cancel_trigger  = {
	    	has_global_flag = JAP_SOV_neutrality_pact_saved
	    }
	    icon = mission_icon     # For GFX_decision_mission_icon
	    is_good = no
	    war_with_on_timeout = JAP
	    days_mission_timeout = 90
	    selectable_mission = no
	    timeout_effect = {
	    SOV = {
	    	set_global_flag = SOV_manchurian_war_flag
			set_rule = { 
				desc = desc_key
				can_not_declare_war = no 
			}
	    	add_timed_idea = {
	    		idea = SOV_manchurian_strategic_offensive_operations
	    		days = 14
	    	}
	        declare_war_on = {
	            target = JAP
	            type = annex_everything
	        }
	        declare_war_on = {
	            target = MEN
	            type = annex_everything
	        }
	        declare_war_on = {
	            target = MAN
	            type = annex_everything
	        }	    
	    }

	    }
	}	
}

GER_defense_of_berlin_preparations = {
	GER_form_12th_army = {
		icon = GFX_decision_generic_army_support 

		available = {
			surrender_progress > 0.07
			NOT = {
				has_start_date > 1945.4.11
			}
			GER = {
				controls_state = 64
			}
		}

		allowed = {
			tag = GER
		}

		visible = {
			tag = GER
		}

		custom_cost_trigger = {
			command_power > 49
			has_political_power > 49
			has_army_experience > 49
		}
		custom_cost_text = decision_cost_CP_50_pp_50_ArmXP_50

		days_remove = 10

		ai_will_do = {
    		base = 10
		}

		fire_only_once = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				add_political_power = -50
				army_experience = -50
			}
		}

		remove_effect = {	
			custom_effect_tooltip = GER_12th_army_tt
			hidden_effect = {
				GER = {
				load_oob = "GER_12_armee"	
				}		
			}
		}		
	}
	GER_mass_defense_improvisation = {
		icon = GFX_decision_generic_mountain_fortification 

		available = {
			NOT = {
				has_start_date > 1945.4.11
			}
			GER = {
				controls_state = 64
			}
		}

		allowed = {
			tag = GER
		}

		visible = {
			tag = GER
		}

		cost = 50

		days_remove = 25

		ai_will_do = {
    		base = 10
		}

		fire_only_once = yes

		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			64 = {
				add_building_construction = {
				type = bunker
				level = 1
				province = 6521
				instant_build = yes
				}		
			}
		}		
	}
	GER_conscript_volkssturm_in_berlin = {
		icon = GFX_decision_generic_disband_irregulars 

		available = {
			SOV = {
				controls_state = 86
			}
			NOT = {
				has_start_date > 1945.4.11
			}
			GER = {
				controls_state = 64
			}
		}

		allowed = {
			tag = GER
		}

		visible = {
			tag = GER
		}

		custom_cost_trigger = {
			command_power > 49
			has_political_power > 49
			has_army_experience > 49
		}
		custom_cost_text = decision_cost_CP_50_pp_50_ArmXP_50

		days_remove = 12

		ai_will_do = {
    		base = 10
		}

		fire_only_once = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				add_political_power = -50
				army_experience = -50
			}
		}

		remove_effect = {
			custom_effect_tooltip = GER_defense_of_berlin_tt
			GER = {
				hidden_effect = {
					load_oob = "GER_defense_of_berlin"	
				}
				recruit_character = GER_helmuth_weidling 
				#custom_effect_tooltip = recruited_general_weidling_tt
			}
		}		
	}
}