add handle_under_attack, reduce duplicated code