pub struct SpellDefinitionDraft {Show 110 fields
pub(crate) cast_time_ms: u32,
pub(crate) empower_cast_times_ms: Vec<u32>,
pub(crate) max_empower_aura_id: u32,
pub(crate) cooldown_hasted: bool,
pub(crate) gcd_haste_type: GcdHasteType,
pub(crate) cooldown_category: Option<CooldownCategoryId>,
pub(crate) category_cooldown_secs: f64,
pub(crate) charge_category: Option<CooldownCategoryId>,
pub(crate) start_recovery_category: Option<CooldownCategoryId>,
pub(crate) usable_while_casting: bool,
pub(crate) usable_while_moving: bool,
pub(crate) explicit_target_mask: u32,
pub(crate) required_explicit_target_mask: u32,
pub(crate) shapeshift_required_mask: u64,
pub(crate) shapeshift_excluded_mask: u64,
pub(crate) caster_aura_spell: i32,
pub(crate) caster_aura_state: Option<AuraState>,
pub(crate) exclude_caster_aura_spell: i32,
pub(crate) exclude_caster_aura_state: Option<AuraState>,
pub(crate) target_aura_spell: i32,
pub(crate) target_aura_state: Option<AuraState>,
pub(crate) exclude_target_aura_spell: i32,
pub(crate) exclude_target_aura_state: Option<AuraState>,
pub(crate) fixed_travel_time_override_ms: Option<u32>,
pub(crate) projectile_speed: f64,
pub(crate) launch_delay_s: f64,
pub(crate) dbc_fixed_travel_time: bool,
pub(crate) gcd_ms: u32,
pub(crate) cooldown_secs: Option<f64>,
pub(crate) max_charges: u8,
pub(crate) recharge_secs: Option<f64>,
pub(crate) resource_cost: f64,
pub(crate) optional_resource_cost: f64,
pub(crate) resource_cost_pct: ResourceCostPercent,
pub(crate) maximum_resource_cost_pct: ResourceCostPercent,
pub(crate) optional_resource_cost_pct: ResourceCostPercent,
pub(crate) resource_gain: f64,
pub(crate) secondary_resource_cost: f64,
pub(crate) secondary_optional_resource_cost: f64,
pub(crate) secondary_resource_gain: f64,
pub(crate) health_cost: f64,
pub(crate) health_cost_pct: f64,
pub(crate) health_max_cost_pct: f64,
pub(crate) health_optional_cost: f64,
pub(crate) health_optional_cost_pct: ResourceCostPercent,
pub(crate) damage: BuilderDamageDef,
pub(crate) damage_may_crit: bool,
pub(crate) damage_attribute_flags: DamageFlags,
pub(crate) damage_effect: Option<DamageEffectRef>,
pub(crate) base_points: f64,
pub(crate) applies_aura: Option<LocalAuraIdx>,
pub(crate) followup_effects: Vec<BuilderSpellEffect>,
pub(crate) trigger_program_predicates: Vec<BuilderTriggerProgramPredicate>,
pub(crate) infer_data_damage: bool,
pub(crate) applies_aura_ids: Vec<u32>,
pub(crate) cdr_effects: Vec<CdrEffect>,
pub(crate) hook: Option<CastHookFn>,
pub(crate) empower_release_hook: Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>,
pub(crate) tick_hook: Option<CastHookFn>,
pub(crate) is_pet: bool,
pub(crate) requires_unshifted: bool,
pub(crate) allow_while_unshifted: bool,
pub(crate) requires_stealth: bool,
pub(crate) requires_behind_target: bool,
pub(crate) requires_main_hand: bool,
pub(crate) requires_off_hand: bool,
pub(crate) equipped_item_requirement: Option<EquippedItemRequirement>,
pub(crate) breaks_stealth: bool,
pub(crate) aoe_max_targets: u8,
pub(crate) aoe_reduced_targets: u8,
pub(crate) aoe_full_targets: u8,
pub(crate) aoe_base_mult: f64,
pub(crate) chain_targeting: bool,
pub(crate) chain_multiplier: f64,
pub(crate) split: bool,
pub(crate) is_aoe: bool,
pub(crate) is_channel: bool,
pub(crate) channel_tick_count: u8,
pub(crate) channel_tick_interval_ms: u32,
pub(crate) channel_tick_zero: bool,
pub(crate) channel_tick_is_periodic: bool,
pub(crate) channel_hasted_ticks: bool,
pub(crate) channel_duration_hasted: bool,
pub(crate) channel_tick_damage: BuilderDamageDef,
pub(crate) channel_tick_may_crit: bool,
pub(crate) channel_tick_spell_id: Option<u32>,
pub(crate) channel_tick_damage_alt: BuilderDamageDef,
pub(crate) channel_tick_damage_alt_may_crit: bool,
pub(crate) channel_tick_damage_alt_spell_id: u32,
pub(crate) channel_tick_damage_aura: u32,
pub(crate) channel_tick_cost: f64,
pub(crate) channel_tick_cost_alt: f64,
pub(crate) channel_tick_cost_aura: u32,
pub(crate) channel_tick_effects: Vec<BuilderSpellEffect>,
pub(crate) channel_complete_effects: Vec<BuilderSpellEffect>,
pub(crate) channel_gcd_on_start: bool,
pub(crate) channel_apply_lag: bool,
pub(crate) gating_aura_id: u32,
pub(crate) gating_aura_min_stacks: u8,
pub(crate) cost_bypass_aura_id: u32,
pub(crate) consume_aura_on_cast_id: u32,
pub(crate) cooldown_bypass_aura_id: u32,
pub(crate) execute_below_pct: f64,
pub(crate) instant_cast_aura_id: u32,
pub(crate) override_aura_id: u32,
pub(crate) override_spell_id: u32,
pub(crate) override_aura_min_stacks: u8,
pub(crate) override_shares_base_cooldown: bool,
pub(crate) override_preserves_aura: bool,
pub(crate) guaranteed_crit: bool,
}Expand description
Mutable draft of a single castable spell definition.
Fields§
§cast_time_ms: u32§empower_cast_times_ms: Vec<u32>§max_empower_aura_id: u32§cooldown_hasted: bool§gcd_haste_type: GcdHasteType§cooldown_category: Option<CooldownCategoryId>§category_cooldown_secs: f64§charge_category: Option<CooldownCategoryId>§start_recovery_category: Option<CooldownCategoryId>§usable_while_casting: bool§usable_while_moving: bool§explicit_target_mask: u32§required_explicit_target_mask: u32§shapeshift_required_mask: u64§shapeshift_excluded_mask: u64§caster_aura_spell: i32§caster_aura_state: Option<AuraState>§exclude_caster_aura_spell: i32§exclude_caster_aura_state: Option<AuraState>§target_aura_spell: i32§target_aura_state: Option<AuraState>§exclude_target_aura_spell: i32§exclude_target_aura_state: Option<AuraState>§fixed_travel_time_override_ms: Option<u32>§projectile_speed: f64§launch_delay_s: f64§dbc_fixed_travel_time: bool§gcd_ms: u32§cooldown_secs: Option<f64>§max_charges: u8§recharge_secs: Option<f64>§resource_cost: f64§optional_resource_cost: f64§resource_cost_pct: ResourceCostPercent§maximum_resource_cost_pct: ResourceCostPercent§optional_resource_cost_pct: ResourceCostPercent§resource_gain: f64§secondary_resource_cost: f64§secondary_optional_resource_cost: f64§secondary_resource_gain: f64§health_cost: f64§health_cost_pct: f64§health_max_cost_pct: f64§health_optional_cost: f64§health_optional_cost_pct: ResourceCostPercent§damage: BuilderDamageDef§damage_may_crit: bool§damage_attribute_flags: DamageFlags§damage_effect: Option<DamageEffectRef>§base_points: f64§applies_aura: Option<LocalAuraIdx>§followup_effects: Vec<BuilderSpellEffect>§trigger_program_predicates: Vec<BuilderTriggerProgramPredicate>§infer_data_damage: bool§applies_aura_ids: Vec<u32>§cdr_effects: Vec<CdrEffect>§hook: Option<CastHookFn>§empower_release_hook: Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>§tick_hook: Option<CastHookFn>§is_pet: bool§requires_unshifted: bool§allow_while_unshifted: bool§requires_stealth: bool§requires_behind_target: bool§requires_main_hand: bool§requires_off_hand: bool§equipped_item_requirement: Option<EquippedItemRequirement>§breaks_stealth: bool§aoe_max_targets: u8§aoe_reduced_targets: u8§aoe_full_targets: u8§aoe_base_mult: f64§chain_targeting: bool§chain_multiplier: f64§split: bool§is_aoe: bool§is_channel: bool§channel_tick_count: u8§channel_tick_interval_ms: u32§channel_tick_zero: bool§channel_tick_is_periodic: bool§channel_hasted_ticks: bool§channel_duration_hasted: bool§channel_tick_damage: BuilderDamageDef§channel_tick_may_crit: bool§channel_tick_spell_id: Option<u32>§channel_tick_damage_alt: BuilderDamageDef§channel_tick_damage_alt_may_crit: bool§channel_tick_damage_alt_spell_id: u32§channel_tick_damage_aura: u32§channel_tick_cost: f64§channel_tick_cost_alt: f64§channel_tick_cost_aura: u32§channel_tick_effects: Vec<BuilderSpellEffect>§channel_complete_effects: Vec<BuilderSpellEffect>§channel_gcd_on_start: bool§channel_apply_lag: bool§gating_aura_id: u32§gating_aura_min_stacks: u8§cost_bypass_aura_id: u32§consume_aura_on_cast_id: u32§cooldown_bypass_aura_id: u32§execute_below_pct: f64§instant_cast_aura_id: u32§override_aura_id: u32§override_spell_id: u32§override_aura_min_stacks: u8§override_preserves_aura: bool§guaranteed_crit: boolImplementations§
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub fn additional_damage_ap_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>
pub fn additional_damage_ap_from_data_typed( self, lookup: EffectLookup<'_>, multiplier: f64, ap_type: WeaponApType, ) -> Result<Self, BuilderError>
pub fn additional_damage_sp_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>
Sourcepub fn triggered_damage_from_data(
self,
lookup: EffectLookup<'_>,
multiplier: f64,
) -> Result<Self, BuilderError>
pub fn triggered_damage_from_data( self, lookup: EffectLookup<'_>, multiplier: f64, ) -> Result<Self, BuilderError>
Append the terminal child damage reached through an exact DBC trigger edge.
Sourcepub fn apply_cooldown_pools_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_cooldown_pools_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Applies every DBC cooldown component without collapsing their independent pools.
Sourcepub fn apply_base_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_base_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Apply the standard data-driven field set for spell_id, erroring on any missing required field.
Sourcepub fn apply_aoe_from_data(self, data: &ResolvedGameData) -> Self
pub fn apply_aoe_from_data(self, data: &ResolvedGameData) -> Self
Apply DBC chain targeting and its per-hop multiplier from the primary damage effect.
Sourcepub fn damage_ap_from_data(
self,
lookup: EffectLookup<'_>,
) -> Result<Self, BuilderError>
pub fn damage_ap_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>
Set AP-coefficient damage, resolving coef + physical flag from data; errors if the school mask is missing on populated data.
Sourcepub fn damage_ap_from_data_typed(
self,
lookup: EffectLookup<'_>,
ap_type: WeaponApType,
) -> Result<Self, BuilderError>
pub fn damage_ap_from_data_typed( self, lookup: EffectLookup<'_>, ap_type: WeaponApType, ) -> Result<Self, BuilderError>
Like Self::damage_ap_from_data with an explicit weapon-AP composite.
Sourcepub fn damage_sp_from_data(
self,
lookup: EffectLookup<'_>,
) -> Result<Self, BuilderError>
pub fn damage_sp_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>
Set SP-coefficient damage, resolving coef + physical flag from data; errors if the school mask is missing on populated data.
Sourcepub fn channel_tick_damage_ap_from_data(
self,
lookup: EffectLookup<'_>,
) -> Result<Self, BuilderError>
pub fn channel_tick_damage_ap_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>
Set AP-coefficient channel-tick damage, resolving coef + physical flag from game data.
Sourcepub fn channel_tick_damage_sp_from_data(
self,
lookup: EffectLookup<'_>,
) -> Result<Self, BuilderError>
pub fn channel_tick_damage_sp_from_data( self, lookup: EffectLookup<'_>, ) -> Result<Self, BuilderError>
Set SP-coefficient channel-tick damage, resolving coef + physical flag from game data.
Sourcepub fn channel_tick_damage_alt_ap_from_data(
self,
lookup: EffectLookup<'_>,
aura_id: u32,
) -> Result<Self, BuilderError>
pub fn channel_tick_damage_alt_ap_from_data( self, lookup: EffectLookup<'_>, aura_id: u32, ) -> Result<Self, BuilderError>
Set an aura-conditional AP channel-tick payload from game data.
Sourcepub fn channel_tick_damage_alt_sp_from_data(
self,
lookup: EffectLookup<'_>,
aura_id: u32,
) -> Result<Self, BuilderError>
pub fn channel_tick_damage_alt_sp_from_data( self, lookup: EffectLookup<'_>, aura_id: u32, ) -> Result<Self, BuilderError>
Set an aura-conditional SP channel-tick payload from game data.
fn apply_empower_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
fn additional_damage( self, effect: DamageEffectRef, damage: BuilderDamageDef, base_points: f64, may_crit: bool, attribute_flags: DamageFlags, equipment: DamageEquipmentRequirements, ) -> Self
fn additional_triggered_damage( self, triggered: TriggeredDamage, multiplier: f64, may_crit: bool, attribute_flags: DamageFlags, ) -> Result<Self, BuilderError>
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
Sourcepub fn max_targets(self, n: u8) -> Self
pub fn max_targets(self, n: u8) -> Self
Hard cap on targets selected by a multi-target spell (0 = unlimited).
Sourcepub fn reduced_aoe_targets(self, n: u8) -> Self
pub fn reduced_aoe_targets(self, n: u8) -> Self
Beyond this count, per-target damage is multiplied by sqrt(reduced_aoe_targets / hits).
Sourcepub fn full_amount_targets(self, n: u8) -> Self
pub fn full_amount_targets(self, n: u8) -> Self
Number of targets that always receive full damage before sqrt scaling.
Sourcepub fn base_aoe_multiplier(self, m: f64) -> Self
pub fn base_aoe_multiplier(self, m: f64) -> Self
Flat multiplier applied to every AoE hit (default 1.0).
Sourcepub fn multi_target(self) -> Self
pub fn multi_target(self) -> Self
Mark a manually-authored spell as multi-target.
Sourcepub fn chain_targets(self, n: u8) -> Self
pub fn chain_targets(self, n: u8) -> Self
Apply a DBC chain-target count independently of the chain damage multiplier.
Sourcepub fn chain_targeting(self, enabled: bool) -> Self
pub fn chain_targeting(self, enabled: bool) -> Self
Mark whether resolved DBC or manifest semantics select chain geometry.
Sourcepub fn chain_multiplier(self, m: f64) -> Self
pub fn chain_multiplier(self, m: f64) -> Self
Chain decay multiplier per hop. Hit k gets mult.powi(k).
Sourcepub fn split_damage(self) -> Self
pub fn split_damage(self) -> Self
Split damage: total damage is divided across hits.
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
Sourcepub fn on_channel_tick(self, hook: CastHookFn) -> Self
pub fn on_channel_tick(self, hook: CastHookFn) -> Self
Register a hook fired after each channel tick’s damage is applied.
Sourcepub fn channel(self, tick_count: u8) -> Self
pub fn channel(self, tick_count: u8) -> Self
Mark this spell as a channel of tick_count ticks over cast_time_ms.
pub fn channel_tick_timing(self, interval_ms: u32, tick_zero: bool) -> Self
Sourcepub fn channel_tick_direct_damage(self) -> Self
pub fn channel_tick_direct_damage(self) -> Self
Classify child tick hits as direct damage while retaining channel cadence.
pub fn channel_tick_damage_ap(self, coef: f64, flags: DamageFlags) -> Self
pub fn channel_tick_damage_sp(self, coef: f64, flags: DamageFlags) -> Self
Sourcepub fn channel_tick_damage_alt_ap(
self,
coef: f64,
flags: DamageFlags,
spell_id: u32,
aura_id: u32,
) -> Self
pub fn channel_tick_damage_alt_ap( self, coef: f64, flags: DamageFlags, spell_id: u32, aura_id: u32, ) -> Self
Use an alternate AP payload while aura_id is active.
Sourcepub fn channel_tick_damage_alt_sp(
self,
coef: f64,
flags: DamageFlags,
spell_id: u32,
aura_id: u32,
) -> Self
pub fn channel_tick_damage_alt_sp( self, coef: f64, flags: DamageFlags, spell_id: u32, aura_id: u32, ) -> Self
Use an alternate SP payload while aura_id is active.
Sourcepub fn channel_tick_cost(self, amount: f64) -> Self
pub fn channel_tick_cost(self, amount: f64) -> Self
Per-tick primary-resource cost for a channel; an unaffordable tick ends it early.
Sourcepub fn channel_tick_cost_alt(self, amount: f64, aura_id: u32) -> Self
pub fn channel_tick_cost_alt(self, amount: f64, aura_id: u32) -> Self
Aura-conditional per-tick cost: spend amount instead while aura_id is active.
pub fn channel_tick_gain(self, amount: f64) -> Self
pub fn channel_tick_secondary_gain(self, amount: f64) -> Self
Sourcepub fn channel_complete_extend_aura(
self,
aura: LocalAuraIdx,
amount_ms: u32,
) -> Self
pub fn channel_complete_extend_aura( self, aura: LocalAuraIdx, amount_ms: u32, ) -> Self
Extend an aura once after the channel’s final scheduled tick.
Sourcepub fn channel_gcd_on_start(self, on_start: bool) -> Self
pub fn channel_gcd_on_start(self, on_start: bool) -> Self
Override whether the GCD triggers at channel start. Defaults to true.
pub(crate) fn channel_tick_source(self, spell_id: u32) -> Self
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub fn cooldown(self, secs: f64) -> Self
pub fn charges(self, max: u8, recharge_secs: f64) -> Self
Sourcepub fn hasted_cooldown(self) -> Self
pub fn hasted_cooldown(self) -> Self
Scale this spell’s cooldown or charge recharge with the actor’s haste.
Sourcepub fn unhasted_cooldown(self) -> Self
pub fn unhasted_cooldown(self) -> Self
Keep this spell’s cooldown or charge recharge on wall-clock time.
pub fn gcd_haste_type(self, haste_type: GcdHasteType) -> Self
Sourcepub fn start_recovery_category(
self,
category: Option<CooldownCategoryId>,
) -> Self
pub fn start_recovery_category( self, category: Option<CooldownCategoryId>, ) -> Self
Applies the DBC start-recovery bucket.
pub fn cooldown_categories( self, cooldown: Option<CooldownCategoryId>, category_cooldown_secs: f64, charge: Option<CooldownCategoryId>, ) -> Self
pub fn reduces_cd(self, target: LocalSpellIdx, amount_ms: u32) -> Self
pub fn reduces_cd_chance( self, target: LocalSpellIdx, amount_ms: u32, chance: f64, ) -> Self
pub fn resets_cd_while(self, target: LocalSpellIdx, aura: LocalAuraIdx) -> Self
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub fn damage_flat(self, amount: f64) -> Self
pub fn damage_ap(self, coef: f64, flags: DamageFlags) -> Self
pub fn damage_ap_typed( self, coef: f64, flags: DamageFlags, ap_type: WeaponApType, ) -> Self
pub fn damage_sp(self, coef: f64, flags: DamageFlags) -> Self
Sourcepub fn damage_auto(self, def: ResolvedDamageDef) -> Result<Self, BuilderError>
pub fn damage_auto(self, def: ResolvedDamageDef) -> Result<Self, BuilderError>
Applies a resolved data-driven damage definition.
§Errors
Returns an error when the resolved damage kind has no builder representation.
Sourcepub fn without_data_damage(self) -> Self
pub fn without_data_damage(self) -> Self
Suppress damage inferred by Self::apply_base_from_data.
Sourcepub fn without_primary_data_damage(self) -> Self
pub fn without_primary_data_damage(self) -> Self
Suppress only the parent’s inferred payload while retaining DBC trigger-child damage.
pub(crate) fn damage_effect(self, spell_id: u32, effect_index: u8) -> Self
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub fn new(_name: &str, _id: u32) -> Self
pub fn usable_while_moving(self) -> Self
Sourcepub fn guaranteed_crit(self) -> Self
pub fn guaranteed_crit(self) -> Self
Makes every hit of this spell critical.
pub fn usable_while_casting(self) -> Self
Sourcepub fn targets_player(self) -> Self
pub fn targets_player(self) -> Self
Cast without an explicit target payload.
pub fn requires_stealth(self) -> Self
Sourcepub const fn requires_behind_target(self) -> Self
pub const fn requires_behind_target(self) -> Self
Require the player to be behind the current target.
pub fn cast_time(self, ms: u32) -> Self
Sourcepub fn max_empower_when_aura(self, aura_id: u32) -> Self
pub fn max_empower_when_aura(self, aura_id: u32) -> Self
Make an empower instant and release at its DBC maximum rank while aura_id is active.
The one-shot aura is consumed by the completed empower cast.
pub fn travel_time(self, ms: u32) -> Self
pub fn gcd(self, ms: u32) -> Self
pub fn extends_aura(self, aura: LocalAuraIdx, amount_ms: u32) -> Self
pub fn applies_aura(self, aura: LocalAuraIdx) -> Self
Sourcepub fn applies_inferred_aura(
self,
aura: LocalAuraIdx,
aura_spell_id: u32,
) -> Self
pub fn applies_inferred_aura( self, aura: LocalAuraIdx, aura_spell_id: u32, ) -> Self
Applies a name-matched aura unless the data says this spell requires it instead.
A spell and its usability requirement often share a display name.
Whirling Dragon Punch 152175 names 196742 as its SpellAuraRestrictions.CasterAuraSpell.
Inferring application from the shared name would apply the very aura the cast consumes.
The requirement stated in the data therefore wins over the inference.
Sourcepub fn applies_aura_id(self, aura_id: u32) -> Self
pub fn applies_aura_id(self, aura_id: u32) -> Self
Apply the aura with this game id on cast; resolved to its registered local index.
pub fn on_cast(self, hook: CastHookFn) -> Self
Sourcepub fn trigger_program_predicate(
self,
effect_index: u8,
predicate: fn(&HookCtx<'_>) -> bool,
) -> Self
pub fn trigger_program_predicate( self, effect_index: u8, predicate: fn(&HookCtx<'_>) -> bool, ) -> Self
Gate one source effect’s complete DBC trigger program with content-owned runtime logic.
Sourcepub fn on_empower_release(
self,
hook: fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment,
) -> Self
pub fn on_empower_release( self, hook: fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment, ) -> Self
Register a rank-aware driver that adjusts an empower spell’s release payload.
pub fn pet(self) -> Self
pub fn no_stealth_break(self) -> Self
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub(crate) fn finalize(self, name: String, id: u32) -> BuilderSpellDef
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
Sourcepub fn requires_aura_at_min_stacks(self, aura_id: u32, min_stacks: u8) -> Self
pub fn requires_aura_at_min_stacks(self, aura_id: u32, min_stacks: u8) -> Self
Gate this spell on aura_id being active with at least min_stacks stacks (aura_id = 0 clears).
Sourcepub fn cost_free_when_aura(self, aura_id: u32) -> Self
pub fn cost_free_when_aura(self, aura_id: u32) -> Self
Bypass all resource costs while aura_id is active (aura_id = 0 clears).
Sourcepub fn consume_aura_on_cast(self, aura_id: u32) -> Self
pub fn consume_aura_on_cast(self, aura_id: u32) -> Self
Consume one stack of aura_id after a successful cast.
Sourcepub fn cooldown_bypass_when_aura(self, aura_id: u32) -> Self
pub fn cooldown_bypass_when_aura(self, aura_id: u32) -> Self
Do not start this spell’s cooldown while aura_id is active.
Sourcepub fn execute_below_pct(self, percent: f64) -> Self
pub fn execute_below_pct(self, percent: f64) -> Self
Gate castability on the target being at or below percent health.
Sourcepub fn instant_when_aura(self, aura_id: u32) -> Self
pub fn instant_when_aura(self, aura_id: u32) -> Self
Make this spell instant while aura_id is active.
Make an action replacement share the requested action’s cooldown.
Sourcepub fn override_preserves_aura(self) -> Self
pub fn override_preserves_aura(self) -> Self
Keep a stance/form aura active when it selects a replacement action.
Sourcepub fn overridden_by(self, spell_id: u32, aura_id: u32) -> Self
pub fn overridden_by(self, spell_id: u32, aura_id: u32) -> Self
Replace this action with spell_id while aura_id is active.
Sourcepub fn override_at_min_stacks(self, min_stacks: u8) -> Self
pub fn override_at_min_stacks(self, min_stacks: u8) -> Self
Replace this action only when the controlling aura reaches min_stacks.
Source§impl SpellDefinitionDraft
impl SpellDefinitionDraft
pub fn cost(self, amount: f64) -> Self
Sourcepub fn cost_percent_of_base(self, percent: f64) -> Self
pub fn cost_percent_of_base(self, percent: f64) -> Self
Charge a percentage of the actor’s configured base primary-resource maximum.
Sourcepub fn cost_percent_of_maximum(self, percent: f64) -> Self
pub fn cost_percent_of_maximum(self, percent: f64) -> Self
Charge a percentage of the actor’s current modified primary-resource maximum.
Sourcepub fn health_cost(self, amount: f64, percent_of_maximum: f64) -> Self
pub fn health_cost(self, amount: f64, percent_of_maximum: f64) -> Self
Pay a flat amount plus a percent of caster maximum health when the spell is cast.
Sourcepub fn health_optional_cost(self, amount: f64, percent_of_maximum: f64) -> Self
pub fn health_optional_cost(self, amount: f64, percent_of_maximum: f64) -> Self
Optionally spend flat health plus a percentage of caster maximum health.
pub fn gain(self, amount: f64) -> Self
pub fn secondary_cost(self, amount: f64) -> Self
pub fn secondary_gain(self, amount: f64) -> Self
pub fn additional_resource_gain(self, amount: f64) -> Self
pub(super) fn optional_cost(self, amount: f64) -> Self
pub(super) fn secondary_optional_cost(self, amount: f64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpellDefinitionDraft
impl RefUnwindSafe for SpellDefinitionDraft
impl Send for SpellDefinitionDraft
impl Sync for SpellDefinitionDraft
impl Unpin for SpellDefinitionDraft
impl UnsafeUnpin for SpellDefinitionDraft
impl UnwindSafe for SpellDefinitionDraft
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
§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>
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>
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