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 .
×
🍵 What is a cleric’s favorite hot drink? Divini-tea. 🍵
Create a free account

Percentage Macro Question

Hi, I just had a quick Macro question, how would I go about calculating a percent reduction? If I wanted one individual to roll damage versus a target and for the damage to be reduced by the targets damage reduction how would I go about it? What I have so far would be something like: /r 1d8+9 - [@{target|DR}*result of 1d8+9] but I don't know how to have the macro use the result.
1435444772

Edited 1435444914
Wes
Pro
Sheet Author
Assuming that @{target|DR} is a percentage expressed as a decimal ie 25% = 0.25. you could use something like this: [[round((1d8+9)*(1-@{target|DR}))]] Additionally you can leave out the round or use floor to round down to a whole number or ceil to round up to a whole number.