pub struct CombatProgram {Show 65 fields
pub(crate) spec_identity_brand: Option<u32>,
pub(crate) enemies: Vec<EnemyActorDefinition>,
pub(crate) telemetry_targets: Vec<TargetMetadata>,
pub(crate) spells: Vec<SpellData>,
pub(crate) scheduled_spells: ScheduledSpellCatalog,
pub(crate) runtime_events: RuntimeEventCatalog,
pub(crate) scheduled_spell_executions: Box<[ScheduledSpellExecution]>,
pub(crate) empower_cast_times_ms: Vec<u32>,
pub(crate) spell_effects: Vec<SpellEffectData>,
pub(crate) auras: Vec<AuraData>,
pub(crate) aura_bindings: Box<[Option<LocalAuraIdx>]>,
pub(crate) spell_bindings: Box<[Option<LocalSpellIdx>]>,
pub(crate) rppm_bindings: Box<[Option<LocalRppmIdx>]>,
pub(crate) system_rppm_bindings: Box<[Option<ResolvedSystemRppmBinding>]>,
pub(crate) aura_followups: Box<[Option<LocalAuraIdx>]>,
pub(crate) aura_exclusions: Box<[[Option<LocalAuraIdx>; 5]]>,
pub(crate) aura_expire_trigger_spells: Box<[Option<LocalSpellIdx>]>,
pub(crate) external_buff_auras: Box<[Option<LocalAuraIdx>]>,
pub(crate) proc_category_recovery_ms: Box<[u32]>,
pub(crate) auto_attacks: Vec<AutoAttackData>,
pub(crate) pet_action_plans: Box<[u16]>,
pub(crate) pet_action_plan_by_auto: Box<[Option<u16>]>,
pub(crate) primary_pet_action_auto: Option<u16>,
pub(crate) pet_auto_attacks: Box<[u16]>,
pub(crate) cast_hooks: Vec<Option<CastHookFn>>,
pub(crate) empower_release_hooks: Vec<Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>>,
pub(crate) tick_hooks: Vec<Option<CastHookFn>>,
pub(crate) player_cast_hooks: Vec<CastHookFn>,
pub(crate) resource_threshold_triggers: Vec<ResourceThresholdTrigger>,
pub(crate) impact_procs: Vec<ImpactProc>,
pub(crate) landed_impact_procs: Vec<LandedImpactProc>,
pub(crate) accumulating_impact_procs: Vec<AccumulatingImpactProc>,
pub(crate) impact_effect_procs: Vec<ImpactEffectProc>,
pub(crate) driver_spell_modifiers: Vec<DriverSpellModifier>,
pub(crate) passive_driver_effects: Vec<PassiveDriverEffect>,
pub(crate) effects: EffectPlan,
pub(crate) damage: DamagePlan,
pub(crate) ground_effects: Box<[GroundEffectPlan]>,
pub(crate) aura_dependencies: AuraDependencyPlan,
pub(crate) rotation: RotationPlan,
pub(crate) periodic_drivers: Vec<PeriodicDriver>,
pub(crate) periodic_driver_bindings: Box<[Option<usize>]>,
pub(crate) talent_ranks: Box<[u8]>,
pub(crate) resource_gain_procs: Vec<ResourceGainProc>,
pub(crate) item_use_spells: Vec<(GearSlot, u32)>,
pub(crate) weapon_enchant_bindings: Box<[ResolvedWeaponEnchantBinding]>,
pub(crate) weapon_imbue_bindings: Box<[ResolvedWeaponImbueBinding]>,
pub(crate) weapon_imbue_by_spell: Box<[Option<WeaponImbueSlotHandle>]>,
pub(crate) precombat_auras: Vec<LocalAuraIdx>,
pub(crate) talent_aura_stacks: Vec<(LocalAuraIdx, u8)>,
pub(crate) stealth_aura: Option<LocalAuraIdx>,
pub(crate) spell_by_id: IntMap<u32, LocalSpellIdx>,
pub(crate) aura_by_id: IntMap<u32, LocalAuraIdx>,
pub(crate) cooldown_category_members: Box<[Box<[LocalSpellIdx]>]>,
pub(crate) charge_category_members: Box<[Box<[LocalSpellIdx]>]>,
pub(crate) charge_category_owners: Box<[LocalSpellIdx]>,
pub(crate) start_recovery_category_owners: Box<[LocalSpellIdx]>,
pub(crate) item_rppm_indices: IntMap<u32, LocalRppmIdx>,
pub(crate) system_rppm_indices: IntMap<u32, LocalRppmIdx>,
pub(crate) enchant_rppm_indices: IntMap<u32, LocalRppmIdx>,
pub(crate) enchant_buff_spell_ids: IntMap<u32, u32>,
pub(crate) config: ProgramConfig,
pub(crate) names: Vec<Box<str>>,
pub(crate) layout_fingerprint: LayoutFingerprint,
pub(crate) buffer_bindings: BufferBindings,
}Expand description
Immutable executable definition produced by combat-system finalization.
Fields§
§spec_identity_brand: Option<u32>§enemies: Vec<EnemyActorDefinition>§telemetry_targets: Vec<TargetMetadata>§spells: Vec<SpellData>§scheduled_spells: ScheduledSpellCatalog§runtime_events: RuntimeEventCatalog§scheduled_spell_executions: Box<[ScheduledSpellExecution]>§empower_cast_times_ms: Vec<u32>§spell_effects: Vec<SpellEffectData>§auras: Vec<AuraData>§aura_bindings: Box<[Option<LocalAuraIdx>]>§spell_bindings: Box<[Option<LocalSpellIdx>]>§rppm_bindings: Box<[Option<LocalRppmIdx>]>§system_rppm_bindings: Box<[Option<ResolvedSystemRppmBinding>]>§aura_followups: Box<[Option<LocalAuraIdx>]>§aura_exclusions: Box<[[Option<LocalAuraIdx>; 5]]>§aura_expire_trigger_spells: Box<[Option<LocalSpellIdx>]>§external_buff_auras: Box<[Option<LocalAuraIdx>]>§proc_category_recovery_ms: Box<[u32]>§auto_attacks: Vec<AutoAttackData>§pet_action_plans: Box<[u16]>§pet_action_plan_by_auto: Box<[Option<u16>]>§primary_pet_action_auto: Option<u16>§pet_auto_attacks: Box<[u16]>§cast_hooks: Vec<Option<CastHookFn>>§empower_release_hooks: Vec<Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>>§tick_hooks: Vec<Option<CastHookFn>>§player_cast_hooks: Vec<CastHookFn>§resource_threshold_triggers: Vec<ResourceThresholdTrigger>§impact_procs: Vec<ImpactProc>§landed_impact_procs: Vec<LandedImpactProc>§accumulating_impact_procs: Vec<AccumulatingImpactProc>§impact_effect_procs: Vec<ImpactEffectProc>§driver_spell_modifiers: Vec<DriverSpellModifier>§passive_driver_effects: Vec<PassiveDriverEffect>§effects: EffectPlan§damage: DamagePlan§ground_effects: Box<[GroundEffectPlan]>§aura_dependencies: AuraDependencyPlan§rotation: RotationPlan§periodic_drivers: Vec<PeriodicDriver>§periodic_driver_bindings: Box<[Option<usize>]>§talent_ranks: Box<[u8]>§resource_gain_procs: Vec<ResourceGainProc>§item_use_spells: Vec<(GearSlot, u32)>§weapon_enchant_bindings: Box<[ResolvedWeaponEnchantBinding]>§weapon_imbue_bindings: Box<[ResolvedWeaponImbueBinding]>§weapon_imbue_by_spell: Box<[Option<WeaponImbueSlotHandle>]>§precombat_auras: Vec<LocalAuraIdx>§talent_aura_stacks: Vec<(LocalAuraIdx, u8)>§stealth_aura: Option<LocalAuraIdx>§spell_by_id: IntMap<u32, LocalSpellIdx>§aura_by_id: IntMap<u32, LocalAuraIdx>§cooldown_category_members: Box<[Box<[LocalSpellIdx]>]>§charge_category_members: Box<[Box<[LocalSpellIdx]>]>§charge_category_owners: Box<[LocalSpellIdx]>§start_recovery_category_owners: Box<[LocalSpellIdx]>§item_rppm_indices: IntMap<u32, LocalRppmIdx>§system_rppm_indices: IntMap<u32, LocalRppmIdx>§enchant_rppm_indices: IntMap<u32, LocalRppmIdx>§enchant_buff_spell_ids: IntMap<u32, u32>§config: ProgramConfig§names: Vec<Box<str>>§layout_fingerprint: LayoutFingerprint§buffer_bindings: BufferBindingsImplementations§
Source§impl CombatProgram
impl CombatProgram
pub fn base_stats(&self) -> &BaseStats
pub fn game_data(&self) -> &ResolvedGameData
pub fn encounter(&self) -> &ResolvedEncounter
pub fn spec_config<T>(&self) -> Option<&T>where
T: SpecConfig,
Sourcepub fn spell(&self, local: LocalSpellIdx) -> &SpellData
pub fn spell(&self, local: LocalSpellIdx) -> &SpellData
Returns the spell definition for a program-owned local identity.
§Panics
Panics when local belongs to a different specialization.
pub fn spells(&self) -> &[SpellData]
Sourcepub fn aura(&self, local: LocalAuraIdx) -> &AuraData
pub fn aura(&self, local: LocalAuraIdx) -> &AuraData
Returns the aura definition for a program-owned local identity.
§Panics
Panics when local belongs to a different specialization.
pub fn auras(&self) -> &[AuraData]
pub fn precombat_auras(&self) -> &[LocalAuraIdx]
pub fn talent_aura_stacks(&self) -> &[(LocalAuraIdx, u8)]
pub fn talent_rank(&self, talent: DamageActionId) -> u8
Sourcepub fn diagnostic_talent_rank(&self, spell_id: u32) -> Option<u8>
pub fn diagnostic_talent_rank(&self, spell_id: u32) -> Option<u8>
Keyed test oracle for fixtures that do not have generated identities.
pub fn impact_effect_proc_count(&self) -> usize
pub fn impact_proc_count(&self) -> usize
pub fn impact_proc(&self, index: usize) -> Option<&ImpactProc>
pub fn player_cast_hook_count(&self) -> usize
pub fn impact_effect_proc(&self, index: usize) -> Option<&ImpactEffectProc>
pub fn spell_effects(&self) -> &[SpellEffectData]
pub fn enemy_definition(&self, enemy: EnemyIdx) -> Option<&EnemyActorDefinition>
pub fn enemy_definitions( &self, ) -> impl ExactSizeIterator<Item = &EnemyActorDefinition>
pub(crate) fn spell_data( &self, spell_id: u32, ) -> Option<(LocalSpellIdx, &SpellData)>
pub(crate) fn scheduled_spell( &self, local: LocalSpellIdx, ) -> ScheduledSpellBinding
pub(crate) fn validate_scheduled_spell( &self, binding: ScheduledSpellBinding, ) -> Option<LocalSpellIdx>
pub(crate) fn scheduled_spell_execution( &self, binding: ScheduledSpellBinding, ) -> Option<ScheduledSpellExecution>
pub(crate) fn buffer_cooldown<'a>( &self, instance: &'a CombatInstance, local: LocalSpellIdx, ) -> Option<&'a CooldownSlot>
pub(crate) fn buffer_cooldown_mut<'a>( &self, instance: &'a mut CombatInstance, local: LocalSpellIdx, ) -> Option<&'a mut CooldownSlot>
pub(crate) fn cooldown_binding( &self, local: LocalSpellIdx, ) -> Option<CooldownSlotHandle>
pub(crate) fn aura_binding( &self, local: LocalAuraIdx, key: AuraKey, ) -> Option<ConcreteAuraBinding>
pub(crate) fn aura_pool_index( &self, local: LocalAuraIdx, key: AuraKey, ) -> Option<usize>
pub(crate) fn aura_event( &self, local: LocalAuraIdx, key: AuraKey, target: Option<EnemyIdx>, ) -> Option<AuraEventBinding>
pub(crate) fn validate_aura_event( &self, event: AuraEventBinding, ) -> Option<(LocalAuraIdx, AuraKey, Option<EnemyIdx>)>
pub(crate) fn buffer_aura<'a>( &self, instance: &'a CombatInstance, local: LocalAuraIdx, key: AuraKey, ) -> Option<&'a AuraSlot>
pub(crate) fn buffer_resource<'a>( &self, instance: &'a CombatInstance, resource: ResourceType, ) -> Option<&'a ResourceSlot>
pub(crate) fn buffer_resource_mut<'a>( &self, instance: &'a mut CombatInstance, resource: ResourceType, ) -> Option<&'a mut ResourceSlot>
pub(crate) fn resource_binding( &self, resource: ResourceType, ) -> Option<ResourceSlotHandle>
pub(crate) fn buffer_talent_mut<'a>( &self, instance: &'a mut CombatInstance, key: &str, ) -> Option<&'a mut TalentSlot>
pub(crate) fn buffer_swing<'a>( &self, instance: &'a CombatInstance, index: usize, ) -> Option<&'a SwingSlot>
pub(crate) fn buffer_swing_mut<'a>( &self, instance: &'a mut CombatInstance, index: usize, ) -> Option<&'a mut SwingSlot>
pub(crate) fn target_unit_mut<'a>( &self, instance: &'a mut CombatInstance, ) -> &'a mut UnitSlot
pub(crate) fn buffer_weapon_imbue_mut<'a>( &self, instance: &'a mut CombatInstance, key: &str, ) -> Option<&'a mut WeaponImbueSlot>
fn lookup_spell_data( &self, spell_id: u32, ) -> Option<(LocalSpellIdx, &SpellData)>
Source§impl CombatProgram
impl CombatProgram
pub(crate) fn spell_local(&self, spell_id: u32) -> Option<LocalSpellIdx>
pub(crate) fn aura_local(&self, aura_id: u32) -> Option<LocalAuraIdx>
pub(crate) fn item_rppm_local(&self, item_id: u32) -> Option<LocalRppmIdx>
pub(crate) fn system_rppm_local( &self, driver_spell_id: u32, ) -> Option<LocalRppmIdx>
pub(crate) fn enchant_rppm_local( &self, enchantment_id: u32, ) -> Option<LocalRppmIdx>
pub(crate) fn enchant_buff_spell_id(&self, enchantment_id: u32) -> Option<u32>
fn lookup_spell_local(&self, spell_id: u32) -> Option<LocalSpellIdx>
fn lookup_aura_local(&self, aura_id: u32) -> Option<LocalAuraIdx>
fn lookup_item_rppm_local(&self, item_id: u32) -> Option<LocalRppmIdx>
fn lookup_enchant_rppm_local(&self, enchantment_id: u32) -> Option<LocalRppmIdx>
fn lookup_enchant_buff_spell_id(&self, enchantment_id: u32) -> Option<u32>
Source§impl CombatProgram
impl CombatProgram
Sourcepub fn telemetry_targets(&self) -> &[TargetMetadata]
pub fn telemetry_targets(&self) -> &[TargetMetadata]
Immutable target dictionary finalized in encounter identity order.
Sourcepub fn telemetry_scope(
&self,
source: ActorId,
target: EnemyIdx,
) -> Option<TelemetryScope>
pub fn telemetry_scope( &self, source: ActorId, target: EnemyIdx, ) -> Option<TelemetryScope>
Exact source/target ownership scope for telemetry emitted against target.
Sourcepub fn aura_telemetry_scope(
&self,
instance: &CombatInstance,
key: AuraKey,
) -> AuraTelemetryScope
pub fn aura_telemetry_scope( &self, instance: &CombatInstance, key: AuraKey, ) -> AuraTelemetryScope
Pull/group ownership for an exact aura instance.
Source§impl CombatProgram
impl CombatProgram
pub(crate) fn resolve_spell_identity( &self, local: LocalSpellIdx, ) -> Option<LocalSpellIdx>
pub(crate) fn resolve_aura_identity( &self, local: LocalAuraIdx, ) -> Option<LocalAuraIdx>
Source§impl CombatProgram
impl CombatProgram
pub(crate) fn capture_aura_transfer( &self, instance: &CombatInstance, binding: ConcreteAuraBinding, ) -> Option<AuraTransferState>
Sourcepub(crate) fn mutate_aura(
&self,
instance: &mut CombatInstance,
binding: ConcreteAuraBinding,
mutation: AuraMutation,
now: SimTime,
) -> bool
pub(crate) fn mutate_aura( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, mutation: AuraMutation, now: SimTime, ) -> bool
Atomically mutates one concrete aura and dispatches all finalized consumers.
pub(crate) fn reset_aura_slots( &self, instance: &mut CombatInstance, token: AuraResetToken, )
fn mark_changed_aura_projections( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, )
fn dispatch_aura_consumers( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, now: SimTime, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CombatProgram
impl !RefUnwindSafe for CombatProgram
impl Send for CombatProgram
impl !Sync for CombatProgram
impl Unpin for CombatProgram
impl UnsafeUnpin for CombatProgram
impl !UnwindSafe for CombatProgram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more