Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
DwarvenWiz
Junior Member
 
Join Date: Jun 2015
Posts: 23

Old July 11th, 2015, 01:11 PM
Trying to code this feat and running into issues around how to reduce the AC penalty for shields by 1. Could anyone help this novice? I appreciate it!

+1 Dodge bonus to AC while carrying a shield.

AC penalty for the shield is reduced by 1 to no less than zero.
DwarvenWiz is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old July 13th, 2015, 10:33 AM
Quote:
Originally Posted by DwarvenWiz View Post
Trying to code this feat and running into issues around how to reduce the AC penalty for shields by 1. Could anyone help this novice? I appreciate it!

+1 Dodge bonus to AC while carrying a shield.

AC penalty for the shield is reduced by 1 to no less than zero.
When a shield is equipped, the hero is given the tag "Hero.EquipShld". The feat can have a script on it that searches for this tag, and if present grants a +1 dodge bonus to AC:

Code:
if (hero.tagis[Hero.EquipShld] <> 0) then
 #applybonus[Dodge,hero.child[ArmorClass],1]
endif
I'm not sure at what point the tag is applied, so I'd set the timing to something like Post-Levels/10000 to start with and see if it works.

For the second part, I'm assuming you mean armor check penalty. For that, you'll need a foreach loop to look at all shields on the hero and reduce the penalty by 1. For this script, I'll assume the ability stacks with the reduction from the item being masterwork:

Code:
foreach pick in hero from BaseArmor where "EquipType.Shield"
 eachpick.field[mArmorChk].value = maximum(0,eachpick.field[mArmorChk].value-1)
nexteach
Not sure on the timing. Could try same as above. I haven't tested these scripts, but they should work for you. Let me know if you have any trouble.
Sendric is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old July 22nd, 2015, 11:22 AM
One point, I believe dodge bonuses do stack with themselves, so you wouldn't want to use the #applybonus macro here (that is for non stacking, use the highest type bonuses).
Aaron is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old July 23rd, 2015, 05:37 AM
Quote:
Originally Posted by Aaron View Post
One point, I believe dodge bonuses do stack with themselves, so you wouldn't want to use the #applybonus macro here (that is for non stacking, use the highest type bonuses).
That's a good point. I always forget about that. Thanks. In that case, you could change the code to this:

Code:
if (hero.tagis[Hero.EquipShld] <> 0) then
 hero.child[ArmorClass].field[tACDodge].value += 1
endif
Sendric is offline   #4 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:00 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.