Add a no push option & solve difficulty > skill issue#20
Add a no push option & solve difficulty > skill issue#20ulrikL wants to merge 3 commits intoshdwjk:masterfrom
Conversation
Add two new versions of rolling dice that does not allow pushing the die roll. !myz-np and !wmyz-np
If the difficulty is higher than the skill the remaining dice shall be rolled and any "successes" of the difficulty dice shall reduce the total number of successes. Difficulty dice are shown in red (ordinary skill dice are shown in green) to help differentiate between the dice.
The push button should still be available when only having difficulty dice left.
|
Add a difficulty dice inline roll part of the script. If the scripts are called with a following solution it handles the difficulty dice correctly. |
|
@shdwjk Are these good enough or do you want them done in a different way? |
There was a problem hiding this comment.
• On your line 122, should probably retain the html entity for ampersand.
• Take out lines 683-692 and instead add a second case for whisper (this is just another label to the same whisper code):
case '!wmyz':
case '!wmyz-np':
a second case for non-whisper and code to determine nopush (this is just another label to the same non-whisper code):
case '!myz':
case '!myz-np':
nopush=/-np$/.test(cmd);
Since the switch statement falls through, this will use the existing logic to determine whisper and then additionally check both commands for the trailing -np indicating a no push roll.
• You took out the case for -6 on line ~759 for skillDiceArray. I don't recall why it was in there but just want to make sure it was intentional.
Other than that, it looks pretty good! I don't know the mechanics for difficulty, but I'll trust you do. =D
Add two new versions of rolling dice that does not allow pushing the die roll.
!myz-np and !wmyz-np