Skip to content

Commit

Permalink
added Override decorator, removed ununsed imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Sep 6, 2023
1 parent 962650a commit d5dd3d4
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.csse3200.game.components.player;

import com.csse3200.game.components.CombatStatsComponent;
import com.csse3200.game.components.Component;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.Melee;
import com.csse3200.game.entities.Weapon;
import org.slf4j.Logger;
Expand All @@ -26,29 +24,18 @@
*/
public class HumanCombatStatsComponent extends CombatStatsComponent {

private static final Logger logger = LoggerFactory.getLogger(HumanCombatStatsComponent.class);
private int health;
private int baseAttack;
private String state;
private ArrayList<Integer> drops;
private ArrayList<Melee> closeRangeAbilities;
private ArrayList<Weapon> longRangeAbilities; //TODO change String to Projectiles

public HumanCombatStatsComponent(int health, int baseAttack) {
super(health, baseAttack);
}

/**
* Decrease the health of the entity based on the damage provided.
* */
@Override
public void hit(Integer damage) {
int newHealth = getHealth() - damage;
setHealth(newHealth);
entity.getEvents().trigger("hitStart");

changeState();
}

//TODO: this will be changed to drop an item and load it to the screen

}

0 comments on commit d5dd3d4

Please sign in to comment.