beanc16 / roll-of-darkness-bot

A discord bot for rolling dice in the New World of Darkness, Pokemon Tabletop United, and Curseborne tabletop systems
1 stars 0 forks source link

`/ptu roll attack` does not account for critical hits #16

Open beanc16 opened 6 hours ago

beanc16 commented 6 hours ago

When rolling with /ptu roll attack, any attack that hits with a 20 should critical hit (abbreviated as "crit"). When criting, the roll should take the first dice pool and number added onto it that's typed in to the damage roll, double the number of dice rolled, and double the number added onto it, then roll the specified dice.

For example, if a damage dice pool of 2d6+8+15 is given, a crit should automatically modify the damage roll to 4d6+16+15.

However, we typically house rule that crits instead roll the max value instead of doubling the dice pool. This house rule should be given a boolean parameter called use_max_crit_roll that defaults to true. When this parameter is true, this value should use the house rule instead. For example, if a damage dice pool of 2d6+8+15 is given, a crit should automatically modify the damage roll to 2d6+8+15+20 (where 20 is 6+6+8 for the max possible roll for the extra crit dice pool).

beanc16 commented 6 hours ago

This bug will likely be easier to fix once auto-hit and auto-miss detection are added in order to fix https://github.com/beanc16/roll-of-darkness-bot/issues/17