diff --git a/dice_maiden.rb b/dice_maiden.rb index 01467b1..f1ef84a 100755 --- a/dice_maiden.rb +++ b/dice_maiden.rb @@ -1,6 +1,6 @@ # Dice bot for Discord # Author: Humblemonk -# Version: 8.10.0 +# Version: 8.10.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! diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index a516132..14c41d4 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,8 @@ +## 8.10.1 -2024-06-16 +### Added +- fix help rolls +- fix save roll + ## 8.10.0 -2024-06-16 ### Added - Hero system support diff --git a/src/dice_maiden_logic.rb b/src/dice_maiden_logic.rb index afd20a6..d351918 100644 --- a/src/dice_maiden_logic.rb +++ b/src/dice_maiden_logic.rb @@ -28,7 +28,7 @@ def alias_input_pass(input) [/\bdndstats\b/i, 'DnD Stat-roll', /\b(dndstats)\b/i, '6 4d6 k3'], # DnD character stats - 4d6 drop lowest 6 times [/\battack\b/i, 'DnD attack roll', /\b(attack)\b/i, '1d20'], # DnD attack roll [/\bskill\b/i, 'DnD skill check', /\b(skill)\b/i, '1d20'], # DnD skill check - [/\bsave\b/i, 'DnD saving throw', /\b(attack)\b/i, '1d20'], # DnD saving throw + [/\bsave\b/i, 'DnD saving throw', /\b(save)\b/i, '1d20'], # DnD saving throw [/\b\d+hsn\b/i, 'Hero System Normal', /\b(\d+)hsn\b/i, 'hsn \\1d6 nr'], # Hero System 5e Normal Damage [/\b\d+hsk\d*\b/i, 'Hero System Killing', /\b(\d+)hsk(\d*)\b/i, 'hsk\\2 \\1d6 nr'], # Hero System 5e Killing Damage [/\b\d+hsh\b/i, 'Hero System to Hit', /\b(\d+)hsh\b/i, 'hsh 11+\\1 -3d6 nr'] # Hero System 5e to Hit @@ -385,13 +385,15 @@ def check_donate(event) end def check_help(event) - if @check =~ /^\s*(help)\s*$/i + case @check + when /^\s*(help)\s*$/i event.respond(content: @basic_help.to_s) true - elsif @check =~ /^\s*(help)\s+(alias)\s*$/i + # 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 event.respond(content: @alias_help.to_s) true - elsif @check =~ /^\s*(help)\s+(system)\s*$/i + when /^\s*hel\s+(system)\s*$/i event.respond(content: @system_help.to_s) true end