• 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

Shinobi Again and Again!

Manalishi66

Well-known member
This a custom classs ability is giving me a fit....

Kendo: A lesser form of the samurai art of Kenjutsu, Kendo is a system of fencing for the shinobi. When using a sword that she has Weapon Focus in, the shinobi gains a +1 competence bonus to damage rolls with the sword, and an additional +1 to attack and damage per 6 levels of shinobi class.

The following script works except the bonus does not display with the weapon when using "wClass.BladeLight" and "wClass.BladeHeavy". It does if I use "wClass.Light", etc., Why? Help!

~ Loop through all weapons of a specific fighter type
foreach pick in hero from BaseWep where "wClass.BladeLight | wClass.BladesHeavy"
~ Set the bonus on each weapon found

if (#levelcount[SBI] >= 1) then
eachpick.field[wDamBonus].value += 1
endif
if (#levelcount[SBI] >= 6) then
eachpick.field[Bonus].value += 1
endif
if (#levelcount[SBI] >= 12) then
eachpick.field[Bonus].value += 1
endif
if (#levelcount[SBI] >= 18) then
eachpick.field[Bonus].value += 1
endif
nexteach
 
This a custom classs ability is giving me a fit....

Kendo: A lesser form of the samurai art of Kenjutsu, Kendo is a system of fencing for the shinobi. When using a sword that she has Weapon Focus in, the shinobi gains a +1 competence bonus to damage rolls with the sword, and an additional +1 to attack and damage per 6 levels of shinobi class.

The following script works except the bonus does not display with the weapon when using "wClass.BladeLight" and "wClass.BladeHeavy". It does if I use "wClass.Light", etc., Why? Help!

~ Loop through all weapons of a specific fighter type
foreach pick in hero from BaseWep where "wClass.BladeLight | wClass.BladesHeavy"
~ Set the bonus on each weapon found

if (#levelcount[SBI] >= 1) then
eachpick.field[wDamBonus].value += 1
endif
if (#levelcount[SBI] >= 6) then
eachpick.field[Bonus].value += 1
endif
if (#levelcount[SBI] >= 12) then
eachpick.field[Bonus].value += 1
endif
if (#levelcount[SBI] >= 18) then
eachpick.field[Bonus].value += 1
endif
nexteach

Phase ?
Priority ?
Also tidy the code by putting all the endif statements at the end of your script and use else at the existing endif points.

if (#levelcount[SBI] >= 1) then
eachpick.field[wDamBonus].value += 1
else
if (#levelcount[SBI] >= 6) then ETC.
 
Untested, but I think this'll do what you want. When making a Custom Ability you don't need to specify the class having 1 level for something, you are obviously a member of that class because you're getting to select their custom abilities. As long as your timing is Post-Levels you can use field[xTotalLev].value to get the levels in the associated class.


Code:
doneif (tagisHelper.SpcDisable <> 0)
~set our bonus
field[abValue].value += round(field[xTotalLev].value/6, 0, -1)

~ Loop through all weapons of a specific fighter type
foreach pick in hero from BaseWep where "(wClass.BladeLight | wClass.BladesHeavy) & Broadcast.WepFocus"
~ Set the bonus on each weapon found
  eachpick.field[wDamBonus].value += 1
  eachpick.field[Bonus].value += field[abValue].value
nexteach
 
Untested, but I think this'll do what you want. When making a Custom Ability you don't need to specify the class having 1 level for something, you are obviously a member of that class because you're getting to select their custom abilities. As long as your timing is Post-Levels you can use field[xTotalLev].value to get the levels in the associated class.
Also even better is to simply bootstrap the class ability multiple times to the class at the correct levels. It means the ability can be re-used later at different levels without having to change the script.

This is the base class special script I always start from:
Code:
~Set the list name
field[listname].text = field[thingname].text & " " & signed(field[xIndex].value)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += field[xCount].value
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
This is designed to get its bonus from the number of times it has been bootstrapped to the class.

Just FYI....
 
Back
Top