Skip to main content

CombatResult

Enum CombatResult 

#[repr(u8)]
pub enum CombatResult {
Show 20 variants StrikeDamage = 0, StrikeDamageCrit = 1, StrikeDamageGlance = 2, Block = 3, Evade = 4, Interrupt = 5, Absorb = 6, Blind = 7, KillingBlow = 8, Downed = 9, BreakbarDamage = 10, SkillCast = 11, CrowdControl = 12, Invert = 13, BuffDamageCycle = 14, BuffDamageNotCycle = 15, BuffDamageTargetOnHit = 16, BuffDamageSourceOnHit = 17, BuffDamageOnBuffRemove = 18, Unknown(u8),
}
Expand description

Combat result.

Variants§

§

StrikeDamage = 0

Strike damage.

No critical hit, no glance.

§

StrikeDamageCrit = 1

Critical strike damage.

§

StrikeDamageGlance = 2

Glancing strike damage.

§

Block = 3

Attack was blocked.

Due to Aegis, Chrono Shield 4 etc.

§

Evade = 4

Attack was evaded.

Due to dodge, Mesmer Sword 2 etc.

§

Interrupt = 5

Action was interrupted.

§

Absorb = 6

Attack was absorbed.

Usually due to an invulnerability like Guardian Renewed Focus.

§

Blind = 7

Attack missed.

Due to blind etc.

§

KillingBlow = 8

Attack killed the target.

§

Downed = 9

Attack downed the target.

§

BreakbarDamage = 10

Attack dealt breakbar damage.

§

SkillCast = 11

On-skill-activation event.

§

CrowdControl = 12

Skill crowd controlled the target.

§

Invert = 13

Damage was inverted.

§

BuffDamageCycle = 14

Regular buff damage on cycle.

§

BuffDamageNotCycle = 15

Buff damage outside of cycle.

§

BuffDamageTargetOnHit = 16

Buff damage to target on hitting target (outside of cycle).

§

BuffDamageSourceOnHit = 17

Buff damage to source on hitting target (outside of cycle).

§

BuffDamageOnBuffRemove = 18

Buff damage to target on buff removal (outside of cycle).

§

Unknown(u8)

Unknown.

Implementations§

§

impl CombatResult

pub const fn is_health_damage(&self) -> bool

Whether the attack dealt health damage to the target.

pub const fn is_strike_damage(&self) -> bool

Whether the attack dealt strike damage to the target.

pub const fn is_buff_damage(&self) -> bool

Whether the attack dealt buff damage to the target.

pub const fn is_breakbar_damage(&self) -> bool

Whether the attack dealt breabkar damage to the target.

pub const fn is_pervented(&self) -> bool

Whether the attack was prevented

Trait Implementations§

§

impl Clone for CombatResult

§

fn clone(&self) -> CombatResult

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CombatResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CombatResult

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CombatResult, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for CombatResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl EnumCount for CombatResult

§

const COUNT: usize = 20usize

§

impl<'_derivative_strum> From<&'_derivative_strum CombatResult> for &'static str

§

fn from(x: &'_derivative_strum CombatResult) -> &'static str

Converts to this type from the input type.
§

impl From<CombatResult> for &'static str

§

fn from(x: CombatResult) -> &'static str

Converts to this type from the input type.
§

impl From<u8> for CombatResult

§

fn from(number: u8) -> CombatResult

Converts to this type from the input type.
§

impl FromPrimitive for CombatResult

§

type Primitive = u8

§

fn from_primitive( number: <CombatResult as FromPrimitive>::Primitive, ) -> CombatResult

§

impl Hash for CombatResult

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl IntoEnumIterator for CombatResult

§

impl Ord for CombatResult

§

fn cmp(&self, other: &CombatResult) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for CombatResult

§

fn eq(&self, other: &CombatResult) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for CombatResult

§

fn partial_cmp(&self, other: &CombatResult) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Serialize for CombatResult

§

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 VariantNames for CombatResult

§

const VARIANTS: &'static [&'static str]

Names of the variants of this enum
§

impl Copy for CombatResult

§

impl Eq for CombatResult

§

impl StructuralPartialEq for CombatResult

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,