Hey everyone, hoping you can help me with this. Although I have experience with writing HTML, CSS and Javascript code (but quite rusty), I'm finding it hard to figure out how I can do a condition statement for a dice roll. I get the impression from other threads that I may have to make an API script, but as that obviously can only be run by Pro users, I'd rather not use that method unless I absolutely have to. Specifically, the Valiant version of the cue system uses a Luck stat for characters, which if a particular die lands on, is classed as a Critical Success. Luck is the only stat which is a number, the rest are die (e.g. You could have a d6 in Charisma). For basic rolls, this is not an issue. A stat challenge example is below (with Might being the stat die): /roll 1d12cs0cf0 + 1@{Might}cs@{Luck}cf0 + ?{Modifier|0} But when in combat or using a character's Power, both the Stat die and Power die are rolled, with the higher number kept unless either one lands on luck, in which case it's a Critical Success. The problem is that the only formula I can think to use (pasted below) doesn't honor the Luck stat as a Critical Success and just passes on whichever of the two rolls is higher (Dtype is the Power die). /roll 1d12cs0cf0 + {1@{Dtype}cs@{Luck}cf0,1?{What Attribute would you like to use for this roll?|Might,@{Might}|Intellect,@{Intellect}|Charisma,@{Charisma}|Action,@{Action}}cs@{Luck}cf0}kh1 + ?{Modifier|0}
Is there another way to do this via the Dice Specification that I'm missing or would it only work with an API script? And if that is the case, I'm not sure how I would push the rolls to the API for it to then do the conditional calculation. Thank you in advance for any advice you could give me in this