View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 591

Old November 11th, 2017, 09:13 AM
What we did for the community tortle (which will come out next update) was to catch the DEX modifier and subtract it when unarmored, if armored, we set any worn armor bonuses to 0. This leaves shields and magic bracers/rings alone as is indicated by the tortle. It's not beautiful, but it works. It also allows a tortle to wear armor of resistance and get the resistance granted, but not the AC.

Post-attributes/5000
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.Disable] <> 0)

var dexmod as number

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

if (hero.tagis[Hero.EquipArmor] = 0) then
     ~ we are unarmored, remove Dex bonus by adding it's negative value back
     hero.child[ArmorClass].field[tACUnarDef].value += dexmod
else
     ~ we are armored, strip all armor bonuses
     hero.child[ArmorClass].field[tACDexMod].value = 0
     foreach pick in hero from BaseArmor where "Helper.CurrArmor"
     ~ kill off any type of AC modifier
          eachpick.field[arAC].value = 0 
          eachpick.field[arBonus].value = 0
          eachpick.field[Bonus].value = 0
     nexteach
endif

Last edited by dungeonguru; November 11th, 2017 at 09:16 AM.
dungeonguru is offline   #3 Reply With Quote