• 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

Manalishi66

Well-known member
Hi need help on the following code....

~ our bonus is level /5, min 1
field[abValue].value += maximum(round(#levelcount[SBI] / 5,0,-1),1)

field[livename].text = "Iaido (+" & field[abValue].value & " to Initiative w/ninja sword)"

~ Loop through all weapons of a specific fighter type
foreach pick in hero from BaseWep where "IsWeapon.wShShikomi | IsWeapon.wSnBigatan"
~ Set the initiative bonus on hero with each weapon found
hero.child[Initiative].field[Bonus].value += field[abValue].value
nexteach

everything works (so far), but....I want the script to add to initiative if the character uses either wShShikomi or the wSnBigatan, not both. It adds to both if on his character. How do I get it to apply to only the one wielded?

Here is the custom ability descrip....

A lesser form of the samurai art of Iaijutsu, Iaido is a series of techniques for quickly drawing and cutting with the ninja sword as one reflexive movement. The shinobi gains +1 to initiative when wielding a shinobigatana or shikomizue, with an additional +1 to initiative per 5 levels in the shinobi class. A qualifying weapon counts as being wielded by the shinobi as long as it is on their person.
 
Last edited:
Maybe this?
Code:
~ our bonus is level /5, min 1
field[abValue].value += maximum(round(#levelcount[SBI] / 5,0,-1),1)

field[livename].text = "Iaido (+" & field[abValue].value & " to Initiative w/ninja sword)"

~ Loop through all weapons of a specific fighter type
foreach pick in hero from BaseWep where "IsWeapon.wShShikomi | IsWeapon.wSnBigatan"
~ Set the initiative bonus on hero with each weapon found
  if (eachpick.field[gIsEquip].value <> 0) then
    hero.child[Initiative].field[Bonus].value += field[abValue].value
  endif
nexteach

That should make it run only if the sword is equipped
 
Back
Top