optolith-database-schema 0.24.3 → 0.26.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 +25 -0
- package/gen/types.d.ts +49 -6
- package/lib/main.d.ts +7 -0
- package/lib/test.d.ts +1 -1
- package/lib/test.js +10 -1
- package/lib/types/Advantage.js +7 -0
- package/lib/types/AnimalDisease.js +6 -0
- package/lib/types/AnimalType.js +6 -0
- package/lib/types/ArcaneBardTradition.js +6 -0
- package/lib/types/ArcaneDancerTradition.js +6 -0
- package/lib/types/Aspect.js +6 -0
- package/lib/types/Attribute.js +10 -0
- package/lib/types/Blessing.js +6 -0
- package/lib/types/Cantrip.js +6 -0
- package/lib/types/Ceremony.js +6 -0
- package/lib/types/CombatTechnique.d.ts +79 -55
- package/lib/types/CombatTechnique.js +37 -7
- package/lib/types/Condition.js +6 -0
- package/lib/types/Continent.js +6 -0
- package/lib/types/Culture.js +6 -0
- package/lib/types/DerivedCharacteristic.js +10 -0
- package/lib/types/Disadvantage.js +7 -0
- package/lib/types/Disease.js +6 -0
- package/lib/types/Element.js +6 -0
- package/lib/types/ExperienceLevel.js +6 -0
- package/lib/types/EyeColor.js +6 -0
- package/lib/types/FamiliarsTrick.js +6 -0
- package/lib/types/HairColor.js +6 -0
- package/lib/types/Lessons.js +12 -0
- package/lib/types/LiturgicalChant.js +6 -0
- package/lib/types/Locale.js +10 -0
- package/lib/types/MetaCondition.js +6 -0
- package/lib/types/PactCategory.js +36 -0
- package/lib/types/Patron.js +6 -0
- package/lib/types/PatronCategory.js +6 -0
- package/lib/types/PersonalityTrait.js +6 -0
- package/lib/types/Profession.d.ts +25 -0
- package/lib/types/Profession.js +16 -0
- package/lib/types/Property.js +6 -0
- package/lib/types/Race.js +17 -0
- package/lib/types/Region.js +6 -0
- package/lib/types/Ritual.js +6 -0
- package/lib/types/Service.js +6 -0
- package/lib/types/SexPractice.js +6 -0
- package/lib/types/Skill.js +15 -0
- package/lib/types/SkillGroup.js +6 -0
- package/lib/types/SkillModificationLevel.js +8 -0
- package/lib/types/SocialStatus.js +7 -0
- package/lib/types/Spell.js +6 -0
- package/lib/types/State.js +6 -0
- package/lib/types/Talisman.js +6 -0
- package/lib/types/TargetCategory.js +6 -0
- package/lib/types/_ActivatableSelectOptions.js +11 -0
- package/lib/types/_Enhancements.js +11 -0
- package/lib/types/_Influence.js +6 -0
- package/lib/types/equipment/EquipmentPackage.js +6 -0
- package/lib/types/equipment/item/Ammunition.js +6 -0
- package/lib/types/equipment/item/Animal.js +6 -0
- package/lib/types/equipment/item/AnimalCare.js +6 -0
- package/lib/types/equipment/item/Armor.js +6 -0
- package/lib/types/equipment/item/BandageOrRemedy.js +16 -0
- package/lib/types/equipment/item/Book.js +6 -0
- package/lib/types/equipment/item/CeremonialItem.js +16 -0
- package/lib/types/equipment/item/Clothes.js +16 -0
- package/lib/types/equipment/item/Container.js +16 -0
- package/lib/types/equipment/item/Elixir.js +6 -0
- package/lib/types/equipment/item/EquipmentOfBlessedOnes.js +16 -0
- package/lib/types/equipment/item/GemOrPreciousStone.js +6 -0
- package/lib/types/equipment/item/IlluminationLightSource.js +16 -0
- package/lib/types/equipment/item/IlluminationRefillOrSupply.js +16 -0
- package/lib/types/equipment/item/Jewelry.js +6 -0
- package/lib/types/equipment/item/Laboratory.js +6 -0
- package/lib/types/equipment/item/Liebesspielzeug.js +16 -0
- package/lib/types/equipment/item/LuxuryGood.js +16 -0
- package/lib/types/equipment/item/MagicalArtifact.js +16 -0
- package/lib/types/equipment/item/MusicalInstrument.js +16 -0
- package/lib/types/equipment/item/Newspaper.js +6 -0
- package/lib/types/equipment/item/Poison.js +6 -0
- package/lib/types/equipment/item/ToolOfTheTrade.js +6 -0
- package/lib/types/equipment/item/TravelGearOrTool.js +16 -0
- package/lib/types/equipment/item/Vehicle.js +6 -0
- package/lib/types/equipment/item/Weapon.d.ts +45 -45
- package/lib/types/equipment/item/Weapon.js +13 -5
- package/lib/types/equipment/item/WeaponAccessory.js +16 -0
- package/lib/types/equipment/item/_Item.js +19 -1
- package/lib/types/equipment/item/_Weapon.d.ts +13 -4
- package/lib/types/equipment/item/_Weapon.js +32 -4
- package/lib/types/equipment/item/sub/ArmorType.js +6 -0
- package/lib/types/equipment/item/sub/Reach.js +6 -0
- package/lib/types/magicalActions/AnimistPower.js +6 -0
- package/lib/types/magicalActions/AnimistPower_Tribe.js +6 -0
- package/lib/types/magicalActions/Curse.js +6 -0
- package/lib/types/magicalActions/DominationRitual.js +6 -0
- package/lib/types/magicalActions/ElvenMagicalSong.js +6 -0
- package/lib/types/magicalActions/GeodeRitual.js +6 -0
- package/lib/types/magicalActions/JesterTrick.js +6 -0
- package/lib/types/magicalActions/MagicalDance.js +6 -0
- package/lib/types/magicalActions/MagicalMelody.js +6 -0
- package/lib/types/magicalActions/MagicalRune.js +6 -0
- package/lib/types/magicalActions/ZibiljaRitual.js +6 -0
- package/lib/types/rule/AlternativeRule.js +6 -0
- package/lib/types/rule/CoreRule.js +6 -0
- package/lib/types/rule/FocusRule.js +6 -0
- package/lib/types/rule/FocusRule_Subject.js +6 -0
- package/lib/types/rule/OptionalRule.js +6 -0
- package/lib/types/source/Publication.js +6 -0
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.js +7 -0
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.js +7 -0
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.js +7 -0
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.js +7 -0
- package/lib/types/specialAbility/AncestorGlyph.js +7 -0
- package/lib/types/specialAbility/BlessedTradition.js +7 -0
- package/lib/types/specialAbility/BrawlingSpecialAbility.js +7 -0
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.js +12 -0
- package/lib/types/specialAbility/CombatSpecialAbility.js +7 -0
- package/lib/types/specialAbility/CombatStyleSpecialAbility.js +7 -0
- package/lib/types/specialAbility/CommandSpecialAbility.js +7 -0
- package/lib/types/specialAbility/FamiliarSpecialAbility.js +7 -0
- package/lib/types/specialAbility/FatePointSexSpecialAbility.js +7 -0
- package/lib/types/specialAbility/FatePointSpecialAbility.js +7 -0
- package/lib/types/specialAbility/GeneralSpecialAbility.js +7 -0
- package/lib/types/specialAbility/KarmaSpecialAbility.js +7 -0
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.js +7 -0
- package/lib/types/specialAbility/LycantropicGift.js +7 -0
- package/lib/types/specialAbility/MagicStyleSpecialAbility.js +7 -0
- package/lib/types/specialAbility/MagicalSign.js +7 -0
- package/lib/types/specialAbility/MagicalSpecialAbility.js +7 -0
- package/lib/types/specialAbility/MagicalTradition.js +7 -0
- package/lib/types/specialAbility/PactGift.js +7 -0
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.js +7 -0
- package/lib/types/specialAbility/Sermon.js +7 -0
- package/lib/types/specialAbility/SexSpecialAbility.js +7 -0
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.js +7 -0
- package/lib/types/specialAbility/SkillStyleSpecialAbility.js +7 -0
- package/lib/types/specialAbility/VampiricGift.js +7 -0
- package/lib/types/specialAbility/Vision.js +7 -0
- package/lib/types/specialAbility/sub/Language.js +6 -0
- package/lib/types/specialAbility/sub/Script.js +6 -0
- package/lib/types/specialAbility/sub/TradeSecret.js +6 -0
- package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/AttireEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/Beutelzauber.js +7 -0
- package/lib/types/traditionArtifacts/BowlEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/CauldronEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/ChronicleEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/DaggerRitual.js +7 -0
- package/lib/types/traditionArtifacts/FoolsHatEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/Haubenzauber.js +7 -0
- package/lib/types/traditionArtifacts/InstrumentEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/Krallenkettenzauber.js +7 -0
- package/lib/types/traditionArtifacts/Kristallkugelzauber.js +7 -0
- package/lib/types/traditionArtifacts/OrbEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/RingEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/SickleRitual.js +7 -0
- package/lib/types/traditionArtifacts/SpellSwordEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/StaffEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/ToyEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/Trinkhornzauber.js +7 -0
- package/lib/types/traditionArtifacts/WandEnchantment.js +7 -0
- package/lib/types/traditionArtifacts/WeaponEnchantment.js +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
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.26.0](https://github.com/elyukai/optolith-database-schema/compare/v0.25.0...v0.26.0) (2025-12-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* Combat techniques need to specify special rules
|
|
11
|
+
differently.
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add profession liturgies for ap sum option ([a1316af](https://github.com/elyukai/optolith-database-schema/commit/a1316af0c1f8b85e79f5f393eed2c3bec5204645)), closes [#86](https://github.com/elyukai/optolith-database-schema/issues/86)
|
|
16
|
+
* custom constraint for weapon values ([02be29d](https://github.com/elyukai/optolith-database-schema/commit/02be29dab7bca40fb4c370c48a9f775ccf8aaf7d))
|
|
17
|
+
|
|
18
|
+
## [0.25.0](https://github.com/elyukai/optolith-database-schema/compare/v0.24.3...v0.25.0) (2025-12-14)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ⚠ BREAKING CHANGES
|
|
22
|
+
|
|
23
|
+
* add unique constraints
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add unique constraints ([8bacb48](https://github.com/elyukai/optolith-database-schema/commit/8bacb489d804d280801b38111d96732fb9a317fc))
|
|
28
|
+
* adjust display names of pact domains and types ([6086a6d](https://github.com/elyukai/optolith-database-schema/commit/6086a6d89160f7f09f9f6474cc240acd4d518f43))
|
|
29
|
+
|
|
5
30
|
## [0.24.3](https://github.com/elyukai/optolith-database-schema/compare/v0.24.2...v0.24.3) (2025-12-09)
|
|
6
31
|
|
|
7
32
|
|
package/gen/types.d.ts
CHANGED
|
@@ -176,6 +176,23 @@ export type EntityMap = {
|
|
|
176
176
|
ZibiljaRitual: ZibiljaRitual
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
export type ChildEntityMap = {
|
|
180
|
+
Enhancement: [Enhancement, "parent", Enhancement["parent"]]
|
|
181
|
+
GeneralSelectOption: [GeneralSelectOption, "parent", GeneralSelectOption["parent"]]
|
|
182
|
+
LanguageSpecialization: [LanguageSpecialization, "parent", LanguageSpecialization["parent"]]
|
|
183
|
+
LessonPackage: [LessonPackage, "curriculum", LessonPackage["curriculum"]]
|
|
184
|
+
MagicalRuneOption: [MagicalRuneOption, "parent", MagicalRuneOption["parent"]]
|
|
185
|
+
NewSkillApplication: [NewSkillApplication, "parent", NewSkillApplication["parent"]]
|
|
186
|
+
PactDomain: [PactDomain, "parent", PactDomain["parent"]]
|
|
187
|
+
PactType: [PactType, "parent", PactType["parent"]]
|
|
188
|
+
ProfessionPackage: [ProfessionPackage, "profession_version", ProfessionPackage["profession_version"]]
|
|
189
|
+
ProfessionVariant: [ProfessionVariant, "profession_package", ProfessionVariant["profession_package"]]
|
|
190
|
+
ProfessionVersion: [ProfessionVersion, "profession", ProfessionVersion["profession"]]
|
|
191
|
+
RaceVariant: [RaceVariant, "race", RaceVariant["race"]]
|
|
192
|
+
SkillApplication: [SkillApplication, "parent", SkillApplication["parent"]]
|
|
193
|
+
SkillUse: [SkillUse, "parent", SkillUse["parent"]]
|
|
194
|
+
}
|
|
195
|
+
|
|
179
196
|
export type StringableTranslationParameter = {
|
|
180
197
|
toString(): string
|
|
181
198
|
}
|
|
@@ -4114,17 +4131,31 @@ export interface CloseCombatTechniqueSpecialRules {
|
|
|
4114
4131
|
/**
|
|
4115
4132
|
* Is parrying possible with this combat technique?
|
|
4116
4133
|
*/
|
|
4117
|
-
can_parry:
|
|
4134
|
+
can_parry: WeaponCombatTechniqueValueRule
|
|
4118
4135
|
|
|
4119
|
-
has_damage_threshold:
|
|
4136
|
+
has_damage_threshold: WeaponCombatTechniqueValueRule
|
|
4120
4137
|
|
|
4121
|
-
has_reach:
|
|
4138
|
+
has_reach: WeaponCombatTechniqueValueRule
|
|
4122
4139
|
|
|
4123
|
-
has_length:
|
|
4140
|
+
has_length: WeaponCombatTechniqueValueRule
|
|
4124
4141
|
|
|
4125
|
-
has_shield_size:
|
|
4142
|
+
has_shield_size: WeaponCombatTechniqueValueRule
|
|
4126
4143
|
}
|
|
4127
4144
|
|
|
4145
|
+
/**
|
|
4146
|
+
* Defines if the weapon must/can/must not define a value for this parameter.
|
|
4147
|
+
*/
|
|
4148
|
+
export type WeaponCombatTechniqueValueRule =
|
|
4149
|
+
| {
|
|
4150
|
+
kind: "Required"
|
|
4151
|
+
}
|
|
4152
|
+
| {
|
|
4153
|
+
kind: "Optional"
|
|
4154
|
+
}
|
|
4155
|
+
| {
|
|
4156
|
+
kind: "Prohibited"
|
|
4157
|
+
}
|
|
4158
|
+
|
|
4128
4159
|
export interface RangedCombatTechnique {
|
|
4129
4160
|
/**
|
|
4130
4161
|
* Special rules for the combat technique that apply to all weapons in this category.
|
|
@@ -4182,7 +4213,7 @@ export interface RangedCombatTechniqueTranslation {
|
|
|
4182
4213
|
* Special rules for the combat technique that apply to all weapons in this category.
|
|
4183
4214
|
*/
|
|
4184
4215
|
export interface RangedCombatTechniqueSpecialRules {
|
|
4185
|
-
has_ammunition:
|
|
4216
|
+
has_ammunition: WeaponCombatTechniqueValueRule
|
|
4186
4217
|
}
|
|
4187
4218
|
|
|
4188
4219
|
export interface Property {
|
|
@@ -7720,6 +7751,7 @@ export interface ProfessionPackageOptions {
|
|
|
7720
7751
|
curses?: CursesOptions
|
|
7721
7752
|
terrain_knowledge?: TerrainKnowledgeOptions
|
|
7722
7753
|
skills?: SkillsOptions
|
|
7754
|
+
liturgies?: LiturgiesOptions
|
|
7723
7755
|
}
|
|
7724
7756
|
|
|
7725
7757
|
/**
|
|
@@ -8026,6 +8058,16 @@ export interface SkillsOptions {
|
|
|
8026
8058
|
ap_value: number
|
|
8027
8059
|
}
|
|
8028
8060
|
|
|
8061
|
+
/**
|
|
8062
|
+
* Buy liturgical chants and ceremonies for a specific amount of AP.
|
|
8063
|
+
*/
|
|
8064
|
+
export interface LiturgiesOptions {
|
|
8065
|
+
/**
|
|
8066
|
+
* The AP value you can buy liturgical chants and ceremonies for.
|
|
8067
|
+
*/
|
|
8068
|
+
ap_value: number
|
|
8069
|
+
}
|
|
8070
|
+
|
|
8029
8071
|
export type ProfessionSpecialAbility =
|
|
8030
8072
|
| {
|
|
8031
8073
|
kind: "Constant"
|
|
@@ -17209,6 +17251,7 @@ export interface ProfessionVariantPackageOptions {
|
|
|
17209
17251
|
curses?: VariantOptionAction<CursesOptions>
|
|
17210
17252
|
terrain_knowledge?: VariantOptionAction<TerrainKnowledgeOptions>
|
|
17211
17253
|
skills?: VariantOptionAction<SkillsOptions>
|
|
17254
|
+
liturgies?: VariantOptionAction<LiturgiesOptions>
|
|
17212
17255
|
}
|
|
17213
17256
|
|
|
17214
17257
|
export type VariantOptionAction<T> =
|
package/lib/main.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import { Schema } from "tsondb/schema";
|
|
2
|
+
import type { ChildEntityMap, EntityMap } from "../gen/types.js";
|
|
3
|
+
declare module "tsondb/schema" {
|
|
4
|
+
interface Register {
|
|
5
|
+
entityMap: EntityMap;
|
|
6
|
+
childEntityMap: ChildEntityMap;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
2
9
|
export declare const schema: Schema;
|
package/lib/test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/lib/test.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import { stderr } from "node:process";
|
|
2
|
+
import { styleText } from "node:util";
|
|
1
3
|
// importing the main file will run the schema checks
|
|
2
|
-
import
|
|
4
|
+
import("./main.js")
|
|
5
|
+
.then(() => {
|
|
6
|
+
console.log(styleText("green", "Schema is valid"));
|
|
7
|
+
})
|
|
8
|
+
.catch((err) => {
|
|
9
|
+
console.error(styleText("red", err instanceof Error ? err.message : String(err), { stream: stderr }));
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
});
|
package/lib/types/Advantage.js
CHANGED
|
@@ -26,4 +26,10 @@ If no causes are given, the disease is not communicable to intelligent creatures
|
|
|
26
26
|
translations: NestedTranslationMap(Required, "AnimalDisease", DiseaseTranslation),
|
|
27
27
|
}),
|
|
28
28
|
displayName: {},
|
|
29
|
+
uniqueConstraints: [
|
|
30
|
+
{
|
|
31
|
+
entityMapKeyPath: "translations",
|
|
32
|
+
keyPathInEntityMap: "name",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
29
35
|
});
|
package/lib/types/AnimalType.js
CHANGED
|
@@ -5,4 +5,10 @@ export const ArcaneBardTradition = Entity(import.meta.url, {
|
|
|
5
5
|
namePlural: "ArcaneBardTraditions",
|
|
6
6
|
type: ArcaneTraditionType("ArcaneBardTraditionTranslation"),
|
|
7
7
|
displayName: {},
|
|
8
|
+
uniqueConstraints: [
|
|
9
|
+
{
|
|
10
|
+
entityMapKeyPath: "translations",
|
|
11
|
+
keyPathInEntityMap: "name",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
8
14
|
});
|
|
@@ -5,4 +5,10 @@ export const ArcaneDancerTradition = Entity(import.meta.url, {
|
|
|
5
5
|
namePlural: "ArcaneDancerTraditions",
|
|
6
6
|
type: ArcaneTraditionType("ArcaneDancerTraditionTranslation"),
|
|
7
7
|
displayName: {},
|
|
8
|
+
uniqueConstraints: [
|
|
9
|
+
{
|
|
10
|
+
entityMapKeyPath: "translations",
|
|
11
|
+
keyPathInEntityMap: "name",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
8
14
|
});
|
package/lib/types/Aspect.js
CHANGED
package/lib/types/Attribute.js
CHANGED
|
@@ -21,4 +21,14 @@ export const Attribute = Entity(import.meta.url, {
|
|
|
21
21
|
})),
|
|
22
22
|
}),
|
|
23
23
|
displayName: {},
|
|
24
|
+
uniqueConstraints: [
|
|
25
|
+
{
|
|
26
|
+
entityMapKeyPath: "translations",
|
|
27
|
+
keyPathInEntityMap: "name",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
entityMapKeyPath: "translations",
|
|
31
|
+
keyPathInEntityMap: "abbreviation",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
24
34
|
});
|
package/lib/types/Blessing.js
CHANGED
|
@@ -45,6 +45,12 @@ export const Blessing = Entity(import.meta.url, {
|
|
|
45
45
|
})),
|
|
46
46
|
}),
|
|
47
47
|
displayName: {},
|
|
48
|
+
uniqueConstraints: [
|
|
49
|
+
{
|
|
50
|
+
entityMapKeyPath: "translations",
|
|
51
|
+
keyPathInEntityMap: "name",
|
|
52
|
+
},
|
|
53
|
+
],
|
|
48
54
|
});
|
|
49
55
|
const BlessingPerformanceParameters = TypeAlias(import.meta.url, {
|
|
50
56
|
name: "BlessingPerformanceParameters",
|
package/lib/types/Cantrip.js
CHANGED
|
@@ -56,6 +56,12 @@ export const Cantrip = Entity(import.meta.url, {
|
|
|
56
56
|
})),
|
|
57
57
|
}),
|
|
58
58
|
displayName: {},
|
|
59
|
+
uniqueConstraints: [
|
|
60
|
+
{
|
|
61
|
+
entityMapKeyPath: "translations",
|
|
62
|
+
keyPathInEntityMap: "name",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
59
65
|
});
|
|
60
66
|
const CantripNote = Enum(import.meta.url, {
|
|
61
67
|
name: "CantripNote",
|
package/lib/types/Ceremony.js
CHANGED
|
@@ -1,19 +1,39 @@
|
|
|
1
|
-
import { Array,
|
|
1
|
+
import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Integer, Object, String, TypeAlias } from "tsondb/schema/def";
|
|
2
2
|
export declare const CloseCombatTechnique: Entity<"CloseCombatTechnique", {
|
|
3
3
|
special: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"CloseCombatTechniqueSpecialRules", Object<{
|
|
4
|
-
can_parry: import("tsondb/schema/def").MemberDecl<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
can_parry: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
5
|
+
Required: EnumCase<null>;
|
|
6
|
+
Optional: EnumCase<null>;
|
|
7
|
+
Prohibited: EnumCase<null>;
|
|
8
|
+
}, []>>, true>;
|
|
9
|
+
has_damage_threshold: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
10
|
+
Required: EnumCase<null>;
|
|
11
|
+
Optional: EnumCase<null>;
|
|
12
|
+
Prohibited: EnumCase<null>;
|
|
13
|
+
}, []>>, true>;
|
|
14
|
+
has_reach: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
15
|
+
Required: EnumCase<null>;
|
|
16
|
+
Optional: EnumCase<null>;
|
|
17
|
+
Prohibited: EnumCase<null>;
|
|
18
|
+
}, []>>, true>;
|
|
19
|
+
has_length: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
20
|
+
Required: EnumCase<null>;
|
|
21
|
+
Optional: EnumCase<null>;
|
|
22
|
+
Prohibited: EnumCase<null>;
|
|
23
|
+
}, []>>, true>;
|
|
24
|
+
has_shield_size: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
25
|
+
Required: EnumCase<null>;
|
|
26
|
+
Optional: EnumCase<null>;
|
|
27
|
+
Prohibited: EnumCase<null>;
|
|
28
|
+
}, []>>, true>;
|
|
9
29
|
}>, []>>, true>;
|
|
10
30
|
primary_attribute: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
11
31
|
breaking_point_rating: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
12
|
-
improvement_cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
13
|
-
A:
|
|
14
|
-
B:
|
|
15
|
-
C:
|
|
16
|
-
D:
|
|
32
|
+
improvement_cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"ImprovementCost", {
|
|
33
|
+
A: EnumCase<null>;
|
|
34
|
+
B: EnumCase<null>;
|
|
35
|
+
C: EnumCase<null>;
|
|
36
|
+
D: EnumCase<null>;
|
|
17
37
|
}, []>>, true>;
|
|
18
38
|
src: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"PublicationRefs", Array<IncludeIdentifier<[], TypeAlias<"PublicationRef", Object<{
|
|
19
39
|
id: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").ReferenceIdentifierType, true>;
|
|
@@ -21,35 +41,35 @@ export declare const CloseCombatTechnique: Entity<"CloseCombatTechnique", {
|
|
|
21
41
|
initial: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"InitialOccurrence", Object<{
|
|
22
42
|
printing: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
23
43
|
pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
|
|
24
|
-
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
25
|
-
InsideCoverFront:
|
|
26
|
-
InsideCoverBack:
|
|
27
|
-
Numbered:
|
|
44
|
+
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
45
|
+
InsideCoverFront: EnumCase<null>;
|
|
46
|
+
InsideCoverBack: EnumCase<null>;
|
|
47
|
+
Numbered: EnumCase<Integer>;
|
|
28
48
|
}, []>>, true>;
|
|
29
|
-
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
30
|
-
InsideCoverFront:
|
|
31
|
-
InsideCoverBack:
|
|
32
|
-
Numbered:
|
|
49
|
+
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
50
|
+
InsideCoverFront: EnumCase<null>;
|
|
51
|
+
InsideCoverBack: EnumCase<null>;
|
|
52
|
+
Numbered: EnumCase<Integer>;
|
|
33
53
|
}, []>>, false>;
|
|
34
54
|
}>, []>>>, true>;
|
|
35
55
|
}>, []>>, true>;
|
|
36
|
-
revisions: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[],
|
|
37
|
-
Since:
|
|
56
|
+
revisions: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], Enum<"Revision", {
|
|
57
|
+
Since: EnumCase<IncludeIdentifier<[], TypeAlias<"Since", Object<{
|
|
38
58
|
printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
39
59
|
pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
|
|
40
|
-
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
41
|
-
InsideCoverFront:
|
|
42
|
-
InsideCoverBack:
|
|
43
|
-
Numbered:
|
|
60
|
+
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
61
|
+
InsideCoverFront: EnumCase<null>;
|
|
62
|
+
InsideCoverBack: EnumCase<null>;
|
|
63
|
+
Numbered: EnumCase<Integer>;
|
|
44
64
|
}, []>>, true>;
|
|
45
|
-
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
46
|
-
InsideCoverFront:
|
|
47
|
-
InsideCoverBack:
|
|
48
|
-
Numbered:
|
|
65
|
+
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
66
|
+
InsideCoverFront: EnumCase<null>;
|
|
67
|
+
InsideCoverBack: EnumCase<null>;
|
|
68
|
+
Numbered: EnumCase<Integer>;
|
|
49
69
|
}, []>>, false>;
|
|
50
70
|
}>, []>>>, true>;
|
|
51
71
|
}>, []>>>;
|
|
52
|
-
Deprecated:
|
|
72
|
+
Deprecated: EnumCase<IncludeIdentifier<[], TypeAlias<"Deprecation", Object<{
|
|
53
73
|
printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
54
74
|
}>, []>>>;
|
|
55
75
|
}, []>>>, false>;
|
|
@@ -66,15 +86,19 @@ export declare const CloseCombatTechnique: Entity<"CloseCombatTechnique", {
|
|
|
66
86
|
}, undefined>;
|
|
67
87
|
export declare const RangedCombatTechnique: Entity<"RangedCombatTechnique", {
|
|
68
88
|
special: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"RangedCombatTechniqueSpecialRules", Object<{
|
|
69
|
-
has_ammunition: import("tsondb/schema/def").MemberDecl<
|
|
89
|
+
has_ammunition: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"WeaponCombatTechniqueValueRule", {
|
|
90
|
+
Required: EnumCase<null>;
|
|
91
|
+
Optional: EnumCase<null>;
|
|
92
|
+
Prohibited: EnumCase<null>;
|
|
93
|
+
}, []>>, true>;
|
|
70
94
|
}>, []>>, true>;
|
|
71
95
|
primary_attribute: import("tsondb/schema/def").MemberDecl<Array<import("tsondb/schema/def").ReferenceIdentifierType>, true>;
|
|
72
96
|
breaking_point_rating: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
73
|
-
improvement_cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
74
|
-
A:
|
|
75
|
-
B:
|
|
76
|
-
C:
|
|
77
|
-
D:
|
|
97
|
+
improvement_cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"ImprovementCost", {
|
|
98
|
+
A: EnumCase<null>;
|
|
99
|
+
B: EnumCase<null>;
|
|
100
|
+
C: EnumCase<null>;
|
|
101
|
+
D: EnumCase<null>;
|
|
78
102
|
}, []>>, true>;
|
|
79
103
|
src: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"PublicationRefs", Array<IncludeIdentifier<[], TypeAlias<"PublicationRef", Object<{
|
|
80
104
|
id: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").ReferenceIdentifierType, true>;
|
|
@@ -82,35 +106,35 @@ export declare const RangedCombatTechnique: Entity<"RangedCombatTechnique", {
|
|
|
82
106
|
initial: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"InitialOccurrence", Object<{
|
|
83
107
|
printing: import("tsondb/schema/def").MemberDecl<Integer, false>;
|
|
84
108
|
pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
|
|
85
|
-
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
86
|
-
InsideCoverFront:
|
|
87
|
-
InsideCoverBack:
|
|
88
|
-
Numbered:
|
|
109
|
+
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
110
|
+
InsideCoverFront: EnumCase<null>;
|
|
111
|
+
InsideCoverBack: EnumCase<null>;
|
|
112
|
+
Numbered: EnumCase<Integer>;
|
|
89
113
|
}, []>>, true>;
|
|
90
|
-
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
91
|
-
InsideCoverFront:
|
|
92
|
-
InsideCoverBack:
|
|
93
|
-
Numbered:
|
|
114
|
+
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
115
|
+
InsideCoverFront: EnumCase<null>;
|
|
116
|
+
InsideCoverBack: EnumCase<null>;
|
|
117
|
+
Numbered: EnumCase<Integer>;
|
|
94
118
|
}, []>>, false>;
|
|
95
119
|
}>, []>>>, true>;
|
|
96
120
|
}>, []>>, true>;
|
|
97
|
-
revisions: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[],
|
|
98
|
-
Since:
|
|
121
|
+
revisions: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], Enum<"Revision", {
|
|
122
|
+
Since: EnumCase<IncludeIdentifier<[], TypeAlias<"Since", Object<{
|
|
99
123
|
printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
100
124
|
pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
|
|
101
|
-
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
102
|
-
InsideCoverFront:
|
|
103
|
-
InsideCoverBack:
|
|
104
|
-
Numbered:
|
|
125
|
+
first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
126
|
+
InsideCoverFront: EnumCase<null>;
|
|
127
|
+
InsideCoverBack: EnumCase<null>;
|
|
128
|
+
Numbered: EnumCase<Integer>;
|
|
105
129
|
}, []>>, true>;
|
|
106
|
-
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[],
|
|
107
|
-
InsideCoverFront:
|
|
108
|
-
InsideCoverBack:
|
|
109
|
-
Numbered:
|
|
130
|
+
last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
|
|
131
|
+
InsideCoverFront: EnumCase<null>;
|
|
132
|
+
InsideCoverBack: EnumCase<null>;
|
|
133
|
+
Numbered: EnumCase<Integer>;
|
|
110
134
|
}, []>>, false>;
|
|
111
135
|
}>, []>>>, true>;
|
|
112
136
|
}>, []>>>;
|
|
113
|
-
Deprecated:
|
|
137
|
+
Deprecated: EnumCase<IncludeIdentifier<[], TypeAlias<"Deprecation", Object<{
|
|
114
138
|
printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
|
|
115
139
|
}>, []>>>;
|
|
116
140
|
}, []>>>, false>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Array,
|
|
1
|
+
import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
|
|
2
2
|
import { AttributeIdentifier } from "./_Identifier.js";
|
|
3
3
|
import { ImprovementCost } from "./_ImprovementCost.js";
|
|
4
4
|
import { NestedTranslationMap } from "./Locale.js";
|
|
@@ -40,6 +40,30 @@ export const CloseCombatTechnique = Entity(import.meta.url, {
|
|
|
40
40
|
})),
|
|
41
41
|
}),
|
|
42
42
|
displayName: {},
|
|
43
|
+
uniqueConstraints: [
|
|
44
|
+
{
|
|
45
|
+
entityMapKeyPath: "translations",
|
|
46
|
+
keyPathInEntityMap: "name",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
});
|
|
50
|
+
const WeaponCombatTechniqueValueRule = Enum(import.meta.url, {
|
|
51
|
+
name: "WeaponCombatTechniqueValueRule",
|
|
52
|
+
comment: "Defines if the weapon must/can/must not define a value for this parameter.",
|
|
53
|
+
values: () => ({
|
|
54
|
+
Required: EnumCase({
|
|
55
|
+
comment: "The parameter must be present in all weapons for this combat technique.",
|
|
56
|
+
type: null,
|
|
57
|
+
}),
|
|
58
|
+
Optional: EnumCase({
|
|
59
|
+
comment: "The parameter can be present in any weapons for this combat technique.",
|
|
60
|
+
type: null,
|
|
61
|
+
}),
|
|
62
|
+
Prohibited: EnumCase({
|
|
63
|
+
comment: "The parameter must not be present in any weapon for this combat technique.",
|
|
64
|
+
type: null,
|
|
65
|
+
}),
|
|
66
|
+
}),
|
|
43
67
|
});
|
|
44
68
|
const CloseCombatTechniqueSpecialRules = TypeAlias(import.meta.url, {
|
|
45
69
|
name: "CloseCombatTechniqueSpecialRules",
|
|
@@ -47,12 +71,12 @@ const CloseCombatTechniqueSpecialRules = TypeAlias(import.meta.url, {
|
|
|
47
71
|
type: () => Object({
|
|
48
72
|
can_parry: Required({
|
|
49
73
|
comment: "Is parrying possible with this combat technique?",
|
|
50
|
-
type:
|
|
74
|
+
type: IncludeIdentifier(WeaponCombatTechniqueValueRule),
|
|
51
75
|
}),
|
|
52
|
-
has_damage_threshold: Required({ type:
|
|
53
|
-
has_reach: Required({ type:
|
|
54
|
-
has_length: Required({ type:
|
|
55
|
-
has_shield_size: Required({ type:
|
|
76
|
+
has_damage_threshold: Required({ type: IncludeIdentifier(WeaponCombatTechniqueValueRule) }),
|
|
77
|
+
has_reach: Required({ type: IncludeIdentifier(WeaponCombatTechniqueValueRule) }),
|
|
78
|
+
has_length: Required({ type: IncludeIdentifier(WeaponCombatTechniqueValueRule) }),
|
|
79
|
+
has_shield_size: Required({ type: IncludeIdentifier(WeaponCombatTechniqueValueRule) }),
|
|
56
80
|
}),
|
|
57
81
|
});
|
|
58
82
|
export const RangedCombatTechnique = Entity(import.meta.url, {
|
|
@@ -91,11 +115,17 @@ export const RangedCombatTechnique = Entity(import.meta.url, {
|
|
|
91
115
|
})),
|
|
92
116
|
}),
|
|
93
117
|
displayName: {},
|
|
118
|
+
uniqueConstraints: [
|
|
119
|
+
{
|
|
120
|
+
entityMapKeyPath: "translations",
|
|
121
|
+
keyPathInEntityMap: "name",
|
|
122
|
+
},
|
|
123
|
+
],
|
|
94
124
|
});
|
|
95
125
|
const RangedCombatTechniqueSpecialRules = TypeAlias(import.meta.url, {
|
|
96
126
|
name: "RangedCombatTechniqueSpecialRules",
|
|
97
127
|
comment: "Special rules for the combat technique that apply to all weapons in this category.",
|
|
98
128
|
type: () => Object({
|
|
99
|
-
has_ammunition: Required({ type:
|
|
129
|
+
has_ammunition: Required({ type: IncludeIdentifier(WeaponCombatTechniqueValueRule) }),
|
|
100
130
|
}),
|
|
101
131
|
});
|
package/lib/types/Condition.js
CHANGED
package/lib/types/Continent.js
CHANGED
package/lib/types/Culture.js
CHANGED
|
@@ -94,6 +94,12 @@ export const Culture = Entity(import.meta.url, {
|
|
|
94
94
|
})),
|
|
95
95
|
}),
|
|
96
96
|
displayName: {},
|
|
97
|
+
uniqueConstraints: [
|
|
98
|
+
{
|
|
99
|
+
entityMapKeyPath: "translations",
|
|
100
|
+
keyPathInEntityMap: "name",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
97
103
|
});
|
|
98
104
|
const AreaKnowledge = TypeAlias(import.meta.url, {
|
|
99
105
|
name: "AreaKnowledge",
|
|
@@ -26,6 +26,16 @@ export const DerivedCharacteristic = Entity(import.meta.url, {
|
|
|
26
26
|
})),
|
|
27
27
|
}),
|
|
28
28
|
displayName: {},
|
|
29
|
+
uniqueConstraints: [
|
|
30
|
+
{
|
|
31
|
+
entityMapKeyPath: "translations",
|
|
32
|
+
keyPathInEntityMap: "name",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
entityMapKeyPath: "translations",
|
|
36
|
+
keyPathInEntityMap: "abbreviation",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
29
39
|
});
|
|
30
40
|
const CalculationTranslation = TypeAlias(import.meta.url, {
|
|
31
41
|
name: "CalculationTranslation",
|
package/lib/types/Disease.js
CHANGED
|
@@ -18,4 +18,10 @@ export const Disease = Entity(import.meta.url, {
|
|
|
18
18
|
translations: NestedTranslationMap(Required, "Disease", DiseaseTranslation),
|
|
19
19
|
}),
|
|
20
20
|
displayName: {},
|
|
21
|
+
uniqueConstraints: [
|
|
22
|
+
{
|
|
23
|
+
entityMapKeyPath: "translations",
|
|
24
|
+
keyPathInEntityMap: "name",
|
|
25
|
+
},
|
|
26
|
+
],
|
|
21
27
|
});
|