2 status effects and combat modifiers
forgejo-actions edited this page 2026-07-13 19:45:35 +00:00

Status Effects And Combat Modifiers

What This System Is

The status-effect system turns ability effect_ids and applied_effects into shared, validated combat state. It owns stack limits, duration refresh behavior, modifier ladders, presentation metadata, and deterministic consumption. Preview and game-server authority use the same catalog math rather than maintaining separate balance constants.

How Authors Use It

Edit assets/gameplay/status_effect_catalog.json. Each effect defines a stable id, label, description, icon key, category, duration, maximum stacks, stack policy, dispel policy, semantic tags, optional numeric parameters, and stat modifiers. Modifier values are indexed by stack count; the final value is reused if an active stack count exceeds the authored ladder.

Abilities in assets/gameplay/ability_catalog.json may use:

  • applied_effects for target/self status applications and stack counts;
  • consumed_target_effect_ids for finishers that consume target state;
  • effect_ids for passive or instant semantics such as life steal.

Catalog hot reload validates both assets and their cross-references before publishing either. An unknown effect reference rejects the reload and leaves the last valid pair active.

Rules And Invariants

The game server owns active player and scene-actor effects. It prunes expired effects, applies stack policies, computes modifiers, consumes effects, and includes active-effect projections in player combat snapshots and combat target-health snapshots. Clients cannot submit stacks, durations, modifier values, or expiration times.

The current Dragoon slice provides:

  • Wound application, five-stack cap, twelve-second refresh, and damage-taken ladder;
  • War Fiend wound consumption and its consumed-stack damage ladder;
  • War Fiend life steal from authored effect parameters;
  • War Lust as a typed non-targeted authority activation and a consumed next-attack buff;
  • Dragoon's Eye Wound proc on an authoritative forced critical, using the authored chance parameter.

Player effects project into the gameplay UI and are displayed with vitals. Target effects travel with authoritative damage health snapshots so future target frames can render the same data.

Permanent progression and equipment totals are resolved by the Character Stats And Equipment Modifiers pipeline. The shared stat-source contract reserves passive and status-effect source categories for future temporary-stat integration without changing the replicated breakdown shape.

Authored traits now apply status effects through Passive Traits And Procs.

Validation And Debugging

The Items editor Abilities & Loadouts card also lists status effects, categories, durations, and stack limits. Reload and validate catalog validates both catalogs and every cross-reference.

Validation rejects unsupported schema versions, empty or duplicate ids, missing labels, zero stack limits, empty modifier ladders, oversized ladders, and ability references to unknown effects.

Run:

cargo test -p aether-world-domain status_effect_system
cargo test -p aether-common-proto authoritative_state
cargo test -p aether-game-server status_effect --bin aether-game-server

Examples

Wound can stack to five, refresh duration, and increase damage taken through its authored modifier ladder. War Fiend can consume those stacks for bonus damage without the client inventing stack counts.