Skip to content

Commit

Permalink
Minor fixes to recent commands
Browse files Browse the repository at this point in the history
Fixed some issues related to help command and the dnd save
  • Loading branch information
Humblemonk committed Jun 16, 2024
1 parent 0e6e430 commit bed9a32
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 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.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!
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.10.1 -2024-06-16
### Added
- fix help rolls
- fix save roll

## 8.10.0 -2024-06-16
### Added
- Hero system support
Expand Down
10 changes: 6 additions & 4 deletions src/dice_maiden_logic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bed9a32

Please sign in to comment.