bemyak
1 supporter
Devlog №001

Devlog №001

Apr 10, 2021

Support for roll annotations! 🎉

Try it:

/r d20 to hit the dragon, 6d6 slashing damage

And get beautiful:

to hit the dragon: 1d20[17] = 17
slashing damage: 6d6[3,2,2,1,6,2] = 16

Boring technical stuff

It took me a lot of time to implement and I'm not sure how well this will work under heavy load. This was enabled by recently implemented parser.

The problem is that each comment symbol is analyzed for being begging of a roll expression, which is quite complicated thanks to a lot of shortcuts. Basically, anything that doesn't look like a roll is treated like an annotation for the previous roll.

The parser grew up to 113 lines, but IMO it still looks good and quiet readable.

Until next time! 👋

Enjoy this post?

Buy bemyak a coffee

More from bemyak