I play Castles & Crusades. In order to account for the special manuevers and attack options I use a table of buffs/conditions the players can select. Recently I had a Barbarian join the game. One of their abilities (in C&C) is combat sense which reduces the bonus enemies get on sneak, rear, flank, etc attacks by half. I have a checkbox called Barbarian (original I know) that has a value of 2! This is how I wrote it up in the macro... . + [[(floor(@{selected|Flank}/(@{target|Barbarian}+1)))]]
[Flank] +[[(floor(@{selected|Rear}/(@{target|Barbarian}+0)))]]
[Rear] -[[(@{selected|CalledShot}*8)]] [Called Shot] +[[(floor(@{selected|Sneak}/(@{target|Barbarian}+0)))]]
[Sneak Attack] The entire attack code looks like this.. --!^4AttackRoll5:|**Attack Roll:** [[ [$Atk0] 1d20 [1d20] +2
[Bane] +@{selected|WeaponHitTotal_1} [Weapon] +@{selected|Animosity} [Animosity]
+@{selected|OffensiveFocus} [Offensive Focus] +[[(floor(@{selected|Flank}/(@{target|Barbarian}+1)))]]
[Flank] +[[(floor(@{selected|Rear}/(@{target|Barbarian}+0)))]] [Rear] -[[(@{selected|CalledShot}*8)]]
[Called Shot] +[[(floor(@{selected|Sneak}/(@{target|Barbarian}+0)))]] [Sneak Attack] +@{selected|Enemy} [Favored
Enemy] +[[(@{selected|Smite}*@{selected|CharismaMod})]] [Smite]
+@{selected|Inspired} [Inspired] +@{selected|Bless} [Bless] +@{selected|Exhort}
[Exhort] +[[(@{selected|BackAttack}*4)/(@{target|Barbarian}+0)]] [Back Attack] +@{selected|MiscCombat}
[Misc Modifier] -@{selected|Demoralize} [Demoralized] -@{selected|Def} [Defensive
Fighting] -[[(@{selected|Evil}*@{target|ProtectionFromEvil})]]
[Protection Evil] -[[(@{selected|Good}*@{target|ProtectionFromGood})]]
[Protection Good] -[[(@{selected|Lawful}*@{target|ProtectionFromLaw})]]
[Protection Law] -[[(@{selected|Chaotic}*@{target|ProtectionFromChaos})]]
[Protection Chaos] ]] (it is actually one of several skipto attack options). As I said above, if the value is 2 it works well. If it is any other number (other than 0) the macro fires (but the results for the rear atacks (et al) are wrong).