• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Increasing attribute just for spellcasting

frumple

Well-known member
Could use some ideas on this one.

I have an ability that adds to a character's attribute for the purposes of spellcasting only.

In other words, for a cleric it would add to the Wisdom attribute for the purposes of determining spells allowed, bonus spells, spell DCs etc.

Ideas on how to implement?
 
Currently my only thought would be to adjust the "values" on the Class Only. IN example on the cHelpClr Thing is a field called "cSplAttBon" where you maybe able to increase to have it affect stuff.

Worse case you have to give "bonus" spells by affecting the cCastTot matrix. Maybe you get really lucky and by affecting cSplAttBon it affects everything about the class. :)

I have not tested any of the above ideas. But that is how I would approach the issue.
 
Figured it out (I think).

Here is the code. abValue is the amount of increase

Code:
Timing: Post-attributes/500

perform hero.child[cHelpClr].setfocus

focus.field[cSplAttVal].value += field[abValue].value

var atrBon as number
atrBon = focus.field[cSplAttVal].value - 10
if (atrBon >= 0) then
  focus.field[cSplAttBon].value = round(atrBon/2,0,-1)
else
  focus.field[cSplAttBon].value = round(atrBon/2,0,1)
endif

if (focus.field[cSplAttBon].value > 0) then
  focus.field[cSplMaxAtt].value += field[abValue].value
endif

~ set bonus spells
var cnt as number
cnt = 1
while (cnt <= focus.field[cMaxSpLev].value)
  var bon as number
  bon = focus.field[cSplAttBon].value - cnt - 1
  bon = round(bon/4,0,1)
  bon = maximum(bon,0)
  focus.field[cMemMax].arrayvalue[cnt] += bon
  cnt += 1
loop
 
Back
Top