JAP_annex = {

	JAP_annex_SIA = {
	
		icon = generic_ignite_civil_war

		available = {
		    
		    date > 1938.1.1
			SIA = { is_ai = yes }
			any_other_country = {
				original_tag = SIA
				exists = yes
			}
		}

		target_trigger = {
			FROM = {
				OR = {
					original_tag = SIA
				}
			}
		}

		fire_only_once = yes
		
		complete_effect = {
			annex_country = { target = SIA }
			every_state = {
				limit = {
					is_core_of = SIA
					is_controlled_by = JAP
					}
				set_compliance = 100
			}
			SIA = {
				every_unit_leader = {
					set_unit_leader_flag = flag_former_french_general
					set_nationality = JAP
				}
			}			
		}
	}

	JAP_marionetka_Siam = {
	
		icon = generic_ignite_civil_war

		available = {
		    date > 1938.1.1
			SIA = { is_ai = no }
			any_other_country = {
				original_tag = SIA
				exists = yes
			}
		}

		target_trigger = {
			FROM = {
				OR = {
					original_tag = SIA
				}
			}
		}

		fire_only_once = yes
		
		complete_effect = {
			JAP = { 
					set_autonomy = {
						target = SIA
						autonomy_state = autonomy_wtt_imperial_associate 
					}
				}			
		}
	}
	

}



JAP_special_prodjects_categories = { 

    JAP_special_prodjects_idustrial = {  
		##icon = generic_army_support
         icon = GFX_decision_gre_paying_ifc_debt

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_MP
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR 

		days_remove = 100 

        visible = {
			has_completed_focus = JAP_theproma_project_sakura1
		}

		available = {


		}

		

		fire_only_once = yes
		
		complete_effect = {
			add_to_variable = { imperial = -50 }

		}

		remove_Effect = {
			add_ideas = {
				TNP1
			}
			set_global_flag = JAP_special_prodjects_has
			set_global_flag = JAP_special_prodjects_idustrial_has
		}		
	}

	JAP_special_prodjects_idustrial1 = {   
		##icon = generic_army_support
         icon = GFX_decision_gre_paying_ifc_debt

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1 

		days_remove = 45

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_has
				}
			
				has_global_flag = JAP_special_prodjects_has 
		}



		available = {

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_idustrial_has 
				}
			
				has_global_flag = JAP_special_prodjects_idustrial_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_idustrial_has

		}

		remove_Effect = {
			JAP_china_cor = yes
			set_global_flag = JAP_special_prodjects_idustrial_has
			every_state = {
				limit = {
					is_core_of = CHI
					is_controlled_by = JAP
					free_building_slots = {
						building = arms_factory
						size > 7
						include_locked = yes
					}
				}
				random_select_amount = 7
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = -0.10
			}
		}		
	}
	JAP_special_prodjects_idustrial2 = {   
		##icon = generic_army_support
         icon = GFX_decision_gre_paying_ifc_debt

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1 

		days_remove = 45

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_has
				}
			
				has_global_flag = JAP_special_prodjects_has 
		}



		available = {

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_idustrial_has 
				}
			
				has_global_flag = JAP_special_prodjects_idustrial_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = { 
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_idustrial_has

		}

		remove_Effect = {
			JAP_china_cor = yes
			set_global_flag = JAP_special_prodjects_idustrial_has
			599 = {		
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = synthetic_refinery
					level = 3
					instant_build = yes
				}
			}
			594 = {		
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = synthetic_refinery
					level = 3
					instant_build = yes
				}
			}
			593 = {		
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = synthetic_refinery
					level = 3
					instant_build = yes
				}
			}
			592 = {		
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = synthetic_refinery
					level = 3
					instant_build = yes
				}
			}
			add_tech_bonus = {
				name = ITA_industria_della_gomma_sintetica
				bonus = 1.00
				uses = 1
				category = synth_resources
			}
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = -0.15
			}
		}		
	}
	JAP_special_prodjects_idustrial3 = {   
		##icon = generic_army_support
         icon = GFX_decision_gre_paying_ifc_debt

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1 

		days_remove = 45

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_has
				}
			
				has_global_flag = JAP_special_prodjects_has 
		}



		available = {

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_idustrial_has 
				}
			
				has_global_flag = JAP_special_prodjects_idustrial_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_idustrial_has

		}

		remove_Effect = {
			JAP_china_cor = yes
			set_global_flag = JAP_special_prodjects_idustrial_has
			
			608 = {		
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
			609 = {		
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
			613 = {		
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
			743 = {		
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
			custom_effect_tooltip = JAP_special_prodjects2_tt
		}		
	}
	JAP_special_prodjects_idustrial4 = {   
		##icon = generic_army_support
         icon = GFX_decision_generic_research

		custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_MP
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR 

		days_remove = 100

		visible = {
			has_completed_focus = JAP_theproma_project_sakura5 
		}



		available = {

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_idustrial_has 
				}
			
				has_global_flag = JAP_special_prodjects_idustrial_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -50 }
			clr_global_flag = JAP_special_prodjects_idustrial_has

		}

		remove_Effect = {
			JAP_china_cor = yes
			set_global_flag = JAP_special_prodjects_idustrial_has
			add_research_slot = 1
			set_technology = { amphibious_drive = 1 }
		}		
	}
	JAP_special_prodjects_Arms = {   
		##icon = generic_army_support
         icon = GFX_decision_generic_consumer_goods

		custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_MP
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR 

		days_remove = 100

		visible = {
			has_completed_focus = JAP_theproma_project_sakura3
			
		}



		available = {			
				OR = {
			    is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side3_range
		         }
				  is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side2_range
		         }
			}
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -50 }

		}

		remove_Effect = {
			set_global_flag = JAP_special_prodjects2_has
			set_global_flag = JAP_special_prodjects_arms_has
		}		
	}
	JAP_special_prodjects_Arms1 = {    
		##icon = generic_army_support
         icon = GFX_decision_generic_merge_plant_aircraft

		custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1 

		days_remove = 60

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects2_has
				}
			
				has_global_flag = JAP_special_prodjects2_has
		}



		available = {
			OR = {
			    is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side3_range
		         }
				  is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side2_range
		         }
			}

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_arms_has 
				}
			
				has_global_flag = JAP_special_prodjects_arms_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_arms_has

		}

		remove_Effect = {
			JAP_Baf_arms = yes
			set_global_flag = JAP_special_prodjects_arms_has
		}		
	}
	JAP_special_prodjects_Arms2 = {   
		##icon = generic_army_support
         icon = GFX_decision_generic_factory

		custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1  

		days_remove = 60

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects2_has
				}
			
				has_global_flag = JAP_special_prodjects2_has
		}



		available = {
			OR = {
			    is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side3_range
		         }
				  is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side2_range
		         }
			}

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_arms_has 
				}
			
				has_global_flag = JAP_special_prodjects_arms_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_arms_has

		}

		remove_Effect = {
			JAP_Baf_arms = yes
			set_global_flag = JAP_special_prodjects_arms_has
		}		
	}
	JAP_special_prodjects_Arms3 = {   
		##icon = generic_army_support
         icon = GFX_decision_generic_tank

		custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_medium_amount
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR1 

		days_remove = 60

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects2_has
				}
			
				has_global_flag = JAP_special_prodjects2_has
		}



		available = {
			OR = {
			    is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side3_range
		         }
				  is_power_balance_in_range = {
				    id = JAP_balanc_imperial
                    range = left_side2_range
		         }
			}

				custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_arms_has 
				}
			
				has_global_flag = JAP_special_prodjects_arms_has
			
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -25 }
			clr_global_flag = JAP_special_prodjects_arms_has

		}

		remove_Effect = {
			JAP_Baf_arms = yes
			set_global_flag = JAP_special_prodjects_arms_has

		}		
	}

	JAP_oil = { 
		##icon = generic_army_support
         icon = oil 

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_lowen_amount  
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_mr_low_amount_MR  


		available = {
		 has_tech = excavation2
		 num_of_civilian_factories_available_for_projects > 10
		}

		visible = {
			has_completed_focus = JAP_theproma_project_sakura2
		}

		days_remove = 60

		fire_only_once = yes

		modifier = {
			civilian_factory_use = 10
		}

		complete_effect = {
			add_to_variable = { imperial = -15 }

		}

		remove_Effect = {
			714 = {
				add_resource = {
					type = oil
					amount = 58 
				}
			}
			set_global_flag = JAP_special_prodjects_oil_has
		}
	}
	JAP_oil2 = {   
		##icon = generic_army_support
         icon = oil 

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_lowen_amount  
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_mr_low_amount_MR  


		available = {
		 has_tech = excavation3
		 num_of_civilian_factories_available_for_projects > 10
		}

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_oil_has
				}
			
				has_global_flag = JAP_special_prodjects_oil_has
		}

		days_remove = 60

		fire_only_once = yes

		modifier = {
			civilian_factory_use = 7
		}

		complete_effect = {
			add_to_variable = { imperial = -15 }

		}

		remove_Effect = {
			714 = {
				add_resource = {
					type = oil
					amount = 15
				}
			}
			set_global_flag = JAP_special_prodjects_oil_has2
		}
	}
	JAP_oil3 = { 
		##icon = generic_army_support
         icon = oil 

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_lowen_amount  
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_mr_low_amount_MR  


		available = {
		 has_tech = excavation3
		 num_of_civilian_factories_available_for_projects > 10
		}

		visible = {
			custom_trigger_tooltip = {
					has_global_flag = JAP_special_prodjects_oil_has2
				}
			
				has_global_flag = JAP_special_prodjects_oil_has2
		}

		days_remove = 60

		fire_only_once = yes

		modifier = {
			civilian_factory_use = 7
		}

		complete_effect = {
			add_to_variable = { imperial = -15 }

		}

		remove_Effect = {
			714 = {
				add_resource = {
					type = oil
					amount = 24 
				}
			}
		}
	}
	
	JAP_steel = {
	    custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_lowen_amount  
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_mr_low_amount_MR  
		##icon = generic_army_support
         icon = steel
		available = {
		 has_tech = excavation2
		 num_of_civilian_factories_available_for_projects > 10
		}
		visible = {
			has_completed_focus = JAP_theproma_project_sakura2
		}

		modifier = {
			civilian_factory_use = 7
		}

		days_remove = 60

		fire_only_once = yes

		complete_effect = {
			add_to_variable = { imperial = -15 }

		}

		remove_Effect = {
			716 = {
				add_resource = {
					type = steel
					amount = 100
				}
			}
		}
	}
	
	JAP_aluminium = {
	    custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_mr_lowen_amount  
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_mr_low_amount_MR  
		##icon = generic_army_support
         icon = aluminium
		available = {
		 has_tech = excavation2
		 num_of_civilian_factories_available_for_projects > 10
		}
		visible = {
			has_completed_focus = JAP_theproma_project_sakura2
		}

		modifier = {
			civilian_factory_use = 7
		}

		days_remove = 60

		

		fire_only_once = yes

		complete_effect = {
			add_to_variable = { imperial = -15 }

		}

		remove_Effect = {
			328 = {
				add_resource = {
					type = aluminium
					amount = 100
				}
			}
		}
	}

	JAP_special_prodjects_war_azzia = {    
		##icon = generic_army_support
         icon = GFX_decision_generic_coastal_fortification

		 custom_cost_trigger = { 
            check_variable = {
                var = imperial
                value = imperial_MP
                compare = greater_than_or_equals

            }
        }

        custom_cost_text = imp_decision_cost_medium_high_MR 

		days_remove = 100

		visible = {
			has_completed_focus = JAP_theproma_project_sakura4

		}

		modifier = {
			civilian_factory_use = 15
		}



		available = {
			num_of_civilian_factories_available_for_projects > 20
			date > 1940.6.1
			671 = {
			    is_controlled_by = ROOT 
			}
			286 = {
			    is_controlled_by = ROOT 
			}
				
			 
		}

		fire_only_once = yes

		
		complete_effect = {
			add_to_variable = { imperial = -50 }
			clr_global_flag = JAP_special_prodjects_idustrial_has

		}

		remove_Effect = {

			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = -0.5
			}

			869 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			289 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			724 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			747 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			325 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			670 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}

			524 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			526 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			645 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			528 = {
				add_building_construction = {
					type = air_base
					level = 5
					instant_build = yes
				}	
			}
			524 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}
			526 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}
			671 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}
			286 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}
			593 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}
			591 = {
				add_building_construction = {
					type = radar_station
					level = 3
					instant_build = yes
				}	
			}





		}		
	}
}




JAP_balanc_power = {

	jap_imperial_balanc2 = {
	
		icon = GFX_decision_generic_arrest

		available = { 

			OR = {

			

				is_power_balance_in_range = {
				    id = JAP_balanc_imperial
				    range = left_side2_range
			    }

				is_power_balance_in_range = {
				    id = JAP_balanc_imperial
				    range = left_side3_range
			    }
		    }
		}
		 


		visible = { 
		
			
		}    



		days_remove = 30

		cost = 75  
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.6
			}
			
		}
	}

	jap_minister_balanc = {
	
		icon = GFX_decision_generic_speech

		
		days_remove = 60 

		cost = 50

		available = {
			OR = {

				is_power_balance_in_range = {
				   id = JAP_balanc_imperial
				   range = right_side3_range
			    }
				is_power_balance_in_range = {
				   id = JAP_balanc_imperial
				   range = right_side2_range
			    }

			}
			
		}

		complete_effect = {
			add_stability = -0.1
		}

		remove_Effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = -0.6
			}
			add_stability = 0.1
			army_experience = 75
		}		
	}

	


	jap_minister_balanc2 = {
	
		icon = GFX_decision_SWI_guisan_speech

		
		days_remove = 25 

		cost = 25

		available = {
			
		}

		complete_effect = {
			
		}

		remove_Effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = -0.30
			}
			army_experience = 10
			
		}		
	}

	jap_imperial_balanc = {
	
		icon = GFX_decision_SWI_elect_confederation_president

		available = { 
			NOT = {
				is_power_balance_in_range = {
				    id = JAP_balanc_imperial
				    range = left_side3_range
		        }
			}
			

		} 
		days_remove = 15

		cost = 25  
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.30
			}
			add_command_power = 15
			
		}
	}


	jap_imperial_xiroxito1 = {
	
		icon = GFX_decision_generic_army_support

		available = { 
			is_power_balance_in_range = {
				id = JAP_balanc_imperial
                range = right_side3_range
		    }
		} 
		days_remove = 15

		cost = 25  
		fire_only_once = yes
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.05
			}
			add_country_leader_trait = jap_imperial_xiroxito1
			
		}
	}
	jap_imperial_xiroxito2 = {
	
		icon = GFX_decision_generic_army_support

		available = { 
			is_power_balance_in_range = {
				id = JAP_balanc_imperial
                range = right_side3_range
		    }
		} 
		days_remove = 15

		cost = 25  
		fire_only_once = yes
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.05
			}
			add_country_leader_trait = jap_imperial_xiroxito2
			
		}
	}
	jap_imperial_xiroxito3 = {
	
		icon = GFX_decision_generic_army_support

		available = { 
			is_power_balance_in_range = {
				id = JAP_balanc_imperial
                range = right_side3_range
		    }
		} 
		days_remove = 15

		cost = 25  
		fire_only_once = yes
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.05
			}
			add_country_leader_trait = jap_imperial_xiroxito3
			
		}
	}
	jap_imperial_xiroxito4 = {
	
		icon = GFX_decision_generic_army_support

		available = { 
			is_power_balance_in_range = {
				id = JAP_balanc_imperial
                range = right_side3_range
		    }
		} 
		days_remove = 15

		cost = 25  
		fire_only_once = yes
		
		remove_effect = {
			add_power_balance_value = {
				id = JAP_balanc_imperial
				value = 0.05
			}
			add_country_leader_trait = jap_imperial_xiroxito4
			
		}
	}


	
}