Phase 1 B1/B2/B4-B7: separation, poise, boss lunge, party HP scale, run-failed banner, fire anim

B1 SEPARATION: pairwise soft-collision pass INSIDE EnemyAISystem (sole
enemy-Position writer preserved; O(n^2) fine at MaxAlive<=14). Knocked/
lunging enemies keep committed motion but still push neighbours; the boss is
never pushed; enemies yield a small personal radius around players (below
melee range per review B1-1); displacement goes through the swept move so
nothing shoves through walls. SeparationMaxSpeed = live knob.

B2 POISE: the windup-cancel lived in the knockback CONTINUE branches (grunt/
charger/spitter). Threshold on the EXISTING KnockbackState.Speed channel:
light melee (6) nudges without interrupting; the finisher (10.8) and cone
(8) stagger as before. StaggerKnockbackSpeed = live knob (default 7).

B4 BOSS LUNGE: a telegraphed gap-closer on its own cooldown when the target
sits outside slam reach (repositioning - the slam stays the damage beat).
BossState.PendingAttack (server-only byte) disambiguates the shared windup
elapse (review-confirmed: naive reuse would SLAM on a lunge elapse);
LungeState.UntilTick spans windup+travel so the existing IsLunging ghost bit
replicates the tell, and the client draws a travel wedge instead of the slam
ring while it is set.

B5 PARTY HP SCALE: boss Health x(1 + 0.75/extra LIVING expedition player) at
spawn (not RunParticipant - dead-respawned members park at base). Max is a
GhostField so the bar stays truthful.

B6 RUN-FAILED BANNER: silent wipes used to land players home with zero
explanation. Client detects the (in-run)->Staging edge with a launch-cached
Charge (NEVER Returning - a 1-tick transient that precedes the bank by a
tick) and shows EXPEDITION FAILED for 6 s.

B7 FIRE ANIM: the class ability finally moves the body - a stateless window
from replicated AbilityCooldown.NextFireTick minus derived CooldownTicks
(works for predicted local + interpolated remotes, no cached edges).

456/456 EditMode; live Play smoke: launch -> 5 kills credit the room clear
through the corpse window -> boon window opens -> corpses expire clean, no
exceptions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 18:50:49 -07:00
parent 3836e9c842
commit ea108e48e4
9 changed files with 269 additions and 17 deletions
@@ -99,6 +99,10 @@ namespace ProjectM.Simulation
/// non-targetable corpse so the client death animation has time to read before the despawn burst.</summary>
public const uint EnemyDeathWindowTicks = 54;
/// <summary>Phase 1 (B5): boss HP grows by this fraction of its base per LIVING expedition player beyond the
/// first (counted at spawn; Health.Max replicates so the bar stays truthful).</summary>
public const float BossHealthPerExtraPlayer = 0.75f;
// ---- Expedition BOSS (a scaled Charger given a real kit by BossAISystem; server-only feel consts) ----
/// <summary>Radial SLAM AoE radius (world units): a player inside this ring at wind-up elapse eats the hit
@@ -114,6 +118,16 @@ namespace ProjectM.Simulation
/// <summary>Ticks between SLAMs in phase one (~4 s). Phase two multiplies this by BossPhase2SlamCooldownMult.</summary>
public const uint BossSlamCooldownTicks = 240;
// Phase 1 (B4): the boss's SECOND attack - a telegraphed gap-closing LUNGE (repositioning; the slam stays
// the damage beat). Windup is readable (~0.6 s); travel reuses the Charger contract (committed, wall-stopped).
public const uint BossLungeWindupTicks = 35;
public const float BossLungeSpeed = 20f;
public const uint BossLungeDurationTicks = 22;
public const uint BossLungeCooldownTicks = 300;
/// <summary>Lunge only when the target is beyond this (else slam) and within LungeMaxRange.</summary>
public const float BossLungeMinRange = 7f;
public const float BossLungeMaxRange = 20f;
/// <summary>Health fraction at/below which the boss enters phase two (faster + summons adds).</summary>
public const float BossPhase2HealthFraction = 0.5f;