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?