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?
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?