Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Need help with Code fix (http://forums.wolflair.com/showthread.php?t=65824)

Fenris447 May 5th, 2021 12:07 PM

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.

dungeonguru May 5th, 2021 04:24 PM

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


All times are GMT -8. The time now is 04:17 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.