Thread: Arcane Thesis
View Single Post
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 11:16 AM
So popping in the tag on the Metamagic feat and testing it out worked. As usual I put my timing in Final with a huge number.

First - Grab the metamagic feat chosen
Second - Grab customized spells
Third - Grab customized spell's level
Fourth - Grab the original spell's level
Fifth- Is our metamagic feat there? ->increment level reduction
sixth - overhead.

var Lvl as number
var LvlRed as number
var MMg as string
var nlvl as number
var BLvl as number

doneif (field[fChosen].ischosen = 0)

MMg = field[fChosen].chosen.field[mmAbbr].text

foreach pick in hero where "NeedHelper.CustomSpl"
~Grab current level of the customized spell
Lvl = eachpick.field[sLevel].value
LvlRed=0
~Need the level of the base spell; I anticipate that this foreach
~will only find one thing.

foreach pick in eachpick.gizmo from BaseSpell
BLvl=eachpick.field[sLevel].value
nexteach

~Look for the metamagic chosen within the gizmos
foreach pick in eachpick.gizmo from BaseMetamg
if (compare(eachpick.field[mmAbbr].text,MMg) = 0) then
LvlRed += 1
endif
nexteach

nlvl=maximum(Lvl-LvlRed,BLvl)
perform eachpick.delete[sLevel.?]

~Set the field.
eachpick.field[sLevel].value=nlvl

~Set the correct tag
if (eachpick.field[sLevel].value = 0) then
perform eachpick.assign[sLevel.0]
elseif (eachpick.field[sLevel].value = 1) then
perform eachpick.assign[sLevel.1]
elseif (eachpick.field[sLevel].value = 2) then
perform eachpick.assign[sLevel.2]
elseif (eachpick.field[sLevel].value = 3) then
perform eachpick.assign[sLevel.3]
elseif (eachpick.field[sLevel].value = 4) then
perform eachpick.assign[sLevel.4]
elseif (eachpick.field[sLevel].value = 5) then
perform eachpick.assign[sLevel.5]
elseif (eachpick.field[sLevel].value = 6) then
perform eachpick.assign[sLevel.6]
elseif (eachpick.field[sLevel].value = 7) then
perform eachpick.assign[sLevel.7]
elseif (eachpick.field[sLevel].value = 8) then
perform eachpick.assign[sLevel.8]
else
perform eachpick.assign[sLevel.9]
endif
nexteach
CptCoots is offline   #22 Reply With Quote