Weapon type validation on an advanced profile needs to consider every model type in the profile
dixhuit opened this issue · 0 comments
dixhuit commented
Steps to recreate:
- Go to Crunch page.
- Select "Ranged" as the attack type.
- Select the demo profile "Boys led by Medic" as the attacker.
- Edit the profile once selected.
- Go to the Medic model type and clone one of his weapons (they're all melee weapons).
- Validation error message appears "At least 1 ranged weapon is required for a ranged attack".
The validation error message shouldn't appear because this profile still has ranged weapons to make it a valid ranged attacker (the Boys unit has ranged weapons, even if the Medic doesn't).
Adjust validation logic to take this into account.