Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a no push option & solve difficulty > skill issue #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ulrikL
Copy link

@ulrikL ulrikL commented Nov 25, 2017

Add two new versions of rolling dice that does not allow pushing the die roll.

!myz-np and !wmyz-np

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.
@ulrikL
Copy link
Author

ulrikL commented Nov 26, 2017

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.
"!myz [[(?{skill}-?{diff})d6]] [[1d6]] [[1d6]] [[(?{diff}-?{skill})d6]]"
Since the difficulty dice are last they can be ignored and can be considered optional.

@ulrikL ulrikL changed the title Add a no push option Add a no push option & solve difficulty > skill issue Nov 26, 2017
@ulrikL
Copy link
Author

ulrikL commented Sep 20, 2018

@shdwjk Are these good enough or do you want them done in a different way?

Copy link
Owner

@shdwjk shdwjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

• 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants