Class Forneymon

  • All Implemented Interfaces:
    MinForneymon
    Direct Known Subclasses:
    Burnymon, Dampymon, Leafymon, Zappymon

    public abstract class Forneymon
    extends java.lang.Object
    implements MinForneymon
    Pseudo-mystical pets locked in combat for the amusement of our viewers! Get your Forneymonagerie ready today!
    • Constructor Summary

      Constructors 
      Constructor Description
      Forneymon​(int health, DamageType dt, int level)
      Constructs a new Forneymon with the given starting health, level, and dealt damage type
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Forneymon clone()
      Creates a copy of this Forneymon
      boolean equals​(java.lang.Object other)
      Compares two Forneymon for equivalence based on their type and level
      DamageType getDamageType()  
      int getHealth()  
      int getLevel()  
      java.lang.String getSpecies()
      Returns a String representation of this Forneymon's type, e.g., "Burnymon" or "Dampymon"
      int hashCode()  
      int takeDamage​(int dmg, DamageType type)
      Reduces the Forneymon's health by the amount specified, with the potential for bonuses / penalties based on the damage type
      java.lang.String toString()
      Returns a convenient String representation of the Forneymon of the format: FMType [Level] CurrentHealth HP
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Forneymon

        public Forneymon​(int health,
                         DamageType dt,
                         int level)
        Constructs a new Forneymon with the given starting health, level, and dealt damage type
        Parameters:
        health - Starting health
        dt - Damage type dealt when attacking
        level - Starting level
    • Method Detail

      • takeDamage

        public int takeDamage​(int dmg,
                              DamageType type)
        Reduces the Forneymon's health by the amount specified, with the potential for bonuses / penalties based on the damage type
        Specified by:
        takeDamage in interface MinForneymon
        Parameters:
        dmg - Amount of damage taken
        type - Damage Type of the damage taken
        Returns:
        This Forneymon's health remaining
      • getSpecies

        public java.lang.String getSpecies()
        Returns a String representation of this Forneymon's type, e.g., "Burnymon" or "Dampymon"
        Specified by:
        getSpecies in interface MinForneymon
        Returns:
        This Forneymon's species
      • getHealth

        public int getHealth()
        Specified by:
        getHealth in interface MinForneymon
        Returns:
        Returns this Forneymon's remaining health
      • getLevel

        public int getLevel()
        Specified by:
        getLevel in interface MinForneymon
        Returns:
        Returns this Forneymon's current level
      • getDamageType

        public DamageType getDamageType()
        Specified by:
        getDamageType in interface MinForneymon
        Returns:
        Returns the damage type that this Forneymon deals in combat
      • clone

        public abstract Forneymon clone()
        Creates a copy of this Forneymon
        Returns:
        A copy of the calling Forneymon
      • toString

        public java.lang.String toString()
        Returns a convenient String representation of the Forneymon of the format: FMType [Level] CurrentHealth HP
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representing this Forneymon's type, level, and health
      • equals

        public boolean equals​(java.lang.Object other)
        Compares two Forneymon for equivalence based on their type and level
        Overrides:
        equals in class java.lang.Object
        Returns:
        Whether two Forneymon are the same type and level
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object