Struct veloren_common::comp::melee::MeleeConstructor
source · pub struct MeleeConstructor {
pub kind: MeleeConstructorKind,
pub scaled: Option<Scaled>,
pub range: f32,
pub angle: f32,
pub multi_target: Option<MultiTarget>,
pub damage_effect: Option<CombatEffect>,
pub attack_effect: Option<(CombatEffect, CombatRequirement)>,
pub dodgeable: Dodgeable,
pub simultaneous_hits: u32,
pub custom_combo: Option<CustomCombo>,
pub precision_flank_multipliers: FlankMults,
pub precision_flank_invert: bool,
}
Fields§
§kind: MeleeConstructorKind
§scaled: Option<Scaled>
This multiplied by a fraction is added to what is specified in kind
.
Note, that this must be the same variant as what is specified in kind
.
range: f32
§angle: f32
§multi_target: Option<MultiTarget>
§damage_effect: Option<CombatEffect>
§attack_effect: Option<(CombatEffect, CombatRequirement)>
§dodgeable: Dodgeable
§simultaneous_hits: u32
§custom_combo: Option<CustomCombo>
§precision_flank_multipliers: FlankMults
§precision_flank_invert: bool
Implementations§
source§impl MeleeConstructor
impl MeleeConstructor
pub fn create_melee(self, precision_mult: f32, tool_stats: Stats) -> Melee
pub fn handle_scaling(self, scaling: f32) -> Self
pub fn adjusted_by_stats(self, stats: Stats) -> Self
pub fn custom_combo(self, custom: Option<CustomCombo>) -> Self
Trait Implementations§
source§impl Clone for MeleeConstructor
impl Clone for MeleeConstructor
source§fn clone(&self) -> MeleeConstructor
fn clone(&self) -> MeleeConstructor
Returns a copy 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 MeleeConstructor
impl Debug for MeleeConstructor
source§impl<'de> Deserialize<'de> for MeleeConstructor
impl<'de> Deserialize<'de> for MeleeConstructor
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for MeleeConstructor
impl PartialEq for MeleeConstructor
source§fn eq(&self, other: &MeleeConstructor) -> bool
fn eq(&self, other: &MeleeConstructor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MeleeConstructor
impl Serialize for MeleeConstructor
impl Copy for MeleeConstructor
impl StructuralPartialEq for MeleeConstructor
Auto Trait Implementations§
impl Freeze for MeleeConstructor
impl RefUnwindSafe for MeleeConstructor
impl Send for MeleeConstructor
impl Sync for MeleeConstructor
impl Unpin for MeleeConstructor
impl UnwindSafe for MeleeConstructor
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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