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 CombatState + 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 build_combat_system does not panic with default inputs.

Structs§

AccumulatingImpactProc
A registered per-impact proc driven by randomized contributions to a threshold accumulator.
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
Output of a successful crate::CombatSystemBuilder::build call.
CombatBuildError
Typed failure while compiling and assembling a combat system.
CombatCtx
Short-lived borrow bundle for combat operations.
CombatHandler
CombatState
All static combat data plus mutable non-buffer state, grouped into sub-structs.
CombatSystemBuilder
Fluent builder for constructing a combat system.
CombatView
Read-only combat state and dense-buffer projection.
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.
GroundEffectSpec
A location-locked sequence of damage pulses.
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.
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.
HookView
Read-only combat projection scoped to a hook target and simulation time.
ImpactEffectProcDefinition
ImpactEvent
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 CombatState.
LocalRppmIdx
Local RPPM tracker index scoped to a single CombatState.
LocalSpellIdx
Local spell index scoped to a single CombatState.
LocalThresholdIdx
Local accumulated-threshold tracker index scoped to a single CombatState.
MasteryCtx
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.
PetAbility
One ability in a persistent pet’s priority list.
PetActionBar
Resource and global-cooldown rules for a persistent pet’s priority list.
PetResourceModel
Resource model for a persistent pet action bar.
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.
RppmScalingOptions
DBC-selected multiplicative coordinates for an RPPM tracker.
RppmTracker
RPPM (real procs per minute) state for one proc source.
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.
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
Static definition of an aura (buff/debuff). SimC’s per-tick stat update coordinate.
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§

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_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_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 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