View Single Post
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old September 1st, 2009, 10:21 AM
Here is my example code, for reference

~ If our dexterity bonus is higher than our strength bonus, do nothing and get out now.
var dexterity as number
var strength as number
dexterity = hero.child[aDEX].field[aModBonus].value
strength = hero.child[aSTR].field[aModBonus].value
if (dexterity >= strength) then
done
endif

~ Since our Strength is higher than our dexterity and we passed, iterate through all weapons which are thrown, and subtract dexterity and add strength instead to our attack rolls.

foreach pick in hero where "wCategory.RangeThrow Missing stuff here"
each.field[wAttBonus].value = each.field[wAttBonus].value - dexterity + strength
nexteach
Lawful_g is offline   #3 Reply With Quote