I don't know you will accept this. It works but does not use existing functions. It means no rng seperation on gm to allow testing using assert.equal. "2gm" does not work, although "gm gm" does.
This approach at least means basic funationality is achieved and that a gm roll does not affect dice results, so you can roll 2d6 gm and get a 2d6 result + gm result in the comment.
I don't know you will accept this. It works but does not use existing functions. It means no rng seperation on gm to allow testing using assert.equal. "2gm" does not work, although "gm gm" does.
This approach at least means basic funationality is achieved and that a gm roll does not affect dice results, so you can roll 2d6 gm and get a 2d6 result + gm result in the comment.