public void attack(Entity e) { //Checking if e is in the attack range if (!isInAttackRange(e)) return; e.takeDamage (this.makeDamageForEntity (e)); }
public void dealDamage(Entity entity, int damage) { entity.takeDamage(damage); }
public void attack(Entity entity) { entity.takeDamage (strength); }
private void damageIfEnemy(Entity other) { if (other != null && other.getIsPlayer() != GameManager.gameManager.getPlayerTurn()) { other.takeDamage(); } }