~ 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
~!!! You were looking for the field xAllLev on this ability, not the hero. Doing
~!!! herofield[xAllLev].value may work, but this macro should work, too.
act_level = #totallevelcount[]
~!!! I added this debug code; you can see its output from Develop > Floating Info Windows > Show debug output
~!!! It'll tell you what act_level is at this stage in the script. If you add it again later, you can
~!!! see whether it's calculating correctly. You can do this with any field, variable, etc.
debug "Current act_level: " & act_level
~ 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
~!!! Changed your test because it was looking to see if this ability has the tag "IsWeapon.wUnarmed"
~!!! Now instead we're looking to see if the hero has the tags for equipping stuff in their main and offhand
if (hero.tagis[Hero.EquipMain] = 0) then
if (hero.tagis[Hero.EquipOff] = 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
endif
~!!! added hero.childfound[wUnarmed] to the beginning of these, to tell HL to go to the
~!!! wUnarmed thing (Unarmed Strikes) and modify it's weapon dice #'s
~!!! Another thing you may want to think about doing is telling it to be the maximum of
~!!! whatever damage dice is present, otherwise you're overriding a possibly higher dice,
~!!! like if they're a Monk. You'd do this:hero.childfound[wUnarmed].field[wDieSize].value =
~!!! maximum(hero.childfound[wUnarmed].field[wDieSize].value,12)
if (act_level >= 24) then
~ Medium folks get 1d12 at this level. Avg = 6.5
hero.childfound[wUnarmed].field[wDieCount].value = 1
hero.childfound[wUnarmed].field[wDieSize].value = 12
field[abValue].value += 6.5
elseif (act_level >= 18) then
~ Medium folks get 1d10 at this level. Avg = 5.5
hero.childfound[wUnarmed].field[wDieCount].value = 1
hero.childfound[wUnarmed].field[wDieSize].value = 10
field[abValue].value += 5.5
elseif (act_level >= 12) then
~ Medium folks get 1d8 at this level. Avg = 4.5
hero.childfound[wUnarmed].field[wDieCount].value = 1
hero.childfound[wUnarmed].field[wDieSize].value = 8
field[abValue].value += 4.5
elseif (act_level >= 6) then
~ Medium folks get 1d6 at this level. Avg = 3.5
hero.childfound[wUnarmed].field[wDieCount].value = 1
hero.childfound[wUnarmed].field[wDieSize].value = 6
field[abValue].value += 3.5
elseif (act_level >= 3) then
~ Medium folks get 1d4 at this level. Avg = 2.5
hero.childfound[wUnarmed].field[wDieCount].value = 1
hero.childfound[wUnarmed].field[wDieSize].value = 4
field[abValue].value += 2.5
else
~!!! I removed the part where you're telling it to be 1d1, since that's already the default
~!!! Again, you might accidentally override a higher die that someone has from another source
field[abValue].value += 1
endif
~!!! I have no idea what this is, but it's likely unrelated to your problem
var v_text as string
call wMainText
field[abText].text = v_text