# ## Physics - Weapon Technologies

# ##################
# Laser Weapons
# ##################

# Red Lasers
tech_lasers_1 = {
	tier = 0
	cost = @tier0cost1
	area = physics
	start_tech = yes
	category = { particles }
	start_tech = yes

	technology_swap = {
		name = tech_bio_lasers_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}
}

# Blue Lasers
tech_lasers_2 = {
	area = physics
	cost = @tier1cost2
	tier = 1
	category = { particles }
	prerequisites = { "tech_lasers_1" }
	weight = @tier1weight2

	gateway = energy_weapons
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_lasers_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# UV Lasers
tech_lasers_3 = {
	area = physics
	cost = @tier2cost1
	tier = 2
	category = { particles }
	prerequisites = { "tech_lasers_2" }
	weight = @tier2weight1

	gateway = energy_weapons
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_lasers_3
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# X-Ray Lasers
tech_lasers_4 = {
	area = physics
	cost = @tier3cost1
	tier = 3
	category = { particles }
	prerequisites = { "tech_lasers_3" }
	weight = @tier3weight1

	gateway = energy_weapons
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_lasers_4
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# Gamma Lasers
tech_lasers_5 = {
	area = physics
	cost = @tier4cost1
	tier = 4
	category = { particles }
	prerequisites = { "tech_lasers_4" }
	weight = @tier4weight1

	gateway = energy_weapons
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_lasers_5
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_energy_lance_1 = {
	area = physics
	cost = @tier4cost2
	tier = 4
	category = { particles }
	prerequisites = {
		tech_lasers_4
		OR = {
			tech_battleships
			tech_stingers
		}
	}
	weight = @tier4weight2

	technology_swap = {
		name = tech_bio_energy_lance_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_energy_lance_2 = {
	area = physics
	cost = @tier4cost3
	tier = 4
	category = { particles }
	prerequisites = { "tech_lasers_5" "tech_energy_lance_1" }
	weight = @tier4weight3

	technology_swap = {
		name = tech_bio_energy_lance_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# ##################
# Plasma Weapons
# ##################

tech_plasma_1 = {
	area = physics
	cost = @tier2cost2
	tier = 2
	category = { particles }
	weight = @tier2weight2
	
	modifier = {
		army_damage_mult = 0.05
	}

	prerequisites = {
		tech_lasers_2
	}

	technology_swap = {
		name = tech_bio_plasma_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 0.5
			NOT = {
				has_technology = "tech_lasers_1"
			}
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_plasma_2 = {
	area = physics
	cost = @tier3cost1
	tier = 3
	category = { particles }
	prerequisites = { "tech_plasma_1" }
	weight = @tier3weight1
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_plasma_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_plasma_3 = {
	area = physics
	cost = @tier4cost1
	tier = 4
	category = { particles }
	prerequisites = { "tech_plasma_2" }
	weight = @tier4weight1
	
	modifier = {
		army_damage_mult = 0.05
	}

	technology_swap = {
		name = tech_bio_plasma_3
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_arc_emitter_1 = {
	area = physics
	cost = @tier4cost2
	tier = 4
	category = { particles }
	prerequisites = {
		tech_disruptors_3
		OR = {
			tech_battleships
			tech_stingers
		}
	}
	weight = @tier4weight2

	technology_swap = {
		name = tech_bio_arc_emitter_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_arc_emitter_2 = {
	area = physics
	cost = @tier4cost3
	tier = 4
	category = { particles }
	prerequisites = { "tech_arc_emitter_1" }
	weight = @tier4weight3

	technology_swap = {
		name = tech_bio_arc_emitter_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# ##################
# Disruptor Weapons
# ##################

tech_disruptors_1 = {
	area = physics
	cost = @tier2cost2
	tier = 2
	category = { particles }
	weight = @tier2weight2

	prerequisites = { "tech_lasers_2" }

	technology_swap = {
		name = tech_bio_disruptors_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 0.5
			NOT = {
				has_technology = "tech_lasers_1"
			}
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_disruptors_2 = {
	area = physics
	cost = @tier3cost1
	tier = 3
	category = { particles }
	prerequisites = { "tech_disruptors_1" }
	weight = @tier3weight1

	technology_swap = {
		name = tech_bio_disruptors_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_disruptors_3 = {
	area = physics
	cost = @tier4cost1
	tier = 4
	category = { particles }
	prerequisites = { "tech_disruptors_2" }
	weight = @tier4weight1

	technology_swap = {
		name = tech_bio_disruptors_3
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# ##################
# Energy Torpedo Weapons
# ##################

tech_energy_torpedoes_1 = {
	area = physics
	cost = @tier3cost3
	tier = 3
	category = { particles }
	prerequisites = {
		tech_lasers_4
		OR = {
			tech_torpedoes_1
			tech_harbingers
		}
	}
	weight = @tier3weight3

	technology_swap = {
		name = tech_bio_energy_torpedoes_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
		modifier = {
			factor = 0.5
			NOT = {
				has_technology = "tech_lasers_1"
			}
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_energy_torpedoes_2 = {
	area = physics
	cost = @tier4cost2
	tier = 4
	category = { particles }
	prerequisites = { "tech_energy_torpedoes_1" }
	weight = @tier4weight2


	technology_swap = {
		name = tech_bio_energy_torpedoes_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# ##################
# Point-Defense
# ##################

#Active Countermeasures
tech_pd_tracking_1 = {
	area = physics
	tier = 0
	category = { computing }
	start_tech = yes

	technology_swap = {
		name = tech_bio_pd_tracking_1
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}
}

#Interlinked Support Systems
tech_pd_tracking_2 = {
	area = physics
	tier = 2
	cost = @tier2cost3
	category = { computing }
	prerequisites = { "tech_pd_tracking_1" }
	weight = @tier2weight3

	# unlocks point defence 2

	technology_swap = {
		name = tech_bio_pd_tracking_2
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	weight_modifier = {

	}

	ai_weight = {
		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

#Predictive Algorithms
tech_pd_tracking_3 = {
	area = physics
	tier = 4
	cost = @tier4cost1
	category = { computing }
	prerequisites = { "tech_pd_tracking_2" }
	weight = @tier4weight1

	technology_swap = {
		name = tech_bio_pd_tracking_3
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	# unlocks point defence 3

	weight_modifier = {

	}

	ai_weight = {
		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# ##################
# Critter Weapons
# ##################

tech_extradimensional_weapon_1 = {
	area = physics
	cost = @tier5cost3
	tier = 5
	is_rare = yes
	category = { particles }
	weight = 0

	weight_modifier = {
		factor = 10
		modifier = {
			factor = 0
			NOT = { has_country_flag = covenant_end_of_the_cycle }
		}
		inline_script = {
			script = technologies/rare_technologies_weight_modifiers
			TECHNOLOGY = tech_extradimensional_weapon_1
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_mining_drone_weapon_1 = {
	area = physics
	cost = @tier2cost2
	tier = 2
	category = { particles }
	weight = 0

	technology_swap = {
		name = tech_mining_bio_laser
		inherit_icon = no
		inherit_effects = yes
		trigger = {
			country_uses_bio_ships = yes
		}
		weight = {
			factor = 1
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

tech_space_cloud_weapon_1 = {
	area = physics
	cost = @tier2cost3
	tier = 2
	is_rare = yes
	category = { particles }
	weight = 0

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}

# Null void beam
null_void_beam = {
	area = physics
	cost = @tier1cost2
	tier = 2
	is_rare = yes
	category = { particles }
	weight = 0

}

# ##################
# Infernal Weapons
# ##################

tech_starfire_cannon = {
	area = physics
	cost = @tier4cost3
	tier = 4
	is_rare = yes
	category = { particles }
	weight = @tier4weight3

	# Note: Weapon has tech requirements in the decision tooltip instead
	potential = {
		has_origin = origin_red_giant
		has_country_flag = starfire_cannon_unlocked
	}

	weight_modifier = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}
	}

	ai_weight = {
		modifier = {
			factor = 1.25
			has_ethic = ethic_militarist
		}
		modifier = {
			factor = 1.5
			has_ethic = ethic_fanatic_militarist
		}

		inline_script = {
			script = ai/weapon_preference_weight
			WEAPON_TYPE = weapon_type_energy
		}
	}
}
