dixhuit/unitcrunch-issue-tracker

Weapon type validation on an advanced profile needs to consider every model type in the profile

dixhuit opened this issue · 0 comments

Steps to recreate:

  1. Go to Crunch page.
  2. Select "Ranged" as the attack type.
  3. Select the demo profile "Boys led by Medic" as the attacker.
  4. Edit the profile once selected.
  5. Go to the Medic model type and clone one of his weapons (they're all melee weapons).
  6. 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.