Enum Class ElementalEffectiveness
- All Implemented Interfaces:
Serializable, Comparable<ElementalEffectiveness>, Constable
怪物對特定元素屬性的相剋效果列舉,以傷害倍率表達。
四種效果及其倍率:
NORMAL(1.0)— 一般,無加成或減免。IMMUNE(0.0)— 完全免疫,傷害歸零。STRONG(0.5)— 強抗,傷害減半。WEAK(1.5)— 弱點,傷害提升 50%。
getByNumber(int) 依 WZ elemAttr 字串的數字尾碼(1/2/3)解析;
傷害計算時由 MapleMonsterStats.getEffectiveness(Element) 取得對應值,
再乘以原始傷害得到最終傷害量。-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementalEffectivenessgetByNumber(int num) doublegetValue()static ElementalEffectivenessReturns the enum constant of this class with the specified name.static ElementalEffectiveness[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
-
IMMUNE
-
STRONG
-
WEAK
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public double getValue() -
getByNumber
-