protected boolean doDamage(final RPEntity entity){
  final int hp=entity.getHP();
  if (hp == 0) {
    return false;
  }
  if (entity.isGhost()) {
    return true;
  }
  int damage=(int)(hp * damageRatio);
  damage=Math.max(damage,minimumDamage);
  damage=Math.min(damage,hp);
  if (damage != 0) {
    entity.onDamaged(this,damage);
  }
  return true;
}

protected boolean doDamage ( final RPEntity entity ) { final int hp = entity . getHP ( ) ; if ( hp == 0 ) { return false ; } if ( entity . isGhost ( ) ) { return true ; } int damage = ( int ) ( hp * damageRatio ) ; damage = Math . max ( damage , minimumDamage ) ; damage = Math . min ( damage , hp ) ; if ( damage != 0 ) { entity . onDamaged ( this , damage ) ; } return true ; }
inflict damage on an entity .
