Shared building blocks for the builtin gameplay controllers (#57): the ludic.gameplay source package (Cooldown timer, Stats + timed modifier stack, Faction table, Combat damage pipeline with cancel/mutable hooks), plus the compiler `disable system <esys_fn>` extensibility lever. Deterministic, integer-only; C-free bootstrap fixpoint holds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.1 KiB
bump: minor
type: feat
Gameplay-controller foundation (#57) — the shared, cross-genre building blocks the builtin controllers stand on, shipped as the source package ludic.gameplay: a deterministic Cooldown frame timer (engine-ticked), a Stats attribute bundle with an unbounded timed modifier stack (Stats.total computes base+flat then percent on demand; expired modifiers self-despawn), a Faction friend/enemy/neutral relationship table (same-id-friendly / different-hostile by default), and a Combat damage pipeline whose cancellable DamageAboutToApply hook lets a game veto a hit or rewrite the amount (Combat.set_amount) and which emits Damaged/Died/Healed. Everything is integer-only so lockstep, replay and world_save snapshots hold. Also adds extensibility lever 5 to the language: disable system <esys_fn> drops exactly one engine-owned system's tick at compile time, so a game can carry a well-known component but tick it with its own handler (byte-identical when nothing is disabled; the C-free bootstrap fixpoint is untouched). Example: examples/library/gameplay_foundation.ludic.