battle_calcs library: some tweaks to attack_rating() function