Expand description
Combat system for the WoW Lab simulation engine.
Modules§
- builder 🔒
- Fluent builder API for constructing a combat system.
- context 🔒
- Combat context types for passing state through the combat pipeline.
- handler 🔒
wowlab_engine_ports::SpecHandlerimplementation backed byCombatState+DenseBuffer.- keys 🔒
- Centralized string keys for dense-buffer slots (units, swing slots).
- pipeline 🔒
- Cast processing pipeline: resource cost, cooldowns, damage, aura application, CDR, and post-cast hooks.
- state 🔒
- Combat state: typed data structures for the combat system.
- systems 🔒
- Combat system functions operating on
crate::context::CombatCtxand typed buffer accessors. - targeting 🔒
- Deterministic selector, filter, and spatial target-shape resolution.
- test_
support - travel 🔒
- Shared projectile travel-time resolution.
Macros§
- smoke_
test - Generates a smoke test that verifies
build_combat_systemdoes not panic with default inputs.
Structs§
- Accumulating
Impact Proc - A registered per-impact proc driven by randomized contributions to a threshold accumulator.
- Aura
Data - Aura
Definition Draft - Auto
Attack Definition Draft - Mutable auto-attack definition lowered with the rest of the combat catalog.
- Base
Stats - Base stats that remain constant within a single simulation iteration.
- Buff
Totals - Accumulated buff totals from all active auras for one frame.
- Builder
Error - Error raised by the fluent builder API at construction time.
- Built
Combat System - Output of a successful
crate::CombatSystemBuilder::buildcall. - Combat
Build Error - Typed failure while compiling and assembling a combat system.
- Combat
Ctx - Short-lived borrow bundle for combat operations.
- Combat
Handler - Combat
State - All static combat data plus mutable non-buffer state, grouped into sub-structs.
- Combat
System Builder - Fluent builder for constructing a combat system.
- Combat
View - Read-only combat state and dense-buffer projection.
- Damage
Effect Ref - DBC coordinates of an effect used as a damage payload or targeting geometry.
- Damage
Flags - Semantics of a damage impact. Empty is magical, player-sourced, direct, and crit-capable.
- Damage
Outcome - Resolved outcome of one hook-owned damage impact.
- Damage
Payload - Spell identity, scaling coefficient, and semantic flags for one power-scaled hit.
- Damage
Replication - One active-aura rule that copies resolved impact damage to selected targets.
- Driver
Spell Modifier - Per-damage-event spell modifiers owned by a real spell or passive driver.
- Driver
Spell Modifier Result - Identity-based adjustments returned by a
DriverSpellModifier. - Empower
Release Adjustment - Rank-dependent payload changes produced when an empower spell is released.
- Ground
Effect Spec - A location-locked sequence of damage pulses.
- Guardian
Ability - One independently scheduled ability owned by a temporary guardian.
- Guardian
Event - Context supplied to a guardian action callback.
- Guardian
Handle - Stable handle for one temporary guardian instance during an iteration.
- Guardian
Spec - Definition used when a cast hook summons a temporary guardian.
- HookCtx
- Constrained context exposing only the operations cast hooks may perform.
- Hook
CtxRequest - Coordinates and provenance for constructing a hook context.
- Hook
CtxServices - Mutable combat services borrowed by one hook invocation.
- Hook
View - Read-only combat projection scoped to a hook target and simulation time.
- Impact
Effect Proc Definition - Impact
Event - Impact
Proc - A registered per-damage-impact proc.
- Landed
Impact Event - One landed member of a fully resolved damage-impact batch.
- Landed
Impact Proc - A registered callback for landed members of a resolved damage-impact batch.
- Local
Aura Idx - Local aura index scoped to a single
CombatState. - Local
Rppm Idx - Local RPPM tracker index scoped to a single
CombatState. - Local
Spell Idx - Local spell index scoped to a single
CombatState. - Local
Threshold Idx - Local accumulated-threshold tracker index scoped to a single
CombatState. - Mastery
Ctx - Passive
Driver Effect - An always-present player effect owned by a real spell or passive driver.
- Periodic
Damage Data Input - Data coordinates and affine transform for a periodic damage coefficient.
- Periodic
Data - Periodic
Driver - Encounter-lifetime periodic work owned by a real spell or passive driver.
- PetAbility
- One ability in a persistent pet’s priority list.
- PetAction
Bar - Resource and global-cooldown rules for a persistent pet’s priority list.
- PetResource
Model - Resource model for a persistent pet action bar.
- Proc
Driver - Policy and callback ownership for a registered proc driver.
- Proc
HitMask - Hit outcomes eligible to trigger a proc.
- Proc
Phase Mask - Spellcast phases eligible to trigger a proc.
- Proc
Policy - DBC policy carried by a triggering action or registered proc driver.
- Proc
Provenance - Triggering-action identity and policy carried by each impact.
- Resource
Gain Event - One completed resource gain, including the amount rejected by the resource cap.
- Resource
Gain Proc - A pseudo-random proc driven by effective resource gains.
- Rppm
Scaling Options - DBC-selected multiplicative coordinates for an RPPM tracker.
- Rppm
Tracker - RPPM (real procs per minute) state for one proc source.
- Spell
Definition Draft - Mutable draft of a single castable spell definition.
- Spell
Effect Range - Contiguous range into the combat definition’s private
spell_effectsstorage. - Swing
Event - One completed auto-attack swing supplied to content hooks.
- Swing
Replacement - Data-driven spell selected by a hook to replace the current landed auto attack.
- Threshold
Tracker - State for an accumulated-threshold proc.
- Weapon
Enchant Binding - One equipped weapon-enchant RPPM source and the aura it applies.
Enums§
- Attack
Position - Player position relative to the current hostile target.
- Aura
Tick Behavior - Whether an aura’s periodic tick mutates its stack count.
- Buff
Effect - A single per-stack buff contributed by an active aura.
- Damage
Source - Exclusive ownership category used by caster-scoped target modifiers.
- Dynamic
Tick Action - Static definition of an aura (buff/debuff).
SimC’s per-tick stat update coordinate. - Free
Action Source - Provenance for a cost-free registered action dispatched from a hook.
- Health
Threshold Direction - Direction used by aura 468 when an actor crosses a health threshold.
- Impact
Actor Filter - Actor whose impact is eligible to drive a proc.
- Impact
Chance Scale - Impact
Source - Periodic
Damage Mode - Governs periodic-damage refresh behavior.
- Periodic
Kind - Proc
Event Kind - Event family carried through proc matching.
- Proc
Trigger Side - Which actor-side callback owns a registered proc.
- Resource
Gain Source - Origin of a discrete resource gain.
- Resource
Pool - Runtime
Damage Def - Closed damage representation stored by the combat runtime.
- Spell
Effect Data - Ordered follow-up operation executed by a spell after its primary payload.
- Swing
Hand - Which hand produced an auto-attack swing.
- Weapon
ApType - Weapon-DPS composite used by an AP coefficient.
Constants§
- MAX_
AURA_ APPLICATION_ EXCLUSIONS - Maximum number of active aura IDs that can prevent one aura application.
- MAX_
AURA_ BUFF_ EFFECTS
Traits§
- AuraOps
- Aura lifecycle and aura-owned accumulator operations.
- Cooldown
Ops - Spell cooldown, charge, and cast-gate operations.
- Damage
Ops - Damage calculation and impact operations.
- Guardian
Ops - Temporary guardian lifecycle and command operations.
- ProcOps
- Deterministic proc rolls, attempt tracking, and driver counters.
- Resource
Ops - Player and persistent-pet resource operations.
- Scheduling
Ops - Delayed hook, periodic-driver, and ground-effect scheduling.
Functions§
- accumulate_
buffs - Sum all active aura buff contributions, scaled by stack count.
- apply_
aura - Applies an aura by local index.
- apply_
aura_ with_ duration - Applies an aura with an optional duration override.
- clip_
active_ channel - Legally clips the active player channel, granting its elapsed partial tick.
- deal_
damage_ ap - Deal attack-power-based damage with the default main-hand weapon-AP composite.
- expire_
aura - Expires an aura by local index.
- expire_
aura_ by_ id - Expires an aura by game ID.
- extend_
aura - Extends an active non-permanent aura without pandemic recomputation.
- is_
aura_ active - Returns whether an aura is active.
- no_
crit_ damage - Neutral
mastery_crit_damagehook (no crit-damage bonus). - no_
damage_ bonus - Mastery that does not modify direct damage (proc- or pet-based); the mechanic lives elsewhere.
- process_
cast - process_
channel_ tick_ for - process_
single_ aura_ tick_ for - Processes one periodic aura tick and queued expiry hooks.
- set_
primary_ resource_ base_ regen - Override the primary resource’s base regeneration and project its effective live rate.
- set_
spell_ gate - Set one independent availability gate and project the composed result.
- try_
push_ effect - Push
effectinto the first empty slot of a fixed aura-effect array, erroring when full. - validated_
channel_ tick_ count - Validate a channel’s tick count, accepting the empty introspection map’s neutral zero.
- validated_
max_ stacks - Validate an aura stack cap.
- validated_
milliseconds - Convert a manifest/game-data scalar to an integral millisecond duration.
- validated_
nonnegative - Validate a finite non-negative scalar override.