# REMOVED CAT operations


#Category allowed for JAP
JAP_intervene_in_china = {

	JAP_china_step_up_war_effort = {

		icon = jap_conquer_china

		available = {
			JAP_has_idea_JAP_intervene_in_china = yes
		}

		visible = {
			JAP_has_idea_JAP_intervene_in_china = yes
			any_enemy_country = {
				is_literally_china = yes
			}
		}

		fire_only_once = no

		ai_will_do = {
			factor = 201
			modifier = {
				has_war_with = USA
				factor = 10 #screw it, kill everything
			}
			modifier = {
				factor = 0
				has_country_flag = JAP_slow_down_in_china
				#NOT = { has_war_with = USA }
			}
		}
		modifier = {

		}

		days_remove = 0
		days_re_enable = 30

		cost = 25

		complete_effect = {
			if = {
				limit = {
					USA = {
						has_war = no
					}
				}
				USA = { add_war_support = 0.025 }
			}
			JAP_intervene_in_china_level_down = yes
			hidden_effect = {
				set_country_flag = { flag = JAP_slow_down_in_china value = 1 days = 50 }
			}
		}
	}

	JAP_conquer_china = {

		icon = jap_conquer_china

		available = {
			event_target:WTT_current_china_leader = {
				OR = {
					has_capitulated = yes
					exists = no
					is_subject_of = ROOT
				}
			}
		}

		visible = {
			JAP_has_idea_JAP_intervene_in_china = yes
			any_enemy_country = {
				is_literally_china = yes
			}
		}

		activation = {
			has_country_flag = JAP_conquer_china_activate
		}

		fire_only_once = yes

		is_good = no

		days_mission_timeout = 360
		
		timeout_effect = {
			add_stability = -0.05
			add_war_support = -0.15
		}

		complete_effect = {
			add_stability = 0.03
			add_war_support = 0.07
		}
	}

	
}

JAP_interservice_rivalry = {
	JAP_steel_for_guns = {

		icon = generic_tank

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_steel_for_ships
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_steel_for_ships
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 4
		}
		complete_effect = {
			random_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					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
				}
			}
			random_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					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_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_army = yes
			set_country_flag = JAP_steel_for_guns
		}
	}
	JAP_steel_for_ships = {

		icon = generic_naval

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_steel_for_guns
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_steel_for_guns
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 1
		}
		complete_effect = {
			random_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
			random_owned_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_navy = yes
			set_country_flag = JAP_steel_for_ships
		}
	}
	JAP_prioritize_army_aircraft_construction = {

		icon = generic_tank

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_prioritize_naval_aircraft_construction
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_prioritize_naval_aircraft_construction
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				date < 1938.9.1
			}
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			add_ideas = JAP_prioritize_army_aircraft_construction
			JAP_interservice_rivalry_towards_army = yes
			set_country_flag = JAP_prioritize_army_aircraft_construction
		}
	}
	JAP_prioritize_naval_aircraft_construction = {

		icon = generic_naval

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_prioritize_army_aircraft_construction
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_prioritize_army_aircraft_construction
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 2
			modifier = {
				factor = 0
				date < 1938.9.1
			}
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			add_ideas = JAP_prioritize_naval_aircraft_construction
			JAP_interservice_rivalry_towards_navy = yes
			set_country_flag = JAP_prioritize_naval_aircraft_construction
		}
	}
	JAP_everybody_serves = {

		icon = generic_tank

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_draft_exemptions
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_draft_exemptions
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				date < 1939.1.1
			}
		}
		modifier = {
			conscription = 0.02
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_army = yes
			set_country_flag = JAP_everybody_serves
		}
	}
	JAP_draft_exemptions = {

		icon = generic_naval

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_everybody_serves
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_everybody_serves
			}
		}
		cost = 30
		days_remove = -1
		fire_only_once = yes
		ai_will_do = {
			factor = 3
			modifier = {
				factor = 0
				date < 1939.1.1
			}
		}
		modifier = {
			industrial_capacity_factory = 0.05
			industrial_capacity_dockyard = 0.05
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_navy = yes
			set_country_flag = JAP_draft_exemptions
		}
	}
	JAP_raiding_regiments = {

		icon = generic_tank

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_special_air_landing_force
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_special_air_landing_force
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				date < 1939.1.1
			}
		}
		modifier = {
			special_forces_cap = 0.02
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			set_country_flag = JAP_raiding_regiments
			JAP_interservice_rivalry_towards_army = yes
		}
	}
	JAP_special_air_landing_force = {

		icon = generic_naval

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			NOT = {
				has_country_flag = JAP_raiding_regiments
			}
		}
		visible = {
			NOT = {
				has_country_flag = JAP_raiding_regiments
			}
		}
		cost = 30
		fire_only_once = yes
		days_remove = -1
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				date < 1939.1.1
			}
		}
		modifier = {
			special_forces_attack_factor = 0.05 
			special_forces_defence_factor = 0.05
		}
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			set_country_flag = JAP_special_air_landing_force
			JAP_interservice_rivalry_towards_navy = yes
		}
	}
	JAP_favor_army = {

		icon = generic_tank

		available = {
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			AND = {
				OR = { 
					has_country_flag = JAP_raiding_regiments 
					has_country_flag = JAP_special_air_landing_force
				}
				OR = { 
					has_country_flag = JAP_everybody_serves
					has_country_flag = JAP_draft_exemptions
				}
				OR = { 
					has_country_flag = JAP_prioritize_naval_aircraft_construction
					has_country_flag = JAP_prioritize_army_aircraft_construction
				}
				OR = { 
					has_country_flag = JAP_steel_for_guns
					has_country_flag = JAP_steel_for_ships
				}
			}
			
		}
		visible = {
			AND = {
				OR = { 
					has_country_flag = JAP_raiding_regiments 
					has_country_flag = JAP_special_air_landing_force
				}
				OR = { 
					has_country_flag = JAP_everybody_serves
					has_country_flag = JAP_draft_exemptions
				}
				OR = { 
					has_country_flag = JAP_prioritize_naval_aircraft_construction
					has_country_flag = JAP_prioritize_army_aircraft_construction
				}
				OR = { 
					has_country_flag = JAP_steel_for_guns
					has_country_flag = JAP_steel_for_ships
				}
			}
		}
		cost = 30
		fire_only_once = yes
		ai_will_do = {
			factor = 1
		}
		
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_army = yes
		}
	}
	JAP_favor_navy = {

		icon = generic_naval

		available = { 
			NOT = {
				has_country_flag = JAP_war_conferences_cd
			}
			AND = {
				OR = { 
					has_country_flag = JAP_raiding_regiments 
					has_country_flag = JAP_special_air_landing_force
				}
				OR = { 
					has_country_flag = JAP_everybody_serves
					has_country_flag = JAP_draft_exemptions
				}
				OR = { 
					has_country_flag = JAP_prioritize_naval_aircraft_construction
					has_country_flag = JAP_prioritize_army_aircraft_construction
				}
				OR = { 
					has_country_flag = JAP_steel_for_guns
					has_country_flag = JAP_steel_for_ships
				}
			}
			
		}
		visible = {
			AND = {
				OR = { 
					has_country_flag = JAP_raiding_regiments 
					has_country_flag = JAP_special_air_landing_force
				}
				OR = { 
					has_country_flag = JAP_everybody_serves
					has_country_flag = JAP_draft_exemptions
				}
				OR = { 
					has_country_flag = JAP_prioritize_naval_aircraft_construction
					has_country_flag = JAP_prioritize_army_aircraft_construction
				}
				OR = { 
					has_country_flag = JAP_steel_for_guns
					has_country_flag = JAP_steel_for_ships
				}
			}
		}
		cost = 30
		fire_only_once = yes
		ai_will_do = {
			factor = 1
		}
		
		complete_effect = {
			set_country_flag = { flag = JAP_war_conferences_cd value = 1 days = 180 }
			JAP_interservice_rivalry_towards_navy = yes
		}
	}
}

foreign_politics = {
	JAP_sue_for_peace_CHI = {

		allowed = {
			original_tag = JAP
		}

		available = {
			FROM = { 
				surrender_progress < 0.2 # if they are losing, lets not allow it
			}
			custom_trigger_tooltip = {
				tooltip = JAP_sue_for_peace_TT
				NOT = {
					controls_state = 525
					controls_state = 527
				}
				NOT = {
					any_of = {
						array = CHI.core_states
						var:v = {
							NOT = {
								state = 524
							}
							controller = {
								OR = {
									tag = JAP
									AND = {
										is_subject_of = JAP
										OR = {
											tag = MEN
											tag = MAN
										}
									}
								}
							}
						}
					}
				}
				MAN = {
					OR = {
						exists = no
						NOT = {
							is_subject_of = JAP
						}
						has_capitulated = yes
					}
				}
			}
		}

		target_array = enemies

		target_trigger = {
			#Target is FROM
			FROM = {
				tag = event_target:WTT_current_china_leader
				has_war_with = ROOT
			}
		}

		visible = {
			FROM = { 
				exists = yes 
				is_subject = no
			}
			is_subject = no
			any_enemy_country = {
				is_literally_china = yes
			}
		}

		cost = 0

		fire_only_once = yes

		ai_will_do = {
			factor = 400
		}

		complete_effect = {
			event_target:WTT_current_china_leader = {
				country_event = { id = wtt_japan.126 days = 1 }
			}
		}
	}

	JAP_sue_for_peace_MAN = {

		allowed = {
			original_tag = JAP
		}

		available = {
			FROM = { 
				surrender_progress < 0.2 # if they are losing, lets not allow it
			}
			custom_trigger_tooltip = {
				tooltip = JAP_sue_for_peace_TT
				NOT = {
					controls_state = 525
					controls_state = 527
				}
				NOT = {
					any_of = {
						array = CHI.core_states
						var:v = {
							NOT = {
								state = 524
							}
							controller = {
								OR = {
									tag = JAP
									AND = {
										is_subject_of = JAP
										tag = MEN
									}
								}
							}
						}
					}
				}
			}
		}


		target_trigger = {
			#Target is FROM
			FROM = {
				tag = MAN
				has_war_with = ROOT
			}
		}

		visible = {
			FROM = { 
				exists = yes 
				is_subject = no
			}
			is_subject = no
			has_war_with = FROM
		}

		cost = 0

		fire_only_once = yes

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				casualties_inflicted_by = {
					opponent = MAN
					thousands < 300
				}
			}

			modifier = {
				factor = 0
				NOT = {has_country_flag = JAP_dont_surrender_instantly_lock}
			}
		}

		complete_effect = {
			MAN = {
				country_event = { id = wtt_japan.129 days = 1 }
			}
		}
	}

	JAP_sue_for_peace_nuke = {

		allowed = {
			original_tag = JAP
		}

		available = {
			has_global_flag = JAP_nuke_1
			has_global_flag = JAP_nuke_2
			has_navy_size = { size < 40 }
			NOT = {
				controls_state = 526
				controls_state = 645
			}
		}

		visible = {
			has_war = yes
			has_global_flag = JAP_nuke_1
		}

		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
		}
		complete_effect = {
			JAP = {
				country_event = { id = scenario.25 }		
			}
			hidden_effect = {
				clr_global_flag = JAP_nuke_1
				clr_global_flag = JAP_nuke_2
			}
		}
	}
	JAP_sue_for_peace_nuke_mission = {
		available = {
			has_global_flag = JAP_nuke_1
			has_global_flag = JAP_nuke_2
		}

		visible = {
			NOT = {
				OR = {
					controls_state = 536
					controls_state = 533
					controls_state = 534
					controls_state = 532
					controls_state = 282
					controls_state = 530
					controls_state = 531
					controls_state = 528
					controls_state = 529
				}
			}
		}

		modifier = {
			
		}

		days_mission_timeout = 720
		fire_only_once = yes

		activation = {
			has_tech = nukes
			has_war_with = JAP
		}

		complete_effect = {
			JAP = {
				unlock_decision_tooltip = JAP_sue_for_peace_nuke
			}
		}
	}

	JAP_request_soviet_support = {

		icon = generic_prepare_civil_war

		available = {
		}

		visible = {
			tag = JAP
			has_civil_war = yes
			has_government = communism
		}

		cost = 50
		fire_only_once = yes
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			SOV = { country_event = { id = wtt_japan.118 } }
		}
	}
}

#Category allowed for JAP
#Not visible if puppet
JAP_southern_expansion = {

	JAP_pressure_france = { 

		available = {
			16 = { NOT = { is_controlled_by = FRA } } #Paris has fallen
			286 = { 
				CONTROLLER = { 
					NOT = {
						has_war_with = ROOT
						is_in_faction_with = ROOT
					}
				} 
			}
			670 = { 
				CONTROLLER = { 
					NOT = {
						has_war_with = ROOT
						is_in_faction_with = ROOT
					}
				} 
			}
			671 = { 
				CONTROLLER = { 
					NOT = {
						has_war_with = ROOT
						is_in_faction_with = ROOT
					}
				} 
			}
			custom_trigger_tooltip = {
				tooltip = demand_indochina_focus_tt
				OR = {
					286 = { 
						CONTROLLER = { 
							OR = { 
								tag = FRA 
								tag = VIC
								is_subject_of = FRA
								is_subject_of = VIC 
							} 
						}
					}
					670 = { 
						CONTROLLER = { 
							OR = { 
								tag = FRA 
								tag = VIC 
								is_subject_of = FRA
								is_subject_of = VIC
							} 
						}
					}
					671 = { 
						CONTROLLER = { 
							OR = { 
								tag = FRA 
								tag = VIC 
								is_subject_of = FRA
								is_subject_of = VIC
							} 
						}
					}
				}
			}
		}

		visible = {
			always = no
		}

		fire_only_once = yes


		modifier = {

		}

		cost = 75

		ai_will_do = {
			factor = 5
			modifier = {
				factor = 0
				FRA = { has_war = no }
			}			
			modifier = {
				factor = 3
				FRA = { has_war = yes } 
				strength_ratio = {
					tag = FRA
					ratio > 0.9
				}
			}
			
		}

		complete_effect = {
			if = {
				limit = {
					FRA = {
						OR = {
							controls_state = 671
							671 = { CONTROLLER = { is_subject_of = FRA } }
							controls_state = 670
							670 = { CONTROLLER = { is_subject_of = FRA } }
							controls_state = 286
							286 = { CONTROLLER = { is_subject_of = FRA } }
						}
					}
				}
				FRA = { country_event = { id = france.1 } }
			}
			else_if = {
				limit = {
					VIC = {
						OR = {
							controls_state = 671
							controls_state = 670
							controls_state = 286
							671 = { CONTROLLER = { is_subject_of = VIC } }
							670 = { CONTROLLER = { is_subject_of = VIC } }
							286 = { CONTROLLER = { is_subject_of = VIC } }
						}
					}
				}
				VIC = { country_event = { id = france.1 } }
			}
		}

	}
}

#Category allowed for JAP
#Visible when has completed JAP_pacific_guardian focus.
#Visible if independent
JAP_pacific_guardian = {

	JAP_release_korea = {

		icon = generic_independence

		available = {
			country_exists = KOR
		}

		days_mission_timeout = 180

		fire_only_once = yes
		is_good = no 
		activation = {
			has_completed_focus = JAP_the_korean_question
			has_full_control_of_state = 525
			has_full_control_of_state = 527
			KOR = { exists = no }
		}

		complete_effect = {
			add_political_power = 50
		}
		timeout_effect = {
			add_stability = -0.1 #naughty
		}
	}

	JAP_guardian_of_INS = {

		icon = jap_pacific_guardian

		available = {
			HOL = {
				#has_capitulated = yes
			}
			"INS" = {
				is_puppet_of = HOL
			}
		}

		fire_only_once = yes


		modifier = {

		}

		days_remove = 0
		days_re_enable = 0

		cost = 50

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			HOL = { country_event = { id = wtt_japan.1 } }
		}
	}

	JAP_guardian_of_MAL = {

		icon = jap_pacific_guardian

		available = {
			ENG = {
				#has_capitulated = yes
			}
			MAL = {
				is_puppet_of = ENG
			}
		}

		fire_only_once = yes


		modifier = {

		}

		days_remove = 0
		days_re_enable = 0

		cost = 50

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			ENG = { country_event = { id = wtt_japan.1 } }
		}
	}

	JAP_guardian_of_indochina = {

		icon = jap_pacific_guardian

		available = {
			FRA = {
				#has_capitulated = yes
				OR = {
					has_full_control_of_state = 670
					has_full_control_of_state = 671
					has_full_control_of_state = 286
					has_full_control_of_state = 741
				}
			}
		}

		fire_only_once = yes


		modifier = {

		}

		days_remove = 0
		days_re_enable = 0

		cost = 50

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			FRA = { country_event = { id = wtt_japan.1 } }
		}
	}
}

JAP_colonial_independence = {
	JAP_return_manchuria = {

		icon = generic_independence

		allowed = {
			original_tag = JAP
		}

		available = {
			609 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			610 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			716 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			715 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			328 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			717 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			714 = {
				is_fully_controlled_by = controller
				CONTROLLER = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
		}

		visible = {
			has_completed_focus = JAP_liberate_manchuria
			609 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			610 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			716 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			715 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			328 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			717 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
			714 = {
				owner = {
					OR = {
						is_puppet_of = JAP
						original_tag = JAP
					}
				}
			}
		}

		fire_only_once = yes


		modifier = {

		}

		days_remove = 0
		days_re_enable = 0

		cost = 0

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			if = {
				limit = {
					country_exists = event_target:WTT_current_china_leader
				}
				event_target:WTT_current_china_leader = { 
					transfer_state = 609
					transfer_state = 610
					transfer_state = 716
					transfer_state = 715
					transfer_state = 328
					transfer_state = 717
					transfer_state = 714
					transfer_state = 761
					transfer_state = 745
					transfer_state = 612
					transfer_state = 611
					country_event = { id = wtt_japan.101 days = 1 }
					custom_effect_tooltip = JAP_liberate_manchuria_alliance_tt
				}
			}
			if = {
				limit = {
					country_exists = event_target:WTT_communist_china
					NOT = { country_exists = event_target:WTT_current_china_leader }
				}
				event_target:WTT_communist_china = { 
					transfer_state = 609
					transfer_state = 610
					transfer_state = 716
					transfer_state = 715
					transfer_state = 328
					transfer_state = 717
					transfer_state = 714
					transfer_state = 761
					transfer_state = 745
					transfer_state = 612
					transfer_state = 611
					country_event = { id = wtt_japan.101 days = 1 }
				}
			}
			if = {
				limit = {
					NOT = { country_exists = event_target:WTT_communist_china }
					NOT = { country_exists = event_target:WTT_current_china_leader }
				}
				random_other_country = {
					limit = {
						OR = {
							original_tag = GXC
							original_tag = YUN
							original_tag = XSM
							original_tag = SIK
							original_tag = SHX
							original_tag = MEN
						}
						NOT = {
							has_government = communism
							has_government = fascism
						}
					}
					transfer_state = 609
					transfer_state = 610
					transfer_state = 716
					transfer_state = 715
					transfer_state = 328
					transfer_state = 717
					transfer_state = 714
					transfer_state = 761
					transfer_state = 745
					transfer_state = 612
					transfer_state = 611
					country_event = { id = wtt_japan.101 days = 1 }
					custom_effect_tooltip = JAP_liberate_manchuria_alliance_tt
				}
			}
		}
	}
}

political_actions = {
	JAP_break_the_london_naval_treaty = {

		icon = generic_break_treaty

		allowed = {
			original_tag = JAP
		}

		available = {

		}

		visible = {
			has_idea = JAP_the_london_naval_treaty
			has_completed_focus = JAP_join_the_london_naval_treaty
		}

		fire_only_once = yes


		modifier = {

		}

		days_remove = 0
		days_re_enable = 0

		cost = 25

		ai_will_do = {
			factor = 0
		}

		complete_effect = {
			remove_ideas = JAP_the_london_naval_treaty
			FRA = { add_opinion_modifier = { target = ROOT modifier = JAP_broke_the_london_naval_treaty } }
			USA = { add_opinion_modifier = { target = ROOT modifier = JAP_broke_the_london_naval_treaty } }
			ENG = { add_opinion_modifier = { target = ROOT modifier = JAP_broke_the_london_naval_treaty } }
			FRA = { remove_opinion_modifier = { target = ROOT modifier = JAP_join_the_london_naval_treaty } }
			USA = { remove_opinion_modifier = { target = ROOT modifier = JAP_join_the_london_naval_treaty } }
			ENG = { remove_opinion_modifier = { target = ROOT modifier = JAP_join_the_london_naval_treaty } }
			remove_opinion_modifier = { target = FRA modifier = JAP_join_the_london_naval_treaty }
			remove_opinion_modifier = { target = USA modifier = JAP_join_the_london_naval_treaty }
			remove_opinion_modifier = { target = ENG modifier = JAP_join_the_london_naval_treaty }
		}		
	}
}

prospect_for_resources = {

#  #  ##  ###  ### #  # ### ###  #  #     ###  ###  ##  ##  #  # ###   ##  ###      ##  ###  ###  ##  
## # #  # #  #  #  #  # #   #  # ## #     #  # #   #   #  # #  # #  # #  # #       #  # #  # #   #  # 
# ## #  # ###   #  #### ##  ###  # ##     ###  ##   #  #  # #  # ###  #    ##      #### ###  ##  #### 
#  # #  # #  #  #  #  # #   #  # #  #     #  # #     # #  # #  # #  # #  # #       #  # #  # #   #  # 
#  #  ##  #  #  #  #  # ### #  # #  #     #  # ### ##   ##   ##  #  #  ##  ###     #  # #  # ### #  # 

	#Below is visible when JAP_establish_the_northern_resource_area is completed
	JAP_develop_north_sakhalin_oil_deposits = { #655
		icon = oil

		highlight_states = {
 highlight_state_targets = {
			state = 655
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 655
			has_tech = excavation2
		}

		visible = {
			has_completed_focus = JAP_establish_the_northern_resource_area
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			655 = {
				add_resource = {
					type = oil
					amount = 8
				}
			}
		}
	}


 ##  ##  #  # ### #  # ### ###  #  #     ###  ###  ##  ##  #  # ###   ##  ###      ##  ###  ###  ##  
#   #  # #  #  #  #  # #   #  # ## #     #  # #   #   #  # #  # #  # #  # #       #  # #  # #   #  # 
 #  #  # #  #  #  #### ##  ###  # ##     ###  ##   #  #  # #  # ###  #    ##      #### ###  ##  #### 
  # #  # #  #  #  #  # #   #  # #  #     #  # #     # #  # #  # #  # #  # #       #  # #  # #   #  # 
##   ##   ##   #  #  # ### #  # #  #     #  # ### ##   ##   ##  #  #  ##  ###     #  # #  # ### #  # 

#623:0 "Luzon"
#627:0 "Mindanao"
#625:0 "Samar"
#725:0 "Nauru"

	#Below is visible when JAP_exploit_the_southern_resource_area is completed
	JAP_develop_luzon_chromium_deposits = { #623
		icon = chromium

		highlight_states = {
 highlight_state_targets = {
			state = 623
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 623
			has_tech = excavation3
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			623 = {
				NOT = {
					has_state_flag = luzon_chromium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			623 = {
				add_resource = {
					type = chromium
					amount = 12
				}
				set_state_flag = luzon_chromium_developed
			}
		}
	}

	JAP_develop_mindanao_steel_deposits = { #627
		icon = steel

		highlight_states = {
 highlight_state_targets = {
			state = 627
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 627
			has_tech = excavation4
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			627 = {
				NOT = {
					has_state_flag = mindanao_steel_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			627 = {
				add_resource = {
					type = steel
					amount = 8
				}
				set_state_flag = mindanao_steel_developed
			}
		}
	}

	JAP_develop_samar_steel_deposits = { #625
		icon = steel

		highlight_states = {
 highlight_state_targets = {
			state = 625
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 625
			has_tech = excavation3
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			625 = {
				NOT = {
					has_state_flag = samar_steel_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			625 = {
				add_resource = {
					type = steel
					amount = 6
				}
				set_state_flag = samar_steel_developed
			}
		}
	}

	JAP_develop_nauru_tungsten_deposits = { #725
		icon = tungsten

		allowed = {
			original_tag = JAP
		}

		highlight_states = {
 highlight_state_targets = {
			state = 725
		} 
}

		available = {
			has_full_control_of_state = 725
			has_tech = excavation4
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			725 = {
				NOT = {
					has_state_flag = nauru_tungsten_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			725 = {
				add_resource = {
					type = tungsten
					amount = 4
				}
				set_state_flag = nauru_tungsten_developed
			}
		}
	}
	JAP_develop_tonkin_aluminium_deposits = { #671
		icon = aluminium
		
		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 671
			has_tech = excavation4
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			671 = {
				NOT = {
					has_state_flag = tonkin_aluminium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			671 = {
				add_resource = {
					type = aluminium
					amount = 6
				}
				set_state_flag = tonkin_aluminium_developed
			}
		}
	}
	JAP_develop_singapore_aluminium_deposits = { #336
		icon = aluminium
		
		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 336
			has_tech = excavation2
		}

		visible = {
			has_completed_focus = JAP_exploit_the_southern_resource_area
			336 = {
				NOT = {
					has_state_flag = singapore_aluminium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			336 = {
				add_resource = {
					type = aluminium
					amount = 12
				}
				set_state_flag = singapore_aluminium_developed
			}
		}
	}

 ##  #  # ### #  # ###  ## ###     ###  ###  ##  ##  #  # ###   ##  ###  ## 
#  # #  #  #  ## # #   #   #       #  # #   #   #  # #  # #  # #  # #   #   
#    ####  #  # ## ##   #  ##      ###  ##   #  #  # #  # ###  #    ##   #  
#  # #  #  #  #  # #     # #       #  # #     # #  # #  # #  # #  # #     # 
 ##  #  # ### #  # ### ##  ###     #  # ### ##   ##   ##  #  #  ##  ### ##  

#597:0 "Shandong"
#621:0 "Suiyuan"

	#Below is visible when JAP_develop_chinese_resources is completed
	JAP_develop_shandong_aluminium_deposits = { #597
		
		icon = aluminium

		highlight_states = {
 highlight_state_targets = {
			state = 597
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 597
			has_tech = excavation3
		}

		visible = {
			has_completed_focus = JAP_develop_chinese_resources
			597 = {
				NOT = {
					has_state_flag = shandong_aluminium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			597 = {
				add_resource = {
					type = aluminium
					amount = 12
				}
				set_state_flag = shandong_aluminium_developed
			}
		}
	}

	JAP_develop_suiyuan_steel_deposits = { #621
		
		icon = steel

		highlight_states = {
 highlight_state_targets = {
			state = 621
		} 
}

		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 621
			has_tech = excavation2
		}

		visible = {
			has_completed_focus = JAP_develop_chinese_resources
			621 = {
				NOT = {
					has_state_flag = suiyuan_steel_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			621 = {
				add_resource = {
					type = steel
					amount = 8
				}
				set_state_flag = suiyuan_steel_developed
			}
		}	
	}

	JAP_develop_yunnan_aluminium_deposits = { #325

		icon = aluminium
		
		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 325
			has_tech = excavation3
		}

		visible = {
			has_completed_focus = JAP_develop_chinese_resources
			325 = {
				NOT = {
					has_state_flag = yunnan_aluminium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			325 = {
				add_resource = {
					type = aluminium
					amount = 12
				}
				set_state_flag = yunnan_aluminium_developed
			}
		}	
	}
	JAP_develop_sichuan_aluminium_deposits = { #605

		icon = aluminium
		
		allowed = {
			original_tag = JAP
		}

		available = {
			has_full_control_of_state = 605
			has_tech = excavation3
		}

		visible = {
			has_completed_focus = JAP_develop_chinese_resources
			605 = {
				NOT = {
					has_state_flag = sichuan_aluminium_developed
				}
			}
		}

		fire_only_once = yes

		cost = 25
		days_remove = 60

		modifier = {
			civilian_factory_use = 3
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			605 = {
				add_resource = {
					type = aluminium
					amount = 12
				}
				set_state_flag = sichuan_aluminium_developed
			}
		}	
	}

}
