Senior Member
Join Date: Jul 2010
Posts: 157
|
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. |
#1 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
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? |
#2 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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 |
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Ninjaed. How appropriate.
|
#4 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Aaron's way is better as it will cover all Shurikens on the character mine would just randomly select one if there were multiples.
|
#5 |
Senior Member
Join Date: Jul 2010
Posts: 157
|
It's initially gained at 2nd level and improves at 6th then finally at 10th.
|
#6 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
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 by AndrewD2; July 15th, 2014 at 03:39 PM. |
#7 |
Senior Member
Join Date: Jul 2010
Posts: 157
|
Thanks for the help. This should get me further along.
|
#8 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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.
|
#9 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Whoops, math is hard! I fixed it in the previous post now.
|
#10 |
|
|