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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Macro Help. If AC is greater than Unarmoured use AC, Else use Unarmoured

I have this macro, so far: [[-1*floor((@{target|AC_no_armour}-@{target|AC}+0.1)/(abs(@{target|AC_no_armour}-@{target|AC}+0.1)+0.001))*@{target|AC} - floor((@{target|AC}-0.1-@{target|AC_no_armour})/(abs(@{target|AC}-0.1-@{target|AC_no_armour})+0.001))*@{target|AC_no_armour}]] Which checks to see which is greater, the targets AC or Unarmoured AC. I have 2 characters playing my 5e campaign who both have 15 AC. One in Medium Armour, one is a Dragon Bloodline Sorcerer. Both return the correct response of 15, however our Rogue has 13 AC, but it keeps returning 6. Which, coincidentally is his max HP. Can anyone spot what Im doing wrong here?
Ok, I was massively over complicating this. . . I have achieved the desired effect by having my players set their AC as Bar2 and using something like: [[1D20+4 - @{target|bar2})]] to hit [[1D6+ 2]] slashing damage, if crit add an extra [[1D6]] damage The perils of being a over logical thinker. Lol.
1442919711
Ziechael
Forum Champion
Sheet Author
API Scripter
Glad you got it sorted, and beat me to it to boot. Since you have answered your own question I'll close this thread for you. Feel free to open a new one should you have any other issues you want to solve in public ;)