optolith-database-schema 0.25.0 → 0.26.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/CHANGELOG.md +30 -0
- package/gen/types.d.ts +390 -300
- package/lib/main.d.ts +7 -0
- package/lib/types/Advantage.d.ts +11 -0
- package/lib/types/CombatTechnique.d.ts +79 -55
- package/lib/types/CombatTechnique.js +25 -7
- package/lib/types/Disadvantage.d.ts +11 -0
- package/lib/types/HomunculusType.d.ts +6 -0
- package/lib/types/HomunculusType.js +15 -0
- package/lib/types/Profession.d.ts +25 -0
- package/lib/types/Profession.js +18 -2
- package/lib/types/_ActivatableAdventurePointsValue.d.ts +1 -0
- package/lib/types/_ActivatableAdventurePointsValue.js +4 -0
- package/lib/types/_ActivatableNonMundane.d.ts +10 -2
- package/lib/types/_ActivatableNonMundane.js +11 -1
- package/lib/types/_ActivatableSelectOptionCategory.d.ts +699 -0
- package/lib/types/_ActivatableSelectOptionCategory.js +73 -0
- package/lib/types/_ActivatableSelectOptions.d.ts +10 -0
- package/lib/types/equipment/item/BandageOrRemedy.js +10 -0
- package/lib/types/equipment/item/CeremonialItem.js +10 -0
- package/lib/types/equipment/item/Clothes.js +10 -0
- package/lib/types/equipment/item/Container.js +10 -0
- package/lib/types/equipment/item/EquipmentOfBlessedOnes.js +10 -0
- package/lib/types/equipment/item/IlluminationLightSource.js +10 -0
- package/lib/types/equipment/item/IlluminationRefillOrSupply.js +10 -0
- package/lib/types/equipment/item/Liebesspielzeug.js +10 -0
- package/lib/types/equipment/item/LuxuryGood.js +10 -0
- package/lib/types/equipment/item/MagicalArtifact.js +10 -0
- package/lib/types/equipment/item/MusicalInstrument.js +10 -0
- package/lib/types/equipment/item/TravelGearOrTool.js +10 -0
- package/lib/types/equipment/item/Weapon.d.ts +45 -45
- package/lib/types/equipment/item/Weapon.js +7 -5
- package/lib/types/equipment/item/WeaponAccessory.js +10 -0
- package/lib/types/equipment/item/_Item.js +13 -1
- package/lib/types/equipment/item/_Weapon.d.ts +13 -4
- package/lib/types/equipment/item/_Weapon.js +32 -4
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/AncestorGlyph.d.ts +11 -0
- package/lib/types/specialAbility/BlessedTradition.d.ts +11 -0
- package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/CombatSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/CommandSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/LycantropicGift.d.ts +11 -0
- package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/MagicalTradition.d.ts +11 -0
- package/lib/types/specialAbility/PactGift.d.ts +11 -0
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/Sermon.d.ts +11 -0
- package/lib/types/specialAbility/SexSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +11 -0
- package/lib/types/specialAbility/VampiricGift.d.ts +11 -0
- package/lib/types/specialAbility/Vision.d.ts +11 -0
- package/lib/types/specialAbility/sub/TradeSecret.d.ts +880 -161
- package/lib/types/specialAbility/sub/TradeSecret.js +9 -5
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/AttireEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/Beutelzauber.d.ts +16 -1
- package/lib/types/traditionArtifacts/BowlEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/CauldronEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/ChronicleEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/DaggerRitual.d.ts +16 -1
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/Haubenzauber.d.ts +16 -1
- package/lib/types/traditionArtifacts/InstrumentEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/Krallenkettenzauber.d.ts +16 -1
- package/lib/types/traditionArtifacts/Kristallkugelzauber.d.ts +16 -1
- package/lib/types/traditionArtifacts/OrbEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/RingEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/SickleRitual.d.ts +16 -1
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/StaffEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/ToyEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/Trinkhornzauber.d.ts +16 -1
- package/lib/types/traditionArtifacts/WandEnchantment.d.ts +16 -1
- package/lib/types/traditionArtifacts/WeaponEnchantment.d.ts +16 -1
- package/package.json +2 -2
|
@@ -16,6 +16,33 @@ export const SelectOptionCategory = Enum(import.meta.url, {
|
|
|
16
16
|
Races: EnumCase({ type: null }),
|
|
17
17
|
Cultures: EnumCase({ type: null }),
|
|
18
18
|
RacesAndCultures: EnumCase({ type: null }),
|
|
19
|
+
HomunculusTypes: EnumCase({ type: null }),
|
|
20
|
+
BlessedTraditions: EnumCase({ type: IncludeIdentifier(BlessedTraditionsSelectOptionCategory) }),
|
|
21
|
+
Elements: EnumCase({ type: IncludeIdentifier(ElementsSelectOptionCategory) }),
|
|
22
|
+
Properties: EnumCase({ type: IncludeIdentifier(PropertiesSelectOptionCategory) }),
|
|
23
|
+
Aspects: EnumCase({ type: IncludeIdentifier(AspectSelectOptionCategory) }),
|
|
24
|
+
Diseases: EnumCase({ type: IncludeIdentifier(DiseasesPoisonsSelectOptionCategory) }),
|
|
25
|
+
Poisons: EnumCase({ type: IncludeIdentifier(DiseasesPoisonsSelectOptionCategory) }),
|
|
26
|
+
Languages: EnumCase({ type: IncludeIdentifier(LanguagesSelectOptionCategory) }),
|
|
27
|
+
Skills: EnumCase({ type: IncludeIdentifier(SkillsSelectOptionCategory) }),
|
|
28
|
+
CombatTechniques: EnumCase({ type: IncludeIdentifier(CombatTechniquesSelectOptionCategory) }),
|
|
29
|
+
TargetCategories: EnumCase({ type: IncludeIdentifier(TargetCategoriesSelectOptionCategory) }),
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
export const TradeSecretSelectOptionCategory = Enum(import.meta.url, {
|
|
33
|
+
name: "TradeSecretSelectOptionCategory",
|
|
34
|
+
values: () => ({
|
|
35
|
+
Blessings: EnumCase({ type: null }),
|
|
36
|
+
Cantrips: EnumCase({ type: null }),
|
|
37
|
+
Scripts: EnumCase({ type: null }),
|
|
38
|
+
AnimalShapes: EnumCase({ type: null }),
|
|
39
|
+
ArcaneBardTraditions: EnumCase({ type: null }),
|
|
40
|
+
ArcaneDancerTraditions: EnumCase({ type: null }),
|
|
41
|
+
SexPractices: EnumCase({ type: null }),
|
|
42
|
+
Races: EnumCase({ type: null }),
|
|
43
|
+
Cultures: EnumCase({ type: null }),
|
|
44
|
+
RacesAndCultures: EnumCase({ type: null }),
|
|
45
|
+
HomunculusTypes: EnumCase({ type: null }),
|
|
19
46
|
BlessedTraditions: EnumCase({ type: IncludeIdentifier(BlessedTraditionsSelectOptionCategory) }),
|
|
20
47
|
Elements: EnumCase({ type: IncludeIdentifier(ElementsSelectOptionCategory) }),
|
|
21
48
|
Properties: EnumCase({ type: IncludeIdentifier(PropertiesSelectOptionCategory) }),
|
|
@@ -189,6 +216,12 @@ const CombatTechniquesSelectOptionCategory = TypeAlias(import.meta.url, {
|
|
|
189
216
|
minItems: 1,
|
|
190
217
|
}),
|
|
191
218
|
}),
|
|
219
|
+
bindingCost: Optional({
|
|
220
|
+
comment: "Generate binding cost values for each entry.\n\n*Note: This only works if the entry it is defined on supports binding costs, i.e. is a tradition artifact enchantment.*",
|
|
221
|
+
type: GenIncludeIdentifier(SelectOptionsBindingCostValue, [
|
|
222
|
+
IncludeIdentifier(CombatTechniqueIdentifier),
|
|
223
|
+
]),
|
|
224
|
+
}),
|
|
192
225
|
ap_value: Optional({
|
|
193
226
|
comment: "Generate AP values for each entry.",
|
|
194
227
|
type: GenIncludeIdentifier(SelectOptionsAdventurePointsValue, [
|
|
@@ -357,6 +390,46 @@ const SelectOptionsFixedAdventurePointsValueMapping = GenTypeAlias(import.meta.u
|
|
|
357
390
|
}),
|
|
358
391
|
}),
|
|
359
392
|
});
|
|
393
|
+
const SelectOptionsBindingCostValue = GenEnum(import.meta.url, {
|
|
394
|
+
name: "SelectOptionsBindingCostValue",
|
|
395
|
+
comment: "Generate binding cost for each entry.",
|
|
396
|
+
parameters: [Param("Identifier")],
|
|
397
|
+
values: Identifier => ({
|
|
398
|
+
Fixed: EnumCase({
|
|
399
|
+
type: GenIncludeIdentifier(SelectOptionsFixedBindingCostValue, [TypeArgument(Identifier)]),
|
|
400
|
+
}),
|
|
401
|
+
}),
|
|
402
|
+
});
|
|
403
|
+
const SelectOptionsFixedBindingCostValue = GenTypeAlias(import.meta.url, {
|
|
404
|
+
name: "SelectOptionsFixedBindingCostValue",
|
|
405
|
+
parameters: [Param("Identifier")],
|
|
406
|
+
type: Identifier => Object({
|
|
407
|
+
map: Required({
|
|
408
|
+
comment: "A mapping of skill identifiers to their specific binding cost values.",
|
|
409
|
+
type: Array(GenIncludeIdentifier(SelectOptionsFixedBindingCostValueMapping, [
|
|
410
|
+
TypeArgument(Identifier),
|
|
411
|
+
])),
|
|
412
|
+
}),
|
|
413
|
+
default: Required({
|
|
414
|
+
comment: "The default value of an entry. Used as a fallback if no value is found in `list`.",
|
|
415
|
+
type: Integer({ minimum: 1 }),
|
|
416
|
+
}),
|
|
417
|
+
}),
|
|
418
|
+
});
|
|
419
|
+
const SelectOptionsFixedBindingCostValueMapping = GenTypeAlias(import.meta.url, {
|
|
420
|
+
name: "SelectOptionsFixedBindingCostValueMapping",
|
|
421
|
+
parameters: [Param("Identifier")],
|
|
422
|
+
type: Identifier => Object({
|
|
423
|
+
id: Required({
|
|
424
|
+
comment: "The entry’s identifier.",
|
|
425
|
+
type: TypeArgument(Identifier),
|
|
426
|
+
}),
|
|
427
|
+
bindingCost: Required({
|
|
428
|
+
comment: "The binding cost for the specified entry.",
|
|
429
|
+
type: Integer({ minimum: 1 }),
|
|
430
|
+
}),
|
|
431
|
+
}),
|
|
432
|
+
});
|
|
360
433
|
const TargetCategoriesSelectOptionCategory = TypeAlias(import.meta.url, {
|
|
361
434
|
name: "TargetCategoriesSelectOptionCategory",
|
|
362
435
|
type: () => Object({
|
|
@@ -12,6 +12,7 @@ export declare const select_options: import("tsondb/schema/def").MemberDecl<Incl
|
|
|
12
12
|
Races: EnumCase<null>;
|
|
13
13
|
Cultures: EnumCase<null>;
|
|
14
14
|
RacesAndCultures: EnumCase<null>;
|
|
15
|
+
HomunculusTypes: EnumCase<null>;
|
|
15
16
|
BlessedTraditions: EnumCase<IncludeIdentifier<[], TypeAlias<"BlessedTraditionsSelectOptionCategory", Object<{
|
|
16
17
|
require_principles: import("tsondb/schema/def").MemberDecl<Boolean, false>;
|
|
17
18
|
}>, []>>>;
|
|
@@ -659,6 +660,15 @@ export declare const select_options: import("tsondb/schema/def").MemberDecl<Incl
|
|
|
659
660
|
}, []>>>, false>;
|
|
660
661
|
}>, [Ref: import("tsondb/schema/def").TypeParameter<"Ref", import("tsondb/schema/def").Type>]>>>;
|
|
661
662
|
}, []>>>, true>;
|
|
663
|
+
bindingCost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], Enum<"SelectOptionsBindingCostValue", {
|
|
664
|
+
Fixed: EnumCase<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], TypeAlias<"SelectOptionsFixedBindingCostValue", Object<{
|
|
665
|
+
map: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").ArrayType<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], TypeAlias<"SelectOptionsFixedBindingCostValueMapping", Object<{
|
|
666
|
+
id: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").TypeArgumentType<import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>>, true>;
|
|
667
|
+
bindingCost: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
668
|
+
}>, [Identifier: import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>]>>>, true>;
|
|
669
|
+
default: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
670
|
+
}>, [Identifier: import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>]>>>;
|
|
671
|
+
}, [Identifier: import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>]>>, false>;
|
|
662
672
|
ap_value: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], Enum<"SelectOptionsAdventurePointsValue", {
|
|
663
673
|
DerivedFromImprovementCost: EnumCase<IncludeIdentifier<[], TypeAlias<"SelectOptionsDeriveAdventurePointsValueFromImprovementCost", Object<{
|
|
664
674
|
multiplier: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const BandageOrRemedy = Entity(import.meta.url, {
|
|
5
6
|
name: "BandageOrRemedy",
|
|
6
7
|
namePlural: "BandagesAndRemedies",
|
|
@@ -35,4 +36,13 @@ export const BandageOrRemedy = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -2,6 +2,7 @@ import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/sc
|
|
|
2
2
|
import { BlessedTraditionIdentifier } from "../../_Identifier.js";
|
|
3
3
|
import { src } from "../../source/_PublicationRef.js";
|
|
4
4
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
5
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
5
6
|
export const CeremonialItem = Entity(import.meta.url, {
|
|
6
7
|
name: "CeremonialItem",
|
|
7
8
|
namePlural: "CeremonialItems",
|
|
@@ -40,4 +41,13 @@ export const CeremonialItem = Entity(import.meta.url, {
|
|
|
40
41
|
keyPathInEntityMap: "name",
|
|
41
42
|
},
|
|
42
43
|
],
|
|
44
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
45
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
46
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
47
|
+
...rest,
|
|
48
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
49
|
+
}, true);
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
},
|
|
43
53
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const Clothes = Entity(import.meta.url, {
|
|
5
6
|
name: "Clothes",
|
|
6
7
|
namePlural: "Clothes",
|
|
@@ -35,4 +36,13 @@ export const Clothes = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const Container = Entity(import.meta.url, {
|
|
5
6
|
name: "Container",
|
|
6
7
|
namePlural: "Containers",
|
|
@@ -35,4 +36,13 @@ export const Container = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Cost, DefaultItemTranslations, RestrictedTo, StructurePoints } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const EquipmentOfBlessedOnes = Entity(import.meta.url, {
|
|
5
6
|
name: "EquipmentOfBlessedOnes",
|
|
6
7
|
namePlural: "EquipmentOfBlessedOnes",
|
|
@@ -31,4 +32,13 @@ export const EquipmentOfBlessedOnes = Entity(import.meta.url, {
|
|
|
31
32
|
keyPathInEntityMap: "name",
|
|
32
33
|
},
|
|
33
34
|
],
|
|
35
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
36
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
37
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
38
|
+
...rest,
|
|
39
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
40
|
+
}, true);
|
|
41
|
+
}
|
|
42
|
+
return [];
|
|
43
|
+
},
|
|
34
44
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, Enum, EnumCase, Float, IncludeIdentifier, Object, Optional, Required, TypeAlias, } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const IlluminationLightSource = Entity(import.meta.url, {
|
|
5
6
|
name: "IlluminationLightSource",
|
|
6
7
|
namePlural: "IlluminationLightSources",
|
|
@@ -39,6 +40,15 @@ export const IlluminationLightSource = Entity(import.meta.url, {
|
|
|
39
40
|
keyPathInEntityMap: "name",
|
|
40
41
|
},
|
|
41
42
|
],
|
|
43
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
44
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
45
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
46
|
+
...rest,
|
|
47
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
48
|
+
}, true);
|
|
49
|
+
}
|
|
50
|
+
return [];
|
|
51
|
+
},
|
|
42
52
|
});
|
|
43
53
|
const BurningTime = Enum(import.meta.url, {
|
|
44
54
|
name: "BurningTime",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const IlluminationRefillOrSupply = Entity(import.meta.url, {
|
|
5
6
|
name: "IlluminationRefillOrSupply",
|
|
6
7
|
namePlural: "IlluminationRefillsAndSupplies",
|
|
@@ -35,4 +36,13 @@ export const IlluminationRefillOrSupply = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const Liebesspielzeug = Entity(import.meta.url, {
|
|
5
6
|
name: "Liebesspielzeug",
|
|
6
7
|
namePlural: "Liebesspielzeug",
|
|
@@ -35,4 +36,13 @@ export const Liebesspielzeug = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const LuxuryGood = Entity(import.meta.url, {
|
|
5
6
|
name: "LuxuryGood",
|
|
6
7
|
namePlural: "LuxuryGoods",
|
|
@@ -35,4 +36,13 @@ export const LuxuryGood = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -3,6 +3,7 @@ import { NestedTranslationMap } from "../../Locale.js";
|
|
|
3
3
|
import { Errata } from "../../source/_Erratum.js";
|
|
4
4
|
import { src } from "../../source/_PublicationRef.js";
|
|
5
5
|
import { CombatUse, Complexity, Cost, StructurePoints, Weight } from "./_Item.js";
|
|
6
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
6
7
|
export const MagicalArtifact = Entity(import.meta.url, {
|
|
7
8
|
name: "MagicalArtifact",
|
|
8
9
|
namePlural: "MagicalArtifacts",
|
|
@@ -69,4 +70,13 @@ export const MagicalArtifact = Entity(import.meta.url, {
|
|
|
69
70
|
keyPathInEntityMap: "name",
|
|
70
71
|
},
|
|
71
72
|
],
|
|
73
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
74
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
75
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
76
|
+
...rest,
|
|
77
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
78
|
+
}, true);
|
|
79
|
+
}
|
|
80
|
+
return [];
|
|
81
|
+
},
|
|
72
82
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const MusicalInstrument = Entity(import.meta.url, {
|
|
5
6
|
name: "MusicalInstrument",
|
|
6
7
|
namePlural: "MusicalInstruments",
|
|
@@ -35,4 +36,13 @@ export const MusicalInstrument = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Entity, IncludeIdentifier, Object, Optional, Required } from "tsondb/schema/def";
|
|
2
2
|
import { src } from "../../source/_PublicationRef.js";
|
|
3
3
|
import { CombatUse, Complexity, Cost, DefaultItemTranslations, StructurePoints, Weight, } from "./_Item.js";
|
|
4
|
+
import { checkWeaponCombatTechniqueIntegrity } from "./_Weapon.js";
|
|
4
5
|
export const TravelGearOrTool = Entity(import.meta.url, {
|
|
5
6
|
name: "TravelGearOrTool",
|
|
6
7
|
namePlural: "TravelGearAndTools",
|
|
@@ -35,4 +36,13 @@ export const TravelGearOrTool = Entity(import.meta.url, {
|
|
|
35
36
|
keyPathInEntityMap: "name",
|
|
36
37
|
},
|
|
37
38
|
],
|
|
39
|
+
customConstraints: ({ instanceContent, ...rest }) => {
|
|
40
|
+
if (instanceContent.combat_use && instanceContent.combat_use.kind === "Weapon") {
|
|
41
|
+
return checkWeaponCombatTechniqueIntegrity({
|
|
42
|
+
...rest,
|
|
43
|
+
instanceContent: instanceContent.combat_use.Weapon,
|
|
44
|
+
}, true);
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
},
|
|
38
48
|
});
|