briyah 1.3.5 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/README.md +689 -684
  2. package/data/common/artifacts/dnd5e/campaign_designer-setting.md +112 -0
  3. package/data/common/artifacts/dnd5e/character_creator-basics.md +40 -0
  4. package/data/common/artifacts/dnd5e/class-barbarian.md +64 -0
  5. package/data/common/artifacts/dnd5e/class-bard.md +63 -0
  6. package/data/common/artifacts/dnd5e/class-cleric.md +60 -0
  7. package/data/common/artifacts/dnd5e/class-druid.md +56 -0
  8. package/data/common/artifacts/dnd5e/class-fighter.md +53 -0
  9. package/data/common/artifacts/dnd5e/class-monk.md +77 -0
  10. package/data/common/artifacts/dnd5e/class-paladin.md +66 -0
  11. package/data/common/artifacts/dnd5e/class-ranger.md +73 -0
  12. package/data/common/artifacts/dnd5e/class-rogue.md +62 -0
  13. package/data/common/artifacts/dnd5e/class-sorcerer.md +67 -0
  14. package/data/common/artifacts/dnd5e/class-warlock.md +83 -0
  15. package/data/common/artifacts/dnd5e/class-wizard.md +51 -0
  16. package/data/common/artifacts/dnd5e/dungeon_master-procedure.md +348 -0
  17. package/data/common/artifacts/dnd5e/manifest.json +95 -0
  18. package/data/common/config/markup +1 -1
  19. package/data/common/config/model_prices.json +1250 -237
  20. package/data/common/prompts/campaign_designer/defaults_config.json +16 -0
  21. package/data/common/prompts/campaign_designer/perceive.json +29 -0
  22. package/data/common/prompts/campaign_designer/perceive.prompt +345 -0
  23. package/data/common/prompts/campaign_designer/system_instruction.prompt +0 -0
  24. package/data/common/prompts/character_creator/defaults_config.json +31 -0
  25. package/data/common/prompts/character_creator/perceive.json +29 -0
  26. package/data/common/prompts/character_creator/perceive.prompt +621 -0
  27. package/data/common/prompts/character_creator/system_instruction.prompt +0 -0
  28. package/data/common/prompts/dnd_player/defaults_config.json +5 -0
  29. package/data/common/prompts/dnd_player/perceive.json +29 -0
  30. package/data/common/prompts/dnd_player/perceive.prompt +312 -0
  31. package/data/common/prompts/dnd_player/system_instruction.prompt +0 -0
  32. package/data/common/prompts/dnd_room_moderator/defaults_config.json +9 -0
  33. package/data/common/prompts/dnd_room_moderator/moderate.json +34 -0
  34. package/data/common/prompts/dnd_room_moderator/moderate.prompt +291 -0
  35. package/data/common/prompts/dnd_room_moderator/system_instruction.prompt +0 -0
  36. package/data/common/prompts/dungeon_master/compact_agent.prompt +24 -0
  37. package/data/common/prompts/dungeon_master/defaults_config.json +29 -0
  38. package/data/common/prompts/dungeon_master/perceive.json +33 -0
  39. package/data/common/prompts/dungeon_master/perceive.prompt +757 -0
  40. package/data/common/prompts/dungeon_master/system_instruction.prompt +0 -0
  41. package/data/common/prompts/room_moderator/moderate.json +34 -29
  42. package/data/common/prompts/room_moderator/moderate.prompt +230 -210
  43. package/data/common/prompts/story_moderator/moderate.prompt +5 -2
  44. package/data/common/prompts/story_moderator/moderate_to_alice.mock +6 -6
  45. package/data/common/prompts/story_moderator/moderate_to_bob.mock +6 -6
  46. package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +2 -0
  47. package/dist-sdk/server/src/ai/LLM/anthropic.service.js +34 -22
  48. package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +1 -0
  49. package/dist-sdk/server/src/ai/LLM/base-ai.service.js +4 -1
  50. package/dist-sdk/server/src/ai/agent-config.d.ts +1 -0
  51. package/dist-sdk/server/src/ai/agent-store.service.js +6 -4
  52. package/dist-sdk/server/src/ai/agent.d.ts +7 -0
  53. package/dist-sdk/server/src/ai/agent.js +33 -2
  54. package/dist-sdk/server/src/ai/artifact.service.d.ts +2 -0
  55. package/dist-sdk/server/src/ai/artifact.service.js +29 -1
  56. package/dist-sdk/server/src/ai/pack-artifacts.d.ts +7 -0
  57. package/dist-sdk/server/src/ai/pack-artifacts.js +155 -0
  58. package/dist-sdk/server/src/app/stripe.controller.js +5 -0
  59. package/dist-sdk/server/src/app.controller.d.ts +18 -18
  60. package/dist-sdk/server/src/app.controller.js +249 -25
  61. package/dist-sdk/server/src/app.service.d.ts +30 -17
  62. package/dist-sdk/server/src/app.service.js +303 -35
  63. package/dist-sdk/server/src/auth/auth.controller.js +3 -2
  64. package/dist-sdk/server/src/auth/owner-only.decorator.d.ts +1 -0
  65. package/dist-sdk/server/src/auth/owner-only.decorator.js +8 -0
  66. package/dist-sdk/server/src/auth/twilio.service.d.ts +5 -1
  67. package/dist-sdk/server/src/auth/twilio.service.js +5 -3
  68. package/dist-sdk/server/src/config/user-paths.service.d.ts +2 -0
  69. package/dist-sdk/server/src/config/user-paths.service.js +8 -0
  70. package/dist-sdk/server/src/room/artifact-store.service.js +10 -2
  71. package/dist-sdk/server/src/room/artifact.d.ts +1 -0
  72. package/dist-sdk/server/src/room/message.d.ts +2 -1
  73. package/dist-sdk/server/src/room/message.js +5 -4
  74. package/dist-sdk/server/src/room/room-config.d.ts +3 -0
  75. package/dist-sdk/server/src/room/room-store.service.d.ts +4 -2
  76. package/dist-sdk/server/src/room/room-store.service.js +46 -12
  77. package/dist-sdk/server/src/room/room.d.ts +29 -3
  78. package/dist-sdk/server/src/room/room.js +390 -122
  79. package/dist-sdk/server/src/sdk/briyah.js +12 -0
  80. package/dist-sdk/server/src/sdk/index.d.ts +4 -1
  81. package/dist-sdk/server/src/sdk/index.js +9 -1
  82. package/dist-sdk/server/src/story/story.service.js +10 -12
  83. package/dist-sdk/server/src/tools/native-tool.types.d.ts +31 -0
  84. package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.d.ts +22 -0
  85. package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.js +59 -0
  86. package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.d.ts +24 -0
  87. package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.js +11 -0
  88. package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.d.ts +5 -0
  89. package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.d.ts +1 -0
  90. package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.js +154 -0
  91. package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.js +9 -0
  92. package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.d.ts +20 -0
  93. package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.d.ts +2 -0
  94. package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.js +1824 -0
  95. package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.js +6 -0
  96. package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.d.ts +44 -0
  97. package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.d.ts +2 -0
  98. package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.js +17293 -0
  99. package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.js +5 -0
  100. package/dist-sdk/server/src/tools/packs/dnd5e/data/races.d.ts +41 -0
  101. package/dist-sdk/server/src/tools/packs/dnd5e/data/races.js +250 -0
  102. package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.d.ts +16 -0
  103. package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.d.ts +2 -0
  104. package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.js +3760 -0
  105. package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.js +12 -0
  106. package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.d.ts +63 -0
  107. package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.js +449 -0
  108. package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.d.ts +23 -0
  109. package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.js +88 -0
  110. package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +20 -0
  111. package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +109 -0
  112. package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.d.ts +30 -0
  113. package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.js +329 -0
  114. package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.d.ts +9 -0
  115. package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.js +100 -0
  116. package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +117 -0
  117. package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +1057 -0
  118. package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.d.ts +13 -0
  119. package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.js +147 -0
  120. package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.d.ts +27 -0
  121. package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.js +263 -0
  122. package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.d.ts +26 -0
  123. package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.js +129 -0
  124. package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.d.ts +22 -0
  125. package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.js +127 -0
  126. package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.d.ts +33 -0
  127. package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.js +137 -0
  128. package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.d.ts +26 -0
  129. package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +182 -0
  130. package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.d.ts +48 -0
  131. package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.js +344 -0
  132. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +98 -0
  133. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +456 -0
  134. package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.d.ts +27 -0
  135. package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.js +123 -0
  136. package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.d.ts +23 -0
  137. package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.js +201 -0
  138. package/dist-sdk/server/src/tools/packs/dnd5e/index.d.ts +3 -0
  139. package/dist-sdk/server/src/tools/packs/dnd5e/index.js +35 -0
  140. package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.d.ts +2 -0
  141. package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +323 -0
  142. package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.d.ts +3 -0
  143. package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +117 -0
  144. package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.d.ts +2 -0
  145. package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.js +122 -0
  146. package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.d.ts +2 -0
  147. package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +157 -0
  148. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +32 -0
  149. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +203 -0
  150. package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.d.ts +4 -0
  151. package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +465 -0
  152. package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.d.ts +2 -0
  153. package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.js +116 -0
  154. package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.d.ts +4 -0
  155. package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.js +234 -0
  156. package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.d.ts +6 -0
  157. package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +616 -0
  158. package/dist-sdk/server/src/tools/packs/index.d.ts +7 -0
  159. package/dist-sdk/server/src/tools/packs/index.js +45 -0
  160. package/dist-sdk/server/src/tools/tool-execution.service.d.ts +2 -2
  161. package/dist-sdk/server/src/tools/tool-execution.service.js +7 -6
  162. package/dist-sdk/shared/types/app.types.d.ts +63 -0
  163. package/docs/assets/hierarchy.js +1 -1
  164. package/docs/assets/navigation.js +1 -1
  165. package/docs/assets/search.js +1 -1
  166. package/docs/classes/Agent.html +51 -15
  167. package/docs/classes/Briyah.html +14 -14
  168. package/docs/classes/BriyahConfigService.html +5 -5
  169. package/docs/classes/NativeToolRegistry.html +21 -0
  170. package/docs/classes/Room.html +79 -29
  171. package/docs/classes/RoomMessage.html +32 -15
  172. package/docs/enums/MessageAction.html +3 -3
  173. package/docs/functions/availableToolPacks.html +2 -0
  174. package/docs/functions/dnd5eTools.html +5 -0
  175. package/docs/functions/enabledToolPacks.html +2 -0
  176. package/docs/functions/registerToolPacks.html +6 -0
  177. package/docs/hierarchy.html +1 -1
  178. package/docs/index.html +3 -3
  179. package/docs/interfaces/AgentInfo.html +17 -2
  180. package/docs/interfaces/AgentMessagesResponse.html +2 -2
  181. package/docs/interfaces/AppService.html +230 -181
  182. package/docs/interfaces/Artifact.html +15 -3
  183. package/docs/interfaces/ArtifactMetadata.html +5 -2
  184. package/docs/interfaces/ArtifactWriteOptions.html +21 -0
  185. package/docs/interfaces/AttachDocumentResponse.html +2 -2
  186. package/docs/interfaces/BriyahConfigOptions.html +9 -9
  187. package/docs/interfaces/ChapterInfo.html +2 -2
  188. package/docs/interfaces/Character.html +2 -2
  189. package/docs/interfaces/CreateAgentResponse.html +2 -2
  190. package/docs/interfaces/CreateRoomResponse.html +2 -2
  191. package/docs/interfaces/CreateStoryResponse.html +2 -2
  192. package/docs/interfaces/FileList.html +2 -2
  193. package/docs/interfaces/FileMetadata.html +3 -3
  194. package/docs/interfaces/IConfigService.html +3 -3
  195. package/docs/interfaces/LoggingOptions.html +6 -6
  196. package/docs/interfaces/Message.html +2 -2
  197. package/docs/interfaces/ModelInfo.html +2 -2
  198. package/docs/interfaces/NativeToolDefinition.html +11 -7
  199. package/docs/interfaces/PreparedPromptResponse.html +2 -2
  200. package/docs/interfaces/ProcessTextResponse.html +2 -2
  201. package/docs/interfaces/PromptFile.html +2 -2
  202. package/docs/interfaces/PromptFileContent.html +2 -2
  203. package/docs/interfaces/PromptFilesResponse.html +2 -2
  204. package/docs/interfaces/PromptFolder.html +2 -2
  205. package/docs/interfaces/PromptFoldersResponse.html +2 -2
  206. package/docs/interfaces/RoomDetails.html +15 -2
  207. package/docs/interfaces/RoomInfo.html +3 -2
  208. package/docs/interfaces/RoomMessageUpdate.html +2 -2
  209. package/docs/interfaces/RoomMessagesResponse.html +2 -2
  210. package/docs/interfaces/SendMessageResult.html +2 -2
  211. package/docs/interfaces/StoryErrorEvent.html +3 -3
  212. package/docs/interfaces/StoryIdea.html +2 -2
  213. package/docs/interfaces/StoryInfo.html +3 -3
  214. package/docs/interfaces/StoryIntroduceCharacterEvent.html +3 -3
  215. package/docs/interfaces/StoryProgressChapterEvent.html +3 -3
  216. package/docs/interfaces/StoryState.html +5 -5
  217. package/docs/interfaces/StoryStateEvent.html +3 -3
  218. package/docs/interfaces/ToolArtifact.html +8 -0
  219. package/docs/interfaces/ToolCaller.html +8 -0
  220. package/docs/interfaces/ToolDefinition.html +2 -2
  221. package/docs/interfaces/ToolHelpers.html +7 -3
  222. package/docs/interfaces/ToolParameter.html +2 -2
  223. package/docs/interfaces/ToolRoomAccess.html +51 -0
  224. package/docs/interfaces/ToolSummary.html +3 -2
  225. package/docs/interfaces/ToolsResponse.html +2 -2
  226. package/docs/interfaces/Transaction.html +2 -2
  227. package/docs/interfaces/TransactionHistoryResponse.html +2 -2
  228. package/docs/modules.html +1 -1
  229. package/docs/types/PromptScope.html +1 -1
  230. package/docs/types/ToolContext.html +2 -2
  231. package/docs/types/ToolRunResult.html +1 -1
  232. package/package.json +6 -4
  233. package/dist-sdk/server/src/ai/LLM/base-ai.service.spec.d.ts +0 -1
  234. package/dist-sdk/server/src/ai/LLM/base-ai.service.spec.js +0 -89
  235. package/dist-sdk/server/src/ai/LLM/comfyui-client.spec.d.ts +0 -1
  236. package/dist-sdk/server/src/ai/LLM/comfyui-client.spec.js +0 -143
  237. package/dist-sdk/server/src/ai/LLM/comfyui-workflow.spec.d.ts +0 -1
  238. package/dist-sdk/server/src/ai/LLM/comfyui-workflow.spec.js +0 -207
@@ -0,0 +1,348 @@
1
+ # Running the game: combat, exploration and adjudication
2
+
3
+ Attach to the **Dungeon Master** agent only.
4
+
5
+ This is the procedural half of the rules the `dnd5e` tool pack does not model. The pack computes
6
+ numbers off character sheets and looks up creatures, spells, items and single rules; it does not
7
+ tell you how a round is sequenced, what an action can be spent on, how far a party travels in a
8
+ day, or how hard a door is to break. That is what is here.
9
+
10
+ *This work includes material from the System Reference Document 5.1 by Wizards of the Coast LLC,
11
+ available under the Creative Commons Attribution 4.0 International License.*
12
+
13
+ ## Look these up rather than guessing
14
+
15
+ `rules_lookup` answers each of these in full. Do not reproduce them from memory; the tool result
16
+ is authoritative and costs one call.
17
+
18
+ | Topic | `rules_lookup` topic |
19
+ |---|---|
20
+ | Cover, advantage, critical hits | `cover`, `advantage`, `critical hit` |
21
+ | Opportunity attacks, two-weapon fighting, grappling | `opportunity attack`, `two-weapon fighting`, `grappling` |
22
+ | Concentration | `concentration` |
23
+ | Death saves, massive damage, temporary hit points | `death saving throw`, `massive damage`, `temporary hit points` |
24
+ | Short and long rest benefits | `short rest`, `long rest` |
25
+ | Hiding, passive Perception | `hiding`, `passive perception` |
26
+ | Falling | `falling` |
27
+ | Any condition, weapon, armour, race, feat, background | the name itself |
28
+
29
+ `stat_block`, `spell` and `magic_item` cover every SRD creature, spell and item. `check`,
30
+ `apply_hp`, `rest`, `spend`, `conditions` and `inventory` do the arithmetic on sheets.
31
+
32
+ ## The combat round
33
+
34
+ 1. **Surprise.** Decide who is surprised.
35
+ 2. **Positions.** Decide where everyone is, from the party's stated positions and marching order.
36
+ 3. **Initiative.** `roll_initiative` in one call for the whole encounter.
37
+ 4. **Turns**, in initiative order.
38
+ 5. **Next round.** Repeat step 4 until the fight ends.
39
+
40
+ A round is 6 seconds. Initiative order is fixed for the whole fight. Roll one initiative for a
41
+ group of identical creatures so they act together. Break ties however you like; the players decide
42
+ among their own tied characters.
43
+
44
+ ### Surprise
45
+
46
+ If neither side is being stealthy, both notice each other and nobody is surprised. Otherwise
47
+ compare each hider's Dexterity (Stealth) against each opposing creature's passive Wisdom
48
+ (Perception). A creature that notices no threat is surprised.
49
+
50
+ A surprised creature cannot move or act on its first turn and cannot take a reaction until that
51
+ turn ends. Individuals in a group can be surprised while others are not.
52
+
53
+ ## What a turn buys
54
+
55
+ | Resource | Rule |
56
+ |---|---|
57
+ | **Move** | Up to your speed, splittable before and after the action, and between attacks of a multiattack |
58
+ | **Action** | One, chosen from the list below or granted by a class feature or spell |
59
+ | **Bonus action** | Only when a feature, spell or item says so. One per turn, chosen if several are available |
60
+ | **Reaction** | One per round, on any turn, spent on a stated trigger. Refreshes at the start of your next turn |
61
+ | **Free interaction** | One object or environment interaction, during the move or the action: draw a weapon, open a door, drink a flagon, throw a lever, hand over an item |
62
+
63
+ A second object interaction costs the action. Require an action for a free interaction when the
64
+ task needs care or is an obstacle: a stuck door, a drawbridge crank.
65
+
66
+ Anything that stops a creature taking actions also stops its bonus action. A creature may forgo
67
+ moving, acting, or doing anything at all.
68
+
69
+ ### Actions
70
+
71
+ | Action | Effect |
72
+ |---|---|
73
+ | **Attack** | One melee or ranged attack, or more with Extra Attack |
74
+ | **Cast a Spell** | For a spell whose casting time is 1 action. Longer casting times are not an action |
75
+ | **Dash** | Extra movement equal to your speed after modifiers |
76
+ | **Disengage** | Your movement provokes no opportunity attacks this turn |
77
+ | **Dodge** | Until your next turn, attacks against you have disadvantage if you can see the attacker, and you make Dexterity saves with advantage. Lost if incapacitated or speed 0 |
78
+ | **Help** | The creature you aid has advantage on its next ability check at that task before your next turn; or the first attack roll an ally makes against a creature within 5 feet of you has advantage |
79
+ | **Hide** | A Dexterity (Stealth) check |
80
+ | **Ready** | Name a perceivable trigger and an action or a move. When it happens, spend your reaction or ignore it. A readied spell must have a 1-action casting time and requires concentration to hold |
81
+ | **Search** | Wisdom (Perception) or Intelligence (Investigation), as the search warrants |
82
+ | **Use an Object** | For an object that requires an action, or a second interaction in a turn |
83
+ | **Improvised** | Anything the player describes. You decide whether it is possible and what roll it needs |
84
+
85
+ Do not restrict a player to this list. Rule on what they describe and pick the closest roll.
86
+
87
+ ## Movement and position
88
+
89
+ - **Difficult terrain** costs 1 extra foot per foot, and does not stack with itself. Rubble,
90
+ undergrowth, steep stairs, snow, shallow bog, and **any other creature's space**.
91
+ - **Prone**: dropping prone is free; standing up costs half your speed; crawling costs 1 extra
92
+ foot per foot, so crawling in difficult terrain costs 3 feet per foot.
93
+ - **Other creatures**: you may move through a non-hostile creature's space, and through a hostile
94
+ one only if it is two or more sizes larger or smaller. You may never willingly end a move in
95
+ another creature's space. Leaving a hostile creature's reach provokes an opportunity attack.
96
+ - **Several speeds** (walking and flying): switch freely, subtracting distance already moved from
97
+ the new speed.
98
+ - **Flying**: a flier that is knocked prone, reduced to speed 0, or otherwise unable to move falls,
99
+ unless it can hover or is held up by magic.
100
+ - **Climbing and swimming** cost 1 extra foot per foot without a climb or swim speed, and you may
101
+ require a Strength (Athletics) check for a slippery surface, few handholds, or rough water.
102
+ - **Long jump**: up to your Strength score in feet with a 10-foot run-up, half that standing. A DC
103
+ 10 Strength (Athletics) check clears a low obstacle; landing in difficult terrain needs a DC 10
104
+ Dexterity (Acrobatics) check or you land prone.
105
+ - **High jump**: 3 + Strength modifier feet with a run-up, half standing. You can reach a further
106
+ half your height above that.
107
+
108
+ Every foot of jumping, climbing and swimming is deducted from your speed.
109
+
110
+ ### Size and space
111
+
112
+ | Size | Space |
113
+ |---|---|
114
+ | Tiny | 2½ × 2½ ft |
115
+ | Small, Medium | 5 × 5 ft |
116
+ | Large | 10 × 10 ft |
117
+ | Huge | 15 × 15 ft |
118
+ | Gargantuan | 20 × 20 ft or more |
119
+
120
+ Space is what a creature controls, not its width: a Medium creature blocks a 5-foot doorway. Eight
121
+ Medium creatures fit around another Medium one; four Large ones crowd it out. A creature can
122
+ **squeeze** through a space sized for one size smaller, at 1 extra foot per foot, with disadvantage
123
+ on attacks and Dexterity saves, and attacks against it have advantage.
124
+
125
+ ## Making an attack
126
+
127
+ Choose a target in range; determine cover, advantage and disadvantage; roll and, on a hit, roll
128
+ damage. If it uses an attack roll, it is an attack.
129
+
130
+ - A natural **20 always hits**, a natural **1 always misses**, regardless of modifiers or AC.
131
+ - **Attacking what you cannot see**: disadvantage. If the target is not where you aimed you miss
132
+ automatically; say only that the attack missed.
133
+ - **When the target cannot see you**: advantage. Attacking from hiding gives away your position
134
+ whether you hit or miss.
135
+ - **Ranged attacks** past normal range have disadvantage and cannot exceed long range. Making any
136
+ ranged attack within 5 feet of a hostile creature that can see you and is not incapacitated has
137
+ disadvantage.
138
+ - **Melee reach** is 5 feet unless the creature's entry says otherwise.
139
+ - **Unarmed strike**: 1 + Strength modifier bludgeoning. Everyone is proficient.
140
+
141
+ ### Shoving
142
+
143
+ Part of the Attack action, replacing one attack. The target must be within reach and no more than
144
+ one size larger. Strength (Athletics) contested by the target's Strength (Athletics) or Dexterity
145
+ (Acrobatics), the target choosing. Automatic success against an incapacitated target. On a success,
146
+ knock it prone **or** push it 5 feet. Grappling works the same way; `rules_lookup: grappling` has it.
147
+
148
+ ## Damage and healing
149
+
150
+ `apply_hp` handles the arithmetic, the dying sequence and death saves. These are the rulings around it.
151
+
152
+ - **Damage rolls**: add the same ability modifier used for the attack roll. Roll area damage
153
+ **once** for every creature caught in it. Damage can be reduced to 0 but never below.
154
+ - **Damage types**: acid, bludgeoning, cold, fire, force, lightning, necrotic, piercing, poison,
155
+ psychic, radiant, slashing, thunder. Types have no rules of their own; resistance uses them.
156
+ - **Resistance halves, vulnerability doubles**, applied **after** every other modifier. Two
157
+ instances of resistance to the same type count as one. A creature with resistance to bludgeoning
158
+ inside an aura reducing damage by 5, hit for 25: subtract 5, then halve, so 10.
159
+ - **Healing** cannot exceed the hit point maximum; the excess is lost. A dead creature regains
160
+ nothing until magic restores it to life.
161
+ - **Instant death**: reduced to 0 with damage left over that equals or exceeds the hit point
162
+ maximum.
163
+ - **Otherwise 0 hit points means unconscious**, ending as soon as any hit points are regained.
164
+ - **Stabilizing**: an action and a DC 10 Wisdom (Medicine) check. A stable creature makes no death
165
+ saves but stays unconscious, and regains 1 hit point after 1d4 hours. Any damage un-stabilizes it.
166
+ - **Knocking out**: an attacker who reduces a creature to 0 with a **melee** attack may choose to
167
+ knock it out instead. It falls unconscious and stable. Decide at the instant the damage lands.
168
+ - **Monsters die at 0 hit points.** Give a named villain the player rules if you want them to.
169
+
170
+ ## Mounted combat
171
+
172
+ Mounting or dismounting costs half your speed, once during your move, on a creature within 5 feet
173
+ that is at least one size larger with a suitable body.
174
+
175
+ A **controlled** mount (trained to accept a rider) takes your initiative and may only Dash,
176
+ Disengage or Dodge; it can move and act on the turn you mount it. An **independent** mount keeps
177
+ its own initiative and acts as it wishes. Either way, if the mount provokes an opportunity attack,
178
+ the attacker may target rider or mount.
179
+
180
+ If your mount is moved against its will, or you are knocked prone while mounted, make a DC 10
181
+ Dexterity save or fall off prone within 5 feet. If the mount is knocked prone you may use your
182
+ reaction to dismount and land on your feet.
183
+
184
+ ## Underwater combat
185
+
186
+ - **Melee weapon attacks** have disadvantage without a swim speed, unless the weapon is a dagger,
187
+ javelin, shortsword, spear or trident.
188
+ - **Ranged weapon attacks** miss automatically beyond normal range, and have disadvantage within
189
+ it unless the weapon is a crossbow, a net, or thrown like a javelin, spear, trident or dart.
190
+ - Fully immersed creatures and objects have **resistance to fire**.
191
+
192
+ ## Setting a difficulty
193
+
194
+ | Task | DC |
195
+ |---|---|
196
+ | Very easy | 5 |
197
+ | Easy | 10 |
198
+ | Medium | 15 |
199
+ | Hard | 20 |
200
+ | Very hard | 25 |
201
+ | Nearly impossible | 30 |
202
+
203
+ Call for a check only when the outcome is uncertain and failure is possible. On a failure the
204
+ character makes no progress, or progress with a setback you choose.
205
+
206
+ - **Contest**: both sides roll an appropriate check and compare totals. A tie changes nothing, so
207
+ the defender wins by default.
208
+ - **Passive check**: 10 + every modifier that would apply, +5 for advantage, −5 for disadvantage.
209
+ Use it for repeated tasks and for anything you resolve without telling the players.
210
+ - **Working together**: the leader (or the best modifier) rolls with advantage, but only if the
211
+ helper could attempt the task alone and help would actually speed it up. In combat this is the
212
+ Help action.
213
+ - **Group check**: everyone rolls; if at least half succeed the group succeeds. Use it when the
214
+ party sinks or swims together, such as crossing a swamp.
215
+ - **Skill with a different ability** is fine when it fits: Constitution (Athletics) for a long
216
+ swim, Strength (Intimidation) for a show of force.
217
+
218
+ | Ability | Skills |
219
+ |---|---|
220
+ | Strength | Athletics |
221
+ | Dexterity | Acrobatics, Sleight of Hand, Stealth |
222
+ | Constitution | none |
223
+ | Intelligence | Arcana, History, Investigation, Nature, Religion |
224
+ | Wisdom | Animal Handling, Insight, Medicine, Perception, Survival |
225
+ | Charisma | Deception, Intimidation, Performance, Persuasion |
226
+
227
+ ## Exploration
228
+
229
+ Track time on the scale the scene needs: **rounds** in combat, **minutes** in a dungeon (a minute
230
+ to creep down a hall, ten to search a chamber), **hours** in a city or wilderness, **days** on a
231
+ journey. Summarize movement between encounters unless the exact time matters.
232
+
233
+ | Pace | Per minute | Per hour | Per day | Effect |
234
+ |---|---|---|---|---|
235
+ | Fast | 400 ft | 4 miles | 30 miles | −5 to passive Wisdom (Perception) |
236
+ | Normal | 300 ft | 3 miles | 18 miles | — |
237
+ | Slow | 200 ft | 2 miles | 24 miles | May use stealth |
238
+
239
+ Difficult terrain halves all of these. The table assumes 8 hours of travel. For each hour beyond
240
+ that, the party covers the hourly distance and each character makes a Constitution save at DC
241
+ 10 + 1 per hour past 8, taking one level of exhaustion on a failure. A mount can gallop for about
242
+ an hour at twice the fast-pace distance. Waterborne travel is limited to the vessel's speed,
243
+ neither penalized for a fast pace nor helped by a slow one, and can run up to 24 hours a day.
244
+
245
+ ### Vision and light
246
+
247
+ **Lightly obscured** (dim light, patchy fog, moderate foliage): disadvantage on sight-based Wisdom
248
+ (Perception) checks. **Heavily obscured** (darkness, opaque fog, dense foliage): treat a creature
249
+ trying to see into it as blinded.
250
+
251
+ Bright light is normal sight. Dim light is lightly obscured, and covers twilight, dawn, the edge of
252
+ a torch's radius, and a brilliant full moon. Darkness is heavily obscured, and covers night
253
+ outdoors, an unlit dungeon and magical darkness.
254
+
255
+ - **Blindsight**: perceives without sight within a radius.
256
+ - **Darkvision**: darkness within the radius is only lightly obscured, in shades of grey.
257
+ - **Truesight**: sees in any darkness, sees invisible creatures and objects, automatically detects
258
+ and saves against visual illusions, sees a shapechanger's or transformed creature's true form,
259
+ and sees into the Ethereal Plane.
260
+
261
+ ### Air, food and water
262
+
263
+ A creature holds its breath for 1 + its Constitution modifier minutes, minimum 30 seconds. Out of
264
+ breath or choking, it survives its Constitution modifier in rounds, minimum 1; at the start of its
265
+ next turn it drops to 0 hit points and is dying, and cannot regain hit points or be stabilized
266
+ until it can breathe.
267
+
268
+ A character needs 1 lb of food and 1 gallon of water a day, or 2 gallons in hot weather. Half
269
+ rations count as half a day without food; a character can go 3 + Constitution modifier days without
270
+ food, minimum 1, then takes a level of exhaustion each day. Half water needs a DC 15 Constitution
271
+ save to avoid a level of exhaustion; less than half is automatic. Either becomes two levels if the
272
+ character is already exhausted. Exhaustion from hunger or thirst cannot be removed until the full
273
+ amount is eaten and drunk.
274
+
275
+ ### Breaking things
276
+
277
+ Objects are **immune to poison and psychic damage**, always fail Strength and Dexterity saves, and
278
+ are immune to effects requiring any other save. An object at 0 hit points breaks. A **damage
279
+ threshold** makes an object immune to any single hit below that number, which is how castle walls
280
+ work. Give a Huge or Gargantuan object no hit point total; divide it into Large sections instead.
281
+
282
+ | Substance | AC | | Size | Fragile | Resilient |
283
+ |---|---|---|---|---|---|
284
+ | Cloth, paper, rope | 11 | | Tiny (bottle, lock) | 2 (1d4) | 5 (2d4) |
285
+ | Crystal, glass, ice | 13 | | Small (chest, lute) | 3 (1d6) | 10 (3d6) |
286
+ | Wood, bone | 15 | | Medium (barrel, chandelier) | 4 (1d8) | 18 (4d8) |
287
+ | Stone | 17 | | Large (cart, 10-ft window) | 5 (1d10) | 27 (5d10) |
288
+ | Iron, steel | 19 | | | | |
289
+ | Mithral | 21 | | | | |
290
+ | Adamantine | 23 | | | | |
291
+
292
+ A Strength check can force or break something; set the DC yourself. Use judgment over the table:
293
+ a sword does not cut a stone wall, and bludgeoning does not sever a rope.
294
+
295
+ ### Traps
296
+
297
+ A trap needs a trigger, an effect, a DC to detect and a way to disable or avoid it. A character
298
+ actively looking rolls Wisdom (Perception) against the trap's DC; otherwise compare passive Wisdom
299
+ (Perception). Disabling is usually Intelligence (Investigation) to work out what to do, then a
300
+ Dexterity check with thieves' tools. Intelligence (Arcana) detects or disarms a magic trap, and
301
+ *dispel magic* often works on one.
302
+
303
+ Let clever play win without a roll. If a character lifts the rug and finds the pressure plate, it
304
+ is found. If they push the chest open from behind a propped shield, the needles fire into the shield.
305
+
306
+ | Danger | Save DC | Attack bonus | | Level | Setback | Dangerous | Deadly |
307
+ |---|---|---|---|---|---|---|---|
308
+ | Setback | 10–11 | +3 to +5 | | 1st–4th | 1d10 | 2d10 | 4d10 |
309
+ | Dangerous | 12–15 | +6 to +8 | | 5th–10th | 2d10 | 4d10 | 10d10 |
310
+ | Deadly | 16–20 | +9 to +12 | | 11th–16th | 4d10 | 10d10 | 18d10 |
311
+ | | | | | 17th–20th | 10d10 | 18d10 | 24d10 |
312
+
313
+ A **complex trap** rolls initiative and acts every round, turning the trap into an encounter. Use
314
+ it for a room that floods a little each round.
315
+
316
+ ### Resting
317
+
318
+ A **short rest** is at least 1 hour of nothing more strenuous than eating, drinking, reading and
319
+ tending wounds; a character may then spend Hit Dice. A **long rest** is at least 8 hours with at
320
+ least 6 asleep and no more than 2 hours of light activity, and is interrupted by an hour or more of
321
+ walking, fighting or spellcasting, which restarts it. One long rest per 24 hours, and a character
322
+ must have at least 1 hit point to benefit. `rest` applies both.
323
+
324
+ ### Inspiration
325
+
326
+ Award inspiration for playing a personality trait, ideal, bond or flaw in a way that costs the
327
+ character something. It is binary, not stockpiled: spend it for advantage on one attack roll,
328
+ saving throw or ability check, or hand it to another player who earned it.
329
+
330
+ ## Between adventures
331
+
332
+ Downtime activities take whole days, at least 8 hours each, not necessarily consecutive.
333
+
334
+ - **Crafting**: 5 gp of market value per day, expending half that in materials, with the right
335
+ tools. Several characters may combine days.
336
+ - **Practising a profession**: covers a modest lifestyle, or comfortable with an organization
337
+ behind you, or wealthy with Performance proficiency.
338
+ - **Recuperating**: after 3 days, a DC 15 Constitution save ends one effect preventing hit point
339
+ recovery, or grants a day's advantage on saves against one disease or poison.
340
+ - **Researching**: 1 gp a day. You decide whether the information exists, how long it takes, and
341
+ what checks it needs.
342
+ - **Training**: 250 days and 1 gp a day for a language or a tool proficiency, and an instructor.
343
+
344
+ ## Not covered here
345
+
346
+ Diseases, poisons and madness are optional subsystems the SRD prints in full; improvise them or
347
+ read them from the source when a campaign actually needs one. They are left out on purpose so this
348
+ document stays in your cached prompt cheaply.
@@ -0,0 +1,95 @@
1
+ {
2
+ "pack": "dnd5e",
3
+ "documents": [
4
+ {
5
+ "id": "dungeon_master-procedure",
6
+ "file": "dungeon_master-procedure.md",
7
+ "name": "5e · dungeon_master — procedure & combat",
8
+ "description": "Round structure, the action economy, movement, attacks, damage rulings, DC guidance, travel, light, objects, traps and downtime. Attach to the Dungeon Master."
9
+ },
10
+ {
11
+ "id": "campaign_designer-setting",
12
+ "file": "campaign_designer-setting.md",
13
+ "name": "5e · campaign_designer — planes & deities",
14
+ "description": "The planes, and the four SRD pantheons with their suggested cleric domains. Attach to the campaign designer."
15
+ },
16
+ {
17
+ "id": "character_creator-basics",
18
+ "file": "character_creator-basics.md",
19
+ "name": "5e · character_creator — basics & languages",
20
+ "description": "What the tools already answer, what the class documents hold, and the language list. Attach to the character creator."
21
+ },
22
+ {
23
+ "id": "class-barbarian",
24
+ "file": "class-barbarian.md",
25
+ "name": "5e · class — Barbarian",
26
+ "description": "Barbarian proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
27
+ },
28
+ {
29
+ "id": "class-bard",
30
+ "file": "class-bard.md",
31
+ "name": "5e · class — Bard",
32
+ "description": "Bard proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
33
+ },
34
+ {
35
+ "id": "class-cleric",
36
+ "file": "class-cleric.md",
37
+ "name": "5e · class — Cleric",
38
+ "description": "Cleric proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
39
+ },
40
+ {
41
+ "id": "class-druid",
42
+ "file": "class-druid.md",
43
+ "name": "5e · class — Druid",
44
+ "description": "Druid proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
45
+ },
46
+ {
47
+ "id": "class-fighter",
48
+ "file": "class-fighter.md",
49
+ "name": "5e · class — Fighter",
50
+ "description": "Fighter proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
51
+ },
52
+ {
53
+ "id": "class-monk",
54
+ "file": "class-monk.md",
55
+ "name": "5e · class — Monk",
56
+ "description": "Monk proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
57
+ },
58
+ {
59
+ "id": "class-paladin",
60
+ "file": "class-paladin.md",
61
+ "name": "5e · class — Paladin",
62
+ "description": "Paladin proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
63
+ },
64
+ {
65
+ "id": "class-ranger",
66
+ "file": "class-ranger.md",
67
+ "name": "5e · class — Ranger",
68
+ "description": "Ranger proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
69
+ },
70
+ {
71
+ "id": "class-rogue",
72
+ "file": "class-rogue.md",
73
+ "name": "5e · class — Rogue",
74
+ "description": "Rogue proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
75
+ },
76
+ {
77
+ "id": "class-sorcerer",
78
+ "file": "class-sorcerer.md",
79
+ "name": "5e · class — Sorcerer",
80
+ "description": "Sorcerer proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
81
+ },
82
+ {
83
+ "id": "class-warlock",
84
+ "file": "class-warlock.md",
85
+ "name": "5e · class — Warlock",
86
+ "description": "Warlock proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
87
+ },
88
+ {
89
+ "id": "class-wizard",
90
+ "file": "class-wizard.md",
91
+ "name": "5e · class — Wizard",
92
+ "description": "Wizard proficiencies, starting equipment, features by level and resource counts. Attach to the character creator while building one, and to the agent who plays one."
93
+ }
94
+ ]
95
+ }
@@ -1 +1 @@
1
- 14.384941000000037
1
+ 16.92596730000004