Package characters.monsters
Class Ogre
java.lang.Object
characters.DungeonCharacter
characters.monsters.Monster
characters.monsters.Ogre
- All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>
public class Ogre extends Monster
Ogre character.
-
Field Summary
Fields inherited from class characters.monsters.Monster
chanceToHeal, maxHeal, minHeal
Fields inherited from class characters.DungeonCharacter
attackSpeed, chanceToHit, damageMax, damageMin, hitPoints, name, randomInt
-
Constructor Summary
Constructors Constructor Description Ogre()
Constructor. -
Method Summary
Modifier and Type Method Description void
attack(DungeonCharacter opponent)
Allows characters to attempt an attack on an opponent.Methods inherited from class characters.monsters.Monster
battleChoices, heal, subtractHitPoints
Methods inherited from class characters.DungeonCharacter
addHitPoints, compareTo, getAttackSpeed, getHitPoints, getName, isAlive
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Ogre
public Ogre()Constructor.
-
-
Method Details
-
attack
Description copied from class:DungeonCharacter
Allows characters to attempt an attack on an opponent. First, chance to hit is considered. If a hit can occur, then the damage is calculated based on character's damage range. This damage is then applied to the opponent.- Overrides:
attack
in classDungeonCharacter
- Parameters:
opponent
- The opponent being attacked.
-