Package characters.heroes
Class Sorceress
java.lang.Object
characters.DungeonCharacter
characters.heroes.Hero
characters.heroes.Sorceress
- All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>
public class Sorceress extends Hero
Sorceress character.
-
Field Summary
Fields inherited from class characters.heroes.Hero
chanceToBlock, numTurns
Fields inherited from class characters.DungeonCharacter
attackSpeed, chanceToHit, damageMax, damageMin, hitPoints, name, randomInt
-
Constructor Summary
Constructors Constructor Description Sorceress()
Constructor. -
Method Summary
Modifier and Type Method Description void
attack(DungeonCharacter opponent)
Allows characters to attempt an attack on an opponent.void
battleChoices(DungeonCharacter opponent)
Provides the user with possible actions to perform during their turn.void
increaseHitPoints()
Special move.Methods inherited from class characters.heroes.Hero
numOfTurns, readName, 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
-
Sorceress
public Sorceress()Constructor.
-
-
Method Details
-
increaseHitPoints
public void increaseHitPoints()Special move. -
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.
-
battleChoices
Provides the user with possible actions to perform during their turn.- Specified by:
battleChoices
in classDungeonCharacter
- Parameters:
opponent
- The opponent to attack.
-