Simplify attack_formula().