
I am experimenting with macros for a custom game system and encountering a weird behaviour. The macro I am trying to make takes into account the number of attacks made and compares it to a specific target to return the number of hits.
The macro is as follow :
&{template:default}{{name=Shot}}{{Sucess= [[{?{# of shots ? }d100}<?{Aim}+?{Weapon bonus}+?{Range bonus}+?{Cover}+?{Maluses}]]}}
In most cases, it works just fine and returns the correct number of successes. However, I found that, since the cover attribute is always negative (so the number is inputed as -20 for example), it causes a bug when the attribute right before it is lower than the subtracted number.
So 4d100<50+0+0+-20+0 for example does not work but 4d100<50+0+20+-20+0 does work.
Example :
Does anyone know what can cause this behaviour and if there is a way to work around it ?