Thread: Question
View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old August 30th, 2018, 03:59 PM
I'm not sure you can completely turn off the ability to equip it, however you could check for the hero level tag: Hero.EquipArmor

If this tag is on, you could throw an error using an eval rule.

Click on eval rule and add one.
Set the Phase to Final
Set the Priority to 10000
Leave the index and severity alone
In the Message and Summary fields type: Hero Cannot Wear Armor!
And for the script use this:
validif (hero.tagis[Hero.EquipArmor] = 0)

It will throw a validation error up top with any other validation errors.

or you can try to modify the code below that basically zeroes out any armor worn, it won't fix every case scenario thought.

I run this post-attributes 5000 on my copy of the Tortle:
Code:
doneif (tagis[Helper.Disable] <> 0)

var dexmod as number

dexmod = #attrmod[aDEX]
~ turn it into a penalty
dexmod *= -1

if (hero.tagis[Hero.EquipArmor] = 1) then
     ~ we are armored, strip all armor bonuses from Dex regardless
     hero.child[ArmorClass].field[tACDexMod].value = 0
     foreach pick in hero from BaseArmor where "Helper.CurrArmor"
     ~ kill off any type of AC modifier on the armor itself
          eachpick.field[arAC].value = 0 
          eachpick.field[arBonus].value = 0
          eachpick.field[Bonus].value = 0
          ~ If there is something scripted like resistance that looks
          ~ for being disabled, disable it.
          perform eachpick.assign[Helper.Disable]
          ~ Kill the profiency so it shows that character shouldn't 
          ~ equip it. 
          perform eachpick.delete[Helper.Proficient]
     nexteach
endif
dungeonguru is offline   #37 Reply With Quote