pub enum CharacterAbility {
Show 31 variants
    BasicMelee {
        energy_cost: f32,
        buildup_duration: f32,
        swing_duration: f32,
        hit_timing: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        movement_modifier: MovementModifier,
        ori_modifier: OrientationModifier,
        frontend_specifier: Option<FrontendSpecifier>,
        meta: AbilityMeta,
    },
    BasicRanged {Show 13 fields
        energy_cost: f32,
        buildup_duration: f32,
        recover_duration: f32,
        projectile: ProjectileConstructor,
        projectile_body: Body,
        projectile_light: Option<LightEmitter>,
        projectile_speed: f32,
        num_projectiles: Amount,
        projectile_spread: f32,
        damage_effect: Option<CombatEffect>,
        movement_modifier: MovementModifier,
        ori_modifier: OrientationModifier,
        meta: AbilityMeta,
    },
    RepeaterRanged {Show 14 fields
        energy_cost: f32,
        buildup_duration: f32,
        shoot_duration: f32,
        recover_duration: f32,
        max_speed: f32,
        half_speed_at: u32,
        projectile: ProjectileConstructor,
        projectile_body: Body,
        projectile_light: Option<LightEmitter>,
        projectile_speed: f32,
        damage_effect: Option<CombatEffect>,
        properties_of_aoe: Option<ProjectileOffset>,
        specifier: Option<FrontendSpecifier>,
        meta: AbilityMeta,
    },
    Boost {
        movement_duration: f32,
        only_up: bool,
        speed: f32,
        max_exit_velocity: f32,
        meta: AbilityMeta,
    },
    GlideBoost {
        booster: Boost,
        meta: AbilityMeta,
    },
    DashMelee {
        energy_cost: f32,
        energy_drain: f32,
        forward_speed: f32,
        buildup_duration: f32,
        charge_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        ori_modifier: f32,
        auto_charge: bool,
        meta: AbilityMeta,
    },
    BasicBlock {
        buildup_duration: f32,
        recover_duration: f32,
        max_angle: f32,
        block_strength: f32,
        parry_window: ParryWindow,
        energy_cost: f32,
        energy_regen: f32,
        can_hold: bool,
        blocked_attacks: AttackFilters,
        meta: AbilityMeta,
    },
    Roll {
        energy_cost: f32,
        buildup_duration: f32,
        movement_duration: f32,
        recover_duration: f32,
        roll_strength: f32,
        attack_immunities: AttackFilters,
        was_cancel: bool,
        meta: AbilityMeta,
    },
    ComboMelee2 {
        strikes: Vec<Strike<f32>>,
        energy_cost_per_strike: f32,
        specifier: Option<FrontendSpecifier>,
        auto_progress: bool,
        meta: AbilityMeta,
    },
    LeapExplosionShockwave {Show 30 fields
        energy_cost: f32,
        buildup_duration: f32,
        movement_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        forward_leap_strength: f32,
        vertical_leap_strength: f32,
        explosion_damage: f32,
        explosion_poise: f32,
        explosion_knockback: Knockback,
        explosion_radius: f32,
        min_falloff: f32,
        explosion_dodgeable: Dodgeable,
        destroy_terrain: Option<(f32, ColorPreset)>,
        replace_terrain: Option<(f32, TerrainReplacementPreset)>,
        eye_height: bool,
        reagent: Option<Reagent>,
        shockwave_damage: f32,
        shockwave_poise: f32,
        shockwave_knockback: Knockback,
        shockwave_angle: f32,
        shockwave_vertical_angle: f32,
        shockwave_speed: f32,
        shockwave_duration: f32,
        shockwave_dodgeable: Dodgeable,
        shockwave_damage_effect: Option<CombatEffect>,
        shockwave_damage_kind: DamageKind,
        shockwave_specifier: FrontendSpecifier,
        move_efficiency: f32,
        meta: AbilityMeta,
    },
    LeapMelee {
        energy_cost: f32,
        buildup_duration: f32,
        movement_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        forward_leap_strength: f32,
        vertical_leap_strength: f32,
        damage_effect: Option<CombatEffect>,
        specifier: Option<FrontendSpecifier>,
        meta: AbilityMeta,
    },
    LeapShockwave {Show 20 fields
        energy_cost: f32,
        buildup_duration: f32,
        movement_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        damage: f32,
        poise_damage: f32,
        knockback: Knockback,
        shockwave_angle: f32,
        shockwave_vertical_angle: f32,
        shockwave_speed: f32,
        shockwave_duration: f32,
        dodgeable: Dodgeable,
        move_efficiency: f32,
        damage_kind: DamageKind,
        specifier: FrontendSpecifier,
        damage_effect: Option<CombatEffect>,
        forward_leap_strength: f32,
        vertical_leap_strength: f32,
        meta: AbilityMeta,
    },
    ChargedMelee {Show 14 fields
        energy_cost: f32,
        energy_drain: f32,
        buildup_strike: Option<(f32, MeleeConstructor)>,
        charge_duration: f32,
        swing_duration: f32,
        hit_timing: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        specifier: Option<FrontendSpecifier>,
        damage_effect: Option<CombatEffect>,
        custom_combo: CustomCombo,
        meta: AbilityMeta,
        movement_modifier: MovementModifier,
        ori_modifier: OrientationModifier,
    },
    ChargedRanged {Show 13 fields
        energy_cost: f32,
        energy_drain: f32,
        projectile: ProjectileConstructor,
        buildup_duration: f32,
        charge_duration: f32,
        recover_duration: f32,
        projectile_body: Body,
        projectile_light: Option<LightEmitter>,
        initial_projectile_speed: f32,
        scaled_projectile_speed: f32,
        damage_effect: Option<CombatEffect>,
        move_speed: f32,
        meta: AbilityMeta,
    },
    Throw {Show 14 fields
        energy_cost: f32,
        energy_drain: f32,
        buildup_duration: f32,
        charge_duration: f32,
        throw_duration: f32,
        recover_duration: f32,
        projectile: ProjectileConstructor,
        projectile_light: Option<LightEmitter>,
        projectile_dir: ProjectileDir,
        initial_projectile_speed: f32,
        scaled_projectile_speed: f32,
        damage_effect: Option<CombatEffect>,
        move_speed: f32,
        meta: AbilityMeta,
    },
    Shockwave {Show 22 fields
        energy_cost: f32,
        buildup_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        damage: f32,
        poise_damage: f32,
        knockback: Knockback,
        shockwave_angle: f32,
        shockwave_vertical_angle: f32,
        shockwave_speed: f32,
        shockwave_duration: f32,
        dodgeable: Dodgeable,
        move_efficiency: f32,
        damage_kind: DamageKind,
        specifier: FrontendSpecifier,
        ori_rate: f32,
        damage_effect: Option<CombatEffect>,
        timing: Timing,
        emit_outcome: bool,
        minimum_combo: Option<u32>,
        combo_consumption: ComboConsumption,
        meta: AbilityMeta,
    },
    Explosion {Show 17 fields
        energy_cost: f32,
        buildup_duration: f32,
        action_duration: f32,
        recover_duration: f32,
        damage: f32,
        poise: f32,
        knockback: Knockback,
        radius: f32,
        min_falloff: f32,
        dodgeable: Dodgeable,
        destroy_terrain: Option<(f32, ColorPreset)>,
        replace_terrain: Option<(f32, TerrainReplacementPreset)>,
        eye_height: bool,
        reagent: Option<Reagent>,
        movement_modifier: MovementModifier,
        ori_modifier: OrientationModifier,
        meta: AbilityMeta,
    },
    BasicBeam {Show 15 fields
        buildup_duration: f32,
        recover_duration: f32,
        beam_duration: f64,
        damage: f32,
        tick_rate: f32,
        range: f32,
        dodgeable: Dodgeable,
        max_angle: f32,
        damage_effect: Option<CombatEffect>,
        energy_regen: f32,
        energy_drain: f32,
        ori_rate: f32,
        move_efficiency: f32,
        specifier: FrontendSpecifier,
        meta: AbilityMeta,
    },
    BasicAura {
        buildup_duration: f32,
        cast_duration: f32,
        recover_duration: f32,
        targets: GroupTarget,
        auras: Vec<AuraBuffConstructor>,
        aura_duration: Option<Secs>,
        range: f32,
        energy_cost: f32,
        scales_with_combo: bool,
        specifier: Option<Specifier>,
        meta: AbilityMeta,
    },
    StaticAura {
        buildup_duration: f32,
        cast_duration: f32,
        recover_duration: f32,
        energy_cost: f32,
        targets: GroupTarget,
        auras: Vec<AuraBuffConstructor>,
        aura_duration: Option<Secs>,
        range: f32,
        sprite_info: Option<SpriteInfo>,
        meta: AbilityMeta,
    },
    Blink {
        buildup_duration: f32,
        recover_duration: f32,
        max_range: f32,
        frontend_specifier: Option<FrontendSpecifier>,
        meta: AbilityMeta,
    },
    BasicSummon {
        buildup_duration: f32,
        cast_duration: f32,
        recover_duration: f32,
        summon_info: SummonInfo,
        movement_modifier: MovementModifier,
        ori_modifier: OrientationModifier,
        meta: AbilityMeta,
    },
    SelfBuff {
        buildup_duration: f32,
        cast_duration: f32,
        recover_duration: f32,
        buffs: Vec<BuffDesc>,
        energy_cost: f32,
        enforced_limit: bool,
        combo_cost: u32,
        combo_scaling: Option<ScalingKind>,
        meta: AbilityMeta,
        specifier: Option<FrontendSpecifier>,
    },
    SpriteSummon {
        buildup_duration: f32,
        cast_duration: f32,
        recover_duration: f32,
        sprite: SpriteKind,
        del_timeout: Option<(f32, f32)>,
        summon_distance: (f32, f32),
        sparseness: f64,
        angle: f32,
        anchor: SpriteSummonAnchor,
        move_efficiency: f32,
        ori_modifier: f32,
        meta: AbilityMeta,
    },
    Music {
        play_duration: f32,
        ori_modifier: f32,
        meta: AbilityMeta,
    },
    FinisherMelee {
        energy_cost: f32,
        buildup_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        minimum_combo: u32,
        scaling: Option<Scaling>,
        combo_consumption: ComboConsumption,
        meta: AbilityMeta,
    },
    DiveMelee {
        energy_cost: f32,
        vertical_speed: f32,
        buildup_duration: Option<f32>,
        movement_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        melee_constructor: MeleeConstructor,
        max_scaling: f32,
        meta: AbilityMeta,
    },
    RiposteMelee {
        energy_cost: f32,
        buildup_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        whiffed_recover_duration: f32,
        block_strength: f32,
        melee_constructor: MeleeConstructor,
        meta: AbilityMeta,
    },
    RapidMelee {
        buildup_duration: f32,
        swing_duration: f32,
        recover_duration: f32,
        energy_cost: f32,
        max_strikes: Option<u32>,
        melee_constructor: MeleeConstructor,
        move_modifier: f32,
        ori_modifier: f32,
        frontend_specifier: Option<FrontendSpecifier>,
        minimum_combo: u32,
        meta: AbilityMeta,
    },
    Transform {
        buildup_duration: f32,
        recover_duration: f32,
        target: String,
        specifier: Option<FrontendSpecifier>,
        allow_players: bool,
        meta: AbilityMeta,
    },
    RegrowHead {
        buildup_duration: f32,
        recover_duration: f32,
        energy_cost: f32,
        specifier: Option<FrontendSpecifier>,
        meta: AbilityMeta,
    },
}Expand description
For documentation on individual fields, see the corresponding character state file in ‘common/src/states/’
Variants§
BasicMelee
Fields
§
melee_constructor: MeleeConstructor§
movement_modifier: MovementModifier§
ori_modifier: OrientationModifier§
frontend_specifier: Option<FrontendSpecifier>§
meta: AbilityMetaBasicRanged
Fields
§
projectile: ProjectileConstructor§
projectile_light: Option<LightEmitter>§
damage_effect: Option<CombatEffect>§
movement_modifier: MovementModifier§
ori_modifier: OrientationModifier§
meta: AbilityMetaRepeaterRanged
Fields
§
projectile: ProjectileConstructor§
projectile_light: Option<LightEmitter>§
damage_effect: Option<CombatEffect>§
properties_of_aoe: Option<ProjectileOffset>§
specifier: Option<FrontendSpecifier>§
meta: AbilityMetaBoost
GlideBoost
DashMelee
BasicBlock
Roll
ComboMelee2
LeapExplosionShockwave
Fields
§
destroy_terrain: Option<(f32, ColorPreset)>§
replace_terrain: Option<(f32, TerrainReplacementPreset)>§
shockwave_damage_effect: Option<CombatEffect>§
shockwave_damage_kind: DamageKind§
shockwave_specifier: FrontendSpecifier§
meta: AbilityMetaLeapMelee
Fields
§
melee_constructor: MeleeConstructor§
damage_effect: Option<CombatEffect>§
specifier: Option<FrontendSpecifier>§
meta: AbilityMetaLeapShockwave
Fields
§
damage_kind: DamageKind§
specifier: FrontendSpecifier§
damage_effect: Option<CombatEffect>§
meta: AbilityMetaChargedMelee
Fields
§
buildup_strike: Option<(f32, MeleeConstructor)>§
melee_constructor: MeleeConstructor§
specifier: Option<FrontendSpecifier>§
damage_effect: Option<CombatEffect>§
custom_combo: CustomCombo§
meta: AbilityMeta§
movement_modifier: MovementModifier§
ori_modifier: OrientationModifierChargedRanged
Fields
§
projectile: ProjectileConstructor§
projectile_light: Option<LightEmitter>§
damage_effect: Option<CombatEffect>§
meta: AbilityMetaThrow
Fields
§
projectile: ProjectileConstructor§
projectile_light: Option<LightEmitter>§
projectile_dir: ProjectileDir§
damage_effect: Option<CombatEffect>§
meta: AbilityMetaShockwave
Fields
§
damage_kind: DamageKind§
specifier: FrontendSpecifier§
damage_effect: Option<CombatEffect>§
combo_consumption: ComboConsumption§
meta: AbilityMetaExplosion
Fields
§
destroy_terrain: Option<(f32, ColorPreset)>§
replace_terrain: Option<(f32, TerrainReplacementPreset)>§
movement_modifier: MovementModifier§
ori_modifier: OrientationModifier§
meta: AbilityMetaBasicBeam
BasicAura
StaticAura
Fields
§
targets: GroupTarget§
auras: Vec<AuraBuffConstructor>§
sprite_info: Option<SpriteInfo>§
meta: AbilityMetaBlink
BasicSummon
Fields
§
summon_info: SummonInfo§
movement_modifier: MovementModifier§
ori_modifier: OrientationModifier§
meta: AbilityMetaSelfBuff
SpriteSummon
Music
FinisherMelee
DiveMelee
RiposteMelee
RapidMelee
Fields
§
melee_constructor: MeleeConstructor§
frontend_specifier: Option<FrontendSpecifier>§
meta: AbilityMetaTransform
Fields
§
specifier: Option<FrontendSpecifier>§
allow_players: boolOnly set to true for admin only abilities since this disables
persistence and is not intended to be used by regular players
§
meta: AbilityMetaRegrowHead
Implementations§
Source§impl CharacterAbility
 
impl CharacterAbility
Sourcepub fn requirements_paid(
    &self,
    data: &JoinData<'_>,
    update: &mut StateUpdate,
) -> bool
 
pub fn requirements_paid( &self, data: &JoinData<'_>, update: &mut StateUpdate, ) -> bool
Attempts to fulfill requirements, mutating update (taking energy) if
applicable.
pub fn default_roll(current_state: Option<&CharacterState>) -> CharacterAbility
pub fn adjusted_by_stats(self, stats: Stats) -> CharacterAbility
pub fn energy_cost(&self) -> f32
pub fn combo_cost(&self) -> u32
pub fn ability_meta(&self) -> AbilityMeta
pub fn adjusted_by_skills( self, skillset: &SkillSet, tool: Option<ToolKind>, ) -> CharacterAbility
Trait Implementations§
Source§impl Clone for CharacterAbility
 
impl Clone for CharacterAbility
Source§fn clone(&self) -> CharacterAbility
 
fn clone(&self) -> CharacterAbility
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for CharacterAbility
 
impl Debug for CharacterAbility
Source§impl Default for CharacterAbility
 
impl Default for CharacterAbility
Source§fn default() -> CharacterAbility
 
fn default() -> CharacterAbility
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CharacterAbility
 
impl<'de> Deserialize<'de> for CharacterAbility
Source§fn deserialize<__D>(
    __deserializer: __D,
) -> Result<CharacterAbility, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(
    __deserializer: __D,
) -> Result<CharacterAbility, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CharacterAbility
 
impl PartialEq for CharacterAbility
Source§impl Serialize for CharacterAbility
 
impl Serialize for CharacterAbility
Source§fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
 
fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CharacterAbility
Auto Trait Implementations§
impl Freeze for CharacterAbility
impl !RefUnwindSafe for CharacterAbility
impl Send for CharacterAbility
impl Sync for CharacterAbility
impl Unpin for CharacterAbility
impl !UnwindSafe for CharacterAbility
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<C, M> ConvertSaveload<M> for C
 
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
 
type Error = Infallible
Error may occur during serialization or deserialization of component
§fn convert_into<F>(
    &self,
    _: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
 
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Convert this data type into serializable form (
Data) using
entity to marker mapping function§fn convert_from<F>(
    data: <C as ConvertSaveload<M>>::Data,
    _: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
 
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Convert this data from a deserializable form (
Data) using
entity to marker mapping function§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§impl<T> Pointable for T
 
impl<T> Pointable for T
Source§impl<Context> SubContext<Context> for Context
 
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
    T: Default,
 
impl<T> TryDefault for Twhere
    T: Default,
§fn try_default() -> Result<T, String>
 
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
 
fn unwrap_default() -> Self
Calls 
try_default and panics on an error case.