Fixed a compile warning on old gcc versions in battle_calc_damage

- Improves code readability
- Fixes bugreport:8312, thanks to Ancyker
  http://hercules.ws/board/tracker/issue-8312-warning-in-latest-hercules/

Signed-off-by: Haru <haru@dotalux.com>