Enum Class Element

All Implemented Interfaces:
Serializable, Comparable<Element>, Constable

public enum Element extends Enum<Element>
楓之谷中的元素屬性列舉,用於描述技能與怪物的元素類型。

定義八種元素:NEUTRAL(無屬性)、PHYSICAL(物理)、 FIRE(火)、ICE(冰)、LIGHTING(雷)、 POISON(毒)、HOLY(聖)、DARKNESS(暗)。 其中火、冰、聖標記為 special = true

提供兩個工廠方法:

元素相剋效果由 ElementalEffectiveness 搭配 MapleMonsterStats.getEffectiveness(Element) 查詢。
  • Enum Constant Details

    • NEUTRAL

      public static final Element NEUTRAL
    • PHYSICAL

      public static final Element PHYSICAL
    • FIRE

      public static final Element FIRE
    • ICE

      public static final Element ICE
    • LIGHTING

      public static final Element LIGHTING
    • POISON

      public static final Element POISON
    • HOLY

      public static final Element HOLY
    • DARKNESS

      public static final Element DARKNESS
  • Method Details

    • values

      public static Element[] 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 Element 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
    • isSpecial

      public boolean isSpecial()
    • getFromChar

      public static Element getFromChar(char c)
    • getFromId

      public static Element getFromId(int c)
    • getValue

      public int getValue()