• 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

special when dual wielding weapons

AndrewD2

Well-known member
I have a couple weapons with the ability:

The character gains a +1 bonus to his AC when fighting defensively and a +2 bonus to AC when using the total defense action while using a tonfa. Using a tonfa in each hand (incurring the normal two-weapon fighting penalties) increases this bonus to +2 and +3, respectively.

I looked at the Thunder and Fang feat for an idea of how this might work and I came up with the code:

Final/1000
Code:
if (hero.tagis[Condition.pstTotDef] <> 0) then
  foreach pick in hero from BaseWep
    if (eachpick.tagis[IsWeapon.wRPTonfa] + eachpick.tagis[Hero.OffHand] = 2) then
      hero.child[ArmorClass].field[Bonus].value += 3
    else
      hero.child[ArmorClass].field[Bonus].value += 2
    endif
  nexteach
endif

But it's not working and I'm not sure where to look next. Any suggestions?
 
Last edited:
Ended up going with a mechanic.

Code:
~ If we have an tonfa equipped in each hand, we get extra bonuses
var main as number
var off as number
if (hero.tagis[Condition.pstTotDef] + hero.tagis[Condition.pstFtDefen] <> 0) then
  foreach pick in hero from BaseWep
    if (eachpick.tagis[IsWeapon.wRPTonfa] + eachpick.tagis[Hero.MainHand] = 2) then
      main = 1
    endif

    if (eachpick.tagexpr[IsWeapon.wRPTonfa] + eachpick.tagis[Hero.OffHand] = 2) then
      off = 1
    endif
  nexteach

  if (main + off = 2) then
    hero.child[ArmorClass].field[Bonus].value += 1
  endif
endif
 
Back
Top