Package wizardquest.entity
Interface PlayerInterface
- All Superinterfaces:
EntityInterface
- All Known Implementing Classes:
AbsolutePulseUnlockUpgrade,FireBallUnlockUpgrade,FireDamageResistanceUpgrade,PhysicalDamageResistanceUpgrade,Player,SlashUnlockUpgrade,ThunderDamageResistanceUpgrade,ThunderStormUnlockUpgrade,UpgradeBase,WaterDamageResistanceUpgrade,WaterJetUnlockUpgrade
-
Method Summary
Modifier and TypeMethodDescriptionvoidgainCoins(int amount) Increases a player's coin total by a given amount.voidgainMagic(int amount) Increases a player's magic points by a given amount.intgetCoins()Gets the amount of coins a player currently has.intgetLives()Gets the remaining lives that a player has in a session.intgetMagic()Gets the amount of magic points a player currently has.intGets the rate at which a player's magic points regenerates between each stage.intGets the maximum amount of magic points a player can have.List the upgrades that have been purchased between encounters by the player.voidloseCoins(int amount) Decrements a player's coin total by a given amount.voidloseLives(int amount) Decrements a player's remaining lives by a given amount.voidloseMagic(int amount) Decrements a player's magic total by a given amount.voidResets the player's magic to 0.Methods inherited from interface wizardquest.entity.EntityInterface
calcDamage, getAbilities, getHealth, getMaxHealth, getType, loseHealth, resetHealth
-
Method Details
-
getCoins
int getCoins()Gets the amount of coins a player currently has.- Returns:
- the player's current coin total.
-
loseCoins
Decrements a player's coin total by a given amount.- Parameters:
amount- the total coins that the player will lose.- Throws:
IllegalArgumentException- if amount is not a non-negative number.
-
gainCoins
Increases a player's coin total by a given amount.- Parameters:
amount- the total coins that the player will gain.- Throws:
IllegalArgumentException- if amount is not a non-negative number.
-
getMagic
int getMagic()Gets the amount of magic points a player currently has.- Returns:
- the player's current magic total.
-
getMaxMagic
int getMaxMagic()Gets the maximum amount of magic points a player can have.- Returns:
- the player's maximum magic total.
-
getMagicRegenRate
int getMagicRegenRate()Gets the rate at which a player's magic points regenerates between each stage.- Returns:
- the player's magic regeneration rate per stage.
-
gainMagic
Increases a player's magic points by a given amount.- Parameters:
amount- the total magic points that the player will gain.- Throws:
IllegalArgumentException- if amount is not a non-negative number.
-
loseMagic
Decrements a player's magic total by a given amount.- Parameters:
amount- the total magic points that the player will lose.- Throws:
IllegalArgumentException- if amount is not a non-negative number.
-
resetMagic
void resetMagic()Resets the player's magic to 0. -
getLives
int getLives()Gets the remaining lives that a player has in a session.- Returns:
- the player's total remaining lives.
-
loseLives
Decrements a player's remaining lives by a given amount.- Parameters:
amount- the total lives that the player will lose.- Throws:
IllegalArgumentException- if amount is not a non-negative number.
-
getUpgrades
List<UpgradeEnum> getUpgrades()List the upgrades that have been purchased between encounters by the player.- Returns:
- a list of purchased upgrades.
-