Hero Lab 4e

Herolab D&D 4e Development => Herolab 4e Development => Script Repository => Topic started by: Cryptoknight on May 21, 2014, 08:06:59 AM

Title: Script to assign a scaling bonus
Post by: Cryptoknight on May 21, 2014, 08:06:59 AM
This script will let a power adjust itself by a scaling bonus based on level


doneif (activated = 0)
~work out what our attack bonus should be
      var bonus as number
      if (hero.tagvalue[Level.?] < 11) then
        bonus = 2
      elseif (hero.tagvalue[Level.?] < 21) then
        bonus = 4
      else
        bonus = 6
        endif
perform hero.child[<put power's tag here>].setfocus
perform focus.field[pwAtkMod].modify[+,bonus,"level bonus"]