Enum Magic.Ancient

  • All Implemented Interfaces:
    Spell, java.io.Serializable, java.lang.Comparable<Magic.Ancient>
    Enclosing class:
    Magic

    public static enum Magic.Ancient
    extends java.lang.Enum<Magic.Ancient>
    implements Spell
    • Method Detail

      • values

        public static Magic.Ancient[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Magic.Ancient c : Magic.Ancient.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Magic.Ancient valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSpriteIdWhenAvailable

        public int getSpriteIdWhenAvailable()
      • getSpriteIdWhenUnavailable

        public int getSpriteIdWhenUnavailable()
      • activate

        public boolean activate​(java.lang.String action)
        Activates the desired spell using the specified action.
        Parameters:
        action - the menu action to interact with
        Returns:
        True if the interaction was successful.
        See Also:
        Magic.activate(String)
      • deactivate

        public boolean deactivate()
        Returns:
        True if the interaction to deactivate the spell was successfully.
        See Also:
        Magic.deactivate()
      • isAutocasting

        public boolean isAutocasting()
        Specified by:
        isAutocasting in interface Spell