Package me.simulation.players
Class Elf
java.lang.Object
me.simulation.players.Champion
me.simulation.players.Elf
- All Implemented Interfaces:
DefaultRequired
Represents an Elf player in the simulation.
Extends the Champion class.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class me.simulation.players.Champion
getHp, getLevel, getLuck, getMaxHp, getMove, getRange, getRegeneration, getShield, getStrength, getSword, getType, getX_index, getY_index, increaseLevel, newIndex, setHp, setLuck, setMaxHp, setMove, setRegeneration, setShield, setStrength, setSword, takeDMG
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.simulation.game.DefaultRequired
getLvl
-
Constructor Details
-
Elf
public Elf(String type, int level, int maxhp, int hp, int strength, int range, int luck, boolean move, boolean has_shield, boolean has_sword, int x_index, int y_index, boolean regeneration) Constructs an Elf object with the specified attributes.- Parameters:
type
- the type of the Elflevel
- the level of the Elfmaxhp
- the maximum hit points of the Elfhp
- the current hit points of the Elfstrength
- the strength of the Elfrange
- the attack range of the Elfluck
- the luck factor of the Elfmove
- indicates if the Elf can movehas_shield
- indicates if the Elf has a shieldhas_sword
- indicates if the Elf has a swordx_index
- the x index position of the Elfy_index
- the y index position of the Elfregeneration
- indicates if the Elf has regeneration ability
-
-
Method Details
-
kill
Simulates the act of killing an opponent.- Parameters:
Opponent
- the name of the opponent being killed- Returns:
- a string indicating that the Elf killed the opponent
-
pickUp
Simulates the act of picking up a kit.- Parameters:
Kit
- the name of the kit being picked up- Returns:
- a string indicating that the Elf picked up the kit
-