View Single Post
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old April 23rd, 2021, 11:47 AM
I have tried the code you've proposed. However, it does not conduct the check and reduces the unarmed damage to literal STR modifier damage.

As the character gains levels, their unarmed damage goes up one damage die at specific levels.

Character Level Unarmed Strike Damage
1–2 1
3–5 1d4
6–11 1d6
12–17 1d8
18–20 1d10

When a character holds no weapon (or shield) in either hand, they go up one damage die.

When a weapon is held in either hand, the damage dice stays at whatever the characters level is. If the character has the Grappler feat, they are considered one character level higher when calculating unarmed damage dice. Also, if the character has Tavern Brawler, the character is considered one character level higher when calculating unarmed damage dice. With the tests you have given me, it reduces the die damage to STR modifier damage only. The following is my full code.





~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ If we're disabled, do nothing
doneif (tagis[Helper.Disable] <> 0)

~ first we have to establish our benchmark, based on our level
~ all comparisons are made assuming that the wielder is medium,
~ because
~ that is what wMain tags assume. Damage dice are then adjusted up

~ or down
~ appropriately based on size.

~ There are two feats that can increase the level upward.

var act_level as number

act_level = field[xAllLev].value

~ Checking for Grappler or Tavern Brawler feats
if (#hasfeat[fGrappler] <> 0) then
act_level += 1
endif

if (#hasfeat[ft5CTaverB] <> 0) then
act_level += 1
endif


if (tagis[IsWeapon.wUnarmed] = 0) then
if (act_level >= 18) then
act_level += 6
elseif (act_level >= 11) then
act_level += 6
elseif (act_level >= 6) then
act_level += 6
elseif (act_level >= 3) then
act_level += 3
else
act_level += 2
endif
endif

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


var v_text as string

call wMainText

field[abText].text = v_text

Last edited by spannclann; April 23rd, 2021 at 12:30 PM. Reason: clarification
spannclann is offline   #3 Reply With Quote