View Single Post
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 201

Old July 12th, 2020, 01:32 PM
Iím working on several archetypes that use an alternate magic system (Super Genius Gamesí House Rule Handbook: Spell Point Compilation), which is a spell point system. The aspect of this system that Iím having trouble with is this: ďA bard gains bonus spell points equal to her Charisma bonus (to a maximum of the highest level spell she knows).Ē

To that effect, I put together this eval script:
<Post-attributes 10000>
Code:
if (hero.childfound[aCHA].field[aFinalVal].value >= 22) then
   if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 16) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 4
      hero.childfound[cReseSPBrd].field[abValue].value += 3
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 13) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3 
      hero.childfound[cReseSPBrd].field[abValue].value += 3
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 20) then
   if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 13) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3 
      hero.childfound[cReseSPBrd].field[abValue].value += 3
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 18) then
   if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 10) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 3 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 16) then
   if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 7) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 2
   elseif (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 14) then
   if (hero.childfound[cHelpBrd].field[cTotalLev].value >= 4) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 2 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   else
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif

elseif (hero.childfound[aCHA].field[aFinalVal].value >= 12) then
      hero.childfound[cOpenSPBrd].field[abValue].value += 1 
      hero.childfound[cReseSPBrd].field[abValue].value += 1
   endif
First, thereís probably a more elegant way of scripting this, but at least I know that abValue is calculating correctly. The trouble is that abValue isnít adding to the bardís spell point pools. I attempted every phase from First to Render, but the spell points arenít changing. Hero Lab gurus, what am I missing?

Projects: Legendary Rogue (Legendary Games) 95.4%, Assassin (Interjection Games) 81.5%, Eldritch Godling (Super Genius Games) 51.9%, Mighty Godling (Super Genius Games) 37.3%, Clever Godling (Super Genius Games) 32%, Adept Godling (Super Genius Games) 27.8%, Legendary Cavalier (Legendary Games) 19.2%, Fortunate (rebuild of Luckbringer, Rite Publishing) 15.6%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #1 Reply With Quote