implemented battle calculator