briyah 1.3.5 → 1.4.1
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.
- package/README.md +849 -684
- package/data/common/artifacts/dnd5e/campaign_designer-setting.md +112 -0
- package/data/common/artifacts/dnd5e/character_creator-basics.md +40 -0
- package/data/common/artifacts/dnd5e/class-barbarian.md +64 -0
- package/data/common/artifacts/dnd5e/class-bard.md +63 -0
- package/data/common/artifacts/dnd5e/class-cleric.md +60 -0
- package/data/common/artifacts/dnd5e/class-druid.md +56 -0
- package/data/common/artifacts/dnd5e/class-fighter.md +53 -0
- package/data/common/artifacts/dnd5e/class-monk.md +77 -0
- package/data/common/artifacts/dnd5e/class-paladin.md +66 -0
- package/data/common/artifacts/dnd5e/class-ranger.md +73 -0
- package/data/common/artifacts/dnd5e/class-rogue.md +62 -0
- package/data/common/artifacts/dnd5e/class-sorcerer.md +67 -0
- package/data/common/artifacts/dnd5e/class-warlock.md +83 -0
- package/data/common/artifacts/dnd5e/class-wizard.md +51 -0
- package/data/common/artifacts/dnd5e/dungeon_master-procedure.md +348 -0
- package/data/common/artifacts/dnd5e/manifest.json +95 -0
- package/data/common/config/markup +1 -1
- package/data/common/config/model_prices.json +1250 -237
- package/data/common/prompts/campaign_designer/defaults_config.json +16 -0
- package/data/common/prompts/campaign_designer/perceive.json +29 -0
- package/data/common/prompts/campaign_designer/perceive.prompt +345 -0
- package/data/common/prompts/campaign_designer/system_instruction.prompt +0 -0
- package/data/common/prompts/character_creator/defaults_config.json +31 -0
- package/data/common/prompts/character_creator/perceive.json +29 -0
- package/data/common/prompts/character_creator/perceive.prompt +621 -0
- package/data/common/prompts/character_creator/system_instruction.prompt +0 -0
- package/data/common/prompts/dnd_player/defaults_config.json +5 -0
- package/data/common/prompts/dnd_player/perceive.json +29 -0
- package/data/common/prompts/dnd_player/perceive.prompt +312 -0
- package/data/common/prompts/dnd_player/system_instruction.prompt +0 -0
- package/data/common/prompts/dnd_room_moderator/defaults_config.json +9 -0
- package/data/common/prompts/dnd_room_moderator/moderate.json +34 -0
- package/data/common/prompts/dnd_room_moderator/moderate.prompt +291 -0
- package/data/common/prompts/dnd_room_moderator/system_instruction.prompt +0 -0
- package/data/common/prompts/dungeon_master/compact_agent.prompt +24 -0
- package/data/common/prompts/dungeon_master/defaults_config.json +29 -0
- package/data/common/prompts/dungeon_master/perceive.json +33 -0
- package/data/common/prompts/dungeon_master/perceive.prompt +757 -0
- package/data/common/prompts/dungeon_master/system_instruction.prompt +0 -0
- package/data/common/prompts/room_moderator/moderate.json +34 -29
- package/data/common/prompts/room_moderator/moderate.prompt +230 -210
- package/data/common/prompts/story_moderator/moderate.prompt +5 -2
- package/data/common/prompts/story_moderator/moderate_to_alice.mock +6 -6
- package/data/common/prompts/story_moderator/moderate_to_bob.mock +6 -6
- package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +2 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +34 -22
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +1 -0
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +4 -1
- package/dist-sdk/server/src/ai/agent-config.d.ts +1 -0
- package/dist-sdk/server/src/ai/agent-store.service.js +6 -4
- package/dist-sdk/server/src/ai/agent.d.ts +7 -0
- package/dist-sdk/server/src/ai/agent.js +33 -2
- package/dist-sdk/server/src/ai/artifact.service.d.ts +2 -0
- package/dist-sdk/server/src/ai/artifact.service.js +29 -1
- package/dist-sdk/server/src/ai/pack-artifacts.d.ts +7 -0
- package/dist-sdk/server/src/ai/pack-artifacts.js +155 -0
- package/dist-sdk/server/src/app/stripe.controller.js +5 -0
- package/dist-sdk/server/src/app.controller.d.ts +18 -18
- package/dist-sdk/server/src/app.controller.js +249 -25
- package/dist-sdk/server/src/app.service.d.ts +30 -17
- package/dist-sdk/server/src/app.service.js +303 -35
- package/dist-sdk/server/src/auth/auth.controller.js +3 -2
- package/dist-sdk/server/src/auth/owner-only.decorator.d.ts +1 -0
- package/dist-sdk/server/src/auth/owner-only.decorator.js +8 -0
- package/dist-sdk/server/src/auth/twilio.service.d.ts +5 -1
- package/dist-sdk/server/src/auth/twilio.service.js +5 -3
- package/dist-sdk/server/src/config/user-paths.service.d.ts +2 -0
- package/dist-sdk/server/src/config/user-paths.service.js +8 -0
- package/dist-sdk/server/src/room/artifact-store.service.js +10 -2
- package/dist-sdk/server/src/room/artifact.d.ts +1 -0
- package/dist-sdk/server/src/room/message.d.ts +2 -1
- package/dist-sdk/server/src/room/message.js +5 -4
- package/dist-sdk/server/src/room/room-config.d.ts +3 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +4 -2
- package/dist-sdk/server/src/room/room-store.service.js +46 -12
- package/dist-sdk/server/src/room/room.d.ts +29 -3
- package/dist-sdk/server/src/room/room.js +390 -122
- package/dist-sdk/server/src/sdk/briyah.js +12 -0
- package/dist-sdk/server/src/sdk/index.d.ts +4 -1
- package/dist-sdk/server/src/sdk/index.js +9 -1
- package/dist-sdk/server/src/story/story.service.js +10 -12
- package/dist-sdk/server/src/tools/native-tool.types.d.ts +31 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.d.ts +22 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.js +59 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.d.ts +24 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.js +11 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.d.ts +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.js +154 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.js +9 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.d.ts +20 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.js +1824 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.js +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.d.ts +44 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.js +17293 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.js +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.d.ts +41 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.js +250 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.d.ts +16 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.js +3760 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.js +12 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.d.ts +63 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.js +449 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.d.ts +23 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.js +88 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +20 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +109 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.d.ts +30 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.js +329 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.d.ts +9 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.js +100 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +117 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +1057 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.d.ts +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.js +147 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.d.ts +27 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.js +263 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.d.ts +26 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.js +129 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.d.ts +22 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.js +127 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.d.ts +33 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.js +137 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.d.ts +26 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +182 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.d.ts +48 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.js +344 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +98 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +456 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.d.ts +27 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.js +123 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.d.ts +23 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.js +201 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/index.d.ts +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/index.js +35 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +323 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.d.ts +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +117 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.js +122 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +157 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +32 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +203 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.d.ts +4 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +465 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.js +116 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.d.ts +4 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.js +234 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.d.ts +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +616 -0
- package/dist-sdk/server/src/tools/packs/index.d.ts +7 -0
- package/dist-sdk/server/src/tools/packs/index.js +45 -0
- package/dist-sdk/server/src/tools/tool-execution.service.d.ts +2 -2
- package/dist-sdk/server/src/tools/tool-execution.service.js +7 -6
- package/dist-sdk/shared/types/app.types.d.ts +63 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Agent.html +51 -15
- package/docs/classes/Briyah.html +14 -14
- package/docs/classes/BriyahConfigService.html +5 -5
- package/docs/classes/NativeToolRegistry.html +21 -0
- package/docs/classes/Room.html +79 -29
- package/docs/classes/RoomMessage.html +32 -15
- package/docs/enums/MessageAction.html +3 -3
- package/docs/functions/availableToolPacks.html +2 -0
- package/docs/functions/dnd5eTools.html +5 -0
- package/docs/functions/enabledToolPacks.html +2 -0
- package/docs/functions/registerToolPacks.html +6 -0
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +69 -3
- package/docs/interfaces/AgentInfo.html +17 -2
- package/docs/interfaces/AgentMessagesResponse.html +2 -2
- package/docs/interfaces/AppService.html +230 -181
- package/docs/interfaces/Artifact.html +15 -3
- package/docs/interfaces/ArtifactMetadata.html +5 -2
- package/docs/interfaces/ArtifactWriteOptions.html +21 -0
- package/docs/interfaces/AttachDocumentResponse.html +2 -2
- package/docs/interfaces/BriyahConfigOptions.html +9 -9
- package/docs/interfaces/ChapterInfo.html +2 -2
- package/docs/interfaces/Character.html +2 -2
- package/docs/interfaces/CreateAgentResponse.html +2 -2
- package/docs/interfaces/CreateRoomResponse.html +2 -2
- package/docs/interfaces/CreateStoryResponse.html +2 -2
- package/docs/interfaces/FileList.html +2 -2
- package/docs/interfaces/FileMetadata.html +3 -3
- package/docs/interfaces/IConfigService.html +3 -3
- package/docs/interfaces/LoggingOptions.html +6 -6
- package/docs/interfaces/Message.html +2 -2
- package/docs/interfaces/ModelInfo.html +2 -2
- package/docs/interfaces/NativeToolDefinition.html +11 -7
- package/docs/interfaces/PreparedPromptResponse.html +2 -2
- package/docs/interfaces/ProcessTextResponse.html +2 -2
- package/docs/interfaces/PromptFile.html +2 -2
- package/docs/interfaces/PromptFileContent.html +2 -2
- package/docs/interfaces/PromptFilesResponse.html +2 -2
- package/docs/interfaces/PromptFolder.html +2 -2
- package/docs/interfaces/PromptFoldersResponse.html +2 -2
- package/docs/interfaces/RoomDetails.html +15 -2
- package/docs/interfaces/RoomInfo.html +3 -2
- package/docs/interfaces/RoomMessageUpdate.html +2 -2
- package/docs/interfaces/RoomMessagesResponse.html +2 -2
- package/docs/interfaces/SendMessageResult.html +2 -2
- package/docs/interfaces/StoryErrorEvent.html +3 -3
- package/docs/interfaces/StoryIdea.html +2 -2
- package/docs/interfaces/StoryInfo.html +3 -3
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +3 -3
- package/docs/interfaces/StoryProgressChapterEvent.html +3 -3
- package/docs/interfaces/StoryState.html +5 -5
- package/docs/interfaces/StoryStateEvent.html +3 -3
- package/docs/interfaces/ToolArtifact.html +8 -0
- package/docs/interfaces/ToolCaller.html +8 -0
- package/docs/interfaces/ToolDefinition.html +2 -2
- package/docs/interfaces/ToolHelpers.html +7 -3
- package/docs/interfaces/ToolParameter.html +2 -2
- package/docs/interfaces/ToolRoomAccess.html +51 -0
- package/docs/interfaces/ToolSummary.html +3 -2
- package/docs/interfaces/ToolsResponse.html +2 -2
- package/docs/interfaces/Transaction.html +2 -2
- package/docs/interfaces/TransactionHistoryResponse.html +2 -2
- package/docs/modules.html +1 -1
- package/docs/types/PromptScope.html +1 -1
- package/docs/types/ToolContext.html +2 -2
- package/docs/types/ToolRunResult.html +1 -1
- package/package.json +8 -5
- package/src/tools/packs/dnd5e/README.md +614 -0
- package/dist-sdk/server/src/ai/LLM/base-ai.service.spec.d.ts +0 -1
- package/dist-sdk/server/src/ai/LLM/base-ai.service.spec.js +0 -89
- package/dist-sdk/server/src/ai/LLM/comfyui-client.spec.d.ts +0 -1
- package/dist-sdk/server/src/ai/LLM/comfyui-client.spec.js +0 -143
- package/dist-sdk/server/src/ai/LLM/comfyui-workflow.spec.d.ts +0 -1
- package/dist-sdk/server/src/ai/LLM/comfyui-workflow.spec.js +0 -207
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SRD_SPELLS = void 0;
|
|
4
|
+
exports.spellLevelName = spellLevelName;
|
|
5
|
+
const spells_generated_1 = require("./spells.generated");
|
|
6
|
+
exports.SRD_SPELLS = spells_generated_1.GENERATED_SPELLS;
|
|
7
|
+
function spellLevelName(level) {
|
|
8
|
+
if (level === 0)
|
|
9
|
+
return 'cantrip';
|
|
10
|
+
const suffix = level === 1 ? 'st' : level === 2 ? 'nd' : level === 3 ? 'rd' : 'th';
|
|
11
|
+
return `${level}${suffix} level`;
|
|
12
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const SRD_ATTRIBUTION = "This work includes material from the System Reference Document 5.1 by Wizards of the Coast LLC, available under the Creative Commons Attribution 4.0 International License.";
|
|
2
|
+
export type AbilityKey = 'str' | 'dex' | 'con' | 'int' | 'wis' | 'cha';
|
|
3
|
+
export declare const ABILITIES: AbilityKey[];
|
|
4
|
+
export declare const ABILITY_NAMES: Record<AbilityKey, string>;
|
|
5
|
+
export declare const SKILL_ABILITY: Record<string, AbilityKey>;
|
|
6
|
+
export declare const PROFICIENCY_BY_LEVEL: number[];
|
|
7
|
+
export declare const XP_THRESHOLDS: number[];
|
|
8
|
+
export type CasterType = 'full' | 'half' | 'third' | 'warlock' | 'none';
|
|
9
|
+
export interface ClassRules {
|
|
10
|
+
name: string;
|
|
11
|
+
hitDie: string;
|
|
12
|
+
saves: AbilityKey[];
|
|
13
|
+
skillChoices: number;
|
|
14
|
+
skillList: string[];
|
|
15
|
+
caster: CasterType;
|
|
16
|
+
spellAbility?: AbilityKey;
|
|
17
|
+
shortRestFeatures?: string[];
|
|
18
|
+
subclassLevel: number;
|
|
19
|
+
subclassLabel: string;
|
|
20
|
+
asiLevels: number[];
|
|
21
|
+
}
|
|
22
|
+
export declare const STANDARD_ASI_LEVELS: number[];
|
|
23
|
+
export declare const CLASSES: Record<string, ClassRules>;
|
|
24
|
+
export declare const FULL_CASTER_SLOTS: number[][];
|
|
25
|
+
export declare const WARLOCK_SLOTS: {
|
|
26
|
+
count: number;
|
|
27
|
+
level: number;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const CONDITIONS: Record<string, string>;
|
|
30
|
+
export declare const EXHAUSTION_EFFECTS: string[];
|
|
31
|
+
export declare const MAX_EXHAUSTION = 6;
|
|
32
|
+
export declare const ATTACK_DISADVANTAGE_CONDITIONS: string[];
|
|
33
|
+
export declare const CHECK_DISADVANTAGE_CONDITIONS: string[];
|
|
34
|
+
export declare const AUTO_FAIL_SAVE_CONDITIONS: string[];
|
|
35
|
+
export declare const INCAPACITATING_CONDITIONS: string[];
|
|
36
|
+
export interface ArmorRules {
|
|
37
|
+
name: string;
|
|
38
|
+
baseAc: number;
|
|
39
|
+
dex: 'full' | 'capped' | 'none';
|
|
40
|
+
strengthRequirement?: number;
|
|
41
|
+
stealthDisadvantage?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const ARMOR: Record<string, ArmorRules>;
|
|
44
|
+
export declare const RULES_TOPICS: Record<string, string>;
|
|
45
|
+
export type FeatureUseMax = {
|
|
46
|
+
fixed: number;
|
|
47
|
+
} | {
|
|
48
|
+
ability: AbilityKey;
|
|
49
|
+
plus?: number;
|
|
50
|
+
min?: number;
|
|
51
|
+
} | {
|
|
52
|
+
perLevel: number;
|
|
53
|
+
} | {
|
|
54
|
+
byLevel: [number, number][];
|
|
55
|
+
};
|
|
56
|
+
export interface ClassFeatureUses {
|
|
57
|
+
key: string;
|
|
58
|
+
name: string;
|
|
59
|
+
from: number;
|
|
60
|
+
max: FeatureUseMax;
|
|
61
|
+
reset: 'short' | 'long';
|
|
62
|
+
}
|
|
63
|
+
export declare const CLASS_FEATURE_USES: Record<string, ClassFeatureUses[]>;
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLASS_FEATURE_USES = exports.RULES_TOPICS = exports.ARMOR = exports.INCAPACITATING_CONDITIONS = exports.AUTO_FAIL_SAVE_CONDITIONS = exports.CHECK_DISADVANTAGE_CONDITIONS = exports.ATTACK_DISADVANTAGE_CONDITIONS = exports.MAX_EXHAUSTION = exports.EXHAUSTION_EFFECTS = exports.CONDITIONS = exports.WARLOCK_SLOTS = exports.FULL_CASTER_SLOTS = exports.CLASSES = exports.STANDARD_ASI_LEVELS = exports.XP_THRESHOLDS = exports.PROFICIENCY_BY_LEVEL = exports.SKILL_ABILITY = exports.ABILITY_NAMES = exports.ABILITIES = exports.SRD_ATTRIBUTION = void 0;
|
|
4
|
+
exports.SRD_ATTRIBUTION = 'This work includes material from the System Reference Document 5.1 by Wizards of the Coast LLC, available under the Creative Commons Attribution 4.0 International License.';
|
|
5
|
+
exports.ABILITIES = ['str', 'dex', 'con', 'int', 'wis', 'cha'];
|
|
6
|
+
exports.ABILITY_NAMES = {
|
|
7
|
+
str: 'Strength',
|
|
8
|
+
dex: 'Dexterity',
|
|
9
|
+
con: 'Constitution',
|
|
10
|
+
int: 'Intelligence',
|
|
11
|
+
wis: 'Wisdom',
|
|
12
|
+
cha: 'Charisma',
|
|
13
|
+
};
|
|
14
|
+
exports.SKILL_ABILITY = {
|
|
15
|
+
acrobatics: 'dex',
|
|
16
|
+
'animal handling': 'wis',
|
|
17
|
+
arcana: 'int',
|
|
18
|
+
athletics: 'str',
|
|
19
|
+
deception: 'cha',
|
|
20
|
+
history: 'int',
|
|
21
|
+
insight: 'wis',
|
|
22
|
+
intimidation: 'cha',
|
|
23
|
+
investigation: 'int',
|
|
24
|
+
medicine: 'wis',
|
|
25
|
+
nature: 'int',
|
|
26
|
+
perception: 'wis',
|
|
27
|
+
performance: 'cha',
|
|
28
|
+
persuasion: 'cha',
|
|
29
|
+
religion: 'int',
|
|
30
|
+
'sleight of hand': 'dex',
|
|
31
|
+
stealth: 'dex',
|
|
32
|
+
survival: 'wis',
|
|
33
|
+
};
|
|
34
|
+
exports.PROFICIENCY_BY_LEVEL = [
|
|
35
|
+
0, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6,
|
|
36
|
+
];
|
|
37
|
+
exports.XP_THRESHOLDS = [
|
|
38
|
+
0, 0, 300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000, 85000, 100000, 120000, 140000,
|
|
39
|
+
165000, 195000, 225000, 265000, 305000, 355000,
|
|
40
|
+
];
|
|
41
|
+
exports.STANDARD_ASI_LEVELS = [4, 8, 12, 16, 19];
|
|
42
|
+
exports.CLASSES = {
|
|
43
|
+
barbarian: {
|
|
44
|
+
name: 'Barbarian',
|
|
45
|
+
hitDie: 'd12',
|
|
46
|
+
saves: ['str', 'con'],
|
|
47
|
+
skillChoices: 2,
|
|
48
|
+
skillList: ['animal handling', 'athletics', 'intimidation', 'nature', 'perception', 'survival'],
|
|
49
|
+
caster: 'none',
|
|
50
|
+
subclassLevel: 3,
|
|
51
|
+
subclassLabel: 'Primal Path',
|
|
52
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
53
|
+
},
|
|
54
|
+
bard: {
|
|
55
|
+
name: 'Bard',
|
|
56
|
+
hitDie: 'd8',
|
|
57
|
+
saves: ['dex', 'cha'],
|
|
58
|
+
skillChoices: 3,
|
|
59
|
+
skillList: [],
|
|
60
|
+
caster: 'full',
|
|
61
|
+
spellAbility: 'cha',
|
|
62
|
+
shortRestFeatures: ['bardic_inspiration'],
|
|
63
|
+
subclassLevel: 3,
|
|
64
|
+
subclassLabel: 'Bard College',
|
|
65
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
66
|
+
},
|
|
67
|
+
cleric: {
|
|
68
|
+
name: 'Cleric',
|
|
69
|
+
hitDie: 'd8',
|
|
70
|
+
saves: ['wis', 'cha'],
|
|
71
|
+
skillChoices: 2,
|
|
72
|
+
skillList: ['history', 'insight', 'medicine', 'persuasion', 'religion'],
|
|
73
|
+
caster: 'full',
|
|
74
|
+
spellAbility: 'wis',
|
|
75
|
+
shortRestFeatures: ['channel_divinity'],
|
|
76
|
+
subclassLevel: 1,
|
|
77
|
+
subclassLabel: 'Divine Domain',
|
|
78
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
79
|
+
},
|
|
80
|
+
druid: {
|
|
81
|
+
name: 'Druid',
|
|
82
|
+
hitDie: 'd8',
|
|
83
|
+
saves: ['int', 'wis'],
|
|
84
|
+
skillChoices: 2,
|
|
85
|
+
skillList: [
|
|
86
|
+
'arcana',
|
|
87
|
+
'animal handling',
|
|
88
|
+
'insight',
|
|
89
|
+
'medicine',
|
|
90
|
+
'nature',
|
|
91
|
+
'perception',
|
|
92
|
+
'religion',
|
|
93
|
+
'survival',
|
|
94
|
+
],
|
|
95
|
+
caster: 'full',
|
|
96
|
+
spellAbility: 'wis',
|
|
97
|
+
shortRestFeatures: ['wild_shape'],
|
|
98
|
+
subclassLevel: 2,
|
|
99
|
+
subclassLabel: 'Druid Circle',
|
|
100
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
101
|
+
},
|
|
102
|
+
fighter: {
|
|
103
|
+
name: 'Fighter',
|
|
104
|
+
hitDie: 'd10',
|
|
105
|
+
saves: ['str', 'con'],
|
|
106
|
+
skillChoices: 2,
|
|
107
|
+
skillList: [
|
|
108
|
+
'acrobatics',
|
|
109
|
+
'animal handling',
|
|
110
|
+
'athletics',
|
|
111
|
+
'history',
|
|
112
|
+
'insight',
|
|
113
|
+
'intimidation',
|
|
114
|
+
'perception',
|
|
115
|
+
'survival',
|
|
116
|
+
],
|
|
117
|
+
caster: 'none',
|
|
118
|
+
shortRestFeatures: ['second_wind', 'action_surge'],
|
|
119
|
+
subclassLevel: 3,
|
|
120
|
+
subclassLabel: 'Martial Archetype',
|
|
121
|
+
asiLevels: [4, 6, 8, 12, 14, 16, 19],
|
|
122
|
+
},
|
|
123
|
+
monk: {
|
|
124
|
+
name: 'Monk',
|
|
125
|
+
hitDie: 'd8',
|
|
126
|
+
saves: ['str', 'dex'],
|
|
127
|
+
skillChoices: 2,
|
|
128
|
+
skillList: ['acrobatics', 'athletics', 'history', 'insight', 'religion', 'stealth'],
|
|
129
|
+
caster: 'none',
|
|
130
|
+
shortRestFeatures: ['ki'],
|
|
131
|
+
subclassLevel: 3,
|
|
132
|
+
subclassLabel: 'Monastic Tradition',
|
|
133
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
134
|
+
},
|
|
135
|
+
paladin: {
|
|
136
|
+
name: 'Paladin',
|
|
137
|
+
hitDie: 'd10',
|
|
138
|
+
saves: ['wis', 'cha'],
|
|
139
|
+
skillChoices: 2,
|
|
140
|
+
skillList: ['athletics', 'insight', 'intimidation', 'medicine', 'persuasion', 'religion'],
|
|
141
|
+
caster: 'half',
|
|
142
|
+
spellAbility: 'cha',
|
|
143
|
+
shortRestFeatures: ['channel_divinity'],
|
|
144
|
+
subclassLevel: 3,
|
|
145
|
+
subclassLabel: 'Sacred Oath',
|
|
146
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
147
|
+
},
|
|
148
|
+
ranger: {
|
|
149
|
+
name: 'Ranger',
|
|
150
|
+
hitDie: 'd10',
|
|
151
|
+
saves: ['str', 'dex'],
|
|
152
|
+
skillChoices: 3,
|
|
153
|
+
skillList: [
|
|
154
|
+
'animal handling',
|
|
155
|
+
'athletics',
|
|
156
|
+
'insight',
|
|
157
|
+
'investigation',
|
|
158
|
+
'nature',
|
|
159
|
+
'perception',
|
|
160
|
+
'stealth',
|
|
161
|
+
'survival',
|
|
162
|
+
],
|
|
163
|
+
caster: 'half',
|
|
164
|
+
spellAbility: 'wis',
|
|
165
|
+
subclassLevel: 3,
|
|
166
|
+
subclassLabel: 'Ranger Archetype',
|
|
167
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
168
|
+
},
|
|
169
|
+
rogue: {
|
|
170
|
+
name: 'Rogue',
|
|
171
|
+
hitDie: 'd8',
|
|
172
|
+
saves: ['dex', 'int'],
|
|
173
|
+
skillChoices: 4,
|
|
174
|
+
skillList: [
|
|
175
|
+
'acrobatics',
|
|
176
|
+
'athletics',
|
|
177
|
+
'deception',
|
|
178
|
+
'insight',
|
|
179
|
+
'intimidation',
|
|
180
|
+
'investigation',
|
|
181
|
+
'perception',
|
|
182
|
+
'performance',
|
|
183
|
+
'persuasion',
|
|
184
|
+
'sleight of hand',
|
|
185
|
+
'stealth',
|
|
186
|
+
],
|
|
187
|
+
caster: 'none',
|
|
188
|
+
subclassLevel: 3,
|
|
189
|
+
subclassLabel: 'Roguish Archetype',
|
|
190
|
+
asiLevels: [4, 8, 10, 12, 16, 19],
|
|
191
|
+
},
|
|
192
|
+
sorcerer: {
|
|
193
|
+
name: 'Sorcerer',
|
|
194
|
+
hitDie: 'd6',
|
|
195
|
+
saves: ['con', 'cha'],
|
|
196
|
+
skillChoices: 2,
|
|
197
|
+
skillList: ['arcana', 'deception', 'insight', 'intimidation', 'persuasion', 'religion'],
|
|
198
|
+
caster: 'full',
|
|
199
|
+
spellAbility: 'cha',
|
|
200
|
+
subclassLevel: 1,
|
|
201
|
+
subclassLabel: 'Sorcerous Origin',
|
|
202
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
203
|
+
},
|
|
204
|
+
warlock: {
|
|
205
|
+
name: 'Warlock',
|
|
206
|
+
hitDie: 'd8',
|
|
207
|
+
saves: ['wis', 'cha'],
|
|
208
|
+
skillChoices: 2,
|
|
209
|
+
skillList: [
|
|
210
|
+
'arcana',
|
|
211
|
+
'deception',
|
|
212
|
+
'history',
|
|
213
|
+
'intimidation',
|
|
214
|
+
'investigation',
|
|
215
|
+
'nature',
|
|
216
|
+
'religion',
|
|
217
|
+
],
|
|
218
|
+
caster: 'warlock',
|
|
219
|
+
spellAbility: 'cha',
|
|
220
|
+
shortRestFeatures: ['pact_magic'],
|
|
221
|
+
subclassLevel: 1,
|
|
222
|
+
subclassLabel: 'Otherworldly Patron',
|
|
223
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
224
|
+
},
|
|
225
|
+
wizard: {
|
|
226
|
+
name: 'Wizard',
|
|
227
|
+
hitDie: 'd6',
|
|
228
|
+
saves: ['int', 'wis'],
|
|
229
|
+
skillChoices: 2,
|
|
230
|
+
skillList: ['arcana', 'history', 'insight', 'investigation', 'medicine', 'religion'],
|
|
231
|
+
caster: 'full',
|
|
232
|
+
spellAbility: 'int',
|
|
233
|
+
shortRestFeatures: ['arcane_recovery'],
|
|
234
|
+
subclassLevel: 2,
|
|
235
|
+
subclassLabel: 'Arcane Tradition',
|
|
236
|
+
asiLevels: exports.STANDARD_ASI_LEVELS,
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
exports.FULL_CASTER_SLOTS = [
|
|
240
|
+
[],
|
|
241
|
+
[0, 2],
|
|
242
|
+
[0, 3],
|
|
243
|
+
[0, 4, 2],
|
|
244
|
+
[0, 4, 3],
|
|
245
|
+
[0, 4, 3, 2],
|
|
246
|
+
[0, 4, 3, 3],
|
|
247
|
+
[0, 4, 3, 3, 1],
|
|
248
|
+
[0, 4, 3, 3, 2],
|
|
249
|
+
[0, 4, 3, 3, 3, 1],
|
|
250
|
+
[0, 4, 3, 3, 3, 2],
|
|
251
|
+
[0, 4, 3, 3, 3, 2, 1],
|
|
252
|
+
[0, 4, 3, 3, 3, 2, 1],
|
|
253
|
+
[0, 4, 3, 3, 3, 2, 1, 1],
|
|
254
|
+
[0, 4, 3, 3, 3, 2, 1, 1],
|
|
255
|
+
[0, 4, 3, 3, 3, 2, 1, 1, 1],
|
|
256
|
+
[0, 4, 3, 3, 3, 2, 1, 1, 1],
|
|
257
|
+
[0, 4, 3, 3, 3, 2, 1, 1, 1, 1],
|
|
258
|
+
[0, 4, 3, 3, 3, 3, 1, 1, 1, 1],
|
|
259
|
+
[0, 4, 3, 3, 3, 3, 2, 1, 1, 1],
|
|
260
|
+
[0, 4, 3, 3, 3, 3, 2, 2, 1, 1],
|
|
261
|
+
];
|
|
262
|
+
exports.WARLOCK_SLOTS = [
|
|
263
|
+
{ count: 0, level: 0 },
|
|
264
|
+
{ count: 1, level: 1 },
|
|
265
|
+
{ count: 2, level: 1 },
|
|
266
|
+
{ count: 2, level: 2 },
|
|
267
|
+
{ count: 2, level: 2 },
|
|
268
|
+
{ count: 2, level: 3 },
|
|
269
|
+
{ count: 2, level: 3 },
|
|
270
|
+
{ count: 2, level: 4 },
|
|
271
|
+
{ count: 2, level: 4 },
|
|
272
|
+
{ count: 2, level: 5 },
|
|
273
|
+
{ count: 2, level: 5 },
|
|
274
|
+
{ count: 3, level: 5 },
|
|
275
|
+
{ count: 3, level: 5 },
|
|
276
|
+
{ count: 3, level: 5 },
|
|
277
|
+
{ count: 3, level: 5 },
|
|
278
|
+
{ count: 3, level: 5 },
|
|
279
|
+
{ count: 3, level: 5 },
|
|
280
|
+
{ count: 4, level: 5 },
|
|
281
|
+
{ count: 4, level: 5 },
|
|
282
|
+
{ count: 4, level: 5 },
|
|
283
|
+
{ count: 4, level: 5 },
|
|
284
|
+
];
|
|
285
|
+
exports.CONDITIONS = {
|
|
286
|
+
blinded: "Can't see and automatically fails any ability check requiring sight. Attacks against the creature have advantage, and its own attacks have disadvantage.",
|
|
287
|
+
charmed: "Can't attack the charmer or target them with harmful abilities or magical effects. The charmer has advantage on ability checks to interact socially with the creature.",
|
|
288
|
+
deafened: "Can't hear and automatically fails any ability check requiring hearing.",
|
|
289
|
+
frightened: 'Has disadvantage on ability checks and attack rolls while the source of its fear is in line of sight, and it cannot willingly move closer to the source.',
|
|
290
|
+
grappled: "Speed becomes 0 and it can't benefit from any bonus to speed. The condition ends if the grappler is incapacitated or the creature is moved out of reach.",
|
|
291
|
+
incapacitated: "Can't take actions or reactions.",
|
|
292
|
+
invisible: 'Impossible to see without magic or a special sense; counts as heavily obscured. Attacks against the creature have disadvantage, and its own attacks have advantage.',
|
|
293
|
+
paralyzed: 'Is incapacitated, cannot move or speak, and automatically fails Strength and Dexterity saving throws. Attacks against it have advantage, and any attack that hits from within 5 feet is a critical hit.',
|
|
294
|
+
petrified: 'Is transformed into inanimate substance, is incapacitated, cannot move or speak, and is unaware of its surroundings. Attacks against it have advantage; it automatically fails Strength and Dexterity saving throws; it has resistance to all damage and is immune to poison and disease.',
|
|
295
|
+
poisoned: 'Has disadvantage on attack rolls and ability checks.',
|
|
296
|
+
prone: 'Can only crawl unless it stands up. It has disadvantage on attack rolls. An attack against it has advantage if the attacker is within 5 feet, and disadvantage otherwise.',
|
|
297
|
+
restrained: 'Speed becomes 0. Attacks against it have advantage, its own attacks have disadvantage, and it has disadvantage on Dexterity saving throws.',
|
|
298
|
+
stunned: 'Is incapacitated, cannot move, and can speak only falteringly. It automatically fails Strength and Dexterity saving throws, and attacks against it have advantage.',
|
|
299
|
+
unconscious: 'Is incapacitated, cannot move or speak, is unaware of its surroundings, drops what it is holding and falls prone. It automatically fails Strength and Dexterity saving throws, attacks against it have advantage, and any attack that hits from within 5 feet is a critical hit.',
|
|
300
|
+
};
|
|
301
|
+
exports.EXHAUSTION_EFFECTS = [
|
|
302
|
+
'No effect.',
|
|
303
|
+
'Disadvantage on ability checks.',
|
|
304
|
+
'Speed halved.',
|
|
305
|
+
'Disadvantage on attack rolls and saving throws.',
|
|
306
|
+
'Hit point maximum halved.',
|
|
307
|
+
'Speed reduced to 0.',
|
|
308
|
+
'Death.',
|
|
309
|
+
];
|
|
310
|
+
exports.MAX_EXHAUSTION = 6;
|
|
311
|
+
exports.ATTACK_DISADVANTAGE_CONDITIONS = ['blinded', 'frightened', 'poisoned', 'prone', 'restrained'];
|
|
312
|
+
exports.CHECK_DISADVANTAGE_CONDITIONS = ['frightened', 'poisoned'];
|
|
313
|
+
exports.AUTO_FAIL_SAVE_CONDITIONS = ['paralyzed', 'petrified', 'stunned', 'unconscious'];
|
|
314
|
+
exports.INCAPACITATING_CONDITIONS = [
|
|
315
|
+
'incapacitated',
|
|
316
|
+
'paralyzed',
|
|
317
|
+
'petrified',
|
|
318
|
+
'stunned',
|
|
319
|
+
'unconscious',
|
|
320
|
+
];
|
|
321
|
+
exports.ARMOR = {
|
|
322
|
+
padded: { name: 'Padded', baseAc: 11, dex: 'full', stealthDisadvantage: true },
|
|
323
|
+
leather: { name: 'Leather', baseAc: 11, dex: 'full' },
|
|
324
|
+
'studded leather': { name: 'Studded Leather', baseAc: 12, dex: 'full' },
|
|
325
|
+
hide: { name: 'Hide', baseAc: 12, dex: 'capped' },
|
|
326
|
+
'chain shirt': { name: 'Chain Shirt', baseAc: 13, dex: 'capped' },
|
|
327
|
+
'scale mail': { name: 'Scale Mail', baseAc: 14, dex: 'capped', stealthDisadvantage: true },
|
|
328
|
+
breastplate: { name: 'Breastplate', baseAc: 14, dex: 'capped' },
|
|
329
|
+
'half plate': { name: 'Half Plate', baseAc: 15, dex: 'capped', stealthDisadvantage: true },
|
|
330
|
+
'ring mail': { name: 'Ring Mail', baseAc: 14, dex: 'none', stealthDisadvantage: true },
|
|
331
|
+
'chain mail': {
|
|
332
|
+
name: 'Chain Mail',
|
|
333
|
+
baseAc: 16,
|
|
334
|
+
dex: 'none',
|
|
335
|
+
strengthRequirement: 13,
|
|
336
|
+
stealthDisadvantage: true,
|
|
337
|
+
},
|
|
338
|
+
splint: {
|
|
339
|
+
name: 'Splint',
|
|
340
|
+
baseAc: 17,
|
|
341
|
+
dex: 'none',
|
|
342
|
+
strengthRequirement: 15,
|
|
343
|
+
stealthDisadvantage: true,
|
|
344
|
+
},
|
|
345
|
+
plate: {
|
|
346
|
+
name: 'Plate',
|
|
347
|
+
baseAc: 18,
|
|
348
|
+
dex: 'none',
|
|
349
|
+
strengthRequirement: 15,
|
|
350
|
+
stealthDisadvantage: true,
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
exports.RULES_TOPICS = {
|
|
354
|
+
cover: 'A target with half cover has +2 to AC and Dexterity saving throws; three-quarters cover gives +5. A target behind total cover cannot be targeted directly.',
|
|
355
|
+
falling: 'A fall deals 1d6 bludgeoning damage per 10 feet fallen, to a maximum of 20d6, and the creature lands prone.',
|
|
356
|
+
'opportunity attack': 'When a hostile creature you can see leaves your reach, you can use your reaction to make one melee attack against it. Disengaging or moving without leaving your reach does not trigger it.',
|
|
357
|
+
concentration: 'You lose concentration on a spell if you cast another spell requiring concentration, become incapacitated, or die. Taking damage forces a Constitution saving throw against DC 10 or half the damage taken, whichever is higher.',
|
|
358
|
+
'two-weapon fighting': 'When you take the Attack action with a light melee weapon in one hand, you can use a bonus action to attack with a different light melee weapon in the other hand. You add your ability modifier to the second attack only if a feature allows it.',
|
|
359
|
+
grappling: "Replace one attack with a grapple: contest your Strength (Athletics) against the target's Strength (Athletics) or Dexterity (Acrobatics). On a success the target is grappled. The target can escape by winning the same contest on its turn.",
|
|
360
|
+
'death saving throw': 'At the start of your turn at 0 hit points, roll a d20 with no modifier. On 10 or higher you succeed. Three successes stabilize you; three failures kill you. Rolling a 20 restores you to 1 hit point; rolling a 1 counts as two failures.',
|
|
361
|
+
'massive damage': 'If damage reduces you to 0 hit points and the remaining damage equals or exceeds your hit point maximum, you die outright.',
|
|
362
|
+
'temporary hit points': 'Temporary hit points are lost first and do not stack: gaining more while you already have some means keeping whichever total is higher. They are not healing and do not raise you above 0 from a dying state on their own.',
|
|
363
|
+
'long rest': 'A long rest is at least 8 hours. It restores all hit points, half your total hit dice (minimum one), all spell slots, and reduces exhaustion by one. You cannot benefit from more than one long rest in a 24-hour period.',
|
|
364
|
+
'short rest': 'A short rest is at least 1 hour. You may spend hit dice, rolling each and adding your Constitution modifier, to regain hit points. Features that recharge on a short rest are restored.',
|
|
365
|
+
'hiding': 'You make a Dexterity (Stealth) check that is contested by the passive Wisdom (Perception) of anyone who might notice you. You cannot hide from a creature that can see you clearly.',
|
|
366
|
+
'passive perception': 'Passive Perception is 10 plus your Wisdom (Perception) modifier, plus 5 if you have advantage or minus 5 if you have disadvantage.',
|
|
367
|
+
'advantage': 'Roll two d20s and use the higher (advantage) or lower (disadvantage). Multiple sources of each do not stack, and having both at once cancels them out entirely.',
|
|
368
|
+
'critical hit': 'When you score a critical hit, roll all of the attack’s damage dice twice and add them together, then add any relevant modifiers as normal.',
|
|
369
|
+
};
|
|
370
|
+
exports.CLASS_FEATURE_USES = {
|
|
371
|
+
barbarian: [
|
|
372
|
+
{
|
|
373
|
+
key: 'rage',
|
|
374
|
+
name: 'Rage',
|
|
375
|
+
from: 1,
|
|
376
|
+
max: { byLevel: [[1, 2], [3, 3], [6, 4], [12, 5], [17, 6]] },
|
|
377
|
+
reset: 'long',
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
bard: [
|
|
381
|
+
{
|
|
382
|
+
key: 'bardic_inspiration',
|
|
383
|
+
name: 'Bardic Inspiration',
|
|
384
|
+
from: 1,
|
|
385
|
+
max: { ability: 'cha', min: 1 },
|
|
386
|
+
reset: 'long',
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
cleric: [
|
|
390
|
+
{
|
|
391
|
+
key: 'channel_divinity',
|
|
392
|
+
name: 'Channel Divinity',
|
|
393
|
+
from: 2,
|
|
394
|
+
max: { byLevel: [[2, 1], [6, 2], [18, 3]] },
|
|
395
|
+
reset: 'short',
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
druid: [
|
|
399
|
+
{ key: 'wild_shape', name: 'Wild Shape', from: 2, max: { fixed: 2 }, reset: 'short' },
|
|
400
|
+
],
|
|
401
|
+
fighter: [
|
|
402
|
+
{ key: 'second_wind', name: 'Second Wind', from: 1, max: { fixed: 1 }, reset: 'short' },
|
|
403
|
+
{
|
|
404
|
+
key: 'action_surge',
|
|
405
|
+
name: 'Action Surge',
|
|
406
|
+
from: 2,
|
|
407
|
+
max: { byLevel: [[2, 1], [17, 2]] },
|
|
408
|
+
reset: 'short',
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
monk: [
|
|
412
|
+
{ key: 'ki', name: 'Ki', from: 2, max: { perLevel: 1 }, reset: 'short' },
|
|
413
|
+
],
|
|
414
|
+
paladin: [
|
|
415
|
+
{
|
|
416
|
+
key: 'divine_sense',
|
|
417
|
+
name: 'Divine Sense',
|
|
418
|
+
from: 1,
|
|
419
|
+
max: { ability: 'cha', plus: 1, min: 1 },
|
|
420
|
+
reset: 'long',
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
key: 'lay_on_hands',
|
|
424
|
+
name: 'Lay on Hands',
|
|
425
|
+
from: 1,
|
|
426
|
+
max: { perLevel: 5 },
|
|
427
|
+
reset: 'long',
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
key: 'channel_divinity',
|
|
431
|
+
name: 'Channel Divinity',
|
|
432
|
+
from: 3,
|
|
433
|
+
max: { fixed: 1 },
|
|
434
|
+
reset: 'short',
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
sorcerer: [
|
|
438
|
+
{ key: 'sorcery_points', name: 'Sorcery Points', from: 2, max: { perLevel: 1 }, reset: 'long' },
|
|
439
|
+
],
|
|
440
|
+
wizard: [
|
|
441
|
+
{
|
|
442
|
+
key: 'arcane_recovery',
|
|
443
|
+
name: 'Arcane Recovery',
|
|
444
|
+
from: 1,
|
|
445
|
+
max: { fixed: 1 },
|
|
446
|
+
reset: 'long',
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type WeaponCategory = 'simple' | 'martial';
|
|
2
|
+
export type WeaponKind = 'melee' | 'ranged';
|
|
3
|
+
export type WeaponProperty = 'ammunition' | 'finesse' | 'heavy' | 'light' | 'loading' | 'reach' | 'special' | 'thrown' | 'two-handed' | 'versatile';
|
|
4
|
+
export interface WeaponRules {
|
|
5
|
+
name: string;
|
|
6
|
+
category: WeaponCategory;
|
|
7
|
+
kind: WeaponKind;
|
|
8
|
+
dmg: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
props: WeaponProperty[];
|
|
11
|
+
versatile?: string;
|
|
12
|
+
range?: string;
|
|
13
|
+
reach?: string;
|
|
14
|
+
weight?: string;
|
|
15
|
+
cost?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const WEAPONS: Record<string, WeaponRules>;
|
|
18
|
+
export declare const WEAPON_ALIASES: Record<string, string>;
|
|
19
|
+
export interface WeaponProficiency {
|
|
20
|
+
categories: WeaponCategory[];
|
|
21
|
+
weapons: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare const CLASS_WEAPON_PROFICIENCY: Record<string, WeaponProficiency>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLASS_WEAPON_PROFICIENCY = exports.WEAPON_ALIASES = exports.WEAPONS = void 0;
|
|
4
|
+
exports.WEAPONS = {
|
|
5
|
+
club: { name: 'Club', category: 'simple', kind: 'melee', dmg: '1d4', type: 'bludgeoning', props: ['light'], weight: '2 lb.', cost: '1 sp' },
|
|
6
|
+
dagger: { name: 'Dagger', category: 'simple', kind: 'melee', dmg: '1d4', type: 'piercing', props: ['finesse', 'light', 'thrown'], range: '20/60 ft', weight: '1 lb.', cost: '2 gp' },
|
|
7
|
+
greatclub: { name: 'Greatclub', category: 'simple', kind: 'melee', dmg: '1d8', type: 'bludgeoning', props: ['two-handed'], weight: '10 lb.', cost: '2 sp' },
|
|
8
|
+
handaxe: { name: 'Handaxe', category: 'simple', kind: 'melee', dmg: '1d6', type: 'slashing', props: ['light', 'thrown'], range: '20/60 ft', weight: '2 lb.', cost: '5 gp' },
|
|
9
|
+
javelin: { name: 'Javelin', category: 'simple', kind: 'melee', dmg: '1d6', type: 'piercing', props: ['thrown'], range: '30/120 ft', weight: '2 lb.', cost: '5 sp' },
|
|
10
|
+
'light hammer': { name: 'Light hammer', category: 'simple', kind: 'melee', dmg: '1d4', type: 'bludgeoning', props: ['light', 'thrown'], range: '20/60 ft', weight: '2 lb.', cost: '2 gp' },
|
|
11
|
+
mace: { name: 'Mace', category: 'simple', kind: 'melee', dmg: '1d6', type: 'bludgeoning', props: [], weight: '4 lb.', cost: '5 gp' },
|
|
12
|
+
quarterstaff: { name: 'Quarterstaff', category: 'simple', kind: 'melee', dmg: '1d6', type: 'bludgeoning', props: ['versatile'], versatile: '1d8', weight: '4 lb.', cost: '2 sp' },
|
|
13
|
+
sickle: { name: 'Sickle', category: 'simple', kind: 'melee', dmg: '1d4', type: 'slashing', props: ['light'], weight: '2 lb.', cost: '1 gp' },
|
|
14
|
+
spear: { name: 'Spear', category: 'simple', kind: 'melee', dmg: '1d6', type: 'piercing', props: ['thrown', 'versatile'], versatile: '1d8', range: '20/60 ft', weight: '3 lb.', cost: '1 gp' },
|
|
15
|
+
'crossbow, light': { name: 'Crossbow, light', category: 'simple', kind: 'ranged', dmg: '1d8', type: 'piercing', props: ['ammunition', 'loading', 'two-handed'], range: '80/320 ft', weight: '5 lb.', cost: '25 gp' },
|
|
16
|
+
dart: { name: 'Dart', category: 'simple', kind: 'ranged', dmg: '1d4', type: 'piercing', props: ['finesse', 'thrown'], range: '20/60 ft', weight: '1/4 lb.', cost: '5 cp' },
|
|
17
|
+
shortbow: { name: 'Shortbow', category: 'simple', kind: 'ranged', dmg: '1d6', type: 'piercing', props: ['ammunition', 'two-handed'], range: '80/320 ft', weight: '2 lb.', cost: '25 gp' },
|
|
18
|
+
sling: { name: 'Sling', category: 'simple', kind: 'ranged', dmg: '1d4', type: 'bludgeoning', props: ['ammunition'], range: '30/120 ft', cost: '1 sp' },
|
|
19
|
+
battleaxe: { name: 'Battleaxe', category: 'martial', kind: 'melee', dmg: '1d8', type: 'slashing', props: ['versatile'], versatile: '1d10', weight: '4 lb.', cost: '10 gp' },
|
|
20
|
+
flail: { name: 'Flail', category: 'martial', kind: 'melee', dmg: '1d8', type: 'bludgeoning', props: [], weight: '2 lb.', cost: '10 gp' },
|
|
21
|
+
glaive: { name: 'Glaive', category: 'martial', kind: 'melee', dmg: '1d10', type: 'slashing', props: ['heavy', 'reach', 'two-handed'], reach: '10 ft', weight: '6 lb.', cost: '20 gp' },
|
|
22
|
+
greataxe: { name: 'Greataxe', category: 'martial', kind: 'melee', dmg: '1d12', type: 'slashing', props: ['heavy', 'two-handed'], weight: '7 lb.', cost: '30 gp' },
|
|
23
|
+
greatsword: { name: 'Greatsword', category: 'martial', kind: 'melee', dmg: '2d6', type: 'slashing', props: ['heavy', 'two-handed'], weight: '6 lb.', cost: '50 gp' },
|
|
24
|
+
halberd: { name: 'Halberd', category: 'martial', kind: 'melee', dmg: '1d10', type: 'slashing', props: ['heavy', 'reach', 'two-handed'], reach: '10 ft', weight: '6 lb.', cost: '20 gp' },
|
|
25
|
+
lance: { name: 'Lance', category: 'martial', kind: 'melee', dmg: '1d12', type: 'piercing', props: ['reach', 'special'], reach: '10 ft', weight: '6 lb.', cost: '10 gp' },
|
|
26
|
+
longsword: { name: 'Longsword', category: 'martial', kind: 'melee', dmg: '1d8', type: 'slashing', props: ['versatile'], versatile: '1d10', weight: '3 lb.', cost: '15 gp' },
|
|
27
|
+
maul: { name: 'Maul', category: 'martial', kind: 'melee', dmg: '2d6', type: 'bludgeoning', props: ['heavy', 'two-handed'], weight: '10 lb.', cost: '10 gp' },
|
|
28
|
+
morningstar: { name: 'Morningstar', category: 'martial', kind: 'melee', dmg: '1d8', type: 'piercing', props: [], weight: '4 lb.', cost: '15 gp' },
|
|
29
|
+
pike: { name: 'Pike', category: 'martial', kind: 'melee', dmg: '1d10', type: 'piercing', props: ['heavy', 'reach', 'two-handed'], reach: '10 ft', weight: '18 lb.', cost: '5 gp' },
|
|
30
|
+
rapier: { name: 'Rapier', category: 'martial', kind: 'melee', dmg: '1d8', type: 'piercing', props: ['finesse'], weight: '2 lb.', cost: '25 gp' },
|
|
31
|
+
scimitar: { name: 'Scimitar', category: 'martial', kind: 'melee', dmg: '1d6', type: 'slashing', props: ['finesse', 'light'], weight: '3 lb.', cost: '25 gp' },
|
|
32
|
+
shortsword: { name: 'Shortsword', category: 'martial', kind: 'melee', dmg: '1d6', type: 'piercing', props: ['finesse', 'light'], weight: '2 lb.', cost: '10 gp' },
|
|
33
|
+
trident: { name: 'Trident', category: 'martial', kind: 'melee', dmg: '1d6', type: 'piercing', props: ['thrown', 'versatile'], versatile: '1d8', range: '20/60 ft', weight: '4 lb.', cost: '5 gp' },
|
|
34
|
+
'war pick': { name: 'War pick', category: 'martial', kind: 'melee', dmg: '1d8', type: 'piercing', props: [], weight: '2 lb.', cost: '5 gp' },
|
|
35
|
+
warhammer: { name: 'Warhammer', category: 'martial', kind: 'melee', dmg: '1d8', type: 'bludgeoning', props: ['versatile'], versatile: '1d10', weight: '2 lb.', cost: '15 gp' },
|
|
36
|
+
whip: { name: 'Whip', category: 'martial', kind: 'melee', dmg: '1d4', type: 'slashing', props: ['finesse', 'reach'], reach: '10 ft', weight: '3 lb.', cost: '2 gp' },
|
|
37
|
+
blowgun: { name: 'Blowgun', category: 'martial', kind: 'ranged', dmg: '1', type: 'piercing', props: ['ammunition', 'loading'], range: '25/100 ft', weight: '1 lb.', cost: '10 gp' },
|
|
38
|
+
'crossbow, hand': { name: 'Crossbow, hand', category: 'martial', kind: 'ranged', dmg: '1d6', type: 'piercing', props: ['ammunition', 'light', 'loading'], range: '30/120 ft', weight: '3 lb.', cost: '75 gp' },
|
|
39
|
+
'crossbow, heavy': { name: 'Crossbow, heavy', category: 'martial', kind: 'ranged', dmg: '1d10', type: 'piercing', props: ['ammunition', 'heavy', 'loading', 'two-handed'], range: '100/400 ft', weight: '18 lb.', cost: '50 gp' },
|
|
40
|
+
longbow: { name: 'Longbow', category: 'martial', kind: 'ranged', dmg: '1d8', type: 'piercing', props: ['ammunition', 'heavy', 'two-handed'], range: '150/600 ft', weight: '2 lb.', cost: '50 gp' },
|
|
41
|
+
net: { name: 'Net', category: 'martial', kind: 'ranged', dmg: '0', props: ['special', 'thrown'], range: '5/15 ft', weight: '3 lb.', cost: '1 gp' },
|
|
42
|
+
};
|
|
43
|
+
exports.WEAPON_ALIASES = {
|
|
44
|
+
'light crossbow': 'crossbow, light',
|
|
45
|
+
'hand crossbow': 'crossbow, hand',
|
|
46
|
+
'heavy crossbow': 'crossbow, heavy',
|
|
47
|
+
'short sword': 'shortsword',
|
|
48
|
+
'long sword': 'longsword',
|
|
49
|
+
'great sword': 'greatsword',
|
|
50
|
+
'great club': 'greatclub',
|
|
51
|
+
'great axe': 'greataxe',
|
|
52
|
+
'battle axe': 'battleaxe',
|
|
53
|
+
'war hammer': 'warhammer',
|
|
54
|
+
'hand axe': 'handaxe',
|
|
55
|
+
warpick: 'war pick',
|
|
56
|
+
};
|
|
57
|
+
exports.CLASS_WEAPON_PROFICIENCY = {
|
|
58
|
+
barbarian: { categories: ['simple', 'martial'], weapons: [] },
|
|
59
|
+
bard: {
|
|
60
|
+
categories: ['simple'],
|
|
61
|
+
weapons: ['crossbow, hand', 'longsword', 'rapier', 'shortsword'],
|
|
62
|
+
},
|
|
63
|
+
cleric: { categories: ['simple'], weapons: [] },
|
|
64
|
+
druid: {
|
|
65
|
+
categories: [],
|
|
66
|
+
weapons: [
|
|
67
|
+
'club', 'dagger', 'dart', 'javelin', 'mace', 'quarterstaff',
|
|
68
|
+
'scimitar', 'sickle', 'sling', 'spear',
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
fighter: { categories: ['simple', 'martial'], weapons: [] },
|
|
72
|
+
monk: { categories: ['simple'], weapons: ['shortsword'] },
|
|
73
|
+
paladin: { categories: ['simple', 'martial'], weapons: [] },
|
|
74
|
+
ranger: { categories: ['simple', 'martial'], weapons: [] },
|
|
75
|
+
rogue: {
|
|
76
|
+
categories: ['simple'],
|
|
77
|
+
weapons: ['crossbow, hand', 'longsword', 'rapier', 'shortsword'],
|
|
78
|
+
},
|
|
79
|
+
sorcerer: {
|
|
80
|
+
categories: [],
|
|
81
|
+
weapons: ['dagger', 'dart', 'sling', 'quarterstaff', 'crossbow, light'],
|
|
82
|
+
},
|
|
83
|
+
warlock: { categories: ['simple'], weapons: [] },
|
|
84
|
+
wizard: {
|
|
85
|
+
categories: [],
|
|
86
|
+
weapons: ['dagger', 'dart', 'sling', 'quarterstaff', 'crossbow, light'],
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BackgroundRules } from '../data/backgrounds';
|
|
2
|
+
import type { SheetState } from './sheet';
|
|
3
|
+
export interface BackgroundLookup {
|
|
4
|
+
background?: BackgroundRules;
|
|
5
|
+
ambiguous?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function resetBackgroundIndex(): void;
|
|
8
|
+
export declare function resolveBackground(name: string): BackgroundLookup;
|
|
9
|
+
export declare function backgroundNames(): string[];
|
|
10
|
+
export interface BackgroundApplication {
|
|
11
|
+
background?: string;
|
|
12
|
+
known: boolean;
|
|
13
|
+
changes: string[];
|
|
14
|
+
outstanding: string[];
|
|
15
|
+
equipment: string[];
|
|
16
|
+
coin: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function applyBackground(state: SheetState, withEquipment?: boolean): BackgroundApplication;
|
|
19
|
+
export declare function backgroundFeature(state: SheetState): BackgroundRules['feature'] | undefined;
|
|
20
|
+
export declare function describeBackground(background: BackgroundRules): string;
|