Senior Member
Join Date: Sep 2017
Posts: 600
|
The tags I put in my first comment should work to test if the hero has something in their hands. You’d need to add it into the rest of your stuff that adjusts the unarmed die size, but it should work.
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#11 |
Senior Member
Join Date: May 2016
Posts: 608
|
I think you have the right thought pattern going but you're both missing some communications.
You do need to check if you are equipped before you send the final die size you can do this by using this pattern for your code. If (hero.tagis[Hero.EquipMain] + hero.tagis[Hero.EquipOff] = 0) then ~ hero doesn't have an item in either hand ~ perform your normal calculation if (act_level >= 24) then ~ Medium folks get 1d12 at this level. Avg = 6.5 field[wDieCount].value = 1 field[wDieSize].value = 12 field[abValue].value += 6.5 elseif (act_level >= 18) then ~ Medium folks get 1d10 at this level. Avg = 5.5 field[wDieCount].value = 1 field[wDieSize].value = 10 field[abValue].value += 5.5 elseif (act_level >= 12) then ~ Medium folks get 1d8 at this level. Avg = 4.5 field[wDieCount].value = 1 field[wDieSize].value = 8 field[abValue].value += 4.5 elseif (act_level >= 6) then ~ Medium folks get 1d6 at this level. Avg = 3.5 field[wDieCount].value = 1 field[wDieSize].value = 6 field[abValue].value += 3.5 elseif (act_level >= 3) then ~ Medium folks get 1d4 at this level. Avg = 2.5 field[wDieCount].value = 1 field[wDieSize].value = 4 field[abValue].value += 2.5 else ~ Medium folks get 1d1 at this level. Avg = 1 field[wDieCount].value = 1 field[wDieSize].value = 1 field[abValue].value += 1 endif Else ~ perform same calculation with 1 dice less if (act_level >= 24) then ~ Medium folks get 1d10 at this level. Avg = 5.5 field[wDieCount].value = 1 field[wDieSize].value = 10 field[abValue].value += 5.5 elseif (act_level >= 18) then ~ Medium folks get 1d8 at this level. Avg = 4.5 field[wDieCount].value = 1 field[wDieSize].value = 8 field[abValue].value += 4.5 elseif (act_level >= 12) then ~ Medium folks get 1d6 at this level. Avg = 3.5 field[wDieCount].value = 1 field[wDieSize].value = 6 field[abValue].value += 3.5 elseif (act_level >= 6) then ~ Medium folks get 1d4 at this level. Avg = 2.5 field[wDieCount].value = 1 field[wDieSize].value = 4 field[abValue].value += 2.5 else ~ Medium folks get 1d1 at this level. Avg = 1 field[wDieCount].value = 1 field[wDieSize].value = 1 field[abValue].value += 1 endif endif |
#12 |
|
|