• 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

Shadow Assassin Again

Manalishi66

Well-known member
Ok, I am trying to add the following class special ability. I looked at the bane weapon for scripting help...but could not figure it out. I am trying to add the damage die bonus to the end of the shuriken on the character sheet like Bane weapons do. Description of ability as follows.....

A favored weapon of many shadow assassins, shuriken are not particularly effective as ranged weapons unless they are used to deliver poison. This shadow style instead imbues each shuriken thrown with a bit of solid shadow, increasing the amount of damage done by any shuriken the shadow assassin throws by +1d6. This increases to +2d6 at 6th level, and to +3d6 at 10th level. The additional damage is treated as being normal piercing weapon damage. Thus a 2nd level human shadow assassin deals 1d2+1d6 damage with a shuriken attack.
 
it uses the #extradamage[] macro which done by filling in a few things

#extradamage[hero.childfound[IDofWep], "EXTRA DAMAGE TEXT", field[name].text]

so you would need a script that generates the extra damage text as a string and input in there. What level do they first get this power at?
 
You'll want to foreach through all Shurikens on the hero and use the #extradamage macro to add that in.

PostLevel 10000
Code:
      var extradam as string

      SOME CODE TO DEFINE WHAT AMOUNT OF EXTRA DAMAGE SHOULD BE FOR THIS LEVEL

      ~ 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)

      foreach pick in hero from BaseWep where "IsWeapon.wShuriken"
        #extradamage[eachpick, extradam, field[thingname].text]
        nexteach
 
Aaron's way is better as it will cover all Shurikens on the character mine would just randomly select one if there were multiples.
 
so modifying Aaron's code you'd need something like

Code:
      var extradam as string

      field[abValue].value += field[xAllLev].value + 2
      field[abValue].value = round(field[abValue].value/4, 0, -1)

      extradam = "+" & field[abValue].value & "d6"

      ~ 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)

      foreach pick in hero from BaseWep where "IsWeapon.wShuriken"
        #extradamage[eachpick, extradam, field[thingname].text]
        nexteach
 
Last edited:
Andrew, you may want to take a second look at the line where you calculate abValue. You're going to end up with an abValue of 8 at 10th level, rather than 3.
 
Here is the final working code. Had to do it this was because it's picked like a rogue talent by the shadows assassin at 2nd. Just one of several abilities he can choose from.

var extradam as string

if (#levelcount[SHA] >= 2) then
field[abValue].value += 1
endif
if (#levelcount[SHA] >= 6) then
field[abValue].value += 1
endif
if (#levelcount[SHA] >= 10) then
field[abValue].value += 1
endif

extradam = "+" & field[abValue].value & "d6"

~ 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)

foreach pick in hero from BaseWep where "IsWeapon.wShuriken"
#extradamage[eachpick, extradam, field[thingname].text]
nexteach
 
if it's a custom ability you can use the same code I already posted except change xAllLevl to xTotalLev and then it will calculate it without you having to do the if statements.
 
Back
Top