• 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

Need help with helper.damageup and other

willuwontu

Well-known member
Ability text
Code:
At 17th level a bladesman deals damage with class weapons as if they were one size category bigger than they really are. This requires a class weapon and nothing in the other hand.

Eval script

Code:
Phase: Post attributes  Priority: 10000

      ~ only run the rest for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)

      ~ If we're disabled, do nothing
      doneif (tagis[Helper.SpcDisable] <> 0)

if (field[xAllLev].value >= 17) then
foreach pick in hero from BaseWep where "(thingid.wSwordBast| thingid.wButtSwo| thingid.wDuelSwo| thingid.wFalcata| thingid.wGladius| thingid.wKatana| thingid.wKhopesh| thingid.wLongsword| thingid.wBroaNine| thingid.wRapier| thingid.wPFSawtoot| thingid.wScimitar| thingid.wScizore| thingid.wShortswd| thingid.wShotel| thingid.wSica| thingid.wSwordCane| thingid.wPFTempleS| thingid.wWakizashi)"
        perform eachpick.assign[B][Helper.DamageUp][/B]
nexteach
endif

The above script works and applies Helper.DamageUp, but the weapon damage doesn't change. Any idea why?
 
Phase: Post attributes Priority: 10000
You are way to late in timing. Helper.DamageUp needs to be in like First/10000 or Maybe as late as Pre-levels/10000. I always run it at First/10000.

In which case you need to change your script to not use Helper.ShowSpec or Helper.FirstCopy. These don't get applied until Post-Levels.

So you can do the following. I am pretty sure this works but I admit I have not tried it as early before as First/10000.
Code:
~we're earlier than the normal test for whether we've reached the correct level, so we'll recreate that test here
doneif (root.linkage[varies].field[cTotalLev].value + field[xExtraLev].value + field[xEffectLev].value < tagvalue[ClSpecWhen.?])
~ If we're disabled, do nothing
doneif (tagis[Helper.SpcDisable] <> 0)

foreach pick in hero from BaseWep where "(thingid.wSwordBast| thingid.wButtSwo| thingid.wDuelSwo| thingid.wFalcata| thingid.wGladius| thingid.wKatana| thingid.wKhopesh| thingid.wLongsword| thingid.wBroaNine| thingid.wRapier| thingid.wPFSawtoot| thingid.wScimitar| thingid.wScizore| thingid.wShortswd| thingid.wShotel| thingid.wSica| thingid.wSwordCane| thingid.wPFTempleS| thingid.wWakizashi)"
    perform eachpick.assign[Helper.DamageUp]
nexteach

By the way you don't need to hard-code level into the script logic (ie 17). The tag Helper.ShowSpec is only assigned to the Class Special when the class is at the correct level. This way you get soft-coded ability that can be re-used for other classes without issues.
 
Helper.DamageUp is checked for at Post-Levels/10000, so since this is a class special, and you want those to come after Post-Levels/1000, I'd say Post-Levels/5000 for your script.
 
Back
Top