@optolith/database-schema 0.48.0 → 0.50.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 +23 -0
- package/gen/types.d.ts +32 -2
- package/lib/types/Ceremony.d.ts +7 -1
- package/lib/types/LiturgicalChant.d.ts +7 -1
- package/lib/types/Ritual.d.ts +7 -1
- package/lib/types/Spell.d.ts +7 -1
- package/lib/types/_ActivatableSkill.js +1 -0
- package/lib/types/_ActivatableSkillCheckResultBased.d.ts +0 -19
- package/lib/types/_ActivatableSkillCheckResultBased.js +0 -23
- package/lib/types/_Enhancements.d.ts +14 -2
- package/lib/types/_Enhancements.js +33 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
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.50.0](https://github.com/Optolith/database-schema/compare/v0.49.0...v0.50.0) (2026-06-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* allow arbitrary AP values for enhancements
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* allow arbitrary AP values for enhancements ([1d06407](https://github.com/Optolith/database-schema/commit/1d06407eb4dee8fec24bc9f8d0d6e31833e4f995))
|
|
15
|
+
* allow arbitrary text input for enhancements ([3a3af6e](https://github.com/Optolith/database-schema/commit/3a3af6e574c1a7d05113ebc75d5d6fa1b92c8dce))
|
|
16
|
+
|
|
17
|
+
## [0.49.0](https://github.com/Optolith/database-schema/compare/v0.48.0...v0.49.0) (2026-06-13)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### ⚠ BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
* add missing skill rating case to parameter expression
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* add missing skill rating case to parameter expression ([64ee1cc](https://github.com/Optolith/database-schema/commit/64ee1cce6adccc2027bb890289b31e2cea653645))
|
|
27
|
+
|
|
5
28
|
## [0.48.0](https://github.com/Optolith/database-schema/compare/v0.47.4...v0.48.0) (2026-06-13)
|
|
6
29
|
|
|
7
30
|
|
package/gen/types.d.ts
CHANGED
|
@@ -298,6 +298,7 @@ export type EnumMap = {
|
|
|
298
298
|
ElixirEffect: ElixirEffect
|
|
299
299
|
EnchantmentCost: EnchantmentCost
|
|
300
300
|
EncumbranceInfluence: EncumbranceInfluence
|
|
301
|
+
EnhancementAdventurePoints: EnhancementAdventurePoints
|
|
301
302
|
EnhancementPrerequisiteGroup: EnhancementPrerequisiteGroup
|
|
302
303
|
EquipmentIdentifier: EquipmentIdentifier
|
|
303
304
|
ExpressionBasedParameterExpressionValue: ExpressionBasedParameterExpressionValue
|
|
@@ -571,6 +572,7 @@ export type TypeAliasMap = {
|
|
|
571
572
|
DerivedCharacteristicPermanentLoss: DerivedCharacteristicPermanentLoss
|
|
572
573
|
DerivedCharacteristicPrerequisites: DerivedCharacteristicPrerequisites
|
|
573
574
|
DerivedCharacteristicPurchase: DerivedCharacteristicPurchase
|
|
575
|
+
DerivedEnhancementAdventurePoints: DerivedEnhancementAdventurePoints
|
|
574
576
|
Dice: Dice
|
|
575
577
|
DiceBasedIntoxicantAddictionInterval: DiceBasedIntoxicantAddictionInterval
|
|
576
578
|
DieType: DieType
|
|
@@ -6916,6 +6918,9 @@ export type ExpressionBasedParameterExpressionValue =
|
|
|
6916
6918
|
| {
|
|
6917
6919
|
kind: "SkillPoints"
|
|
6918
6920
|
}
|
|
6921
|
+
| {
|
|
6922
|
+
kind: "SkillRating"
|
|
6923
|
+
}
|
|
6919
6924
|
|
|
6920
6925
|
export type RangeUnit =
|
|
6921
6926
|
| {
|
|
@@ -7952,9 +7957,9 @@ export interface Enhancement {
|
|
|
7952
7957
|
skill_rating: number
|
|
7953
7958
|
|
|
7954
7959
|
/**
|
|
7955
|
-
*
|
|
7960
|
+
* Defines how to determine the AP cost of an enhancement.
|
|
7956
7961
|
*/
|
|
7957
|
-
|
|
7962
|
+
adventurePoints: EnhancementAdventurePoints
|
|
7958
7963
|
|
|
7959
7964
|
prerequisites?: EnhancementPrerequisites
|
|
7960
7965
|
|
|
@@ -7987,6 +7992,11 @@ export interface EnhancementTranslation {
|
|
|
7987
7992
|
*/
|
|
7988
7993
|
effect: string
|
|
7989
7994
|
|
|
7995
|
+
/**
|
|
7996
|
+
* A string that is used as a label for an input field.
|
|
7997
|
+
*/
|
|
7998
|
+
input?: string
|
|
7999
|
+
|
|
7990
8000
|
errata?: Errata
|
|
7991
8001
|
}
|
|
7992
8002
|
|
|
@@ -19927,6 +19937,26 @@ export interface InfluenceEffect {
|
|
|
19927
19937
|
text: string
|
|
19928
19938
|
}
|
|
19929
19939
|
|
|
19940
|
+
/**
|
|
19941
|
+
* Defines how to determine the AP cost of an enhancement.
|
|
19942
|
+
*/
|
|
19943
|
+
export type EnhancementAdventurePoints =
|
|
19944
|
+
| {
|
|
19945
|
+
kind: "DerivedFromImprovementCost"
|
|
19946
|
+
DerivedFromImprovementCost: DerivedEnhancementAdventurePoints
|
|
19947
|
+
}
|
|
19948
|
+
| {
|
|
19949
|
+
kind: "Constant"
|
|
19950
|
+
Constant: number
|
|
19951
|
+
}
|
|
19952
|
+
|
|
19953
|
+
export interface DerivedEnhancementAdventurePoints {
|
|
19954
|
+
/**
|
|
19955
|
+
* The value to multiply with the numeric representation of the associated skill's improvement cost to form the final AP cost of this enhancement.
|
|
19956
|
+
*/
|
|
19957
|
+
multiplier: number
|
|
19958
|
+
}
|
|
19959
|
+
|
|
19930
19960
|
export type EnhancementPrerequisites = PlainPrerequisites<EnhancementPrerequisiteGroup>
|
|
19931
19961
|
|
|
19932
19962
|
export type EnhancementPrerequisiteGroup =
|
package/lib/types/Ceremony.d.ts
CHANGED
|
@@ -549,7 +549,12 @@ export declare const Ceremony: DB.Entity<"Ceremony", {
|
|
|
549
549
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
550
550
|
}, []>>, true>;
|
|
551
551
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
552
|
-
|
|
552
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
553
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
554
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
555
|
+
}>, []>>>;
|
|
556
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
557
|
+
}, []>>, true>;
|
|
553
558
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
554
559
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
555
560
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -618,6 +623,7 @@ export declare const Ceremony: DB.Entity<"Ceremony", {
|
|
|
618
623
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
619
624
|
name: DB.MemberDecl<DB.String, true>;
|
|
620
625
|
effect: DB.MemberDecl<DB.String, true>;
|
|
626
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
621
627
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
622
628
|
date: DB.MemberDecl<DB.Date, true>;
|
|
623
629
|
description: DB.MemberDecl<DB.String, true>;
|
|
@@ -549,7 +549,12 @@ export declare const LiturgicalChant: DB.Entity<"LiturgicalChant", {
|
|
|
549
549
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
550
550
|
}, []>>, true>;
|
|
551
551
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
552
|
-
|
|
552
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
553
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
554
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
555
|
+
}>, []>>>;
|
|
556
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
557
|
+
}, []>>, true>;
|
|
553
558
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
554
559
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
555
560
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -618,6 +623,7 @@ export declare const LiturgicalChant: DB.Entity<"LiturgicalChant", {
|
|
|
618
623
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
619
624
|
name: DB.MemberDecl<DB.String, true>;
|
|
620
625
|
effect: DB.MemberDecl<DB.String, true>;
|
|
626
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
621
627
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
622
628
|
date: DB.MemberDecl<DB.Date, true>;
|
|
623
629
|
description: DB.MemberDecl<DB.String, true>;
|
package/lib/types/Ritual.d.ts
CHANGED
|
@@ -552,7 +552,12 @@ export declare const Ritual: DB.Entity<"Ritual", {
|
|
|
552
552
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
553
553
|
}, []>>, true>;
|
|
554
554
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
555
|
-
|
|
555
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
556
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
557
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
558
|
+
}>, []>>>;
|
|
559
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
560
|
+
}, []>>, true>;
|
|
556
561
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
557
562
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
558
563
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -621,6 +626,7 @@ export declare const Ritual: DB.Entity<"Ritual", {
|
|
|
621
626
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
622
627
|
name: DB.MemberDecl<DB.String, true>;
|
|
623
628
|
effect: DB.MemberDecl<DB.String, true>;
|
|
629
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
624
630
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
625
631
|
date: DB.MemberDecl<DB.Date, true>;
|
|
626
632
|
description: DB.MemberDecl<DB.String, true>;
|
package/lib/types/Spell.d.ts
CHANGED
|
@@ -552,7 +552,12 @@ export declare const Spell: DB.Entity<"Spell", {
|
|
|
552
552
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
553
553
|
}, []>>, true>;
|
|
554
554
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
555
|
-
|
|
555
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
556
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
557
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
558
|
+
}>, []>>>;
|
|
559
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
560
|
+
}, []>>, true>;
|
|
556
561
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
557
562
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
558
563
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -621,6 +626,7 @@ export declare const Spell: DB.Entity<"Spell", {
|
|
|
621
626
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
622
627
|
name: DB.MemberDecl<DB.String, true>;
|
|
623
628
|
effect: DB.MemberDecl<DB.String, true>;
|
|
629
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
624
630
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
625
631
|
date: DB.MemberDecl<DB.Date, true>;
|
|
626
632
|
description: DB.MemberDecl<DB.String, true>;
|
|
@@ -100,5 +100,6 @@ const ExpressionBasedParameterExpressionValue = DB.Enum(import.meta.url, {
|
|
|
100
100
|
Constant: DB.EnumCase({ type: DB.Integer({ minimum: 1 }) }),
|
|
101
101
|
QualityLevels: DB.EnumCase({ type: null }),
|
|
102
102
|
SkillPoints: DB.EnumCase({ type: null }),
|
|
103
|
+
SkillRating: DB.EnumCase({ type: null }),
|
|
103
104
|
}),
|
|
104
105
|
});
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
|
-
export declare const CheckResultValue: DB.Enum<"CheckResultValue", {
|
|
3
|
-
QualityLevels: DB.EnumCase<null>;
|
|
4
|
-
SkillPoints: DB.EnumCase<null>;
|
|
5
|
-
SkillRating: DB.EnumCase<null>;
|
|
6
|
-
}, []>;
|
|
7
2
|
export declare const CheckResultBasedModifier: DB.TypeAlias<"CheckResultBasedModifier", DB.Object<{
|
|
8
3
|
arithmetic: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CheckResultArithmetic", {
|
|
9
4
|
Multiply: DB.EnumCase<null>;
|
|
@@ -11,17 +6,3 @@ export declare const CheckResultBasedModifier: DB.TypeAlias<"CheckResultBasedMod
|
|
|
11
6
|
}, []>>, true>;
|
|
12
7
|
value: DB.MemberDecl<DB.Integer, true>;
|
|
13
8
|
}>, []>;
|
|
14
|
-
export declare const CheckResultBased: DB.TypeAlias<"CheckResultBased", DB.Object<{
|
|
15
|
-
base: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CheckResultValue", {
|
|
16
|
-
QualityLevels: DB.EnumCase<null>;
|
|
17
|
-
SkillPoints: DB.EnumCase<null>;
|
|
18
|
-
SkillRating: DB.EnumCase<null>;
|
|
19
|
-
}, []>>, true>;
|
|
20
|
-
modifier: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"CheckResultBasedModifier", DB.Object<{
|
|
21
|
-
arithmetic: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CheckResultArithmetic", {
|
|
22
|
-
Multiply: DB.EnumCase<null>;
|
|
23
|
-
Divide: DB.EnumCase<null>;
|
|
24
|
-
}, []>>, true>;
|
|
25
|
-
value: DB.MemberDecl<DB.Integer, true>;
|
|
26
|
-
}>, []>>, false>;
|
|
27
|
-
}>, []>;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
|
-
export const CheckResultValue = DB.Enum(import.meta.url, {
|
|
3
|
-
name: "CheckResultValue",
|
|
4
|
-
comment: "Defines the derived (unitless) value.",
|
|
5
|
-
values: () => ({
|
|
6
|
-
QualityLevels: DB.EnumCase({ type: null }),
|
|
7
|
-
SkillPoints: DB.EnumCase({ type: null }),
|
|
8
|
-
SkillRating: DB.EnumCase({ type: null }),
|
|
9
|
-
}),
|
|
10
|
-
});
|
|
11
2
|
const CheckResultArithmetic = DB.Enum(import.meta.url, {
|
|
12
3
|
name: "CheckResultArithmetic",
|
|
13
4
|
comment: "Defines how the the `value` is set off against the check result.",
|
|
@@ -29,17 +20,3 @@ export const CheckResultBasedModifier = DB.TypeAlias(import.meta.url, {
|
|
|
29
20
|
}),
|
|
30
21
|
}),
|
|
31
22
|
});
|
|
32
|
-
export const CheckResultBased = DB.TypeAlias(import.meta.url, {
|
|
33
|
-
name: "CheckResultBased",
|
|
34
|
-
comment: "Defines a parameter being based on a check result.",
|
|
35
|
-
type: () => DB.Object({
|
|
36
|
-
base: DB.Required({
|
|
37
|
-
comment: "The base value that is derived from the check result.",
|
|
38
|
-
type: DB.IncludeIdentifier(CheckResultValue),
|
|
39
|
-
}),
|
|
40
|
-
modifier: DB.Optional({
|
|
41
|
-
comment: "If defined, it modifies the base value.",
|
|
42
|
-
type: DB.IncludeIdentifier(CheckResultBasedModifier),
|
|
43
|
-
}),
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
@@ -10,7 +10,12 @@ export declare const Enhancements: DB.TypeAlias<"Enhancements", DB.ChildEntities
|
|
|
10
10
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
11
11
|
}, []>>, true>;
|
|
12
12
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
13
|
-
|
|
13
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
14
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
15
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
16
|
+
}>, []>>>;
|
|
17
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
18
|
+
}, []>>, true>;
|
|
14
19
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
15
20
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
16
21
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -79,6 +84,7 @@ export declare const Enhancements: DB.TypeAlias<"Enhancements", DB.ChildEntities
|
|
|
79
84
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
80
85
|
name: DB.MemberDecl<DB.String, true>;
|
|
81
86
|
effect: DB.MemberDecl<DB.String, true>;
|
|
87
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
82
88
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
83
89
|
date: DB.MemberDecl<DB.Date, true>;
|
|
84
90
|
description: DB.MemberDecl<DB.String, true>;
|
|
@@ -93,7 +99,12 @@ export declare const Enhancement: DB.Entity<"Enhancement", {
|
|
|
93
99
|
Ceremony: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
94
100
|
}, []>>, true>;
|
|
95
101
|
skill_rating: DB.MemberDecl<DB.Integer, true>;
|
|
96
|
-
|
|
102
|
+
adventurePoints: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"EnhancementAdventurePoints", {
|
|
103
|
+
DerivedFromImprovementCost: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedEnhancementAdventurePoints", DB.Object<{
|
|
104
|
+
multiplier: DB.MemberDecl<DB.Integer, true>;
|
|
105
|
+
}>, []>>>;
|
|
106
|
+
Constant: DB.EnumCase<DB.Integer>;
|
|
107
|
+
}, []>>, true>;
|
|
97
108
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"EnhancementPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
98
109
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
99
110
|
Disjunction: DB.EnumCase<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PrerequisitesDisjunction", DB.Object<{
|
|
@@ -162,6 +173,7 @@ export declare const Enhancement: DB.Entity<"Enhancement", {
|
|
|
162
173
|
translations: DB.MemberDecl<DB.NestedEntityMap<"EnhancementTranslation", {
|
|
163
174
|
name: DB.MemberDecl<DB.String, true>;
|
|
164
175
|
effect: DB.MemberDecl<DB.String, true>;
|
|
176
|
+
input: DB.MemberDecl<DB.String, false>;
|
|
165
177
|
errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
|
|
166
178
|
date: DB.MemberDecl<DB.Date, true>;
|
|
167
179
|
description: DB.MemberDecl<DB.String, true>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @title Enhancements
|
|
3
3
|
*/
|
|
4
4
|
import * as DB from "tsondb/schema/dsl";
|
|
5
|
+
import { input } from "./_Activatable.js";
|
|
5
6
|
import { SkillWithEnhancementsIdentifier } from "./_IdentifierGroup.js";
|
|
6
7
|
import { EnhancementPrerequisites } from "./_Prerequisite.js";
|
|
7
8
|
import { NestedTranslationMap } from "./Locale.js";
|
|
@@ -28,11 +29,9 @@ export const Enhancement = DB.Entity(import.meta.url, {
|
|
|
28
29
|
multipleOf: 2,
|
|
29
30
|
}),
|
|
30
31
|
}),
|
|
31
|
-
|
|
32
|
-
comment: "
|
|
33
|
-
type: DB.
|
|
34
|
-
minimum: 1,
|
|
35
|
-
}),
|
|
32
|
+
adventurePoints: DB.Required({
|
|
33
|
+
comment: "Defines how to determine the AP cost of an enhancement.",
|
|
34
|
+
type: DB.IncludeIdentifier(EnhancementAdventurePoints),
|
|
36
35
|
}),
|
|
37
36
|
prerequisites: DB.Optional({
|
|
38
37
|
type: DB.IncludeIdentifier(EnhancementPrerequisites),
|
|
@@ -55,6 +54,7 @@ export const Enhancement = DB.Entity(import.meta.url, {
|
|
|
55
54
|
markdown: "block",
|
|
56
55
|
}),
|
|
57
56
|
}),
|
|
57
|
+
input,
|
|
58
58
|
errata: DB.Optional({
|
|
59
59
|
type: DB.IncludeIdentifier(Errata),
|
|
60
60
|
}),
|
|
@@ -78,3 +78,31 @@ export const Enhancement = DB.Entity(import.meta.url, {
|
|
|
78
78
|
],
|
|
79
79
|
],
|
|
80
80
|
});
|
|
81
|
+
const EnhancementAdventurePoints = DB.Enum(import.meta.url, {
|
|
82
|
+
name: "EnhancementAdventurePoints",
|
|
83
|
+
comment: "Defines how to determine the AP cost of an enhancement.",
|
|
84
|
+
values: () => ({
|
|
85
|
+
DerivedFromImprovementCost: DB.EnumCase({
|
|
86
|
+
comment: "Use the numeric representation of the associated skill's improvement cost as the AP cost of this enhancement.",
|
|
87
|
+
type: DB.IncludeIdentifier(DerivedEnhancementAdventurePoints),
|
|
88
|
+
}),
|
|
89
|
+
Constant: DB.EnumCase({
|
|
90
|
+
comment: "Use the specified constant value as the AP cost of this enhancement.",
|
|
91
|
+
type: DB.Integer({
|
|
92
|
+
minimum: 1,
|
|
93
|
+
}),
|
|
94
|
+
}),
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
97
|
+
const DerivedEnhancementAdventurePoints = DB.TypeAlias(import.meta.url, {
|
|
98
|
+
name: "DerivedEnhancementAdventurePoints",
|
|
99
|
+
type: () => DB.Object({
|
|
100
|
+
multiplier: DB.Required({
|
|
101
|
+
comment: "The value to multiply with the numeric representation of the associated skill's improvement cost to form the final AP cost of this enhancement.",
|
|
102
|
+
type: DB.Integer({
|
|
103
|
+
minimum: 1,
|
|
104
|
+
maximum: 3,
|
|
105
|
+
}),
|
|
106
|
+
}),
|
|
107
|
+
}),
|
|
108
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optolith/database-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.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",
|