Class BaseFriendlyEntityConfig

java.lang.Object
com.csse3200.game.entities.configs.BaseEntityConfig
com.csse3200.game.entities.configs.BaseFriendlyEntityConfig
Direct Known Subclasses:
PlayerConfig

public class BaseFriendlyEntityConfig extends BaseEntityConfig
Defines a basic set of properties stored in entities config files to be loaded by Entity Factories.
  • Field Details

    • hintLevel

      public int hintLevel
    • currentHint

      public int currentHint
    • animalName

      protected String animalName
    • baseHint

      protected String[][] baseHint
    • spritePath

      protected String spritePath
    • soundPath

      protected String[] soundPath
  • Constructor Details

    • BaseFriendlyEntityConfig

      protected BaseFriendlyEntityConfig()
  • Method Details

    • getSpritePath

      public String getSpritePath()
      Returns the path to the sprite image for this entity.
      Overrides:
      getSpritePath in class BaseEntityConfig
      Returns:
      the sprite path as a String.
    • setSpritePath

      public void setSpritePath(String spritePath)
      Sets the sprite path for this entity.
      Parameters:
      spritePath - the path to the sprite image.
    • getAnimationSpeed

      public float getAnimationSpeed()
      Returns the animation speed for this entity.
      Overrides:
      getAnimationSpeed in class BaseEntityConfig
      Returns:
      the animation speed as a float.
    • getSoundPath

      public String[] getSoundPath()
      Returns the paths to the sound files associated with this entity.
      Overrides:
      getSoundPath in class BaseEntityConfig
      Returns:
      an array of String representing the sound paths.
    • setSoundPath

      public void setSoundPath(String[] soundPath)
      Sets the sound paths for this entity.
      Parameters:
      soundPath - an array of String representing the new sound paths.
    • getHealth

      public int getHealth()
      Returns the health value of this entity.
      Returns:
      the health value as an int.
    • getAnimalName

      public String getAnimalName()
      Returns the name of the animal for this entity.
      Returns:
      the animal name as a String.
    • getBaseAttack

      public int getBaseAttack()
      Returns the base attack value of this entity.
      Returns:
      the base attack value as an int.
    • getBaseHint

      public String[][] getBaseHint()
      Returns the base hint messages for this entity.
      Returns:
      an array of String containing the base hints.
    • getHints

      public Map<Integer,String[]> getHints()
    • setHints

      public void setHints(Map<Integer,String[]> newHints)
    • restartCurrentHint

      public void restartCurrentHint()
      Restarts the current hint by resetting the current hint and line indices.
    • setHealth

      public void setHealth(int health)
      Sets the health of the entity.
      Parameters:
      health - the new health value to set.
    • getHunger

      public int getHunger()
      Retrieves the current hunger level of the entity.
      Returns:
      the current hunger level.
    • setHunger

      public void setHunger(int hunger)
      Sets the hunger level of the entity.
      Parameters:
      hunger - the new hunger level to set.
    • setBaseAttack

      public void setBaseAttack(int baseAttack)
      Sets the base attack value for the entity.
      Parameters:
      baseAttack - the new base attack value to set.
    • getStrength

      public int getStrength()
      Retrieves the strength attribute of the entity.
      Returns:
      the current strength value.
    • setStrength

      public void setStrength(int strength)
      Sets the strength attribute of the entity.
      Parameters:
      strength - the new strength value to set.
    • getDefense

      public int getDefense()
      Retrieves the defense attribute of the entity.
      Returns:
      the current defense value.
    • setDefense

      public void setDefense(int defense)
      Sets the defense attribute of the entity.
      Parameters:
      defense - the new defense value to set.
    • getSpeed

      public int getSpeed()
      Retrieves the speed attribute of the entity.
      Returns:
      the current speed value.
    • setSpeed

      public void setSpeed(int speed)
      Sets the speed attribute of the entity.
      Parameters:
      speed - the new speed value to set.
    • getExperience

      public int getExperience()
      Retrieves the experience points of the entity.
      Returns:
      the current experience points.
    • setExperience

      public void setExperience(int experience)
      Sets the experience points for the entity.
      Parameters:
      experience - the new experience points to set.
    • getItemProbability

      public float getItemProbability()
      Retrieves the item drop probability of the entity.
      Returns:
      the probability of an item drop occurring.
    • setItemProbability

      public void setItemProbability(float newProbability)
      Sets the item drop probability of an entity.
      Parameters:
      newProbability - the new item probability
    • isBoss

      public Boolean isBoss()
      Determines if the entity is a boss.
      Returns:
      true if the entity is a boss, false otherwise.
    • setIsBoss

      public void setIsBoss(Boolean isBossStatus)
      Sets an entity to be identified as a boss.
    • getLevel

      public int getLevel()
      Retrieves the current level of the entity.
      Returns:
      the current level.
    • setLevel

      public void setLevel(int level)
      Sets the level of the entity.
      Parameters:
      level - the new level to set.