Gerdofal / foundryvtt-cyberpunkred

GNU General Public License v3.0
20 stars 18 forks source link

Add alternate method to handle crit explosions correctly #91

Closed Algebro7 closed 3 years ago

Algebro7 commented 3 years ago

This adds another way to handle explosions of critical rolls, and is hopefully clean enough to be feasible. I've overridden the roll() function on our custom cyberpunkredDie class to add a canExplode property, which defaults to true, and updated the explode and invertExplode functions to set that property to false on the new result when a roll explodes. Note that this effectively disables infinite explosions, which isn't ideal but in my opinion I think is acceptable since the intent of the Die is to implement the Core Rules, and infinite critical explosions aren't part of the core rules.

I've also tested with Dice So Nice and everything seems to work as intended.