Skip to main content

wowlab_engine_combat/builder/def/
effect.rs

1use super::BuilderDamageDef;
2use crate::state::{LocalAuraIdx, LocalSpellIdx, ResourcePool};
3
4#[derive(Clone, Debug)]
5pub(crate) enum BuilderSpellEffect {
6    Conditional {
7        predicate: crate::state::TriggerProgramPredicateFn,
8        effects: Vec<BuilderSpellEffect>,
9    },
10    ApplyAura {
11        aura_local: LocalAuraIdx,
12    },
13    AddAuraStack {
14        aura_local: LocalAuraIdx,
15    },
16    RemoveAura {
17        aura_local: LocalAuraIdx,
18    },
19    InterruptCast {
20        lockout_ms: u32,
21    },
22    Dispel {
23        dispel_type: i32,
24        steal: bool,
25    },
26    Damage {
27        effect: crate::state::DamageEffectRef,
28        damage: BuilderDamageDef,
29        base_points: f64,
30        may_crit: bool,
31        attribute_flags: crate::DamageFlags,
32        requires_main_hand: bool,
33        requires_off_hand: bool,
34        equipped_item_requirement: Option<wowlab_types::data::EquippedItemRequirement>,
35    },
36    Heal {
37        effect: Option<crate::state::DamageEffectRef>,
38        base: f64,
39        ap_coef: f64,
40        sp_coef: f64,
41        percent_of_max: f64,
42        may_crit: bool,
43    },
44    Energize {
45        effect: Option<crate::state::DamageEffectRef>,
46        pool: ResourcePool,
47        amount: f64,
48    },
49    EnergizePercent {
50        resource_type: wowlab_types::combat::ResourceType,
51        percent: f64,
52        effect_index: u8,
53    },
54    ExtendAura {
55        aura_local: LocalAuraIdx,
56        amount_ms: u32,
57    },
58    MutateCooldown {
59        spell_local: LocalSpellIdx,
60        operation: wowlab_engine_domain::dbc::CooldownMutation,
61    },
62    Delayed {
63        delay_ms: u32,
64        profile_spell_id: u32,
65        effects: Vec<BuilderSpellEffect>,
66    },
67}
68
69#[derive(Clone, Copy, Debug)]
70pub(crate) struct BuilderTriggerProgramPredicate {
71    pub(crate) effect_index: u8,
72    pub(crate) predicate: crate::state::TriggerProgramPredicateFn,
73}