News:

Welcome to the Herolab 4e user added support site.

Main Menu

Script to assign a scaling bonus

Started by Cryptoknight, May 21, 2014, 08:06:59 AM

Previous topic - Next topic

Cryptoknight

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"]