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

YZ_sp_land_detonator = {
	specialization = specialization_land

	project_tags = YZ_sp_tag_artillery

	allowed = {
		has_dlc = "Gotterdammerung"
	}
	
	available = {
		FROM = {
			has_country_flag = start_research_0721_detonator
		}
	}
	
	prototype_time = sp_time.prototype.short

	complexity = sp_complexity.medium
	breakthrough_cost = {
		specialization_land = 1
	}

	resource_cost = {
		resources = { 
			aluminium = 1
		}
	}
	
	project_output = {
		enable_subunits = {	#起爆器支援连
			YZ_0721_detonator_company
		}
		enable_equipment_modules = { #车载起爆器
			YZ_0721_detonator_module
		}
		enable_equipments = {  #起爆器
			YZ_0721_detonator_equipment
		}

		country_effects = {
			hidden_effect = {
				set_technology = {
					tech_YZ_0721_detonator = 1
				}
				set_country_flag = has_YZ_0721_detonator_tech
			}
			add_unit_bonus = {
				category_artillery = {
				  	soft_attack = 0.1
					hard_attack = 0.15
					breakthrough = 0.05
				}
			}
		}
	}

	generic_prototype_rewards = {
		sp_land_generic_reward_scientist_xp_1
		sp_land_generic_reward_scientist_xp_2
		sp_land_generic_reward_scientist_xp_3
		sp_land_generic_reward_army_xp_1
		sp_land_generic_reward_army_xp_2
		sp_land_generic_reward_army_xp_3
		sp_land_generic_reward_major_progress_1
		sp_land_generic_reward_major_progress_2
		sp_land_generic_reward_major_progress_3
		sp_land_generic_reward_test_failure_1
		sp_land_generic_reward_test_failure_2
		sp_land_generic_reward_test_failure_3
		sp_land_generic_reward_artillery_tech_1
		sp_land_generic_reward_artillery_tech_2
		sp_land_generic_reward_artillery_tech_3
		sp_land_generic_reward_artillery_bonus_1
		sp_land_generic_reward_artillery_bonus_2
		sp_land_generic_reward_artillery_bonus_3
		sp_land_generic_reward_resource_scarcity
		sp_land_generic_reward_critical_failure
	}

	unique_prototype_rewards = {

		sp_land_reward_detonator_focus_preference = {
			fire_only_once = yes

			threshold = { 
				min = 30
				max = 70
			}

			weight = {
				base = 100
			}

			option = {
				token = sp_land_reward_option_detonator_focus_preference_balance
				
				iteration_output = {
					country_effects = {
						custom_effect_tooltip = {
							localization_key = generic_no_effects_to_equipment_tt #描述
							EQUIPMENT = YZ_0721_detonator_equipment_1
						}
					}
				}
			}

			option = {
				token = sp_land_reward_option_detonator_focus_preference_firepower
				
				iteration_output = {
					equipment_bonus = {
						YZ_0721_detonator_equipment_1 = {
							build_cost_ic = 0.2
							soft_attack = 0.3
							additional_collateral_damage = 0.2
						}
					}
				}
			}

			option = {
				token = sp_land_reward_option_detonator_focus_preference_production
				
				iteration_output = {
					equipment_bonus = {
						YZ_0721_detonator_equipment_1 = {
							build_cost_ic = -0.2
							soft_attack = -0.05
							additional_collateral_damage = -0.05
						}
					}
				}
			}
		}
	}
}

sp_land_yz_type_90 = {
	specialization = specialization_land
	#icon = GFX_sp_land_flamethrower_tank ### Automatically hooked-in since the GFX ID matches the project ID.

	project_tags = yz_sp_tag_type90

	ai_will_do = {
		base = 1
	}

	allowed = {
		has_dlc = "No Step Back"
	}
	
	available = {
		from = {
			has_country_flag = research_yz_type90
		}
		
	}

	breakthrough_cost = {
		specialization_land = 1
	}
	
	complexity = sp_complexity.insane
	prototype_time = sp_time.prototype.long	
	
	project_output = {
		country_effects = {
			hidden_effect = { 
				root = {
					#country_event = yz_type90_event.1	#预备的事件
					set_technology = {
						tech_YZ_type90 = 1
					}
					create_equipment_variant = {
						name = "柚子YIWG-90式主战坦克"
						type = type90_tank_chassis
						parent_version = 0
						modules = {
							main_armament_slot = type90_Rh_120_120mm_gun
							turret_type_slot = type90_tank_turret
							suspension_type_slot = type90_hydropneumatic_suspension
							armor_type_slot = type90_composite_armor
							engine_type_slot = type90_Mitsubishi_10ZG32WT_engine
							special_type_slot_1 = type90_modern_electronic_equipment
							special_type_slot_2 = type90_machine_guns
							special_type_slot_3 = type90_fire_control_system
							special_type_slot_4 = type90_auto_loader
						}
						upgrades = {
							tank_nsb_engine_upgrade = 6
							tank_nsb_armor_upgrade = 20
						}
						#icon = "gfx/counters/YZ_TYPE90_ICON.png"
						design_team = mio:youzi_tank_design_and_production_Center_organization_0
					}
				}
				
			}

			custom_effect_tooltip = {
				localization_key = SP_UNLOCK_TECH
				TECH = tech_YZ_type90	
			}
		}

	}

	generic_prototype_rewards = {
		sp_land_generic_reward_scientist_xp_1
		sp_land_generic_reward_scientist_xp_2
		sp_land_generic_reward_scientist_xp_3
		sp_land_generic_reward_army_xp_1
		sp_land_generic_reward_army_xp_2
		sp_land_generic_reward_army_xp_3
		sp_land_generic_reward_major_progress_1
		sp_land_generic_reward_major_progress_2
		sp_land_generic_reward_major_progress_3
		sp_land_generic_reward_test_failure_1
		sp_land_generic_reward_test_failure_2
		sp_land_generic_reward_test_failure_3
		sp_land_generic_reward_resource_scarcity
	}
}