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

Need Macro for D&D 5e Piercer Feat Reroll.

• Once per turn, when you hit a creature with an attack that deals piercing damage, you can re-roll one of the attack’s damage dice, and you must use the new roll. • When you score a critical hit that deals piercing damage to a creature, you can roll one additional damage die when determining the extra piercing damage the target takes. I'm using a rapier. On a regular attack there's no issue. I just go type /roll 1d8ro<4. This rerolls the damage dice once if the result is less than four. I chose 3 as the point where I choose to reroll as 4.5 is the average damage. Math wise, that's that best bang for my buck. The problem happens on the crit. 3d8ro<4 doesn't work. That rerolls each of the dice once if they're lower than 4. But I need a command that will only reroll the lowest result if the lowest result is less than 4. Does said command exist? Or a combination that would produce the same result?
1626344622

Edited 1626344671
Oosh
Sheet Author
API Scripter
That's too complicated for the vanilla dice roller - there's no way to find the lowest roll and reroll it, and only it, once. You'd need either a custom sheet roll or API script for that. Also, Roll20 uses < and > operators as "less/greater than or equal to". If you don't want to be rerolling on 4s, you need to use <3. The closest I can get is this, but there is no way to total up the rolls, so you'd need to do it manually: &{template:default} {{name=Roller}} [[ [[ { [[ {[[1d8]],[[1d8]],[[1d8]]}kl1 ]], 9}<3]]d8 ]] {{Rolls=$[[0]], $[[1]], $[[2]]}} {{Lowest=$[[3]]}} {{Reroll=$[[5]]}} Bit of a mess, really.
I do something a little different. I do the normal attack macros (well, almost normal, I made custom ones so the buttons/links only show up when I roll damage, and the ones for crits can have different entries. So in the description box for my crit damage roll I put the link to run my Piercer Reroll macro which is this: &{template:default} {{name=Piercer Feat Reroll}} {{Original Damage=?{How much total original damage?}}} {{Replaced Die=?{What die roll being rerolled?}}} {{New Damage=[[?{How much total original damage?}-?{What die roll being rerolled?}+d8]]}} It doesn't refer to earlier rolls, instead I manually input everything, but it doesn't take very long at all. So when I roll for my damage I see how much the dice were (I have 3 extra dice on a crit cause I'm a 9th level barbarian). Obviously I'm going to want to reroll that 1, so I click on the Piercer Reroll link there and then it queries how much the original total damage was, and what was the die that I want to replace. Then it outputs this where it subtracts the replaced die from the total, then adds in a new d8.
With some mathematical trickery it is possible to use the group roll drop/keep mechanics to implement a reroll that will reroll your lowest die with a value of 1,2 or 3 and keep the reroll result even if lower. /r {d8*101,d8*101,d8*101,d8+350}kh3 % 50 How this works is by making your original 3d8 each return 101, 202, 303 ... 808; and the potential reroll d8 becomes 351, 352, 353 ... 358. When your original dice are all 4 or higher (minimum 404) they are all greater than the reroll dice (maximum 358) so your original dice are kept. When one of your dice is 3 or lower (maximum 303) it drops below the reroll dice (minimum 351) so the reroll gets kept above that original die. When two or three of your dice are 3 or lower it'll only drop the lowest of them since there is only one reroll die. Finally at the end is the % 50, that removes the extra 100's and 50's leaving just the sum of the 3 selected dice.
1626440530
David M.
Pro
API Scripter
I like that, Koda! Also, it's always fun seeing the creative maths coming from RainbowEncoder!
I feel like my brain has broken and that I'm going to need some time before the words on the screen start to mean something to my brain again. Thank you all for your answers. However, I think I'm going take a break and go touch grass. No lie, I didn't think taking the Elven Accuracy feat and the Piercer feat would be this much of a pain. But again, thank you!