2 个版本
0.1.1 | 2024 年 2 月 6 日 |
---|---|
0.1.0 | 2024 年 2 月 5 日 |
79 在 游戏
13KB
95 行
mice-roll 是一个简单的工具,可以在您的终端中掷类似 DnD 的骰子。
虽然略有启发于 https://github.com/Humblemonk/DiceMaiden,但并不打算与之兼容。
使用示例
安装
安装此工具的主要方式
- 使用 rustup 安装 rust 和 cargo
- 运行
cargo install mice-roll
Nix/NixOS
如果您已启用 flakes 的 Nix,您还可以使用 nix run git+https://codeberg.org/jilinoleg/mice-roll/ -- 1d20
来运行此应用程序一次
您还可以使用 nix profile
与之一起使用,或将它添加到您的 NixOS/Home Manager 配置中以便永久安装。
不带 Cargo 的通用 Linux
- 从版本中下载可执行文件
- 使用您选择的图形归档管理器(如 Ark)或
tar xzf mice-roll-xxxx.tar.gz
解压缩归档 - 使用文件管理器的右键菜单将文件标记为可执行,或使用
chmod +x mice-roll
命令 - 运行
mice-roll 1d20
以测试它是否正常工作。可选地,您还可以运行cp -a mice-roll ~/.local/bin/
以将其添加到您的 PATH 并允许在任何文件夹中运行
如何使用
目前,此工具接受单个参数,其中骰子和数字由加号或减号分隔。
mice-roll 1d20 # single 20-sided dice roll
mice-roll 2d20 # roll twice
mice-roll 1d20+1d6 # roll one d20 dice, and one d6 dice, and add results
mice-roll 1d20+1 # single d20, 1 is added to result
mice-roll 1d6-2 # single d6, 2 is substracted from result
我们还有一些可选参数作为命令行标志。
mice-roll --help # prints help and quits
mice-roll 1d20 --quiet # silences output, only prints result
mice-roll 3d20 --accesible # provides more screen reader friendly output, replaces brackets with commas
许可证
本软件根据 MIT 许可证 许可。
徽标基于 Vectordoodle 的鼠标图标(根据 CC 属性许可证授权)
横幅(logo-banner.svg)也使用了由Matthew Welch制作的White Rabbit字体,该字体采用MIT风格的许可协议授权。
依赖项
~1.4–2MB
~38K SLoC