Skip to main content

Crate wowlab_engine_combat

Crate wowlab_engine_combat 

Source
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::SpecHandler] implementation backed by CombatInstance + 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::CombatCtx and 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 draft construction does not panic with default inputs.

Structs§

AccumulatingImpactProc
A registered per-impact proc driven by randomized contributions to a threshold accumulator.
AuraBinding
Codegen-owned semantic aura coordinate resolved once for each combat program.
AuraData
AuraDefinitionDraft
AutoAttackDefinitionDraft
Mutable auto-attack definition lowered with the rest of the combat catalog.
BaseStats
Base stats that remain constant within a single simulation iteration.
BuffTotals
Accumulated buff totals from all active auras for one frame.
BuilderError
Error raised by the fluent builder API at construction time.
BuiltCombatSystem
Validated output of the single combat-system finalization transaction.
CombatCtx
Short-lived borrow bundle for combat operations.
CombatHandler
CombatInstance
Mutable state owned by one combat handler and reset between iterations.
CombatProgram
Immutable executable definition produced by combat-system finalization.
CombatSystemBuilder
Fluent builder for constructing a combat system.
CombatSystemDraft
Mutable composition stage before combat-system finalization.
CombatView
Read-only combat state and dense-buffer projection.
DamageActionId
Generated/content-local coordinate for one finalized damage action.
DamageEffectId
Generated/content-local coordinate for one finalized damage effect.
DamageEffectRef
DBC coordinates of an effect used as a damage payload or targeting geometry.
DamageFlags
Semantics of a damage impact. Empty is magical, player-sourced, direct, and crit-capable.
DamageOutcome
Resolved outcome of one hook-owned damage impact.
DamagePayload
Spell identity, scaling coefficient, and semantic flags for one power-scaled hit.
DamageReplication
One active-aura rule that copies resolved impact damage to selected targets.
DriverSpellModifier
Per-damage-event spell modifiers owned by a real spell or passive driver.
DriverSpellModifierResult
Identity-based adjustments returned by a DriverSpellModifier.
EmpowerReleaseAdjustment
Rank-dependent payload changes produced when an empower spell is released.
GroundEffectDefinition
Construction-time description of one location-locked damage sequence.
GroundEffectId
Stable authored identity for one finalized location-locked effect.
GuardianAbility
One independently scheduled ability owned by a temporary guardian.
GuardianEvent
Context supplied to a guardian action callback.
GuardianHandle
Stable handle for one temporary guardian instance during an iteration.
GuardianSpec
Definition used when a cast hook summons a temporary guardian.
GuardianSummonError
Error returned when every finalized temporary-guardian actor slot is occupied.
HookCtx
Constrained context exposing only the operations cast hooks may perform.
HookCtxRequest
Coordinates and provenance for constructing a hook context.
HookCtxServices
Mutable combat services borrowed by one hook invocation.
HookProgramView
Focused immutable program metadata exposed to runtime content hooks.
HookView
Read-only combat projection scoped to a hook target and simulation time.
ImpactEffectProcDefinition
ImpactEvent
ImpactEventData
ImpactProc
A registered per-damage-impact proc.
LandedImpactEvent
One landed member of a fully resolved damage-impact batch.
LandedImpactProc
A registered callback for landed members of a resolved damage-impact batch.
LocalAuraIdx
Local aura index scoped to a single CombatProgram.
LocalRppmIdx
Local RPPM tracker index scoped to a single CombatProgram.
LocalSpellIdx
Local spell index scoped to a single CombatProgram.
LocalThresholdIdx
Local accumulated-threshold tracker index scoped to a single CombatProgram.
MasteryCtx
MasteryEvent
PassiveDriverEffect
An always-present player effect owned by a real spell or passive driver.
PeriodicDamageDataInput
Data coordinates and affine transform for a periodic damage coefficient.
PeriodicData
PeriodicDriver
Encounter-lifetime periodic work owned by a real spell or passive driver.
PeriodicDriverBinding
Codegen-owned semantic periodic-driver coordinate.
PetAbility
One ability in a persistent pet’s priority list.
PetActionBar
Resource and global-cooldown rules for a persistent pet’s priority list.
PetResourceBinding
Opaque program-owned coordinate for one persistent-pet resource plan.
PetResourceModel
Resource model for a persistent pet action bar.
PetStatInheritance
Build-time-resolved DBC multipliers for one pet or guardian creature.
ProcCategoryBinding
Codegen-owned semantic proc-category recovery coordinate.
ProcCounterBinding
Codegen-owned semantic runtime counter coordinate.
ProcDriver
Policy and callback ownership for a registered proc driver.
ProcHitMask
Hit outcomes eligible to trigger a proc.
ProcPhaseMask
Spellcast phases eligible to trigger a proc.
ProcPolicy
DBC policy carried by a triggering action or registered proc driver.
ProcProvenance
Triggering-action identity and policy carried by each impact.
ResourceGainEvent
One completed resource gain, including the amount rejected by the resource cap.
ResourceGainProc
A pseudo-random proc driven by effective resource gains.
RppmBinding
Codegen-owned semantic RPPM coordinate resolved once for each combat program.
RppmScalingOptions
DBC-selected multiplicative coordinates for an RPPM tracker.
RppmTracker
RPPM (real procs per minute) state for one proc source.
SpecAuraBinding
Generated aura coordinate that must be paired with its specialization proof.
SpecIdentityProof
Codegen-owned proof selecting one exact generated specialization namespace.
SpecSpellBinding
Generated spell coordinate that must be paired with its specialization proof.
SpellBinding
Codegen-owned semantic spell coordinate resolved once for each combat program.
SpellDefinitionDraft
Mutable draft of a single castable spell definition.
SpellEffectRange
Contiguous range into the combat definition’s private spell_effects storage.
SwingEvent
One completed auto-attack swing supplied to content hooks.
SwingReplacement
Data-driven spell selected by a hook to replace the current landed auto attack.
SystemRppmBinding
Codegen-owned semantic system-RPPM coordinate.
ThresholdTracker
State for an accumulated-threshold proc.
WeaponEnchantBinding
One equipped weapon-enchant RPPM source and the aura it applies.

Enums§

AttackPosition
Player position relative to the current hostile target.
AuraTickBehavior
Whether an aura’s periodic tick mutates its stack count.
BuffEffect
A single per-stack buff contributed by an active aura.
DamageSource
Exclusive ownership category used by caster-scoped target modifiers.
DynamicTickAction
Per-tick stat update policy for an aura.
FreeActionSource
Provenance for a cost-free registered action dispatched from a hook.
HealthThresholdDirection
Direction used by aura 468 when an actor crosses a health threshold.
ImpactActorFilter
Actor whose impact is eligible to drive a proc.
ImpactChanceScale
ImpactSource
PeriodicDamageMode
Governs periodic-damage refresh behavior.
PeriodicKind
ProcEventKind
Event family carried through proc matching.
ProcTriggerSide
Which actor-side callback owns a registered proc.
ResourceGainSource
Origin of a discrete resource gain.
ResourcePool
RuntimeDamageDef
Closed damage representation stored by the combat runtime.
SpellEffectData
Ordered follow-up operation executed by a spell after its primary payload.
SwingHand
Which hand produced an auto-attack swing.
WeaponApType
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.
CooldownOps
Spell cooldown, charge, and cast-gate operations.
DamageOps
Damage calculation and impact operations.
GuardianOps
Temporary guardian lifecycle and command operations.
ProcOps
Deterministic proc rolls, attempt tracking, and driver counters.
ResourceOps
Player and persistent-pet resource operations.
SchedulingOps
Delayed hook, periodic-driver, and ground-effect scheduling.

Functions§

apply_aura
Applies an aura by local index.
apply_aura_with_duration
Applies an aura with an optional duration override.
buff_totals
Sum all active aura buff contributions, scaled by stack count.
clip_active_channel
Legally clips the active player channel, granting its elapsed partial tick.
expire_aura
Expires an aura by local index.
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_damage hook (no crit-damage bonus).
no_damage_bonus
Mastery that does not modify direct damage (proc- or pet-based); the mechanic lives elsewhere.
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 effect into 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.

Type Aliases§

CastHookFn
GuardianActionFn
ImpactProcFn
LandedImpactProcFn
MasteryFn