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

Sneak Attack, Booming Blade, Elven Accuracy....Oh My!

I followed the instructions in this thread: <a href="https://app.roll20.net/forum/post/5625928/elven-accuracy-sneak-attack-and-booming-blade" rel="nofollow">https://app.roll20.net/forum/post/5625928/elven-accuracy-sneak-attack-and-booming-blade</a> There were a few typos, which I corrected (and along the way FINALLY made sense of these macros).&nbsp; But I also made what I think is an improvement: instead of querying for Elven Accuracy, I just made the 2nd roll use 2d20 and use the higher one.&nbsp; The logic being that if you are rolling with advantage you get the 3rd die, and if you aren't you just ignore the 2nd result.&nbsp; So there's one less query to click through when you use the ability.&nbsp; Seems to work great. I also removed the secondary damage from Booming Blade.&nbsp; I don't like rolling that at the time of the attack; I prefer to wait until and unless the target moves. Enjoy: &amp;{template:atkdmg} {{rname=Shortsword}} {{mod=[[@{dexterity_mod}+@{pb}]]}} {{attack=1}} {{r1=[[1d20cs&gt;20+@{dexterity_mod}+@{pb}]]}} {{always=1}} {{r2=[[2d20kh1cs&gt;20+@{dexterity_mod}+@{pb}]]}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6+@{dexterity_mod}+?{Sneak Attack?|No,0|Yes,[[ceil(@{level}/2)]]d6}]]}} {{dmg1type=Piercing}} ?{Booming Blade?|No,|Yes,{{dmg2flag=1}}} {{dmg2=[[[[floor((@{level} + 1)/6)]]d8]]}} {{dmg2type=Thunder}}{{crit=1}}{{crit1=[[1d6+?{Sneak Attack?|No,0|Yes,[[ceil(@{level}/2)]]d6}]]}}{{crit2=[[[[floor((@{level} + 1)/6)]]d8]]}} @{charname_output}
That's cool. How did you not run into problems with the closed } inside the queries? Why not put the query inside the Dmg2 field? Also, if you're rolling for Elven Accuracy anyway, why not just do a single roll of 3d20kh1?
1589051093

Edited 1589051129
Dakota H. said: That's cool. How did you not run into problems with the closed } inside the queries? Why not put the query inside the Dmg2 field? Also, if you're rolling for Elven Accuracy anyway, why not just do a single roll of 3d20kh1? Not sure what you mean by the closed } inside the queries.&nbsp; Looking through it I don't see anything closed at the wrong place, and it seems to be working, but maybe I made a mistake and I'm kidding myself.&nbsp; Can you be more specific?&nbsp; (Sorry, I'm a novice at this.) To the second question, I'm not always rolling Elven Accuracy, only when I have advantage.&nbsp; So r1 is a single roll, and r2 returns the best of two rolls.&nbsp; So if I don't have advantage (and thus not Elven Accuracy, either) I use r1.&nbsp; If I do have advantage (and thus also Elven Accuracy) I take the best of r1 and r2. I also created this simple macro, for when the Booming Blade secondary damage triggers: &amp;{template:atkdmg} {{rname=Booming Blade}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[[[floor((@{level} + 1)/6+1)]]d8]]}} {{dmg1type=Thunder}}@{charname_output} It just makes a damage roll with no attack roll.&nbsp; If the target moves on its turn I can roll damage.
1589051428

Edited 1589051909
Oh, I think I know what you mean.&nbsp; Are you referring to: ?{Booming Blade?|No,|Yes,{{dmg2flag=1}}} I don't want dmg2 to appear at all if there's no Booming Blade (as opposed to having a value of 0).&nbsp; So this is basically saying, "If the user says to use Booming Blade, assign a value of 1 to dmg2flag."&nbsp; Otherwise the default value is zero, and no dmg2 appears. Apparently queries can be used to return a value or to trigger a variable assignment.&nbsp; E.g. it can be either 'evaluative' or 'declarative'.&nbsp;&nbsp; Is that what you were asking about? I think this could have been written as: {{dmg2flag=?{Booming Blade?|No,0|Yes,1}}} And it would achieve the same thing.&nbsp; I might try it to confirm.
Yeah, that's what I was talking about. Usually, since queries have no set contents, they want to stop the first time they encounter a }, so you'd usually have to use html substitution to get them inside there. Maybe they fixed that, though. I don't read every update.&nbsp;