Attack Boon Changes

This commit is contained in:
2026-07-13 18:30:41 -07:00
parent 972e0d5b4f
commit 24800f4bcb
34 changed files with 1306 additions and 112 deletions
@@ -15,13 +15,14 @@ namespace ProjectM.Simulation
static class KnockbackUtil
{
public static void Stamp(ref ComponentLookup<KnockbackState> lookup, in ComponentLookup<BossState> bossLookup,
Entity target, float3 sourcePos, float3 targetPos, float2 faceFallback, float speed, uint untilTick)
Entity target, float3 sourcePos, float3 targetPos, float2 faceFallback, float speed, uint untilTick, bool pull = false)
{
if (!lookup.HasComponent(target) || bossLookup.HasComponent(target))
return;
float3 delta = targetPos - sourcePos;
float2 dir = math.lengthsq(delta.xz) > 1e-6f ? math.normalize(delta.xz) : faceFallback;
if (pull) dir = -dir; // Phase 1.7 Gravity Pull: drag the target TOWARD the attacker
lookup[target] = new KnockbackState { Dir = dir, Speed = speed, UntilTick = untilTick };
}
}