Fire control Cut 6b: a shot's dice belong to the shot, and airburst resolves in the simulation
6.1 (Soul finding 6): Commit builds a local CultMath.Random from (Zone.CombatSeed, shot.ShotId) instead of reading and writing the shared ItemManager.Random stream. Zone exposes CombatSeed (the same expression that already seeds its own _random), so a shot's outcome is a pure function of zone identity and shot id -- immune to whatever else drew from the shared stream in between. 6.2 (Soul finding 5): airburst is wired into the simulation instead of back into Projectile.cs. PendingShot gains BurstPosition/BurstRadius, frozen at Fire time from PredictedIntercept and the weapon's authored WeaponItemData.AirburstRange when WeaponModifiers carries Airburst. FireControl.Step resolves such a shot via Splash instead of Apply, never both. Projectile.cs/ProjectileManager.cs drop the dead AirburstDistance/AirburstRange fields and write-back. Tests: FireControlCut6Tests.cs pins both rules (208 baseline + 5 new, all green). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
063804801f
commit
39ad4bfc80
6 changed files with 358 additions and 12 deletions
|
|
@ -1,8 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using CultMath;
|
||||
using static CultMath.math;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class ProjectileManager : InstantWeaponEffectManager
|
||||
|
|
@ -29,7 +27,6 @@ public class ProjectileManager : InstantWeaponEffectManager
|
|||
p.Velocity += new Vector3(source.Entity.Velocity.x, 0, source.Entity.Velocity.y);
|
||||
p.Range = weapon.Range;
|
||||
p.Zone = source.Entity.Zone;
|
||||
p.AirburstDistance = target != null ? length(source.Entity.Position - target.Entity.Position) : (weapon.Range * .75f);
|
||||
p.Trail.Clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue