Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var v_strbonus as number
var v_dexbonus as number
var v_conbonus as number
var v_intbonus as number
var v_wisbonus as number
var v_chabonus as number
~all lycanthropes have WIS + 2 and CHA - 2, so modify the animal stats
~that have been set to incorpoorate these
v_wisbonus += 2
v_chabonus -= 2
~ Get what form we're in from our bootstrapped charge
var isanimal as number
var ishybrid as number
if (hero.tagis[Hero.LyHybrid] <> 0) then
isanimal = 1
elseif (hero.tagis[Hero.LyAnimal] <> 0) then
ishybrid = 1
endif
~ In either form:
if (isanimal + ishybrid <> 0) then
~ Apply ability bonuses
~each bonus is the difference between our modified value and the current value,
~not allowing this to go negative (since we get the better of the two values)
~str and con get an additional +2 after this is figured
v_strbonus = maximum(v_strbonus + 10 - hero.child[aSTR].field[aUser].value, 0) + 2
v_dexbonus = maximum(v_dexbonus + 10 - hero.child[aDEX].field[aUser].value, 0)
v_conbonus = maximum(v_conbonus + 10 - hero.child[aCON].field[aUser].value, 0) + 2
v_intbonus = maximum(v_intbonus + 10 - hero.child[aINT].field[aUser].value, 0)
v_wisbonus = maximum(v_wisbonus + 10 - hero.child[aWIS].field[aUser].value, 0)
v_chabonus = maximum(v_chabonus + 10 - hero.child[aCHA].field[aUser].value, 0)
~add the calculated bonuses
hero.child[aSTR].field[aPostMod].value += v_strbonus
hero.child[aDEX].field[aPostMod].value += v_dexbonus
hero.child[aCON].field[aPostMod].value += v_conbonus
hero.child[aINT].field[aPostMod].value += v_intbonus
hero.child[aWIS].field[aPostMod].value += v_wisbonus
hero.child[aCHA].field[aPostMod].value += v_chabonus
~ We don't get extra hit points from our increased constitution, so
~ decrease our hit points appropriately
~var bonushp as number
~bonushp = v_conbonus / 2
~bonushp = round(bonushp, 0, -1) * (hero.tagcount[Hero.HitDice] - field[tmHitDice].value)
~herofield[tHP].value -= bonushp
endif
var v_animsize as number
var v_animnat as number
var v_animspd as number
~ Get what form we're in from our bootstrapped charge
var isanimal as number
var ishybrid as number
if (hero.tagis[Hero.LyHybrid] <> 0) then
ishybrid = 1
elseif (hero.tagis[Hero.LyAnimal] <> 0) then
isanimal = 1
endif
~ In either form:
if (isanimal + ishybrid <> 0) then
~ We get DR5/silver (10/silver if a natural lycanthrope)
var dr as number
if (tagis[TemplHelp.Inherited] <> 0) then
dr = 10
else
dr = 5
endif
#applydr[xDamRdSil,dr]
endif
~ In hybrid form:
if (ishybrid <> 0) then
~ If our natural armor bonus is better than the current, use it
hero.child[mNatural].field[arAC].value = maximum(hero.child[mNatural].field[arAC].value, v_animnat + 2)
~ Our size changes to that of the animal, if it's larger
if (herofield[tSize].value < v_animsize) then
herofield[tSize].value = v_animsize
endif
~ In animal form:
elseif (isanimal <> 0) then
~ Use our animal' natural AC bonus
hero.child[mNatural].field[arAC].value = v_animnat + 2
~ Use our animal's speed
hero.child[Speed].field[tSpeed].value = v_animspd
~ Our size changes to that of the animal
herofield[tSize].value = v_animsize
~animals don't have hands
herofield[tNumHands].value = 0
endif
~ Set up our changing statistics
var v_strbonus as number
var v_dexbonus as number
var v_conbonus as number
var v_intbonus as number
var v_wisbonus as number
var v_chabonus as number
if (#totallevelcount[] > 18) then
~ Ability bonuses
v_strbonus = 0
v_dexbonus = 6
v_conbonus = 0
v_intbonus = 0
v_wisbonus = 4
v_chabonus = 0
elseif (#totallevelcount[] > 12) then
~ Ability bonuses
v_strbonus = 0
v_dexbonus = 4
v_conbonus = 0
v_intbonus = 0
v_wisbonus = 4
v_chabonus = 0
elseif (#totallevelcount[] > 8) then
~ Ability bonuses
v_strbonus = 0
v_dexbonus = 4
v_conbonus = 0
v_intbonus = 0
v_wisbonus = 2
v_chabonus = 0
elseif (#totallevelcount[] > 4) then
~ Ability bonuses
v_strbonus = 0
v_dexbonus = 4
v_conbonus = 0
v_intbonus = 0
v_wisbonus = 2
v_chabonus = 0
else
~ Ability bonuses
v_strbonus = 0
v_dexbonus = 0
v_conbonus = 0
v_intbonus = 0
v_wisbonus = 0
v_chabonus = 0
endif
~ Make all changes appropriately
call LycanAttr
Instead of calling the procedure, why don't you just use it's code as the basis for your own eval script which works differently, as you like?
If talking about LycanAttr this is a procedure which allows for code to be written once and used in many places.Have there been any changes to the base call code? And, what file is it contained in. I would like to create my own version of a call code.
Ahh good to know. I honestly never did a procedure in the editor so I always just reload. Plus procedures are usually allot more code then a normal script and my old eyes can't take the small font same color editor text box for too long....If you do a "Test Now" on a procedure it tells you it's going to reload the system.
Found that out when doing the caster procedures.