~if we're not activated, just get out now
doneif (field[abilActive].value = 0)
var armorbonus as number
var attrbonus as number
var ragebonus as number
var ragetotal as number
if (tagis[Custom.ExpMutagen] <> 0) then
armorbonus = 1
attrbonus = 2
ragebonus = 1
else
armorbonus = 2
attrbonus = 4
ragebonus = 2
endif
armorbonus += hero.tagcount[Hero.MutExArmor]
ragetotal = attrbonus + ragebonus
~apply a +2 natural armor bonus
hero.child[ArmorClass].field[tACNatural].value += armorbonus
~if the user hasn't selected an attribute, there's nothing more we can do
doneif (field[usrChosen1].ischosen = 0)
~set our focus to the chosen attribute. This saves typing later
perform field[usrChosen1].chosen.setfocus
~the chosen attribute gets a +4 alchemical bonus
#applybonus[BonAlch, focus, attrbonus]
~now, we look up the attribute that was chosen, and get its Id
~we compare that Id to each of the three physical attributes in turn
~and once we figure out which one it is, apply a penalty to the ~corresponding mental attribute
~+STR, -INT
if (focus.tagis[thingid.aSTR] <> 0) then
~Modification for Vest of Stable Mutation: If you're wearing the vest, you don't suffer penalties to mental attributes for mutagens.
if (hero.tagis[Hero.NoMutPen] = 0) then
#applypenalty[BonAlch, hero.child[aINT], -2]
endif
~ If we have Sturdy Rage, then our natural armor bonus is 2 higher.
if (hero.tagis[Custom.SturdyRage] <> 0) then
hero.child[ArmorClass].field[tACNatural].value += ragebonus
endif
~ If we have Rage Mutagen, then our strength bonus is 2 higher.
if (hero.tagis[Custom.MutageRage] <> 0) then
#applybonus[BonAlch, focus, ragetotal]
endif
~ If we have Lumbering Rage, then we gain a +2 morale bonus to constitution.
if (hero.tagis[Custom.LumberRage] <> 0) then
#applybonus[BonMorale, hero.child[aCON], ragebonus]
endif
~+DEX, -WIS
elseif (focus.tagis[thingid.aDEX] <> 0) then
~Modification for Vest of Stable Mutation: If you're wearing the vest, you don't suffer penalties to mental attributes for mutagens.
if (hero.tagis[Hero.NoMutPen] = 0) then
#applypenalty[BonAlch, hero.child[aWIS], -2]
endif
~+CON, -CHA
elseif (focus.tagis[thingid.aCON] <> 0) then
~Modification for Vest of Stable Mutation: If you're wearing the vest, you don't suffer penalties to mental attributes for mutagens.
if (hero.tagis[Hero.NoMutPen] = 0) then
#applypenalty[BonAlch, hero.child[aCHA], -2]
endif
~+INT, -STR
elseif (focus.tagis[thingid.aINT] <> 0) then
#applypenalty[BonAlch, hero.child[aSTR], -2]
~+WIS, -DEX
elseif (focus.tagis[thingid.aWIS] <> 0) then
#applypenalty[BonAlch, hero.child[aDEX], -2]
~+CHA, -CON
elseif (focus.tagis[thingid.aCHA] <> 0) then
#applypenalty[BonAlch, hero.child[aCON], -2]
endif