• 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

Using Weapon bonuses to Combat Maneuvers

Mystic Lemur

Well-known member
I know ShadowChemosh has a Weapon CMB adjustment, but I can't quite get the math to come out right, especially when the character has Power Attack. I tried to come at the issue another way, and this is what I have so far. It seems to work well so far, although I know I'm missing things like Weapon Focus.

Code:
     ~if we're not active, just get out now
     doneif (field[pIsOn].value = 0)

     var bonus as number
     bonus = 0

	 ~Only bother with melee weapons
         foreach pick in hero where "wCategory.Melee"
            ~Only bother with "Equipped" weapons.
            if (eachpick.field[gIsEquip].value = 1) then
            ~set the bonus equal to the melee enhancement
	    bonus = maximum(eachpick.field[atmBonEnh].value, 0)
            ~apply the bonus to the Disarm, Sunder, and Trip maneuvers
	    #applybonus[cmbBonEnh, hero.child[manDisarm], bonus]
	    #applybonus[cmbBonEnh, hero.child[manSunder], bonus]
	    #applybonus[cmbBonEnh, hero.child[manTrip], bonus]
            ~If the APG is a valid source
	    doneif (hero.tagis[source.APGManeuv] = 0)
            ~and if the weapon has the Trip quality
            if (eachpick.tagis[wSpecial.Trip] <> 0) then
            ~apply the bonus to the Reposition and Drag maneuvers
            #applybonus[cmbBonEnh, hero.child[manReposit], bonus]
            #applybonus[cmbBonEnh, hero.child[manDrag], bonus]
            endif

	  ~if the weapon has the Disarm quality
          if (eachpick.tagis[wSpecial.Disarm] <> 0) then
          ~add +2 to Disarm combat maneuvers
          hero.child[manDisarm].field[cmbBonus].value += 2
	  endif
	  ~if the weapon has the Sunder quality
	  if (eachpick.tagis[wSpecial.Sunder] <> 0) then
	  ~add +2 to Sunder combat maneuvers
	  hero.child[manSunder].field[cmbBonus].value += 2
	  endif
	  ~if the weapon has the Trip quality
          if (eachpick.tagis[wSpecial.Trip] <> 0) then
         ~and the APG is a valid source
         doneif (hero.tagis[source.APGManeuv] = 0)
         ~add +2 to Drag and Reposition maneuvers
         hero.child[manReposit].field[cmbBonus].value += 2
         hero.child[manDrag].field[cmbBonus].value += 2
         endif
       endif
     nexteach

Any suggestions on how to improve this would be very much appreciated.
 
Back
Top