Power Attack and Charge

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
Post Reply
neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Power Attack and Charge

Post by neofax »

Can this be added in the next update? I am trying to figure out how to add it now as this is RAW according to Pathfinder and I have a player that uses this all the time.

EDIT: Can someone evaluate this and let me know if it is correct? All you have to do is change the subCharge macro on the Lib:libDnD35Pathfinder token. First make a copy of the subCharge macro to revert back.

Code: Select all

[H, MACRO("subSelectWeapon@Lib:libDnD35Pathfinder"): ""]
[H: varsFromStrProp(eval(macro.return))]

[H: gTok = "Lib:GlobalsSRDPF" ]
[H: system = getLibProperty("System", gTok)]
[H, SWITCH(system), CODE:
   case "Pathfinder": {
      [ padaID = "Power Attack/Deadly Aim" ]
      [ pa2H = 1.5 ]
      [ paMultiplier = 2 ]
      [ paOffhand = 0.5 ]
   };
   case "D&D3.5": {
      [ padaID = "Power Attack" ]
      [ pa2H = 2 ]
      [ paMultiplier = 1 ]
      [ paOffhand = 0 ]      
   };
   default: {
      [ padaID = "Power Attack" ]
      [ pa2H = 2 ]
      [ paMultiplier = 1 ]
      [ paOffhand = 0 ] 
   }
]

[H: aTMS = json.get( PrivateJSON, "ActiveTempModSets" ) ]
[H, IF( json.type( aTMS ) == "UNKNOWN" ), CODE: {
   [ PrivateJSON = json.set( PrivateJSON, "ActiveTempModSets", "[]" ) ]
   [ aTMS = "[]" ]
}]
[H: paON = if( json.contains( aTMS, padaID ) > 0, 1, 0 ) ]
[H, IF( paON ): paDMG = floor( paMultiplier * json.get( json.get( json.get( json.get( json.get( PrivateJSON, "CustomModSetValues" ), padaID ), "mods" ), "globalMod" ), "v" ) ); paDMG = 0 ]

[H: tWeaponFinesse = getStrProp(Feats, "WeaponFinesse")]
[H: tWeaponFinesse = if(tWeaponFinesse == "", 0, tWeaponFinesse)]
[H: atkStatB = if(tWeaponFinesse == 1 && Finesse == 1, max(StrB, DexB), StrB)]
[H: dmgStatB = min(DmgBonusCap, if(TwoHanded == 1, Str2hB + if( Ranged == 1, 0, floor(paDMG*pa2H)), if(Primary == 2,floor(StrSecB + if( Ranged == 1, 0,(paDMG*paOffhand))),StrB + if( Ranged == 1, 0, paDMG))))]

[H: dieroll = 1d20]
[H: dieroll2 = 1d20]
[H: atkCalc = dieroll + BAB + SizeM + atkStatB + eval("" + AtkBonus) + MiscATK + 2]
[H: atkCritCalc = dieroll2 + BAB + SizeM + atkStatB + eval("" + AtkBonus) + MiscATK + 2]
[H: critOutput = if(dieroll >= CritRange, "  <i>. . .  CRIT! -> </i>" + atkCritCalc, "")]

[H: dmgCalc = eval("eval(Damage) + dmgStatB + MiscDMG")
 + if(DmgExtra == "0d6" || DmgExtra == "" || DmgExtra == "0", "", " + " + eval("0 + " + DmgExtra) + " " + DmgExtraName)
]
[H: dmgCritCalc = eval("eval(Damage) + dmgStatB + MiscDMG") 
  + if(CritMult > 2,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(CritMult > 3,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"")  
  + if(DmgExtraCrit == "0d10" || DmgExtraCrit == "" || DmgExtraCrit == "0", "", " + " + eval("0 + " + DmgExtraCrit) * (CritMult - 1) + " " + DmgExtraName)
]
[H: dmgCritOutput = if(dieroll >= CritRange, "  <i>. . .  CRIT! -> </i>" + dmgCritCalc, "")]

[H: atkList = ""]
[H: atkList = dieroll]
[H: critList = ""]
[H: critList = critList + dieroll2]
[H: atkList = "<font size= 3>ATK Rolls:<b> " + atkList + " </b>BAB:<b> " + BAB + " </b>Size:<b> " + SizeM + " </b>StatBonus:<b> " + atkStatB + " </b>AtkBonus:<b> " + AtkBonus + " </b>CritThreat:<b> " + CritRange + " </b>Misc:<b> " + MiscATK + " </b>Charge:<b> " + 2 + "</b></font><br />"]
[H: atkList = atkList + "<font size= 3>CritRolls:<b> " + critList + "</b></font><br />" ]

[H: dmgList = ""]
[H: dmgList = "<font size= 3>DMG Rolls:<b> " + eval("0 + " + Damage) + " </b>DamageDice:<b> " + Damage 
   + " </b>StatBonus" + if( Ranged != 1 && paON, '<i><font color="red">+PowerAttack</font></i>', "" ) + ":<b> " + dmgStatB 
   + if( Ranged && paON && system == "Pathfinder", ' <i><font color="red">DeadlyAim</font>:</i> ' + paDMG, "" )
   + " </b>MiscDMG:<b> " + MiscDMG 
   + if(DmgExtra == "0d6" || DmgExtra == "" || DmgExtra == "0", "", " </b>ExtraDMG:<b> " + DmgExtra + " </b>ExtraDMGType: <b>" + DmgExtraName )
   + if(DmgExtraCrit == "0d10" || DmgExtraCrit == "" || DmgExtraCrit == "0", "", " </b>CritDMG:<b> " + DmgExtraCrit )
   + " </b>CritMultiplier:<b> " + CritMult 
   + "</b></font><br />"
]
[H: dmgList = dmgList + "<font size= 3>CritRolls:<b> " + dmgCritCalc + "</b></font><br />" ]

[H: output = "<b>HIT:</b> " + atkCalc + critOutput + "  (<i> " + Name + " </i>)<br /><b>DMG:</b>  " + dmgCalc + dmgCritOutput + "<br />"]
[H: outputwTip = "<span title='<html>" + atkList + " " + dmgList + " </html>'>" + output + "</span>"]

[H, MACRO( "subGetAllOtherPCPlayers@this" ): "" ]
[H: allOtherPC = macro.return ]

[R, W( allOtherPC ): output ]
[R, S, G: outputwTip ]

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: Power Attack and Charge

Post by Paradox »

Does any one know if Neo's implementation works? I too have a player who uses Power Attack Charge a lot.
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Power Attack and Charge

Post by neofax »

It works as my player uses it all the time. I now am trying to find out if weapons confer their abilities during a Sunder attempt.

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Power Attack and Charge

Post by lmarkus001 »

I am changing "Lunge/Cleave" mod-set to "Charge/Lunge/Cleave" as all that mod-set does is apply a -2 AC penalty. Then a normal single attack is rolled and the player needs to put +2 in the temporary attack modifier (since the mod-set stacks charge+lunge+cleave together, and the charge bonus is only for the one swing while the ac penalty is for the round).

I am removing the Charge special attack.

Post Reply

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”