BSData / wh40k-10e

Warhammer 40,000: 10th Edition
112 stars 91 forks source link

Company Heroes Says there are Too many selections when variable amount of captains are added #941

Closed lukeisalright closed 11 months ago

lukeisalright commented 11 months ago

Describe the bug Gives issues saying maximum 0 company heroes allowed when too many captains are added. this is not always the same amount, sometime 3 sometimes 4. The example below is 1 of many combinations that causes this issues

To Reproduce Steps to reproduce the behavior:

  1. Create Space Marine List
  2. Add "Company heroes" unit
  3. Add "Captain" unit
  4. Add "Captain in Gravis Armor"
  5. add "Captain in Phobos Armor"
  6. See error

Expected behavior Don't say maximum 0 company heroes allowed

Screenshots image

Device and data (please complete the following information):

Additional context Add any other context about the problem here.

Mad-Spy commented 11 months ago

@acebaur The Gravis Captain has his keywords applied twice, once on the Unit entry and one on the "Gravis Captain Loadout" SSEG. This causes him to count as 2 CAPTAINS.

I'm sure I fixed this when I did the Marines work a couple of weeks back, but given a bunch of other stuff seems to have not gotten committed, I guess this got lost as well.

Additionally, the Company Heroes max is looking for equal to 3 Captains to allow 3 Company Heroes, which means it resets back to 0 when you add 4 CAPTAINs.

I think I reconfigured it as below when I redid it, such that the Max in Roster covers the "rule of 3" and the repeat increment to "Max in Force" covers the keyword restriction.

image