Class ArcherPlayer
java.lang.Object
model.entity.Entity
model.entity.Player
model.entity.ArcherPlayer
Archer — the highest-attack character, but with relatively low HP and defense.
Special trait: can move through trees (TREE) but cannot cross rivers.
Skill: Strike — attack that fully bypasses defense.
-
Field Summary
Fields inherited from class model.entity.Player
col, inventory, isDefending, maxInventorySize, playerNumber, row, selectedItemIndex, skillFields inherited from class model.entity.Entity
attackPower, baseAttackPower, baseDefense, currentHp, defense, maxHp, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCalculates the Archer's attack value using attackPower directly.booleanArcher can move through TREE cells but cannot cross ROCK or RIVER cells.Returns a short description of the Archer for the UI.Methods inherited from class model.entity.Player
getCol, getInventory, getMaxInventorySize, getPlayerNumber, getRow, getSelectedItemIndex, getSkill, isDefending, isInventoryFull, isValidMove, move, pickUpItem, setDefending, setPlayerNumber, setSelectedItemIndex, takeDamage, useFirstItemMethods inherited from class model.entity.Entity
getAttackPower, getCurrentHp, getDefense, getMaxHp, getName, heal, isAlive, resetAttackPower, resetDefense, setAttackPower, setBaseAttackPower, setBaseDefense, setCurrentHp, setDefense, setMaxHp
-
Constructor Details
-
ArcherPlayer
public ArcherPlayer()Creates an Archer with default stats. HP 85, ATK 24, DEF 3, Skill: Strike (PIERCE).
-
-
Method Details
-
calculateAttack
public int calculateAttack()Calculates the Archer's attack value using attackPower directly.- Specified by:
calculateAttackin classEntity- Returns:
- Attack value
-
getDescription
Returns a short description of the Archer for the UI.- Specified by:
getDescriptionin classEntity- Returns:
- Description text
-
canMoveTo
-