Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Power Card Conditional

!power {{ --name|Dagger --leftsub|Melee Attack --rightsub|Reach 5 ft --hroll|[[ [$Sneak] ?{Sneak Attack|No, 0|Yes, 1} + 0d0 ]] --hroll|[[ [$Bonus] ?{Bonus Action|No, 0|Yes, 1} + 0d0 ]] --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|w/Advantage,2d20KH1|w/Disadvantage,2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC -- ?? $Atk.base == 1 ?? Critical Fail:|[[ [txt] 1t[CFM] ]] -- ?? $Atk.base <> 1 AND $Atk.total < [[@{target|AC}]] AND $Atk.base <> 20 ?? !Miss|You missed. -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 20 ?? Hit:|[[1d6 + 4 [Dex Mod] ]] Piercing damage -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 20 AND $Sneak == 1 ?? !SneakAtk|^* **+** [[2d6]] Sneak Attack Damage -- ?? $Atk.base == 20 ?? !CritHit|^* **+** [[2d6]] critical piercing damage -- ?? $Atk.base == 20 AND $Sneak == 1 ?? !CritSneak|^* **+** [[4d6]] critical sneak attack damage -- ?? $Atk2.base <> 1 AND $Bonus == 1 ?? Off Hand Attack:|[[ [Atk2] 1d20]] vs AC -- ?? $Atk2.base <> 1 AND $Atk2.total < [[@{target|AC}]] <> 20 ?? !Miss:|You missed. -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|AC}]] AND $Atk2.base <> 20 ?? Hit:|[[1d6]] Piercing damage }} This is my latest monster, basically want to pop up an ask me Sneak Attack (yes or no) Bonus Action Attack (yes or no) Standard, Advantage, Disadvantage. Does this part fine. Next it is to roll based on my selections, if it Hits Roll Sneak and/or Bonus Attack if initial attack was successful. If not ignore and give Attack missed Message. Also On critical fail post fail message from random table. If it crits on Initial attack roll Sneak attack as crit, and bonus roll standard, if selected, ignore if not. Is this just to much for the script to handle?
1454868485
Silvyre
Forum Champion
Hey, Shawn M. Are you playing 5th Edition? From the SRD : Two-Weapon Fighting When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a Bonus Action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative. So, there's no attack penalty when making your off-hand attack (I think you're applying a -6 penalty right now). Also, a dagger does 1d4 damage (instead of 1d6), so I adjusted that: !power {{ --name|Dagger --leftsub|Melee Attack --rightsub|Reach 5 ft --hroll|[[ [$Sneak] ?{Sneak Attack|No, 0|Yes, 1} + 0d0 ]] --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|w/Advantage,2d20KH1|w/Disadvantage,2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC -- ?? $Atk.base == 1 ?? Critical Fail:|[[ [txt] 1t[CFM] ]] -- ?? $Atk.base <> 1 AND $Atk.total < [[@{target|AC}]] AND $Atk.base <> 20 ?? !Miss|You missed. -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 20 ?? Hit:|[[1d4 + ?{Bonus Action|No, 4 [Dex Mod] ]]|Yes, 0 [Off-hand] ]] **(off-hand)**} Piercing damage -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|AC}]] AND $Atk.base <> 20 AND $Sneak == 1 ?? !SneakAtk|^* **+** [[2d6]] Sneak Attack Damage -- ?? $Atk.base == 20 ?? !CritHit|^* **+** [[2d4]] critical piercing damage -- ?? $Atk.base == 20 AND $Sneak == 1 ?? !CritSneak|^* **+** [[4d6]] critical sneak attack damage }}
Didnt mean to give a neg six, and I know the dmg is less I was just trying to get it to work then I would fix minor details. Thanks for the fixes though.
Ok now it doesnt do main hand dmg. What I was trying to do is roll main hand and then have the option for the Bonus. This is doing the bonus dmg on main hand. Need a separate att roll for off hand bonus att
1454872534
Silvyre
Forum Champion
Okay, here's what I recommend (it's a bit complex, so bear with me): !power {{ --name|Dagger --leftsub|Melee Attack --rightsub|Reach 5 ft --hroll|[[ [$Sneak] ?{Sneak Attack|No, 0|Yes, 1} + 0d0 ]] --Attack:|[[ [$Atk] ?{Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC -- ?? $Atk.base == 1 ?? Critical Fail:|[[ [txt] 1t[CFM] ]] -- ?? $Atk.base <> 1 AND $Atk.total < [[@{target|1st Target|AC}]] AND $Atk.base <> 20 ?? !Miss|You missed. -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|1st Target|AC}]] AND $Atk.base <> 20 ?? Hit:|[[1d4 + 4 [Dex Mod] ]] Piercing damage -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|1st Target|AC}]] AND $Atk.base <> 20 AND $Sneak == 1 ?? !SneakAtk|^* **+** [[2d6]] Sneak Attack Damage -- ?? $Atk.base == 20 ?? !CritHit|^* **+** [[2d4]] critical piercing damage -- ?? $Atk.base == 20 AND $Sneak == 1 ?? !CritSneak|^* **+** [[4d6]] critical sneak attack damage ?{Two-Weapon Fighting| No, | Yes,     --hrolls|[[ [$Sneak2] ?{Off-hand Sneak Attack|No, 0|Yes, 1} + 0d0 ]]     --Off-hand Attack:|[[ [$Atk2] ?{Off-hand Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC     -- ?? $Atk2.base == 1 ?? Off-hand Critical Fail:|[[ [txt] 1t[CFM] ]]     -- ?? $Atk2.base <> 1 AND $Atk2.total < [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 ?? !Off-hand Miss|You missed.     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 ?? Off-hand Hit:|[[1d4]] Piercing damage     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $Sneak2 == 1 AND $Sneak == 0 ?? !Off-hand SneakAtk|^* **+** [[2d6]] Sneak Attack Damage     -- ?? $Atk2.base == 20 ?? !Off-hand CritHit|^* **+** [[2d4]] critical piercing damage     -- ?? $Atk2.base == 20 AND $Sneak2 == 1 AND $Sneak == 0 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage } }} Key points: Ensures that no two tags have the same name. This is important, because PowerCards will only use the latter of two tags, if both have the same name (e.g. hroll). Uses an Advanced Roll Query , to minimize number of Queries answered. As such, uses HTML entities, so this macro may should be saved as an Ability . Let me know if you have any questions!
Yea still not working right...Maybe Im not implementing it right. Ether way it isnt doing all the steps. And some of the drop downs have code in the answer field
1454876815

Edited 1454877198
To be honest at this point it may just be easier to implement a second macro for my Bonus attack. Just trying to streamline as much as I can cause my screen is starting to fillup.
1454879386
Silvyre
Forum Champion
I think we got this working via PM. :)
Yup we got it...I think I made him *FacePalm* and questioned his sanity a couple times...But he got this noob through it.
1454899560
The Aaron
Pro
API Scripter
No one gets to start at guru status, but today's noob is tomorrow's guru!  Enjoy the climb, see you soon!  =D
Very true....
1455507734

Edited 1455508072
In case you're like me, and will likely forget to increase the damage of the sneak attack on leveling, you can use this in place of the hard coded 2d6: (@{rogue_level}/2)d6 And for crit: ((@{rogue_level}/2)*2)d6
awesome thanks for the heads up bro.