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
@@ -118,6 +118,30 @@ namespace ProjectM.Server
if (idx < 0)
return false; // unknown id (catalog drift) — preserve-and-skip, never throw
if (pool.Defs[idx].Kind == 1)
{
// Phase 1.7 mechanic-changer: mutate the baked-present BoonEffects (non-structural) instead of
// appending a StatModifier. Bytes only (Burst-safe switch). No BoonPickCounter bump (no band row).
if (!state.EntityManager.HasComponent<BoonEffects>(player))
return false; // real players are baked with it; skip defensively otherwise
var fx = state.EntityManager.GetComponentData<BoonEffects>(player);
byte delta = (byte)pool.Defs[idx].Value;
switch (pool.Defs[idx].EffectKind)
{
case BoonEffectKind.Pierce: fx.Pierce = (byte)(fx.Pierce + delta); break;
case BoonEffectKind.Fork: fx.Fork = (byte)(fx.Fork + delta); break;
case BoonEffectKind.Chain: fx.Chain = (byte)(fx.Chain + delta); break;
case BoonEffectKind.DashTrail: fx.Flags |= BoonFlag.DashTrail; break;
case BoonEffectKind.FinisherDetonate: fx.Flags |= BoonFlag.FinisherDetonate; break;
case BoonEffectKind.KnockToPull: fx.Flags |= BoonFlag.KnockToPull; break;
case BoonEffectKind.Siphon: fx.Flags |= BoonFlag.Siphon; break;
case BoonEffectKind.Frenzy: fx.Flags |= BoonFlag.Frenzy; break;
default: return false; // unknown effect kind — preserve-and-skip
}
state.EntityManager.SetComponentData(player, fx);
return true;
}
var mods = state.EntityManager.GetBuffer<StatModifier>(player);
mods.Add(new StatModifier
{