Klasse Player

java.lang.Object
com.botwAdventureOnline.Character
com.botwAdventureOnline.Player
Alle implementierten Schnittstellen:
Serializable

public class Player extends Character
Siehe auch:
  • Konstruktordetails

    • Player

      public Player(String pName, int pHp, int pAd, int pDp, int pXCoordinate, int pYCoordinate)
      Parameter:
      pName - The name of the player
      pHp - The maximal health of the player at the start of the game
      pAd - The player's attack damage at the start of the game
      pDp - The player's defense points at the start of the game
  • Methodendetails

    • getXCoordinate

      public int getXCoordinate()
    • getYCoordinate

      public int getYCoordinate()
    • setXCoordinate

      public void setXCoordinate(int pxCoordinate)
    • setYCoordinate

      public void setYCoordinate(int pyCoordinate)
    • getLevel

      public int getLevel()
      Gibt zurück:
      Returns the player's level
    • getDp

      public int getDp()
      Gibt zurück:
      Returns the player's defense points
    • getMaxHp

      public int getMaxHp()
      Gibt zurück:
      Returns the maximal health of the player
    • getEp

      public int getEp()
      Gibt zurück:
      Returns the player's experience points
    • setEp

      public void setEp(int ep)
      Updates the player's experience points
      Parameter:
      ep - The new player's experience points
    • die

      public void die()
      Runs if the player is dead because he has no more health points
      Setzt außer Kraft:
      die in Klasse Character
    • rest

      public void rest()
      Sets the player's level health points to his maximum health
    • nextLevel

      public boolean nextLevel()
      Gibt zurück:
      Returns if the player has enough experience points to level up
    • levelUp

      public void levelUp()
      Levels up the player and increases the player's stats
    • getInventory

      public Inventory getInventory()
      Gibt zurück:
      Returns the player's inventory
    • getStartAd

      public int getStartAd()
      Gibt zurück:
      Returns the player's start attack damage