Junior Member
Join Date: Mar 2010
Posts: 2
|
I am attempting to create the Dervish Dance feat which allows your Dexterity to be applied to a scimitar instead of Strength for both attack and damage. With the way Weapon Finesse is structured I'm not sure how to go about doing this. Any ideas?
|
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Weapons have the fields wAttBonus and wDam Bonus.
(In the editor, select the help menu, go to the "Reference Information" page, and then go to the weapons section to find things like this.) So, what you want to do in your feat is to search for all Scimitars on the character: Code:
foreach pick in hero from BaseWep where "IsWeapon.wScimitar" So, let's calculate that difference: Code:
var bonus as number bonus = maximum(#attrmod[aDEX] - #attrmod[aSTR], 0) Now, add that modifier to the attack and damage: Code:
eachpick.field[wAttBonus].value += bonus eachpick.field[wDamBonus].value += bonus Code:
var bonus as number bonus = maximum(#attrmod[aDEX] - #attrmod[aSTR], 0) foreach pick in hero from BaseWep where "IsWeapon.wScimitar" eachpick.field[wAttBonus].value += bonus eachpick.field[wDamBonus].value += bonus nexteach |
#2 |
Junior Member
Join Date: Mar 2010
Posts: 2
|
Thank you so much for your response, worked like a charm (and thank you for explaining it piece by piece, it goes a long way towards my understanding the scripting mechanisms in Hero Lab)
|
#3 |
|
|