Refactoring attack outcome calculations