larrychristensen / orcpub

Code for OrcPub2.com
Eclipse Public License 2.0
129 stars 176 forks source link

Bug/Feature Request: Expanding Pool for Selections #76

Open quietshift opened 6 years ago

quietshift commented 6 years ago

Not sure if its a bug, a feature request, or if I did not set it up right. In XGtE and in PHB, there are a few subclasses that have a selection that the player gets more to choose from that pool as they level up. Examples are the Battle Master and Arcane Archer for fighters and the Monk's 4 Elements pool. Unless I am setting them up wrong, the selections make it so that the player is able to pick up the max value I set for the last time the select. For example, for the 4 Elements, the players pick from the pool at 3rd, 6th, 11th, and 17th level. I tried to set it up where at each level they pick one from the list but it just makes it so that the one they select for being lvl 3 would be the ones they chose for the other levels. I changed it to be 1 at 3rd, 2 at 6th, and so on and that still did nothing. The site pings the notification saying there needs to be something done but users are unable to make any selection though the section does show that the user needs to make selections in the appropriate areas.

snorrekim commented 4 years ago

A workaround is to add the expanding selections in reverse order and to add the total amounts.

Don't do this:

Selection Level Amount
Cantrips 2 3
Cantrips 5 1
Cantrips 7 1
Cantrips 10 1

Instead, add them like this. This will let you select the correct amount at each level:

Selection Level (reverse order) Amount (total on each level)
Cantrips 10 6
Cantrips 7 5
Cantrips 5 4
Cantrips 2 3

It will still show the wrong number in the "class/level" tab. Which is annoying. But it will let you select the correct amount at each level.

The bug seems to be that it only expects 1 row of each selection. And when given more it will mess up, only allow the use of the first that meets level requirements, but the number in the "class/level" tab stoll looks at all rows. And when you fill/pick, it goes haywire and depending on how many and what level you are it will decrease it by 1 or 2 or 3 etc.

Edit: after some testing: The number in the "class/level" tab goes haywire because it combines remove and add. So (using the second table above) if I add 5 cantrips at level 7 The number on top will be a red "3" (1 from the level 5 row because I have 1 too many cantrips, and 2 from the level 2 row, because I have 2 too many cantrips).