// Team Fortress Realms' changes to TF2's own weapons, merged over the retail scripts/items/items_game.txt
// (MergeModSchemaFiles in game/shared/econ/econ_item_schema.cpp: values replace, keys with subkeys merge, and a key
// set to "#remove" takes the retail key away).
// Hand-written; every change here is listed in VANILLA_BALANCE.md at the repo root.
// Attribute text lives in resource/vanilla_balance_english.txt.
"items_game"
{
	// Attributes for the mechanics our code adds (32300+; Chief uses 321xx, the Plumber 322xx)
	"attributes"
	{
		// The Pain Train (CTFPlayer::RegenThink, CTFPlayer::IsAtObjective)
		"32300"
		{
			"name"	"health regen at objective"
			"attribute_class"	"add_health_regen_at_objective"
			"description_string"	"#Attrib_HealthRegenAtObjective"
			"description_format"	"value_is_additive"
			"hidden"	"0"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// Scales only the first step of a one-at-a-time reload (CTFWeaponBase::SetReloadTimer)
		"32301"
		{
			"name"	"reload start time hidden"
			"attribute_class"	"mult_reload_start_time_hidden"
			"description_string"	""
			"description_format"	"value_is_percentage"
			"hidden"	"1"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// The retail "effect bar recharge rate increased" without its stat line
		"32302"
		{
			"name"	"effect bar recharge rate hidden"
			"attribute_class"	"effectbar_recharge_rate"
			"description_string"	""
			"description_format"	"value_is_inverted_percentage"
			"hidden"	"1"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// Added to the Sandman ball's base damage (CTFStunBall::GetDamage)
		"32303"
		{
			"name"	"stunball damage bonus hidden"
			"attribute_class"	"add_stunball_damage"
			"description_string"	""
			"description_format"	"value_is_additive"
			"hidden"	"1"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// A fire rate change whose fire animation keeps pace (CTFWeaponBaseGun::PrimaryAttack)
		"32305"
		{
			"name"	"fire rate bonus animated hidden"
			"attribute_class"	"mult_postfiredelay_animated"
			"description_string"	""
			"description_format"	"value_is_inverted_percentage"
			"hidden"	"1"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// Seconds a reload takes while the weapon is put away (CTFWeaponBaseGun::Holster)
		"32306"
		{
			"name"	"holster reload time hidden"
			"attribute_class"	"holster_reload_time"
			"description_string"	""
			"description_format"	"value_is_additive"
			"hidden"	"1"
			"effect_type"	"positive"
			"stored_as_integer"	"0"
		}
		// (32304, the Ullapool Caber's rebuild, and 32307, the Sharpened Volcano Fragment's afterburn through
		// immunity, were reverted on 2026-10-13: free to reuse)
	}

	// Prefabs, so every item built on them changes too
	"prefabs"
	{
		// The Reserve Shooter: deploys 35% faster (TF2: 20%)
		"weapon_reserve_shooter"
		{
			"attributes"
			{
				"single wep deploy time decreased"
				{
					"attribute_class"	"mult_single_wep_deploy_time"
					"value"	"0.65"
				}
			}
		}

		// The Syringe Gun (and its upgradeable copy): reloads automatically when not active (1.3 s: its reload
		// animation, less TF2's 0.2 s early finish), and its description says so
		"weapon_syringegun"
		{
			"item_description"	"#TF_SyringeGun_AutoReload_Desc"
			"attributes"
			{
				"holster reload time hidden"
				{
					"attribute_class"	"holster_reload_time"
					"value"	"1.3"
				}
			}
		}

		// The Jag (and its decorated copies): repairs 30% slower (TF2: 20%)
		"weapon_jag"
		{
			"attributes"
			{
				"Repair rate decreased"
				{
					"attribute_class"	"mult_repair_value"
					"value"	"0.70"
				}
			}
		}
	}

	"items"
	{
		// The Sandman: ball base damage 15 -> 45 (sv_proj_stunball_damage 15 + 30)
		"44"
		{
			"attributes"
			{
				"stunball damage bonus hidden"
				{
					"attribute_class"	"add_stunball_damage"
					"value"	"30"
				}
			}
		}

		// The Scottish Resistance: first reload 0.8 s (stock 1.09), each one after 0.45 s (stock 0.67).
		// The hidden reload multiplier covers every step (and the third-person animation); the start
		// multiplier brings the first step to 0.833x overall (0.672 x 1.24).
		"130"
		{
			"attributes"
			{
				"reload time increased hidden"
				{
					"attribute_class"	"mult_reload_time_hidden"
					"value"	"0.672"
				}
				"reload start time hidden"
				{
					"attribute_class"	"mult_reload_start_time_hidden"
					"value"	"1.24"
				}
			}
		}

		// The Pain Train: +4 health regenerated per second while at an objective
		"154"
		{
			"attributes"
			{
				"health regen at objective"
				{
					"attribute_class"	"add_health_regen_at_objective"
					"value"	"4"
				}
			}
		}

		// The Buffalo Steak Sandvich: eating heals up to 100 (CTFLunchBox::ApplyBiteEffects),
		// damage vulnerability while active +20% -> +10%
		"311"
		{
			"item_description"	"#TF_BuffaloSteak_Desc_Realms"
			"attributes"
			{
				"energy buff dmg taken multiplier"
				{
					"attribute_class"	"energy_buff_dmg_taken_multiplier"
					"value"	"1.1"
				}
			}
		}

		// The Liberty Launcher: -25% damage penalty -> -20% (-15% on 2026-10-08, too much)
		"414"
		{
			"attributes"
			{
				"damage penalty"
				{
					"attribute_class"	"mult_dmg"
					"value"	"0.8"
				}
			}
		}

		// The Warrior's Spirit: +30% damage vulnerability on wearer -> +20%
		"310"
		{
			"attributes"
			{
				"dmg taken increased"
				{
					"attribute_class"	"mult_dmgtaken"
					"value"	"1.2"
				}
			}
		}

		// The Eviction Notice: speed boost on hit lasts 6 seconds (TF2: 3), -60% damage penalty -> -50%
		"426"
		{
			"attributes"
			{
				"damage penalty"
				{
					"attribute_class"	"mult_dmg"
					"value"	"0.5"
				}
				"speed_boost_on_hit"
				{
					"attribute_class"	"speed_boost_on_hit"
					"value"	"6"
				}
			}
		}

		// Baby Face's Blaster: boost lost when hit 4 -> 2 per point of damage (the meter runs 0 to 100;
		// CTFPlayer::OnTakeDamage). Its stat line, "Boost reduced when hit", gives no number.
		"772"
		{
			"attributes"
			{
				"lose hype on take damage"
				{
					"attribute_class"	"lose_hype_on_take_damage"
					"value"	"2"
				}
			}
		}

		// The Cleaner's Carbine: 25% slower firing speed -> 15%
		"751"
		{
			"attributes"
			{
				"fire rate penalty"
				{
					"attribute_class"	"mult_postfiredelay"
					"value"	"1.15"
				}
			}
		}

		// The Gas Passer: its cloud lasts 8 seconds (TF_GAS_LIFETIME); the meter fills from 500 damage (TF2: 750) or
		// by itself in 45 seconds (TF2: 60). Both retail keys are hidden static attributes.
		"1180"
		{
			"static_attrs"
			{
				"item_meter_charge_rate"	"45"
				"item_meter_damage_for_full_charge"	"500"
			}
		}

		// The Hot Hand: speed boost on hit lasts 6 seconds (TF2: 1)
		"1181"
		{
			"static_attrs"
			{
				"speed_boost_on_hit_enemy"	"6"
			}
		}

		// The Righteous Bison: fires every 0.625 s (TF2: 0.8), 24 damage a hit (TF2: 20; CTFProjectile_EnergyRing),
		// plasma like Chief's plasma rifle: pierces resistances, and its multipliers against him (halo_player.cpp)
		"442"
		{
			"attributes"
			{
				"fire rate bonus animated hidden"
				{
					"attribute_class"	"mult_postfiredelay_animated"
					"value"	"0.78125"
				}
				"dmg pierces resists absorbs"
				{
					"attribute_class"	"mod_pierce_resists_absorbs"
					"value"	"1"
				}
			}
		}

		// The Pomson 6000: fires every 0.625 s (TF2: 0.8); first reload 0.87 s (TF2: 1.02), each after 0.51 s
		// (TF2: 0.53): every reload step x0.962, the first x0.76 more (0.731 overall); plasma, as the Bison
		"588"
		{
			"attributes"
			{
				"fire rate bonus animated hidden"
				{
					"attribute_class"	"mult_postfiredelay_animated"
					"value"	"0.78125"
				}
				"reload time increased hidden"
				{
					"attribute_class"	"mult_reload_time_hidden"
					"value"	"0.962"
				}
				"reload start time hidden"
				{
					"attribute_class"	"mult_reload_start_time_hidden"
					"value"	"0.76"
				}
				"dmg pierces resists absorbs"
				{
					"attribute_class"	"mod_pierce_resists_absorbs"
					"value"	"1"
				}
			}
		}

		// The Blutsauger: reloads automatically when not active, as the Syringe Gun
		"36"
		{
			"item_description"	"#TF_SyringeGun_AutoReload_Desc"
			"attributes"
			{
				"holster reload time hidden"
				{
					"attribute_class"	"holster_reload_time"
					"value"	"1.3"
				}
			}
		}

		// The Overdose: reloads automatically when not active, as the Syringe Gun
		"412"
		{
			"item_description"	"#TF_Overdose_Desc_Realms"
			"attributes"
			{
				"holster reload time hidden"
				{
					"attribute_class"	"holster_reload_time"
					"value"	"1.3"
				}
			}
		}

		// The Sun-on-a-Stick: -25% damage penalty -> -20%, +25% fire damage resistance while deployed -> +35%
		"349"
		{
			"attributes"
			{
				"damage penalty"
				{
					"attribute_class"	"mult_dmg"
					"value"	"0.8"
				}
				"dmg taken from fire reduced on active"
				{
					"attribute_class"	"mult_dmgtaken_from_fire_active"
					"value"	"0.65"
				}
			}
		}

		// The Diamondback: "Critical damage is affected by range", as the Ambassador
		"525"
		{
			"static_attrs"
			{
				"crit_dmg_falloff"	"1"
			}
		}

		// The Manmelter: fires every 1.5 s (TF2: 2.0), shown as TF2 shows it: +25% faster firing speed
		"595"
		{
			"attributes"
			{
				"fire rate bonus"
				{
					"attribute_class"	"mult_postfiredelay"
					"value"	"0.75"
				}
			}
		}
	}
}
