Skip to content

Commit

Permalink
Fix roll mode checks
Browse files Browse the repository at this point in the history
Minor update to fix some jank in a switch statement for the roll modes.
This commit also fixes the help syntax issues
  • Loading branch information
Humblemonk committed Jun 21, 2024
1 parent a9ec98a commit 13ee5cb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dice_maiden.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dice bot for Discord
# Author: Humblemonk
# Version: 8.11.0
# Version: 8.11.1
# Copyright (c) 2017. All rights reserved.
# !/usr/bin/ruby
# If you wish to run a single instance of this bot, please follow the "Manual Install" section of the readme!
Expand Down
5 changes: 5 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 8.11.1 -2024-06-21
### Added
- Fixed help rolls
- Fixed game system rolls

## 8.11.0 -2024-06-19
### Added
- Added botch support
Expand Down
20 changes: 10 additions & 10 deletions src/dice_maiden_logic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ def check_help(event)
event.respond(content: @basic_help.to_s)
true
# I do not know when this bug occurred where the p is stripped. Check for hel instea of help
when /^\s*hel\s+(alias)\s*$/i
when /^\s*hel.\s*(alias)\s*$/i
event.respond(content: @alias_help.to_s)
true
when /^\s*hel\s+(system)\s*$/i
when /^\s*hel.\s*(system)\s*$/i
event.respond(content: @system_help.to_s)
true
end
Expand Down Expand Up @@ -548,28 +548,28 @@ def input_valid(event)

def check_roll_modes
case @input
when @input.match(/^\s?(wng)\s/i)
when /^\s?(wng)\s/i
@wng = true
@input.sub!('wng', '')
when @input.match(/^\s?(dh)\s/i)
when /^\s?(dh)\s/i
@dh = true
@input.sub!('dh', '')
when @input.match(/^\s?(s)\s/i)
when /^\s?(s)\s/i
@simple_output = true
@input.sub!('s', '')
when @input.match(/\s?(ul)\s/i)
when /\s?(ul)\s/i
@do_tally_shuffle = true
@input.sub!('ul', '')
when @input.match(/\s?(p)\s/i)
when /\s?(p)\s/i
@private_roll = true
@input.sub!('p', '')
when @input.match(/\s?(gb)\s/i)
when /\s?(gb)\s/i
@godbound = true
@input.sub!('gb', '')
when @input.match(/\s?(hsn)\s/i)
when /\s?(hsn)\s/i
@hsn = true
@input.sub!('hsn', '')
when @input.match(/\s?(hsk)\s/i)
when /\s?(hsk)\s/i
@hsk = true
if @input.match(/hsk\d+/i)
multiplier_string = @input.scan(/(hsk)\d+/i)
Expand Down

0 comments on commit 13ee5cb

Please sign in to comment.