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

Macro Help: Keep lower value for math between Attribute and flat number.

I have a boss enemy that has a unique damage situation. Basically you get up to a certain amount for resistance to their damage. (Their damage cannot be reduced by more than 20). What I am trying to do for my DM is create a macro that does the math without having to pull up character sheets to use with NPCs (this is a big final battle sort of deal). Essentially I am trying to do this math wise:  Damage minus resistance(if it is less than 20) OR Damage minus 20. But like in one command function. I know keep lowest is a thing, but can it be used with attributes and flat numbers or only dice? 
I actually figured it out through some serious digging on the forms and found a four year old post that I think will work for me. Keep lowest was correct, but how I was inputting them was wrong. For anyone else that for whatever reason needs this topic answered its: [[ {[[@{stat}]],[[20]]}kl1 ]]
I'll just take a moment to let you know that the "keep low" and "keep high" function compares either two flat numbers or two rolls to each other. If you want to compare a dice roll to a flat number, just turn the flat number into an XD1 roll and voila ;oP