private int damage(final int amount){
  int tempHp=getHP();
  final int taken=Math.min(amount,tempHp);
  tempHp-=taken;
  setHP(tempHp);
  return taken;
}

private int damage ( final int amount ) { int tempHp = getHP ( ) ; final int taken = Math . min ( amount , tempHp ) ; tempHp -= taken ; setHP ( tempHp ) ; return taken ; }
apply damage to this entity . this is normally called from one of the other damage ( ) methods to account for death .
