battle_calcs library: fix formatting and indenting