Hello everyone. I am having a problem with conditional statements in Roll20. I am running a Star Wars FFG game. If you are unfamiliar with the system, when forming your dice pool you compare your two corresponding stats. The greater of the two equals the number of dice in the pool and the lesser of the two equals to the number of dice upgraded. I have created two dice tables: [gi] for normal dice and [yi] for upgraded.
I am writing an ability that rolls a Presence / Cool pool. It is made up of four parts:
If Pres > Cool, roll (Pres - Cool) normal dice
Else, roll (Cool - Pres) normal dice
+
If Pres > Cool, roll (Cool) upgraded dice
Else, roll (Pres) upgraded dice
Within Roll20, the Ability reads like this:
/roll {{@{Pres}, 0}>@{Cool}} * (@{Pres}-@{Cool})t[gi] + (@{Cool}-@{Pres})t[gi] + {{@{Pres}, 0}>@{Cool}} * @{Cool}t[yi] + @{Pres}t[yi]
When this is rolled, the first two parts of the equation works. But when it gets to the third and fourth steps, it rolls dice as if the second if statement is true and false. I thought the problem might be that I could not have two conditional statements in one ability, but it works when I copy and paste the first two parts over the second two.
I would appreciate any help. Please let me know if I can clarify any points. Thank you.