• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Enhancement Bonus to Attack Question

Lawful_g

Well-known member
So the Psychoactive Skin of the Hero gives a +3 enhancement bonus to attacks, which I am having a problem adding. Here is what I have so far.

if (field[gIsEquip].value <> 0) then

foreach pick in hero from BaseWep
~ Find the difference between 3 and weapon's enhancement bonus, we need to know this so that we can correct our damage, since this only adds to attacks
var bonus as number
bonus = 3 - each.field[BonEnhance].value

if (bonus >= 1) then
each.field[wDamBonus].value -= bonus
endif

#enhancementbonus[each, 3]

nexteach

endif

The problem is that this doesn't work with Masterwork, which is also an enhancement bonus to attack and so should not stack. However, in terms of HL it is treated as a +1 bonus to the wAttBonus field. Can anyone think of a better way to code for this?
 
I need to get masterwork status recorded on weapons/armor/gear as a tag. Once that happens, you'll be able to test for that tag, and you can compensate for the masterwork bonus. I'm afraid I can't think of a better way to handle this until that's available. Sorry.
 
Back
Top