@optolith/database-schema 0.108.1 → 0.110.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.
- package/CHANGELOG.md +31 -0
- package/gen/types.d.ts +93 -29
- package/lib/cache/tradeSecrets.d.ts +1 -1
- package/lib/cache/tradeSecrets.js +1 -0
- package/lib/main.js +1 -0
- package/lib/types/Culture.js +1 -1
- package/lib/types/Profession.js +2 -2
- package/lib/types/_ActivatableAdvanced.js +1 -1
- package/lib/types/_Identifier.d.ts +1 -0
- package/lib/types/_Identifier.js +2 -0
- package/lib/types/equipment/item/ItemComponent.js +2 -2
- package/lib/types/equipment/item/SpecialAmmunition.d.ts +152 -0
- package/lib/types/equipment/item/SpecialAmmunition.js +58 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.110.0](https://github.com/Optolith/database-schema/compare/v0.109.0...v0.110.0) (2026-10-17)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* option identifier for advanced by option
|
|
10
|
+
* profession subgroup identifier type
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* culture naming rules may feature markdown ([b505295](https://github.com/Optolith/database-schema/commit/b505295d331ce7a1c7142335350d62cc611ccde3))
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* option identifier for advanced by option ([20b591e](https://github.com/Optolith/database-schema/commit/20b591ee9da7fd144305653542755ecf0c183cbd))
|
|
19
|
+
* profession subgroup identifier type ([0a6c90e](https://github.com/Optolith/database-schema/commit/0a6c90eed94063f88f1c754339455af05df1fe7e))
|
|
20
|
+
|
|
21
|
+
## [0.109.0](https://github.com/Optolith/database-schema/compare/v0.108.1...v0.109.0) (2026-10-17)
|
|
22
|
+
|
|
23
|
+
### ⚠ BREAKING CHANGES
|
|
24
|
+
|
|
25
|
+
* item component references special ammunition only
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* special ammunition entity ([0b149a9](https://github.com/Optolith/database-schema/commit/0b149a9073f02f425cb56c52c0b4e60b819b3024))
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* derived trade secrets for special ammunition ([83b8d14](https://github.com/Optolith/database-schema/commit/83b8d1410886d87b6f790fa4bb96c100f5c04ee8))
|
|
34
|
+
* item component references special ammunition only ([a200ecd](https://github.com/Optolith/database-schema/commit/a200ecd5bd31e4d4bdc4cf1f13f11d73b22d88ce))
|
|
35
|
+
|
|
5
36
|
## [0.108.1](https://github.com/Optolith/database-schema/compare/v0.108.0...v0.108.1) (2026-10-17)
|
|
6
37
|
|
|
7
38
|
### Bug Fixes
|
package/gen/types.d.ts
CHANGED
|
@@ -171,6 +171,7 @@ export type EntityMap = {
|
|
|
171
171
|
SkillStyleSpecialAbility: SkillStyleSpecialAbility
|
|
172
172
|
SkillUse: SkillUse
|
|
173
173
|
SocialStatus: SocialStatus
|
|
174
|
+
SpecialAmmunition: SpecialAmmunition
|
|
174
175
|
Spell: Spell
|
|
175
176
|
SpellSwordEnchantment: SpellSwordEnchantment
|
|
176
177
|
StaffEnchantment: StaffEnchantment
|
|
@@ -9110,7 +9111,7 @@ export interface MagicalProfessionGroup {
|
|
|
9110
9111
|
/**
|
|
9111
9112
|
* The tradition’s subgroup associated with this magical profession, if any.
|
|
9112
9113
|
*/
|
|
9113
|
-
subgroup?:
|
|
9114
|
+
subgroup?: MagicalTraditionSubgroup_ID
|
|
9114
9115
|
}
|
|
9115
9116
|
|
|
9116
9117
|
/**
|
|
@@ -9700,6 +9701,32 @@ export interface SpellworkAdjustmentWithBase {
|
|
|
9700
9701
|
tradition?: MagicalTradition_ID
|
|
9701
9702
|
}
|
|
9702
9703
|
|
|
9704
|
+
export interface MagicalTraditionSubgroup {
|
|
9705
|
+
/**
|
|
9706
|
+
* The magical tradition this subgroup belongs to.
|
|
9707
|
+
*/
|
|
9708
|
+
parent: MagicalTradition_ID
|
|
9709
|
+
|
|
9710
|
+
/**
|
|
9711
|
+
* All translations for the entry, identified by IETF language tag (BCP47).
|
|
9712
|
+
*/
|
|
9713
|
+
translations: {
|
|
9714
|
+
[localeId: string]: MagicalTraditionSubgroupTranslation
|
|
9715
|
+
}
|
|
9716
|
+
}
|
|
9717
|
+
|
|
9718
|
+
/**
|
|
9719
|
+
* The entity’s identifier. A UUID or a locale code if it is registered as the locale entity.
|
|
9720
|
+
*/
|
|
9721
|
+
export type MagicalTraditionSubgroup_ID = string
|
|
9722
|
+
|
|
9723
|
+
export interface MagicalTraditionSubgroupTranslation {
|
|
9724
|
+
/**
|
|
9725
|
+
* The name of the ceremonial item. This should be the heading used in the respective publication.
|
|
9726
|
+
*/
|
|
9727
|
+
name: string
|
|
9728
|
+
}
|
|
9729
|
+
|
|
9703
9730
|
export interface ReligiousProfessionGroup {
|
|
9704
9731
|
/**
|
|
9705
9732
|
* The associated blessed tradition (religion).
|
|
@@ -14756,7 +14783,7 @@ export interface AdvancedSpecialAbilityByOptionMapping<Identifier> {
|
|
|
14756
14783
|
/**
|
|
14757
14784
|
* The select option’s identifier.
|
|
14758
14785
|
*/
|
|
14759
|
-
option:
|
|
14786
|
+
option: GeneralSelectOption_ID
|
|
14760
14787
|
|
|
14761
14788
|
/**
|
|
14762
14789
|
* The advanced special ability’s identifier.
|
|
@@ -22587,32 +22614,6 @@ export interface InfluenceEffect {
|
|
|
22587
22614
|
text: string
|
|
22588
22615
|
}
|
|
22589
22616
|
|
|
22590
|
-
export interface MagicalTraditionSubgroup {
|
|
22591
|
-
/**
|
|
22592
|
-
* The magical tradition this subgroup belongs to.
|
|
22593
|
-
*/
|
|
22594
|
-
parent: MagicalTradition_ID
|
|
22595
|
-
|
|
22596
|
-
/**
|
|
22597
|
-
* All translations for the entry, identified by IETF language tag (BCP47).
|
|
22598
|
-
*/
|
|
22599
|
-
translations: {
|
|
22600
|
-
[localeId: string]: MagicalTraditionSubgroupTranslation
|
|
22601
|
-
}
|
|
22602
|
-
}
|
|
22603
|
-
|
|
22604
|
-
/**
|
|
22605
|
-
* The entity’s identifier. A UUID or a locale code if it is registered as the locale entity.
|
|
22606
|
-
*/
|
|
22607
|
-
export type MagicalTraditionSubgroup_ID = string
|
|
22608
|
-
|
|
22609
|
-
export interface MagicalTraditionSubgroupTranslation {
|
|
22610
|
-
/**
|
|
22611
|
-
* The name of the ceremonial item. This should be the heading used in the respective publication.
|
|
22612
|
-
*/
|
|
22613
|
-
name: string
|
|
22614
|
-
}
|
|
22615
|
-
|
|
22616
22617
|
/**
|
|
22617
22618
|
* Defines how to determine the AP cost of an enhancement.
|
|
22618
22619
|
*/
|
|
@@ -26728,7 +26729,7 @@ export interface ApplicableAmmunition {
|
|
|
26728
26729
|
/**
|
|
26729
26730
|
* Specific ammunition this component can be applied to.
|
|
26730
26731
|
*/
|
|
26731
|
-
ammunition?:
|
|
26732
|
+
ammunition?: SpecialAmmunition_ID[]
|
|
26732
26733
|
|
|
26733
26734
|
/**
|
|
26734
26735
|
* Whether the list of ammunition is inverted, i.e. whether the component can be applied to all ammunition – or those of the specified category – except for the listed ammunition.
|
|
@@ -26741,6 +26742,69 @@ export interface ApplicableAmmunition {
|
|
|
26741
26742
|
category?: ApplicableAmmunitionCategory
|
|
26742
26743
|
}
|
|
26743
26744
|
|
|
26745
|
+
export interface SpecialAmmunition {
|
|
26746
|
+
/**
|
|
26747
|
+
* The base ammunition type that is affected by this specialization.
|
|
26748
|
+
*/
|
|
26749
|
+
applicableTo: Ammunition_ID[]
|
|
26750
|
+
|
|
26751
|
+
/**
|
|
26752
|
+
* The cost modifier for the base price of affected ammunition.
|
|
26753
|
+
*/
|
|
26754
|
+
costModifier: number
|
|
26755
|
+
|
|
26756
|
+
/**
|
|
26757
|
+
* The complexity of crafting the item.
|
|
26758
|
+
*/
|
|
26759
|
+
complexity?: Complexity
|
|
26760
|
+
|
|
26761
|
+
/**
|
|
26762
|
+
* The prerequisites of the item, if any. Note that this is fully separate from the prerequisites of the item’s trade secret, which are defined independently from this.
|
|
26763
|
+
*/
|
|
26764
|
+
prerequisites?: EquipmentPrerequisites
|
|
26765
|
+
|
|
26766
|
+
/**
|
|
26767
|
+
* References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
|
|
26768
|
+
*/
|
|
26769
|
+
src: PublicationRefs
|
|
26770
|
+
|
|
26771
|
+
/**
|
|
26772
|
+
* All translations for the entry, identified by IETF language tag (BCP47).
|
|
26773
|
+
*/
|
|
26774
|
+
translations: {
|
|
26775
|
+
[localeId: string]: SpecialAmmunitionTranslation
|
|
26776
|
+
}
|
|
26777
|
+
}
|
|
26778
|
+
|
|
26779
|
+
/**
|
|
26780
|
+
* The entity’s identifier. A UUID or a locale code if it is registered as the locale entity.
|
|
26781
|
+
*/
|
|
26782
|
+
export type SpecialAmmunition_ID = string
|
|
26783
|
+
|
|
26784
|
+
export interface SpecialAmmunitionTranslation {
|
|
26785
|
+
/**
|
|
26786
|
+
* The item’s name.
|
|
26787
|
+
*/
|
|
26788
|
+
name: string
|
|
26789
|
+
|
|
26790
|
+
/**
|
|
26791
|
+
* An auxiliary name or label of the item, if available.
|
|
26792
|
+
*/
|
|
26793
|
+
secondary_name?: string
|
|
26794
|
+
|
|
26795
|
+
/**
|
|
26796
|
+
* Note text.
|
|
26797
|
+
*/
|
|
26798
|
+
note?: string
|
|
26799
|
+
|
|
26800
|
+
/**
|
|
26801
|
+
* Special rules text.
|
|
26802
|
+
*/
|
|
26803
|
+
rules?: string
|
|
26804
|
+
|
|
26805
|
+
errata?: Errata
|
|
26806
|
+
}
|
|
26807
|
+
|
|
26744
26808
|
export type ApplicableAmmunitionCategory =
|
|
26745
26809
|
| {
|
|
26746
26810
|
kind: "ArrowOrBolt"
|
|
@@ -5,7 +5,7 @@ type EquipmentEntitiesWithComplexities = {
|
|
|
5
5
|
[K in EquipmentIdentifier["kind"]]: EntityMap[K] extends {
|
|
6
6
|
complexity?: Complexity | ArmorComplexity;
|
|
7
7
|
} ? K : never;
|
|
8
|
-
}[EquipmentIdentifier["kind"]];
|
|
8
|
+
}[EquipmentIdentifier["kind"]] | "SpecialAmmunition";
|
|
9
9
|
type HerbaryEntitiesWithTradeSecrets = "Disease" | "Elixir" | "HerbalAid" | "Poison";
|
|
10
10
|
export type DerivedTradeSecretsCache = {
|
|
11
11
|
equipment: {
|
package/lib/main.js
CHANGED
|
@@ -153,6 +153,7 @@ export const schema = new Schema((await import("../package.json", { with: { type
|
|
|
153
153
|
Types.SkillModificationLevel,
|
|
154
154
|
Types.SkillStyleSpecialAbility,
|
|
155
155
|
Types.SocialStatus,
|
|
156
|
+
Types.SpecialAmmunition,
|
|
156
157
|
Types.Spell,
|
|
157
158
|
Types.SpellSwordEnchantment,
|
|
158
159
|
Types.StaffEnchantment,
|
package/lib/types/Culture.js
CHANGED
|
@@ -378,7 +378,7 @@ const CommonNames = DB.TypeAlias(import.meta.url, {
|
|
|
378
378
|
}),
|
|
379
379
|
naming_rules: DB.Optional({
|
|
380
380
|
comment: "Special naming rules.",
|
|
381
|
-
type: DB.String({ minLength: 1 }),
|
|
381
|
+
type: DB.String({ minLength: 1, markdown: "block" }),
|
|
382
382
|
}),
|
|
383
383
|
}, { minProperties: 1 }),
|
|
384
384
|
});
|
package/lib/types/Profession.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isNotNullish } from "@elyukai/utils/nullable";
|
|
|
2
2
|
import * as DB from "tsondb/schema/dsl";
|
|
3
3
|
import { verifyOptionsForActivatableEntry } from "./_ActivatableSelectOptions.js";
|
|
4
4
|
import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
|
|
5
|
-
import { AdvantageIdentifier, BannzeichenOptionIdentifier, BlessedTraditionIdentifier, CantripIdentifier, CurriculumIdentifier, DisadvantageIdentifier, ExperienceLevelIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, ProfessionPackageIdentifier, ProfessionVersionIdentifier, SkillGroupIdentifier, SkillIdentifier, } from "./_Identifier.js";
|
|
5
|
+
import { AdvantageIdentifier, BannzeichenOptionIdentifier, BlessedTraditionIdentifier, CantripIdentifier, CurriculumIdentifier, DisadvantageIdentifier, ExperienceLevelIdentifier, MagicalTraditionIdentifier, MagicalTraditionSubgroupIdentifier, ProfessionIdentifier, ProfessionPackageIdentifier, ProfessionVersionIdentifier, SkillGroupIdentifier, SkillIdentifier, } from "./_Identifier.js";
|
|
6
6
|
import { CombatTechniqueIdentifier, LiturgyIdentifier, MagicalActionIdentifier, ProfessionSpecialAbilityIdentifier, RequirableSelectOptionIdentifier, SpecialAbilityIdentifier, SpellworkIdentifier, } from "./_IdentifierGroup.js";
|
|
7
7
|
import { ProfessionPrerequisites, ProfessionVariantPrerequisites } from "./_Prerequisite.js";
|
|
8
8
|
import { NestedTranslationMap } from "./Locale.js";
|
|
@@ -66,7 +66,7 @@ const MagicalProfessionGroup = DB.TypeAlias(import.meta.url, {
|
|
|
66
66
|
}),
|
|
67
67
|
subgroup: DB.Optional({
|
|
68
68
|
comment: "The tradition’s subgroup associated with this magical profession, if any.",
|
|
69
|
-
type:
|
|
69
|
+
type: MagicalTraditionSubgroupIdentifier(),
|
|
70
70
|
}),
|
|
71
71
|
}),
|
|
72
72
|
});
|
|
@@ -129,7 +129,7 @@ const AdvancedSpecialAbilityByOptionMapping = DB.GenTypeAlias(import.meta.url, {
|
|
|
129
129
|
type: Identifier => DB.Object({
|
|
130
130
|
option: DB.Required({
|
|
131
131
|
comment: "The select option’s identifier.",
|
|
132
|
-
type:
|
|
132
|
+
type: GeneralSelectOptionIdentifier(),
|
|
133
133
|
}),
|
|
134
134
|
associatedAdvanced: DB.Required({
|
|
135
135
|
comment: "The advanced special ability’s identifier.",
|
|
@@ -161,6 +161,7 @@ export declare const SkillIdentifier: () => R;
|
|
|
161
161
|
export declare const SkillModificationLevelIdentifier: () => R;
|
|
162
162
|
export declare const SkillStyleSpecialAbilityIdentifier: () => R;
|
|
163
163
|
export declare const SocialStatusIdentifier: () => R;
|
|
164
|
+
export declare const SpecialAmmunitionIdentifier: () => R;
|
|
164
165
|
export declare const SpellIdentifier: () => R;
|
|
165
166
|
export declare const SpellSwordEnchantmentIdentifier: () => R;
|
|
166
167
|
export declare const StaffEnchantmentIdentifier: () => R;
|
package/lib/types/_Identifier.js
CHANGED
|
@@ -51,6 +51,7 @@ import { OrienteeringAid } from "./equipment/item/OrienteeringAid.js";
|
|
|
51
51
|
import { Plant } from "./equipment/item/Plant.js";
|
|
52
52
|
import { Poison } from "./equipment/item/Poison.js";
|
|
53
53
|
import { RopeOrChain } from "./equipment/item/RopeOrChain.js";
|
|
54
|
+
import { SpecialAmmunition } from "./equipment/item/SpecialAmmunition.js";
|
|
54
55
|
import { Stationery } from "./equipment/item/Stationery.js";
|
|
55
56
|
import { Biome } from "./equipment/item/sub/Biome.js";
|
|
56
57
|
import { BotanicRegion } from "./equipment/item/sub/BotanicRegion.js";
|
|
@@ -331,6 +332,7 @@ export const SkillIdentifier = () => R(Skill);
|
|
|
331
332
|
export const SkillModificationLevelIdentifier = () => R(SkillModificationLevel);
|
|
332
333
|
export const SkillStyleSpecialAbilityIdentifier = () => R(SkillStyleSpecialAbility);
|
|
333
334
|
export const SocialStatusIdentifier = () => R(SocialStatus);
|
|
335
|
+
export const SpecialAmmunitionIdentifier = () => R(SpecialAmmunition);
|
|
334
336
|
export const SpellIdentifier = () => R(Spell);
|
|
335
337
|
export const SpellSwordEnchantmentIdentifier = () => R(SpellSwordEnchantment);
|
|
336
338
|
export const StaffEnchantmentIdentifier = () => R(StaffEnchantment);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
|
-
import {
|
|
2
|
+
import { ArmorIdentifier, CloseCombatTechniqueIdentifier, ItemComponentIdentifier, RangedCombatTechniqueIdentifier, SpecialAmmunitionIdentifier, WeaponIdentifier, } from "../../_Identifier.js";
|
|
3
3
|
import { EquipmentPrerequisites } from "../../_Prerequisite.js";
|
|
4
4
|
import { CloseCombatTechnique, RangedCombatTechnique } from "../../CombatTechnique.js";
|
|
5
5
|
import { NestedTranslationMap } from "../../Locale.js";
|
|
@@ -258,7 +258,7 @@ const ApplicableAmmunition = DB.TypeAlias(import.meta.url, {
|
|
|
258
258
|
type: () => DB.Object({
|
|
259
259
|
ammunition: DB.Optional({
|
|
260
260
|
comment: "Specific ammunition this component can be applied to.",
|
|
261
|
-
type: DB.Array(
|
|
261
|
+
type: DB.Array(SpecialAmmunitionIdentifier(), {
|
|
262
262
|
minItems: 1,
|
|
263
263
|
uniqueItems: true,
|
|
264
264
|
}),
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
export declare const SpecialAmmunition: DB.Entity<"SpecialAmmunition", {
|
|
3
|
+
applicableTo: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
4
|
+
costModifier: DB.MemberDecl<DB.Integer, true>;
|
|
5
|
+
complexity: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Complexity", {
|
|
6
|
+
Primitive: DB.EnumCase<null>;
|
|
7
|
+
Simple: DB.EnumCase<null>;
|
|
8
|
+
Complex: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ComplexComplexity", DB.Object<{
|
|
9
|
+
ap_value: DB.MemberDecl<DB.Integer, true>;
|
|
10
|
+
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PlainGeneralPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
11
|
+
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
12
|
+
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
13
|
+
list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
|
|
14
|
+
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
15
|
+
Hide: DB.EnumCase<null>;
|
|
16
|
+
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
17
|
+
sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
|
|
18
|
+
Standalone: DB.EnumCase<null>;
|
|
19
|
+
Connected: DB.EnumCase<null>;
|
|
20
|
+
}, []>>, false>;
|
|
21
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
|
|
22
|
+
replacement: DB.MemberDecl<DB.String, true>;
|
|
23
|
+
}>, true>;
|
|
24
|
+
}>, []>>>;
|
|
25
|
+
}, []>>, false>;
|
|
26
|
+
}>, [T: DB.Param<"T", DB.Type>]>>>;
|
|
27
|
+
Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
|
|
28
|
+
list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
|
|
29
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
|
|
30
|
+
text: DB.MemberDecl<DB.String, true>;
|
|
31
|
+
}>, true>;
|
|
32
|
+
}>, [T: DB.Param<"T", DB.Type>]>>>;
|
|
33
|
+
}, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
|
|
34
|
+
src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
|
|
35
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
36
|
+
occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
|
|
37
|
+
initial: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"InitialOccurrence", DB.Object<{
|
|
38
|
+
printing: DB.MemberDecl<DB.Integer, false>;
|
|
39
|
+
pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
|
|
40
|
+
first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
41
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
42
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
43
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
44
|
+
}, []>>, true>;
|
|
45
|
+
last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
46
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
47
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
48
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
49
|
+
}, []>>, false>;
|
|
50
|
+
}>, []>>>, true>;
|
|
51
|
+
isRemoved: DB.MemberDecl<DB.Boolean, false>;
|
|
52
|
+
}>, []>>, true>;
|
|
53
|
+
revisions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"Revision", {
|
|
54
|
+
Since: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Since", DB.Object<{
|
|
55
|
+
printing: DB.MemberDecl<DB.Integer, true>;
|
|
56
|
+
pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
|
|
57
|
+
first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
58
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
59
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
60
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
61
|
+
}, []>>, true>;
|
|
62
|
+
last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
63
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
64
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
65
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
66
|
+
}, []>>, false>;
|
|
67
|
+
}>, []>>>, true>;
|
|
68
|
+
}>, []>>>;
|
|
69
|
+
Deprecated: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Deprecation", DB.Object<{
|
|
70
|
+
printing: DB.MemberDecl<DB.Integer, true>;
|
|
71
|
+
}>, []>>>;
|
|
72
|
+
}, []>>>, false>;
|
|
73
|
+
}>, true>;
|
|
74
|
+
}>, []>>>, []>>, false>;
|
|
75
|
+
}>, []>>>;
|
|
76
|
+
}, []>>, false>;
|
|
77
|
+
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EquipmentPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
78
|
+
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
79
|
+
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
80
|
+
list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
|
|
81
|
+
display_option: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DisplayOption", {
|
|
82
|
+
Hide: DB.EnumCase<null>;
|
|
83
|
+
ReplaceWith: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ReplacementDisplayOption", DB.Object<{
|
|
84
|
+
sentence_type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SentenceType", {
|
|
85
|
+
Standalone: DB.EnumCase<null>;
|
|
86
|
+
Connected: DB.EnumCase<null>;
|
|
87
|
+
}, []>>, false>;
|
|
88
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"ReplacementDisplayOptionTranslation", {
|
|
89
|
+
replacement: DB.MemberDecl<DB.String, true>;
|
|
90
|
+
}>, true>;
|
|
91
|
+
}>, []>>>;
|
|
92
|
+
}, []>>, false>;
|
|
93
|
+
}>, [T: DB.Param<"T", DB.Type>]>>>;
|
|
94
|
+
Group: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisiteGroup", DB.Object<{
|
|
95
|
+
list: DB.MemberDecl<DB.Array<DB.TypeArgument<DB.Param<"T", DB.Type>>>, true>;
|
|
96
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"PrerequisiteGroupTranslation", {
|
|
97
|
+
text: DB.MemberDecl<DB.String, true>;
|
|
98
|
+
}>, true>;
|
|
99
|
+
}>, [T: DB.Param<"T", DB.Type>]>>>;
|
|
100
|
+
}, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
|
|
101
|
+
src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
|
|
102
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
103
|
+
occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
|
|
104
|
+
initial: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"InitialOccurrence", DB.Object<{
|
|
105
|
+
printing: DB.MemberDecl<DB.Integer, false>;
|
|
106
|
+
pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
|
|
107
|
+
first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
108
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
109
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
110
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
111
|
+
}, []>>, true>;
|
|
112
|
+
last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
113
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
114
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
115
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
116
|
+
}, []>>, false>;
|
|
117
|
+
}>, []>>>, true>;
|
|
118
|
+
isRemoved: DB.MemberDecl<DB.Boolean, false>;
|
|
119
|
+
}>, []>>, true>;
|
|
120
|
+
revisions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"Revision", {
|
|
121
|
+
Since: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Since", DB.Object<{
|
|
122
|
+
printing: DB.MemberDecl<DB.Integer, true>;
|
|
123
|
+
pages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PageRange", DB.Object<{
|
|
124
|
+
first_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
125
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
126
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
127
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
128
|
+
}, []>>, true>;
|
|
129
|
+
last_page: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"Page", {
|
|
130
|
+
InsideCoverFront: DB.EnumCase<null>;
|
|
131
|
+
InsideCoverBack: DB.EnumCase<null>;
|
|
132
|
+
Numbered: DB.EnumCase<DB.Integer>;
|
|
133
|
+
}, []>>, false>;
|
|
134
|
+
}>, []>>>, true>;
|
|
135
|
+
}>, []>>>;
|
|
136
|
+
Deprecated: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"Deprecation", DB.Object<{
|
|
137
|
+
printing: DB.MemberDecl<DB.Integer, true>;
|
|
138
|
+
}>, []>>>;
|
|
139
|
+
}, []>>>, false>;
|
|
140
|
+
}>, true>;
|
|
141
|
+
}>, []>>>, []>>, true>;
|
|
142
|
+
translations: DB.MemberDecl<DB.NestedEntityMap<"SpecialAmmunitionTranslation", {
|
|
143
|
+
name: DB.MemberDecl<DB.String, true>;
|
|
144
|
+
secondary_name: DB.MemberDecl<DB.String, false>;
|
|
145
|
+
note: DB.MemberDecl<DB.String, false>;
|
|
146
|
+
rules: DB.MemberDecl<DB.String, false>;
|
|
147
|
+
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
148
|
+
date: DB.MemberDecl<DB.Date, true>;
|
|
149
|
+
description: DB.MemberDecl<DB.String, true>;
|
|
150
|
+
}>, []>>>, []>>, false>;
|
|
151
|
+
}>, true>;
|
|
152
|
+
}, undefined>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
import { AmmunitionIdentifier } from "../../_Identifier.js";
|
|
3
|
+
import { EquipmentPrerequisites } from "../../_Prerequisite.js";
|
|
4
|
+
import { NestedTranslationMap } from "../../Locale.js";
|
|
5
|
+
import { Errata } from "../../source/_Erratum.js";
|
|
6
|
+
import { src } from "../../source/_PublicationRef.js";
|
|
7
|
+
import { Complexity } from "./_Item.js";
|
|
8
|
+
export const SpecialAmmunition = DB.Entity(import.meta.url, {
|
|
9
|
+
name: "SpecialAmmunition",
|
|
10
|
+
namePlural: "SpecialAmmunition",
|
|
11
|
+
type: () => DB.Object({
|
|
12
|
+
applicableTo: DB.Required({
|
|
13
|
+
comment: "The base ammunition type that is affected by this specialization.",
|
|
14
|
+
type: DB.Array(AmmunitionIdentifier(), { minItems: 1 }),
|
|
15
|
+
}),
|
|
16
|
+
costModifier: DB.Required({
|
|
17
|
+
comment: "The cost modifier for the base price of affected ammunition.",
|
|
18
|
+
type: DB.Integer({ minimum: 1 }),
|
|
19
|
+
}),
|
|
20
|
+
complexity: DB.Optional({
|
|
21
|
+
comment: "The complexity of crafting the item.",
|
|
22
|
+
type: DB.IncludeIdentifier(Complexity),
|
|
23
|
+
}),
|
|
24
|
+
prerequisites: DB.Optional({
|
|
25
|
+
comment: "The prerequisites of the item, if any. Note that this is fully separate from the prerequisites of the item’s trade secret, which are defined independently from this.",
|
|
26
|
+
type: DB.IncludeIdentifier(EquipmentPrerequisites),
|
|
27
|
+
}),
|
|
28
|
+
src,
|
|
29
|
+
translations: NestedTranslationMap(DB.Required, "SpecialAmmunition", DB.Object({
|
|
30
|
+
name: DB.Required({
|
|
31
|
+
comment: "The item’s name.",
|
|
32
|
+
type: DB.String({ minLength: 1 }),
|
|
33
|
+
}),
|
|
34
|
+
secondary_name: DB.Optional({
|
|
35
|
+
comment: "An auxiliary name or label of the item, if available.",
|
|
36
|
+
type: DB.String({ minLength: 1 }),
|
|
37
|
+
}),
|
|
38
|
+
note: DB.Optional({
|
|
39
|
+
comment: "Note text.",
|
|
40
|
+
type: DB.String({ minLength: 1, markdown: "block" }),
|
|
41
|
+
}),
|
|
42
|
+
rules: DB.Optional({
|
|
43
|
+
comment: "Special rules text.",
|
|
44
|
+
type: DB.String({ minLength: 1, markdown: "block" }),
|
|
45
|
+
}),
|
|
46
|
+
errata: DB.Optional({
|
|
47
|
+
type: DB.IncludeIdentifier(Errata),
|
|
48
|
+
}),
|
|
49
|
+
})),
|
|
50
|
+
}),
|
|
51
|
+
instanceDisplayName: {},
|
|
52
|
+
uniqueConstraints: [
|
|
53
|
+
{
|
|
54
|
+
entityMapKeyPath: "translations",
|
|
55
|
+
keyPathInEntityMap: "name",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
});
|
package/lib/types/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export { OrienteeringAid } from "./equipment/item/OrienteeringAid.js";
|
|
|
49
49
|
export { Plant } from "./equipment/item/Plant.js";
|
|
50
50
|
export { Poison } from "./equipment/item/Poison.js";
|
|
51
51
|
export { RopeOrChain } from "./equipment/item/RopeOrChain.js";
|
|
52
|
+
export { SpecialAmmunition } from "./equipment/item/SpecialAmmunition.js";
|
|
52
53
|
export { Stationery } from "./equipment/item/Stationery.js";
|
|
53
54
|
export { Biome } from "./equipment/item/sub/Biome.js";
|
|
54
55
|
export { BotanicRegion } from "./equipment/item/sub/BotanicRegion.js";
|
package/lib/types/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export { OrienteeringAid } from "./equipment/item/OrienteeringAid.js";
|
|
|
49
49
|
export { Plant } from "./equipment/item/Plant.js";
|
|
50
50
|
export { Poison } from "./equipment/item/Poison.js";
|
|
51
51
|
export { RopeOrChain } from "./equipment/item/RopeOrChain.js";
|
|
52
|
+
export { SpecialAmmunition } from "./equipment/item/SpecialAmmunition.js";
|
|
52
53
|
export { Stationery } from "./equipment/item/Stationery.js";
|
|
53
54
|
export { Biome } from "./equipment/item/sub/Biome.js";
|
|
54
55
|
export { BotanicRegion } from "./equipment/item/sub/BotanicRegion.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optolith/database-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
4
4
|
"description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tde",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "MPL-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@elyukai/utils": "^0.3.6",
|
|
42
|
-
"tsondb": "^0.
|
|
42
|
+
"tsondb": "^0.23.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@elyukai/oxc-config": "^0.1.0",
|