I'm trying to create a custom version of the spell Scorching Ray for a warlock player. We create and maintain our characters on D&D Beyond, play on the Roll20 virtual tabletop platform, and use the Beyond20 plugin that basically links the two. This allows a player to click on their DDB character sheet, and the results are auto-imported into Roll20 (to hit rolls, initiative, spell damage, etc). This gets a little complicated when you combine multiple spells and abilities.
When the above-mentioned warlock has Hex and Hexblade's Curse up on the BBEG, he casts Scorching Ray and each ray does 2d6 fire damage + 1d6 necrotic damage + CHA modifier + proficiency bonus, and it crits on a 19 or 20.
To make this work in Roll20/DDB, you need to click the Scorching Ray spell to see if you hit and how much damage it does, then click the Hex damage, then manually add the CHA and proficiency modifiers. On a Nat20, Roll20/DDB even doubles the dice damage rolls automatically.
I can make a spell in DDB that does all of this in a single button click -EZPZ. However, I haven't been able to figure out how to get the 'Any attack roll you make against the cursed target is a critical hit on a roll of 19 or 20' portion of Hexblade's Curse worked into the spell.
Alternately, if there is a way to create this same functionality (the automatic rolling of extra dice based on a '19' being a crit) from within Roll20, that would be a valuable answer as my end goal is Roll20 display. However, it would have to be an automated process, not just typing the '/roll' command to roll the extra dice.
On D&D Beyond or Roll20, how do you make a homebrew spell that crits on a 19 & 20?