Thanks for a very reasonable explanation. I'm just glad I was able to pass the test after adding some additional DA - was just curious about the math/logic behind it. thanks again!
edit: hi, me again...
so far be it from me to tell you what to change/tweak as I have no problem doing this piece manually, but the numerical differences are so great that either I just have a crappy set of gear and cant get my HP to what it should be, or maybe it's worth looking at.
This is my challenge with the Gauntlet outfit that the script creates:
Maximum HP
Current: 8,636
Needed: 49294 * 0.29 (660 DA) = 14,177
This is my challenge after I change 3 pieces of gear (sponge helmet instead of nurse's hat, square sponge pants instead of sugar shorts, and stainless steel suspenders instead of blackberry combat boots):
Maximum HP
Current: 8,092
Needed: 49294 * 0.16 (890 DA) = 7,720
so my current HP drops by 544 but my DA multiplier changes enough to almost HALVE the HP needed to pass this test.
Again, it's your script and I'm not complaining... but given the vast difference in numbers I thought maybe you'd want to examine the algorithm to see if you want to tweak it to consider checking DA to apply balance between HP and DA in the calculations.
edit #2: i thought maybe if i manually changed my gauntlet outfit it would stick and i wouldn't have to manually do this challenge anymore, but the gauntlet outfit seems to revert. I thought (incorrectly obviously) that once an outfit was defined it would persist. Anyway I just wanted you to know I was looking for other ways of resolving this for myself so that I could suggest it for others assuming you don't want to change the algorithm.