• 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

Class specialselecting a specific spell

frumple

Well-known member
I am coding a class special that the user can selected a single specific spells from the enchantment school, and that spell gains +1 to its DC. However, the spell selected can be a spell that the character does not have access to yet, i.e. is not on their spell list or in their spell book.

First of all I got the spell selection part down by using

component.BaseSpell & sSchool.Enchant

in Item Selection for the class special.

However it is at this point I get stuck. How do I get the DC bonus to the spell?

Here is the code I have so far (which doesn't work)

Code:
 ~ If we haven't chosen anything, get out now
      doneif (field[usrChosen1].ischosen = 0)

perform field[usrChosen1].chosen.setfocus
focus.field[sDC].value += 1

I am also planning on putting a doneif which checks if the spell is currently selected in the character.

I expect the code needs to be similar to the Improved Spell Difficulty feat from the Beginner Box. However, I cannot access the code to that feat since the editor is not available the Beginner Box data set. :)
 
Have a look at Earthtouched feat from giants revisited. I think that uses a similar type of script you may be looking for!
 
Got it working... here is the code

Code:
Final Phase/10000

~ If we haven't chosen anything, get out now
   doneif (field[usrChosen1].ischosen = 0)

~ If we don't know spell get out now
   doneif (field[usrChosen1].chosen.tagcount[KnowSpell.?] = 0)

var spl as string
spl = "thingid." & field[usrChosen1].chosen.idstring

foreach pick in hero from BaseSpell where spl
  eachpick.field[sDC].value += 1
nexteach
 
Back
Top