Avoid multiple enumerations of armaments in AttackBase.

- Avoid enumerating the collection more than once in a method as it is not trivial.
Merge pull request #5541 from RoosterDragon/enumerate-armaments-once

Avoid repeated work in AttackBase.