dnd 5e的python代码
DnD4p的Python项目详细描述
DND4PY-D&D第五版代码集
安装
DnD4py
可以通过pip通过
pip install DnD4py
也可以通过运行
make install
从墓穴里面。
用法
DND4PY包含许多与D&D第五版一起使用的错误代码。它们包括:
滚动4me
模拟由许多骰子和修改器组成的复杂掷骰 给出结果、单个卷、分布的平均值以及该卷相对于分布的百分位数。
示例:
$ roll 3d8 + 1d6 + 10
返回类似于:
*************
Total: 25
*************
= 12 + 3 + 10
[7 2 3] + [3] + 10
Mean: 27.0
Percentile: 28.9%
查找5e
查找Roll20上的D&D术语。
当前支持:法术、物品和怪物
示例:
$ lookup5e potion of healing
返回
Potion Of Healing
Item Type: Adventuring Gear
Subtype: Potion
Weight: 0.5
Description
===========================
You regain 2d4 + 2 hit points when you drink this potion. The potion's red
liquid glimmers when agitated.
如果您知道搜索所属的类别,则可以缩短查找时间:
$ lookup5e --monster goblin
也与
$ monster5e goblin
两者都返回:
Goblin
HP: 7 (2d6)
AC: 15 (Leather Armor, Shield)
Speed: 30 ft.
Challenge Rating: 1/4
STR DEX CON INT WIS CHA
8 (-1) 14 (+2) 10 (+0) 10 (+0) 8 (-1) 8 (-1)
Type: humanoid (goblinoid)
Size: Small
Alignment: Neutral Evil
Senses: Darkvision 60 Ft.
Skills: Stealth +6
Languages: Common, Goblin
Description
===========================
*Traits*
Nimble Escape: The goblin can take the Disengage or Hide action as a
bonus action on each of its turns.
*Actions*
Scimitar: Melee Weapon Attack: +4
to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.
Shortbow:
Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2)
piercing damage.
您也可以尝试:
$ spell5e fireball
以及
$ item5e deck of many things