Class ArmourStatsComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.DefensiveItemsComponents.ArmourStatsComponent

public class ArmourStatsComponent extends Component
  • Field Details

    • phyResistance

      protected double phyResistance
    • durability

      protected double durability
    • vitality

      protected double vitality
    • dmgReturn

      protected double dmgReturn
    • weight

      protected double weight
    • materials

      protected HashMap<Materials,Integer> materials
  • Constructor Details

    • ArmourStatsComponent

      public ArmourStatsComponent(double phyResistance, double durability, double vitality, double dmgReturn, double weight, HashMap<Materials,Integer> materials)
      Parameters:
      phyResistance - Used to factor with damage reduction (to replace Vitality)
      durability - deteremines how long the item will last (SCHEDULED TO BE REMOVED)
      vitality - Determines how much extra HP the item gives the player
      dmgReturn - Determines the percentage of damage taken returns to enemy
      weight - Determines the speed at which the player moves when using the item
      materials - Determines what materials each armour is made of
  • Method Details

    • setArmourStats

      public void setArmourStats(double phyResistance, double durability, double vitality, double dmgReturn, double weight, HashMap<Materials,Integer> materials)
      Sets the attributes of the armour to desired stats
    • getPhyResistance

      public double getPhyResistance()
      Returns:
      the physResistance
    • setPhyResistance

      public void setPhyResistance(double phyResistance)
      Parameters:
      phyResistance - sets the physResistance to desited value
    • getDurability

      public double getDurability()
      Returns:
      the durability parameter
    • setDurability

      public void setDurability(double durability)
    • getVitality

      public double getVitality()
      Returns:
      the Vitality parameter
    • setVitality

      public void setVitality(double vitality)
    • getDmgReturn

      public double getDmgReturn()
    • setDmgReturn

      public void setDmgReturn(double dmgReturn)
      Parameters:
      dmgReturn - is set to the desired value
    • getWeight

      public double getWeight()
      Returns:
      gets the value of weight
    • setWeight

      public void setWeight(double weight)
      Parameters:
      weight - sets weight to the desired value
    • getMaterials

      public HashMap<Materials,Integer> getMaterials()
      Returns:
      gets the materials required to make the item
    • setMaterials

      public void setMaterials(HashMap<Materials,Integer> materials)
      Parameters:
      materials - sets materials to make the item
    • equals

      public boolean equals(ArmourStatsComponent other)
      Checks if two ArmourStatsComponents have the same stat.
      Parameters:
      other - ArmourStatSComponent
      Returns:
      true if the stats are the same, false otherwise