瀏覽代碼

added a readme and a help flag to help remind users of the syntax

Mitch Donaberger 3 周之前
父節點
當前提交
ceefdaf995
共有 2 個文件被更改,包括 36 次插入1 次删除
  1. 34 0
      README.md
  2. 2 1
      roll_tor.sh

+ 34 - 0
README.md

@@ -0,0 +1,34 @@
+# The One Ring - Dice Roller
+
+A CLI dice roller for *The One Ring* RPG, enhanced with `gum` for animations.
+
+## Features
+
+- Rolls Feat Dice (d12) with special symbols:
+  - **Eye of Mordor** (1)
+  - **Gandalf Rune** (12)
+- Rolls Success Dice (d6) with special symbols:
+  - **Magnificent Success** (6)
+- Cryptographically secure randomness using `/dev/urandom`
+- Terminal animations using `gum`
+
+## Prerequisites
+
+- **Bash**
+- **[Gum](https://github.com/charmbracelet/gum)** (must be installed and in your PATH)
+
+## Usage
+
+```bash
+# Make executable
+chmod +x roll_tor.sh
+
+# Roll 1 Feat Die (default)
+./roll_tor.sh
+
+# Roll 1 Feat Die + 3 Success Dice
+./roll_tor.sh 1 3
+
+# Roll 2 Feat Dice
+./roll_tor.sh 2 0
+```

+ 2 - 1
roll_tor.sh

@@ -51,7 +51,8 @@ roll() {
     echo $(( (val % max) + 1 ))
 }
 
-echo -e "${BOLD}Rolling for The One Ring...${RESET}\n"
+gum spin --spinner moon --title "🎲 Rolling for The One Ring..." -- sleep 1
+echo ""
 
 TOTAL=0