evtc\buff/
attribute.rs

1use num_enum::{IntoPrimitive, TryFromPrimitive};
2
3#[cfg(feature = "serde")]
4use serde::{Deserialize, Serialize};
5
6#[cfg(feature = "strum")]
7use strum::{Display, EnumCount, EnumIter, IntoStaticStr, VariantNames};
8
9/// Attributes for buff formulas.
10///
11/// Used in [`StateChange::BuffFormula`](crate::StateChange::BuffFormula) events.
12/// This enum is different from the game's own attribute ids.
13#[derive(
14    Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, IntoPrimitive, TryFromPrimitive,
15)]
16#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17#[cfg_attr(
18    feature = "strum",
19    derive(Display, EnumCount, EnumIter, IntoStaticStr, VariantNames)
20)]
21#[repr(u16)]
22pub enum Attribute {
23    None = 0,
24
25    /// Power.
26    Power = 1,
27
28    /// Precision.
29    Precision = 2,
30
31    /// Toughness.
32    Toughness = 3,
33
34    /// Vitality.
35    Vitality = 4,
36
37    /// Ferocity.
38    Ferocity = 5,
39
40    /// Healing.
41    Healing = 6,
42
43    /// Condition Damage.
44    Condition = 7,
45
46    /// Concentration.
47    Concentration = 8,
48
49    /// Expertise.
50    Expertise = 9,
51
52    /// Armor.
53    Armor = 10,
54
55    /// Agony Resistance.
56    Agony = 11,
57
58    /// Stat increase.
59    StatInc = 12,
60
61    /// Outgoing strike damage.
62    PhysInc = 13,
63
64    /// Outgoing condition damage.
65    CondInc = 14,
66
67    /// Incoming strike damage.
68    PhysRec = 15,
69
70    /// Incoming condition damage.
71    CondRec = 16,
72
73    /// Attack speed.
74    AttackSpeed = 17,
75
76    /// Outgoing life leech.
77    SiphonInc = 18,
78
79    /// Incoming life leech.
80    SiphonRec = 19,
81}