Enum Class ElementalEffectiveness

java.lang.Object
java.lang.Enum<ElementalEffectiveness>
server.life.ElementalEffectiveness
All Implemented Interfaces:
Serializable, Comparable<ElementalEffectiveness>, Constable

public enum ElementalEffectiveness extends Enum<ElementalEffectiveness>
怪物對特定元素屬性的相剋效果列舉,以傷害倍率表達。

四種效果及其倍率:

  • NORMAL(1.0)— 一般,無加成或減免。
  • IMMUNE(0.0)— 完全免疫,傷害歸零。
  • STRONG(0.5)— 強抗,傷害減半。
  • WEAK(1.5)— 弱點,傷害提升 50%。
getByNumber(int) 依 WZ elemAttr 字串的數字尾碼(1/2/3)解析; 傷害計算時由 MapleMonsterStats.getEffectiveness(Element) 取得對應值, 再乘以原始傷害得到最終傷害量。
  • Enum Constant Details

  • Method Details

    • values

      public static ElementalEffectiveness[] 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

      public static ElementalEffectiveness valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public double getValue()
    • getByNumber

      public static ElementalEffectiveness getByNumber(int num)