|
|
Thread Tools | Display Modes |
Senior Member
Join Date: Jul 2010
Posts: 149
|
Oh my god, I did it. For reference, in case anyone else ever wants to add all spells of a particular subschool to a class at the lowest available level, here's one way of doing it.
POST-LEVELS/5000 Code:
var addspell as number var magspell as string var newlevel as number var newspell as string ~ Compile a list of all magus spells of the teleportation subschool. foreach thing in BaseSpell where "sClass.cHelpMag & sSubschool.Teleport" magspell = magspell & " " & eachthing.field[name].text nexteach ~ Check for lower level versions of any of those spells. foreach thing in BaseSpell where "!sClass.cHelpMag & sSubschool.Teleport" newspell = eachthing.field[name].text newlevel = eachthing.tagvalue[sLevel.?] foreach thing in BaseSpell where "sClass.cHelpMag & sSubschool.Teleport" if (compare(newspell, eachthing.field[name].text) = 0) then if (eachthing.tagvalue[sLevel.?] > newlevel) then ~ If any are found, get rid of the normal version. addspell = 1 perform eachthing.pulltags[ClsDenySp.?] endif endif nexteach ~ And add the lower level version. if (addspell <> 0) then perform eachthing.pulltags[ClsAllowSp.?] endif addspell = 0 nexteach ~ Cross-reference 0-level non-magus teleportation spells with the list. foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.0" newspell = eachthing.field[name].text ~ Add any spell not on the list to the list at this level. if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach ~ Repeat the process for each ascending spell level. foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.1" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.2" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.3" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.4" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.5" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach foreach thing in BaseSpell where "!sClass.cHelpMag & sClass.? & sSubschool.Teleport & sLevel.6" newspell = eachthing.field[name].text if (pos(magspell, newspell) < 0) then perform eachthing.pulltags[ClsAllowSp.?] magspell = magspell & " " & eachthing.field[name].text endif nexteach ~ Finally, apply all changes to the class spell list. perform linkage[varies].pushtags[ClsDenySp.?] perform linkage[varies].pushtags[ClsAllowSp.?] Last edited by Redcap's Corner; March 9th, 2015 at 11:58 AM. |
#11 |
Senior Member
Join Date: Jul 2010
Posts: 149
|
I'm still drawing a total blank on how to reduce the spell level by 1 on all the teleportation spells already on the magus list, though. Is it even possible? It can't be done the way metamagic is, because metamagic doesn't apply until the spell's a pick. I need to alter the spell level while it's still just a thing.
|
#12 |
|
|