@optolith/database-schema 0.92.0 → 0.94.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 +28 -0
- package/gen/types.d.ts +54 -33
- package/lib/cache/activatableSelectOptions.d.ts +1 -1
- package/lib/cache/activatableSelectOptions.js +39 -0
- package/lib/cache/tradeSecrets.js +14 -3
- package/lib/types/Advantage.d.ts +3 -0
- package/lib/types/Disadvantage.d.ts +3 -0
- package/lib/types/Profession.d.ts +252 -161
- package/lib/types/Profession.js +18 -21
- package/lib/types/Settings.d.ts +56 -0
- package/lib/types/Settings.js +5 -0
- package/lib/types/_ActivatableSelectOptionCategory.d.ts +3 -0
- package/lib/types/_ActivatableSelectOptionCategory.js +13 -1
- package/lib/types/_ActivatableSelectOptions.d.ts +6 -0
- package/lib/types/equipment/item/Ammunition.d.ts +72 -0
- package/lib/types/equipment/item/Ammunition.js +5 -1
- package/lib/types/equipment/item/Armor.d.ts +24 -0
- package/lib/types/equipment/item/BandageOrRemedy.d.ts +24 -0
- package/lib/types/equipment/item/Book.d.ts +24 -0
- package/lib/types/equipment/item/CeremonialItem.d.ts +24 -0
- package/lib/types/equipment/item/Clothes.d.ts +24 -0
- package/lib/types/equipment/item/Container.d.ts +24 -0
- package/lib/types/equipment/item/IlluminationLightSource.d.ts +24 -0
- package/lib/types/equipment/item/IlluminationRefillOrSupply.d.ts +24 -0
- package/lib/types/equipment/item/Item.d.ts +24 -0
- package/lib/types/equipment/item/Jewelry.d.ts +24 -0
- package/lib/types/equipment/item/Laboratory.d.ts +24 -0
- package/lib/types/equipment/item/Liebesspielzeug.d.ts +24 -0
- package/lib/types/equipment/item/LuxuryGood.d.ts +24 -0
- package/lib/types/equipment/item/MagicalArtifact.d.ts +24 -0
- package/lib/types/equipment/item/MusicalInstrument.d.ts +24 -0
- package/lib/types/equipment/item/OrienteeringAid.d.ts +24 -0
- package/lib/types/equipment/item/Poison.d.ts +0 -6
- package/lib/types/equipment/item/Poison.js +0 -6
- package/lib/types/equipment/item/RopeOrChain.d.ts +24 -0
- package/lib/types/equipment/item/Stationery.d.ts +24 -0
- package/lib/types/equipment/item/ThievesTool.d.ts +24 -0
- package/lib/types/equipment/item/ToolOfTheTrade.d.ts +24 -0
- package/lib/types/equipment/item/TravelGearOrTool.d.ts +24 -0
- package/lib/types/equipment/item/Vehicle.d.ts +24 -0
- package/lib/types/equipment/item/Weapon.d.ts +26 -2
- package/lib/types/equipment/item/Weapon.js +2 -2
- package/lib/types/equipment/item/WeaponAccessory.d.ts +24 -0
- package/lib/types/equipment/item/_Item.d.ts +72 -0
- package/lib/types/equipment/item/_Item.js +5 -0
- package/lib/types/magicalActions/ElvenMagicalSong.d.ts +1 -0
- package/lib/types/magicalActions/ElvenMagicalSong.js +4 -0
- package/lib/types/specialAbility/AdvancedCombatSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/AdvancedSkillSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/AncestorGlyph.d.ts +3 -0
- package/lib/types/specialAbility/BlessedTradition.d.ts +3 -0
- package/lib/types/specialAbility/BrawlingSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/CeremonialItemSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/CombatSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/CombatStyleSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/CommandSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/FamiliarSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/FatePointSexSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/FatePointSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/GeneralSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/KarmaSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/LycantropicGift.d.ts +3 -0
- package/lib/types/specialAbility/MagicStyleSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/MagicalSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/MagicalTradition.d.ts +3 -0
- package/lib/types/specialAbility/PactGift.d.ts +3 -0
- package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/Sermon.d.ts +3 -0
- package/lib/types/specialAbility/SexSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/SikaryanDrainSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/SkillStyleSpecialAbility.d.ts +3 -0
- package/lib/types/specialAbility/VampiricGift.d.ts +3 -0
- package/lib/types/specialAbility/Vision.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.94.0](https://github.com/Optolith/database-schema/compare/v0.93.0...v0.94.0) (2026-10-12)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* add distorted elven magical songs flag
|
|
10
|
+
* derived trade secrets for ammunition
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add distorted elven magical songs flag ([837062e](https://github.com/Optolith/database-schema/commit/837062ee095a7bd706ce4c7c38517057580ee73a)), references [#199](https://github.com/Optolith/database-schema/issues/199)
|
|
15
|
+
* derived trade secrets for ammunition ([6b5b5ae](https://github.com/Optolith/database-schema/commit/6b5b5ae8f59d26c594c6594e3798263fdd47095b))
|
|
16
|
+
|
|
17
|
+
## [0.93.0](https://github.com/Optolith/database-schema/compare/v0.92.0...v0.93.0) (2026-10-11)
|
|
18
|
+
|
|
19
|
+
### ⚠ BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* allow text option for special abilities
|
|
22
|
+
* derived advantages select option category
|
|
23
|
+
* optional weapon cost and weight for improvised weapons
|
|
24
|
+
* remove demonic poison notes in favor of base poison notes
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* allow text option for special abilities ([ce81dc2](https://github.com/Optolith/database-schema/commit/ce81dc248ea62c8a08d9d631b50290b173ad3571)), closes [#200](https://github.com/Optolith/database-schema/issues/200)
|
|
29
|
+
* derived advantages select option category ([7e36546](https://github.com/Optolith/database-schema/commit/7e365469c4d7920528ac42a5418fa37c6406dd06)), closes [#82](https://github.com/Optolith/database-schema/issues/82)
|
|
30
|
+
* optional weapon cost and weight for improvised weapons ([8941125](https://github.com/Optolith/database-schema/commit/894112599982105b46fdbb9525cb0ad13e942f6f))
|
|
31
|
+
* remove demonic poison notes in favor of base poison notes ([e91b3dd](https://github.com/Optolith/database-schema/commit/e91b3ddddfd02722afa3a0affe0d49f262741dd7)), closes [#183](https://github.com/Optolith/database-schema/issues/183)
|
|
32
|
+
|
|
5
33
|
## [0.92.0](https://github.com/Optolith/database-schema/compare/v0.91.0...v0.92.0) (2026-10-10)
|
|
6
34
|
|
|
7
35
|
### ⚠ BREAKING CHANGES
|
package/gen/types.d.ts
CHANGED
|
@@ -503,6 +503,7 @@ export type TypeAliasMap = {
|
|
|
503
503
|
AdvancedSpecialAbilityDerivedFromExternalOptionMapping: AdvancedSpecialAbilityDerivedFromExternalOptionMapping<unknown>
|
|
504
504
|
AdvantageAnimalPower: AdvantageAnimalPower
|
|
505
505
|
AdvantageDisadvantagePrerequisites: AdvantageDisadvantagePrerequisites
|
|
506
|
+
AdvantagesSelectOptionCategory: AdvantagesSelectOptionCategory
|
|
506
507
|
AdventurePointsDependingOnActive: AdventurePointsDependingOnActive
|
|
507
508
|
AdventurePointsDependingOnActiveInstancesExpression: AdventurePointsDependingOnActiveInstancesExpression
|
|
508
509
|
AdventurePointsDependingOnActiveInstancesExpressionExpression: AdventurePointsDependingOnActiveInstancesExpressionExpression
|
|
@@ -602,7 +603,6 @@ export type TypeAliasMap = {
|
|
|
602
603
|
ConstantDemonicPoisonLevel: ConstantDemonicPoisonLevel
|
|
603
604
|
ConstantIntoxicantAddictionInterval: ConstantIntoxicantAddictionInterval
|
|
604
605
|
ConstantMagicalSignCost: ConstantMagicalSignCost
|
|
605
|
-
ConstantProfessionSpecialAbility: ConstantProfessionSpecialAbility
|
|
606
606
|
CostRange: CostRange
|
|
607
607
|
CulturalPackageItem: CulturalPackageItem
|
|
608
608
|
CultureLanguage: CultureLanguage
|
|
@@ -854,7 +854,7 @@ export type TypeAliasMap = {
|
|
|
854
854
|
ProfessionPrerequisite: ProfessionPrerequisite
|
|
855
855
|
ProfessionPrerequisites: ProfessionPrerequisites
|
|
856
856
|
ProfessionSpecialAbilitySelection: ProfessionSpecialAbilitySelection
|
|
857
|
-
|
|
857
|
+
ProfessionSpecialAbilityTextOption: ProfessionSpecialAbilityTextOption
|
|
858
858
|
ProfessionSpellworkIdentifier: ProfessionSpellworkIdentifier
|
|
859
859
|
ProfessionVariantPackageOptions: ProfessionVariantPackageOptions
|
|
860
860
|
ProfessionVariantPrerequisites: ProfessionVariantPrerequisites
|
|
@@ -926,6 +926,7 @@ export type TypeAliasMap = {
|
|
|
926
926
|
SingleMagicalRuneCost: SingleMagicalRuneCost
|
|
927
927
|
SinglePenalty: SinglePenalty
|
|
928
928
|
SinglePrimaryAttributeDamageThreshold: SinglePrimaryAttributeDamageThreshold
|
|
929
|
+
SingleProfessionSpecialAbility: SingleProfessionSpecialAbility
|
|
929
930
|
SingleResistance: SingleResistance
|
|
930
931
|
SkillAdjustment: SkillAdjustment
|
|
931
932
|
SkillAnimalPower: SkillAnimalPower
|
|
@@ -1259,6 +1260,10 @@ export type SelectOptionCategory =
|
|
|
1259
1260
|
kind: "TargetCategories"
|
|
1260
1261
|
TargetCategories: TargetCategoriesSelectOptionCategory
|
|
1261
1262
|
}
|
|
1263
|
+
| {
|
|
1264
|
+
kind: "Advantages"
|
|
1265
|
+
Advantages: AdvantagesSelectOptionCategory
|
|
1266
|
+
}
|
|
1262
1267
|
|
|
1263
1268
|
export interface BlessedTraditionsSelectOptionCategory {
|
|
1264
1269
|
/**
|
|
@@ -6345,20 +6350,6 @@ export interface DemonicPoison {
|
|
|
6345
6350
|
* The poison’s level.
|
|
6346
6351
|
*/
|
|
6347
6352
|
level: DemonicPoisonLevel
|
|
6348
|
-
|
|
6349
|
-
/**
|
|
6350
|
-
* All translations for the entry, identified by IETF language tag (BCP47).
|
|
6351
|
-
*/
|
|
6352
|
-
translations?: {
|
|
6353
|
-
[localeId: string]: DemonicPoisonTranslation
|
|
6354
|
-
}
|
|
6355
|
-
}
|
|
6356
|
-
|
|
6357
|
-
export interface DemonicPoisonTranslation {
|
|
6358
|
-
/**
|
|
6359
|
-
* A note, if any.
|
|
6360
|
-
*/
|
|
6361
|
-
note?: string
|
|
6362
6353
|
}
|
|
6363
6354
|
|
|
6364
6355
|
export type DemonicPoisonLevel =
|
|
@@ -12545,12 +12536,12 @@ export interface Weapon {
|
|
|
12545
12536
|
/**
|
|
12546
12537
|
* The cost in silverthalers.
|
|
12547
12538
|
*/
|
|
12548
|
-
cost
|
|
12539
|
+
cost?: Cost
|
|
12549
12540
|
|
|
12550
12541
|
/**
|
|
12551
12542
|
* The weight in kg.
|
|
12552
12543
|
*/
|
|
12553
|
-
weight
|
|
12544
|
+
weight?: Weight
|
|
12554
12545
|
|
|
12555
12546
|
/**
|
|
12556
12547
|
* The complexity of crafting the item.
|
|
@@ -12736,6 +12727,11 @@ export interface ComplexComplexity {
|
|
|
12736
12727
|
*/
|
|
12737
12728
|
ap_value: number
|
|
12738
12729
|
|
|
12730
|
+
/**
|
|
12731
|
+
* The prerequisites of the trade secret, if any. Note that the special ability prerequisite for weapon and armor trade secrets is added automatically based on the value in the `Settings` singleton entity.
|
|
12732
|
+
*/
|
|
12733
|
+
prerequisites?: PlainGeneralPrerequisites
|
|
12734
|
+
|
|
12739
12735
|
/**
|
|
12740
12736
|
* References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
|
|
12741
12737
|
*/
|
|
@@ -13002,6 +12998,11 @@ export interface Ammunition {
|
|
|
13002
12998
|
*/
|
|
13003
12999
|
cost: Cost
|
|
13004
13000
|
|
|
13001
|
+
/**
|
|
13002
|
+
* The complexity of crafting the item.
|
|
13003
|
+
*/
|
|
13004
|
+
complexity?: Complexity
|
|
13005
|
+
|
|
13005
13006
|
/**
|
|
13006
13007
|
* References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
|
|
13007
13008
|
*/
|
|
@@ -18633,14 +18634,14 @@ export type VariantSpecialAbilityAction =
|
|
|
18633
18634
|
export type ProfessionSpecialAbility =
|
|
18634
18635
|
| {
|
|
18635
18636
|
kind: "Constant"
|
|
18636
|
-
Constant:
|
|
18637
|
+
Constant: SingleProfessionSpecialAbility
|
|
18637
18638
|
}
|
|
18638
18639
|
| {
|
|
18639
18640
|
kind: "Selection"
|
|
18640
18641
|
Selection: ProfessionSpecialAbilitySelection
|
|
18641
18642
|
}
|
|
18642
18643
|
|
|
18643
|
-
export interface
|
|
18644
|
+
export interface SingleProfessionSpecialAbility {
|
|
18644
18645
|
/**
|
|
18645
18646
|
* The identifier of the special ability to grant.
|
|
18646
18647
|
*/
|
|
@@ -18884,32 +18885,35 @@ export type ProfessionSpecialAbilityOption =
|
|
|
18884
18885
|
kind: "Identifier"
|
|
18885
18886
|
Identifier: RequirableSelectOptionIdentifier
|
|
18886
18887
|
}
|
|
18888
|
+
| {
|
|
18889
|
+
kind: "Text"
|
|
18890
|
+
Text: ProfessionSpecialAbilityTextOption
|
|
18891
|
+
}
|
|
18887
18892
|
| {
|
|
18888
18893
|
kind: "Select"
|
|
18889
18894
|
}
|
|
18890
18895
|
|
|
18891
|
-
export interface
|
|
18896
|
+
export interface ProfessionSpecialAbilityTextOption {
|
|
18892
18897
|
/**
|
|
18893
|
-
*
|
|
18898
|
+
* All translations for the entry, identified by IETF language tag (BCP47).
|
|
18894
18899
|
*/
|
|
18895
|
-
|
|
18900
|
+
translations: {
|
|
18901
|
+
[localeId: string]: ProfessionSpecialAbilityTextOptionTranslation
|
|
18902
|
+
}
|
|
18896
18903
|
}
|
|
18897
18904
|
|
|
18898
|
-
export interface
|
|
18899
|
-
/**
|
|
18900
|
-
* The identifier of the special ability to grant.
|
|
18901
|
-
*/
|
|
18902
|
-
id: ProfessionSpecialAbilityIdentifier
|
|
18903
|
-
|
|
18905
|
+
export interface ProfessionSpecialAbilityTextOptionTranslation {
|
|
18904
18906
|
/**
|
|
18905
|
-
* The
|
|
18907
|
+
* The text of the option.
|
|
18906
18908
|
*/
|
|
18907
|
-
|
|
18909
|
+
text: string
|
|
18910
|
+
}
|
|
18908
18911
|
|
|
18912
|
+
export interface ProfessionSpecialAbilitySelection {
|
|
18909
18913
|
/**
|
|
18910
|
-
*
|
|
18914
|
+
* The list of special abilities to choose from. Must contain at least two entries.
|
|
18911
18915
|
*/
|
|
18912
|
-
options
|
|
18916
|
+
options: SingleProfessionSpecialAbility[]
|
|
18913
18917
|
}
|
|
18914
18918
|
|
|
18915
18919
|
export interface CombatTechniqueRating {
|
|
@@ -19471,6 +19475,11 @@ export interface ElvenMagicalSong {
|
|
|
19471
19475
|
*/
|
|
19472
19476
|
improvement_cost: ImprovementCost
|
|
19473
19477
|
|
|
19478
|
+
/**
|
|
19479
|
+
* Is the song a distorted Elven magical song?
|
|
19480
|
+
*/
|
|
19481
|
+
is_distorted: boolean
|
|
19482
|
+
|
|
19474
19483
|
/**
|
|
19475
19484
|
* References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
|
|
19476
19485
|
*/
|
|
@@ -23193,6 +23202,13 @@ export type AdvantageDisadvantagePrerequisiteGroup =
|
|
|
23193
23202
|
PersonalityTrait: PersonalityTraitPrerequisite
|
|
23194
23203
|
}
|
|
23195
23204
|
|
|
23205
|
+
export interface AdvantagesSelectOptionCategory {
|
|
23206
|
+
/**
|
|
23207
|
+
* A list of advantages of which the generated advantages must depend on at least one of them each.
|
|
23208
|
+
*/
|
|
23209
|
+
dependingOn: Advantage_ID[]
|
|
23210
|
+
}
|
|
23211
|
+
|
|
23196
23212
|
/**
|
|
23197
23213
|
* Rules for how options can be selected and relate to each other. Defaults to a single predefined option if the entry has select options defined, otherwise undefined.
|
|
23198
23214
|
*/
|
|
@@ -27837,6 +27853,11 @@ export interface DerivedTradeSecretsSettings {
|
|
|
27837
27853
|
*/
|
|
27838
27854
|
requiredSpecialAbilityForWeapons: SpecialAbilityIdentifier
|
|
27839
27855
|
|
|
27856
|
+
/**
|
|
27857
|
+
* The special ability required to buy derived trade secrets for ammunition.
|
|
27858
|
+
*/
|
|
27859
|
+
requiredSpecialAbilityForAmmunition: SpecialAbilityIdentifier
|
|
27860
|
+
|
|
27840
27861
|
/**
|
|
27841
27862
|
* The special ability required to buy derived trade secrets for armor.
|
|
27842
27863
|
*/
|
|
@@ -2,7 +2,7 @@ import { Case } from "tsondb/schema/gen";
|
|
|
2
2
|
import type { ActivatableIdentifier as ActivatableIdentifierType, GeneralSelectOption, RequirableSelectOptionIdentifier, TradeSecretAdventurePointsValue } from "../../gen/types.js";
|
|
3
3
|
import type { CacheBuilder } from "./internal.ts";
|
|
4
4
|
import type { ResolvedNewSkillApplication, ResolvedSkillUse } from "./newApplicationsAndUses.ts";
|
|
5
|
-
export type ResolvedSelectOptionIdentifier = RequirableSelectOptionIdentifier | Case<"Blessing" | "Cantrip" | "Script" | "Culture" | "SexPractice" | "HomunculusType" | "BlessedTradition" | "Disease" | "Poison" | "TargetCategory", string>;
|
|
5
|
+
export type ResolvedSelectOptionIdentifier = RequirableSelectOptionIdentifier | Case<"Blessing" | "Cantrip" | "Script" | "Culture" | "SexPractice" | "HomunculusType" | "BlessedTradition" | "Disease" | "Poison" | "TargetCategory" | "Advantage", string>;
|
|
6
6
|
export type ResolvedSelectOption = {
|
|
7
7
|
id: ResolvedSelectOptionIdentifier;
|
|
8
8
|
content: Omit<GeneralSelectOption, "ap_value"> & {
|
|
@@ -733,6 +733,45 @@ const getDerivedSelectOptions = (selectOptionCategory, entryId, database) => {
|
|
|
733
733
|
.getAllInstanceContainersOfEntity("TargetCategory")
|
|
734
734
|
.map(tc => mapToResolvedSelectOption(tc));
|
|
735
735
|
}
|
|
736
|
+
case "Advantages": {
|
|
737
|
+
const mapToResolvedSelectOption = ({ id, content, }) => ({
|
|
738
|
+
id: Case("Advantage", id),
|
|
739
|
+
content: {
|
|
740
|
+
parent: entryId,
|
|
741
|
+
ap_value: content.ap_value,
|
|
742
|
+
translations: mapObject(content.translations, t10n => ({
|
|
743
|
+
name: t10n.name,
|
|
744
|
+
})),
|
|
745
|
+
},
|
|
746
|
+
newApplications: [],
|
|
747
|
+
uses: [],
|
|
748
|
+
});
|
|
749
|
+
const { dependingOn } = selectOptionCategory.Advantages;
|
|
750
|
+
const matchesDependingOn = (prereq) => prereq.kind === "Activatable" &&
|
|
751
|
+
prereq.Activatable.active &&
|
|
752
|
+
prereq.Activatable.id.kind === "Advantage" &&
|
|
753
|
+
dependingOn.includes(prereq.Activatable.id.Advantage);
|
|
754
|
+
return database
|
|
755
|
+
.getAllInstanceContainersOfEntity("Advantage")
|
|
756
|
+
.filter(({ content }) => content.ap_value.kind === "Fixed" &&
|
|
757
|
+
(content.prerequisites?.some(p => {
|
|
758
|
+
if (p.level !== 1) {
|
|
759
|
+
return false;
|
|
760
|
+
}
|
|
761
|
+
switch (p.prerequisite.kind) {
|
|
762
|
+
case "Disjunction":
|
|
763
|
+
return p.prerequisite.Disjunction.list.every(matchesDependingOn);
|
|
764
|
+
case "Group":
|
|
765
|
+
return p.prerequisite.Group.list.some(matchesDependingOn);
|
|
766
|
+
case "Single":
|
|
767
|
+
return matchesDependingOn(p.prerequisite.Single);
|
|
768
|
+
default:
|
|
769
|
+
return assertExhaustive(p.prerequisite);
|
|
770
|
+
}
|
|
771
|
+
}) ??
|
|
772
|
+
false))
|
|
773
|
+
.map(mapToResolvedSelectOption);
|
|
774
|
+
}
|
|
736
775
|
default:
|
|
737
776
|
return assertExhaustive(selectOptionCategory);
|
|
738
777
|
}
|
|
@@ -2,6 +2,7 @@ import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
|
2
2
|
import { Case } from "tsondb/schema/gen";
|
|
3
3
|
const emptyDerivedEquipmentTradeSecretsCache = {
|
|
4
4
|
Armor: {},
|
|
5
|
+
Ammunition: {},
|
|
5
6
|
BandageOrRemedy: {},
|
|
6
7
|
Book: {},
|
|
7
8
|
CeremonialItem: {},
|
|
@@ -53,15 +54,25 @@ export const buildDerivedTradeSecretsCache = (database, settings) => {
|
|
|
53
54
|
id: settings.derivedTradeSecrets.requiredSpecialAbilityForWeapons,
|
|
54
55
|
active: true,
|
|
55
56
|
})),
|
|
57
|
+
...(container.content.complexity.Complex.prerequisites ?? []),
|
|
56
58
|
]
|
|
57
|
-
: entity === "
|
|
59
|
+
: entity === "Ammunition"
|
|
58
60
|
? [
|
|
59
61
|
Case("Single", Case("Activatable", {
|
|
60
|
-
id: settings.derivedTradeSecrets.
|
|
62
|
+
id: settings.derivedTradeSecrets.requiredSpecialAbilityForAmmunition,
|
|
61
63
|
active: true,
|
|
62
64
|
})),
|
|
65
|
+
...(container.content.complexity.Complex.prerequisites ?? []),
|
|
63
66
|
]
|
|
64
|
-
:
|
|
67
|
+
: entity === "Armor"
|
|
68
|
+
? [
|
|
69
|
+
Case("Single", Case("Activatable", {
|
|
70
|
+
id: settings.derivedTradeSecrets.requiredSpecialAbilityForArmor,
|
|
71
|
+
active: true,
|
|
72
|
+
})),
|
|
73
|
+
...(container.content.complexity.Complex.prerequisites ?? []),
|
|
74
|
+
]
|
|
75
|
+
: (container.content.complexity.Complex.prerequisites ?? []),
|
|
65
76
|
src: container.content.complexity.Complex.src ?? container.content.src,
|
|
66
77
|
translations: Object.fromEntries(Object.entries(container.content.translations).map(([lang, translation]) => [
|
|
67
78
|
lang,
|
package/lib/types/Advantage.d.ts
CHANGED
|
@@ -850,6 +850,9 @@ export declare const Advantage: DB.Entity<"Advantage", {
|
|
|
850
850
|
volume: DB.MemberDecl<DB.Integer, false>;
|
|
851
851
|
}>, []>>>, true>;
|
|
852
852
|
}>, []>>>;
|
|
853
|
+
Advantages: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AdvantagesSelectOptionCategory", DB.Object<{
|
|
854
|
+
dependingOn: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
855
|
+
}>, []>>>;
|
|
853
856
|
}, []>>, false>;
|
|
854
857
|
rules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectOptionRules", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectOptionRule", DB.Object<{
|
|
855
858
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SelectOptionRuleValue", {
|
|
@@ -850,6 +850,9 @@ export declare const Disadvantage: DB.Entity<"Disadvantage", {
|
|
|
850
850
|
volume: DB.MemberDecl<DB.Integer, false>;
|
|
851
851
|
}>, []>>>, true>;
|
|
852
852
|
}>, []>>>;
|
|
853
|
+
Advantages: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"AdvantagesSelectOptionCategory", DB.Object<{
|
|
854
|
+
dependingOn: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
855
|
+
}>, []>>>;
|
|
853
856
|
}, []>>, false>;
|
|
854
857
|
rules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectOptionRules", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectOptionRule", DB.Object<{
|
|
855
858
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"SelectOptionRuleValue", {
|