View Single Post
mirtos
Senior Member
 
Join Date: Oct 2011
Posts: 865

Old July 7th, 2014, 03:55 PM
Im trying to create a "rage-like" ability that follows pathfinders basis of rounds/day vs the times/day, and base it on con modifier. thats the problem im having.

Code:
~ Available when not lawful - otherwise we don't meet requirements
      var result as number
      if (hero.tagis[Alignment.Lawful] <> 0) then
        result = assign[Helper.SpcDisable]
      	endif

      ~ If we're enraged, apply the stat modifiers for that
      var level as number
      level = field[xTotalLev].value
      

      var attrbonus as number
      var savebonus as number
      if (level >= 20) then
        attrbonus = 8
        savebonus = 4
      elseif (level >= 11) then
        attrbonus = 6
        savebonus = 3
      else
        attrbonus = 4
        savebonus = 2
        endif
      if (field[hIsOn1].value <> 0) then
        hero.child[aSTR].field[Bonus].value += attrbonus
        hero.child[aCON].field[Bonus].value += attrbonus
        hero.child[aDEX].field[Bonus].value += attrbonus
        #applybonus[BonMorale, hero.child[vWill], savebonus]
        endif

      ~ Set up our text fields
      field[CustDesc].text = "Focus your aggression, giving you +" & attrbonus & " Str, Dex +" & attrbonus & " Con, +" & savebonus & " to Will saves and -2 to Armor Class. Many skills and abilities cannot be used while the character is enraged.{br}{br}Rage lasts for 3 rounds + Con bonus."
      if (level < 17) then
        field[CustDesc].text = field[CustDesc].text & " At the end of the fury, the Viking becomes fatigued (-2 Str, -2 Dex, can't charge or run) for the rest of the encounter."
        endif
      field[xSumm].text = "+" & attrbonus & " Str, Dex, +" & attrbonus & " Con, +" & savebonus & " to Will saves, -2 to AC when enraged."

      ~ If we're exhausted, apply the stat modifiers for that (we don't get
      ~ exhausted after level 17)
      if (level < 17) then
        field[hName2].text = "Exhausted"
        if (field[hIsOn2].value <> 0) then
          hero.child[aSTR].field[Penalty].value = hero.child[aSTR].field[Penalty].value - 2
          hero.child[aDEX].field[Penalty].value = hero.child[aDEX].field[Penalty].value - 2
          endif
        endif

      ~ We can Fury based on our constitution + level rounds per day
      ~ times per day.
      var total as number
      total = 2 + (level * 2) + hero.child[aCON].field[Bonus].value
      
      field[hTotal].value += total
      field[livename].text = "Fury (" & total & "rounds/day)"
The section thats not working right:
Code:
      total = 2 + (level * 2) + hero.child[aCON].field[Bonus].value
Its ignoring the con bonus. Also, id like it to to be based on "real con bonus" vs "temporary con bonus".

Thoughts and help would be useful.

Thanks!
mirtos is offline   #1 Reply With Quote