Package main.forneymon.species
Class Forneymon
- java.lang.Object
-
- main.forneymon.species.Forneymon
-
- All Implemented Interfaces:
MinForneymon
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 Forneymonclone()Creates a copy of this Forneymonbooleanequals(java.lang.Object other)Compares two Forneymon for equivalence based on their type and levelDamageTypegetDamageType()intgetHealth()intgetLevel()java.lang.StringgetSpecies()Returns a String representation of this Forneymon's type, e.g., "Burnymon" or "Dampymon"inthashCode()inttakeDamage(int dmg, DamageType type)Reduces the Forneymon's health by the amount specified, with the potential for bonuses / penalties based on the damage typejava.lang.StringtoString()Returns a convenient String representation of the Forneymon of the format: FMType [Level] CurrentHealth HP
-
-
-
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 healthdt- Damage type dealt when attackinglevel- 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:
takeDamagein interfaceMinForneymon- Parameters:
dmg- Amount of damage takentype- 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:
getSpeciesin interfaceMinForneymon- Returns:
- This Forneymon's species
-
getHealth
public int getHealth()
- Specified by:
getHealthin interfaceMinForneymon- Returns:
- Returns this Forneymon's remaining health
-
getLevel
public int getLevel()
- Specified by:
getLevelin interfaceMinForneymon- Returns:
- Returns this Forneymon's current level
-
getDamageType
public DamageType getDamageType()
- Specified by:
getDamageTypein interfaceMinForneymon- 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:
toStringin classjava.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:
equalsin classjava.lang.Object- Returns:
- Whether two Forneymon are the same type and level
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-