Damage falloff: effective range and damage at max range replace DamageCurve

WeaponData.RangeFactor is the one function of damage over range: 0 outside
[MinRange, Range], 1 up to EffectiveRange, one lerp to DamageAtMaxRange.
DamageCurve (key 7, retired) and its formula parameters, CurveField's
BezierCurve path, and every fixture curve line are deleted. Fire freezes
damage times the factor at BurstReach; the AI's DPS reads, Combat's optimum
sampling and the properties panel chart read the same function. AetherDb
gains range-falloff (command only; the catalog is re-saved in a later commit).
Cut and wiring land in one commit rather than two; this commit has not been
built yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-14 02:16:04 +02:00
commit 5e0ec92509
33 changed files with 282 additions and 127 deletions

View file

@ -423,7 +423,13 @@ public class PropertiesPanel : MonoBehaviour
if (gearData.Behaviors.FirstOrDefault(b => b is WeaponData) is WeaponData weapon)
{
var range = AddCurveField();
range.Show("Damage Range", weapon.DamageCurve, t => ActionGameManager.PlayerSettings.Format(lerp(statValueFunction(weapon.MinRange), statValueFunction(weapon.Range), t)));
var min = statValueFunction(weapon.MinRange);
var effective = statValueFunction(weapon.EffectiveRange);
var max = statValueFunction(weapon.Range);
range.Show("Damage Range",
t => WeaponData.RangeFactor(min, effective, max, weapon.DamageAtMaxRange, lerp(min, max, t)),
t => ActionGameManager.PlayerSettings.Format(lerp(min, max, t)),
effective < max ? saturate(unlerp(min, max, effective)) : .5f);
}
}