I've got a class ability that alters the damage of a selected weapon like unarmed strike. I've got it all scripted out but for some reason it's showing a different value that what the assigned tag is.
For example, no matter what tag is assigned a greatsword changed to 3d4 even when the tag for 2d10 is assigned.
While some items don't change at all (Longsword, No Dachi)
My code is:
Which should be assigning the greater value of the weapon damage or the level based damage and assigning it to the weapon. I've ran it at Post-Level, Post-Attribute, and Final
5000, 10000, 20000, and 99999999.
I'm not sure why it's doing this maybe another set of eyes will be helpful.
Thanks,
Andrew
For example, no matter what tag is assigned a greatsword changed to 3d4 even when the tag for 2d10 is assigned.
While some items don't change at all (Longsword, No Dachi)
My code is:
Code:
doneif (tagis[Helper.SpcDisable] <> 0)
doneif (tagis[Helper.ShowSpec] <> 1)
perform hero.findchild[BaseWep, "Custom.LivingKi"].setfocus
doneif (state.isfocus = 0)
var LWStarDam as number
var LWLevDam as number
if (focus.tagis[wMain.1_1] <> 0) then
LWStarDam = 1
elseif (focus.tagis[wMain.1d2_2] <> 0) then
LWStarDam = 2
elseif (focus.tagis[wMain.1d3_3] <> 0) then
LWStarDam = 3
elseif (focus.tagis[wMain.1d4_4] <> 0) then
LWStarDam = 4
elseif (focus.tagis[wMain.1d6_5] <> 0) then
LWStarDam = 5
elseif (focus.tagis[wMain.1d8_6] <> 0) then
LWStarDam = 6
elseif (focus.tagis[wMain.2d4_6] <> 0) then
LWStarDam = 7
elseif (focus.tagis[wMain.1d10_304] <> 0) then
LWStarDam = 8
elseif (focus.tagis[wMain.1d12_404] <> 0) then
LWStarDam = 9
elseif (focus.tagis[wMain.2d6_104] <> 0) then
LWStarDam = 10
endif
debug "LWStarDam: " & LWStarDam
if (field[xAllLev].value >= 20) then
LWLevDam = 12
elseif (field[xAllLev].value >= 16) then
LWLevDam = 11
elseif (field[xAllLev].value >= 12) then
LWLevDam = 10
elseif (field[xAllLev].value >= 8) then
LWLevDam = 8
elseif (field[xAllLev].value >= 4) then
LWLevDam = 6
else
LWLevDam = 5
endif
debug "LWLevDam: " & LWLevDam
~doneif (hero.childfound[abRPKiFocu].field[abilActive].value = 0)
if (LWLevDam > LWStarDam) then
if (LWLevDam = 5) then
perform focus.tagreplace[wMain.?,wMain.1d6_5]
elseif (LWLevDam = 6) then
perform focus.tagreplace[wMain.?,wMain.1d8_6]
elseif (LWLevDam = 8) then
perform focus.tagreplace[wMain.?,wMain.1d10_304]
elseif (LWLevDam = 10) then
perform focus.tagreplace[wMain.?,wMain.2d6_104]
elseif (LWLevDam = 11) then
perform focus.tagreplace[wMain.?,wMain.2d8_305]
else
perform focus.tagreplace[wMain.?,wMain.2d10_205]
endif
endif
Which should be assigning the greater value of the weapon damage or the level based damage and assigning it to the weapon. I've ran it at Post-Level, Post-Attribute, and Final
5000, 10000, 20000, and 99999999.
I'm not sure why it's doing this maybe another set of eyes will be helpful.
Thanks,
Andrew