optolith-database-schema 0.39.0 → 0.41.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 +52 -0
- package/README.md +1 -1
- package/gen/types.d.ts +1712 -1606
- package/lib/types/DerivedCharacteristic.d.ts +23 -14
- package/lib/types/DerivedCharacteristic.js +58 -21
- package/lib/types/Disease.d.ts +2 -0
- package/lib/types/Disease.js +8 -0
- package/lib/types/Locale.d.ts +7 -0
- package/lib/types/Locale.js +7 -0
- package/lib/types/Profession.d.ts +31 -14
- package/lib/types/Profession.js +12 -2
- package/lib/types/Race.d.ts +22 -15
- package/lib/types/Race.js +26 -20
- package/lib/types/Talisman.d.ts +32 -6
- package/lib/types/Talisman.js +51 -11
- package/lib/types/_Identifier.d.ts +1 -0
- package/lib/types/_Identifier.js +2 -0
- package/lib/types/_IdentifierGroup.d.ts +58 -0
- package/lib/types/_IdentifierGroup.js +15 -1
- package/lib/types/equipment/item/BandageOrRemedy.d.ts +5 -2
- package/lib/types/equipment/item/CeremonialItem.d.ts +6 -3
- package/lib/types/equipment/item/CeremonialItem.js +1 -1
- package/lib/types/equipment/item/Clothes.d.ts +5 -2
- package/lib/types/equipment/item/Container.d.ts +5 -2
- package/lib/types/equipment/item/Elixir.d.ts +16 -1
- package/lib/types/equipment/item/Elixir.js +35 -5
- package/lib/types/equipment/item/EquipmentOfBlessedOnes.d.ts +5 -2
- package/lib/types/equipment/item/IlluminationLightSource.d.ts +5 -2
- package/lib/types/equipment/item/IlluminationRefillOrSupply.d.ts +5 -2
- package/lib/types/equipment/item/Liebesspielzeug.d.ts +5 -2
- package/lib/types/equipment/item/LuxuryGood.d.ts +5 -2
- package/lib/types/equipment/item/MagicalArtifact.d.ts +5 -2
- package/lib/types/equipment/item/MusicalInstrument.d.ts +5 -2
- package/lib/types/equipment/item/OrienteeringAid.d.ts +5 -2
- package/lib/types/equipment/item/Poison.d.ts +64 -91
- package/lib/types/equipment/item/Poison.js +5 -34
- package/lib/types/equipment/item/RopeOrChain.d.ts +5 -2
- package/lib/types/equipment/item/Stationery.d.ts +5 -2
- package/lib/types/equipment/item/ThievesTool.d.ts +5 -2
- package/lib/types/equipment/item/TravelGearOrTool.d.ts +5 -2
- package/lib/types/equipment/item/Weapon.d.ts +10 -4
- package/lib/types/equipment/item/WeaponAccessory.d.ts +5 -2
- package/lib/types/equipment/item/_Herbary.d.ts +31 -0
- package/lib/types/equipment/item/_Herbary.js +9 -0
- package/lib/types/equipment/item/_Item.d.ts +10 -4
- package/lib/types/equipment/item/_MeleeWeapon.d.ts +2 -2
- package/lib/types/equipment/item/_MeleeWeapon.js +1 -1
- package/lib/types/equipment/item/_RangedWeapon.d.ts +8 -2
- package/lib/types/equipment/item/_RangedWeapon.js +2 -2
- package/lib/types/equipment/item/sub/Reach.d.ts +1 -0
- package/lib/types/equipment/item/sub/Reach.js +7 -0
- package/lib/types/magicalActions/MagicalMelody.d.ts +15 -0
- package/lib/types/magicalActions/MagicalMelody.js +5 -0
- package/lib/types/prerequisites/PrerequisiteGroups.d.ts +132 -0
- package/lib/types/prerequisites/PrerequisiteGroups.js +1 -0
- package/package.json +7 -7
- package/schema/Advantage.schema.json +0 -108
- package/schema/AnimalDisease.schema.json +0 -74
- package/schema/AnimalType.schema.json +0 -47
- package/schema/ArcaneBardTradition.schema.json +0 -11
- package/schema/ArcaneDancerTradition.schema.json +0 -11
- package/schema/Aspect.schema.json +0 -51
- package/schema/Attribute.schema.json +0 -57
- package/schema/Blessing.schema.json +0 -265
- package/schema/Cantrip.schema.json +0 -443
- package/schema/Ceremony.schema.json +0 -122
- package/schema/CombatTechnique_Close.schema.json +0 -116
- package/schema/CombatTechnique_Ranged.schema.json +0 -99
- package/schema/Condition.schema.json +0 -68
- package/schema/Continent.schema.json +0 -49
- package/schema/Culture.schema.json +0 -781
- package/schema/DerivedCharacteristic.schema.json +0 -90
- package/schema/Disadvantage.schema.json +0 -97
- package/schema/Disease.schema.json +0 -58
- package/schema/Element.schema.json +0 -48
- package/schema/ExperienceLevel.schema.json +0 -84
- package/schema/EyeColor.schema.json +0 -47
- package/schema/FamiliarsTrick.schema.json +0 -576
- package/schema/HairColor.schema.json +0 -47
- package/schema/Kirchenpraegung.schema.json +0 -11
- package/schema/Lessons_Curriculum.schema.json +0 -499
- package/schema/Lessons_Guideline.schema.json +0 -53
- package/schema/LiturgicalChant.schema.json +0 -122
- package/schema/Locale.schema.json +0 -38
- package/schema/MetaCondition.schema.json +0 -69
- package/schema/PactCategory.schema.json +0 -150
- package/schema/Patron.schema.json +0 -352
- package/schema/PatronCategory.schema.json +0 -57
- package/schema/PersonalityTrait.schema.json +0 -100
- package/schema/Profession.schema.json +0 -1424
- package/schema/Property.schema.json +0 -51
- package/schema/Race.schema.json +0 -534
- package/schema/Region.schema.json +0 -47
- package/schema/Ritual.schema.json +0 -120
- package/schema/Service.schema.json +0 -79
- package/schema/SexPractice.schema.json +0 -70
- package/schema/Skill.schema.json +0 -223
- package/schema/SkillGroup.schema.json +0 -57
- package/schema/SkillModificationLevel.schema.json +0 -153
- package/schema/SocialStatus.schema.json +0 -47
- package/schema/Spell.schema.json +0 -119
- package/schema/State.schema.json +0 -59
- package/schema/Talisman.schema.json +0 -120
- package/schema/TargetCategory.schema.json +0 -65
- package/schema/UI.schema.json +0 -4441
- package/schema/_Activatable.schema.json +0 -2755
- package/schema/_ActivatableSelectOptionCategory.schema.json +0 -1313
- package/schema/_ActivatableSkill.schema.json +0 -188
- package/schema/_ActivatableSkillCastingTime.schema.json +0 -181
- package/schema/_ActivatableSkillCheckResultBased.schema.json +0 -65
- package/schema/_ActivatableSkillCost.schema.json +0 -513
- package/schema/_ActivatableSkillDuration.schema.json +0 -353
- package/schema/_ActivatableSkillEffect.schema.json +0 -122
- package/schema/_ActivatableSkillRange.schema.json +0 -264
- package/schema/_ActivatableSkillTargetCategory.schema.json +0 -145
- package/schema/_AlternativeNames.schema.json +0 -23
- package/schema/_ArcaneTradition.schema.json +0 -51
- package/schema/_Blessed.schema.json +0 -64
- package/schema/_Dice.schema.json +0 -40
- package/schema/_DiseasePoison.schema.json +0 -152
- package/schema/_Enhancements.schema.json +0 -85
- package/schema/_I18n.schema.json +0 -55
- package/schema/_Identifier.schema.json +0 -2577
- package/schema/_IdentifierGroup.schema.json +0 -753
- package/schema/_ImprovementCost.schema.json +0 -23
- package/schema/_Influence.schema.json +0 -84
- package/schema/_NonEmptyString.schema.json +0 -14
- package/schema/_Prerequisite.schema.json +0 -1518
- package/schema/_ResponsiveText.schema.json +0 -66
- package/schema/_Sex.schema.json +0 -18
- package/schema/_SimpleReferences.schema.json +0 -522
- package/schema/_SkillCheck.schema.json +0 -38
- package/schema/_Spellwork.schema.json +0 -54
- package/schema/equipment/EquipmentPackage.schema.json +0 -79
- package/schema/equipment/item/Ammunition.schema.json +0 -56
- package/schema/equipment/item/Animal.schema.json +0 -36
- package/schema/equipment/item/AnimalCare.schema.json +0 -124
- package/schema/equipment/item/Armor.schema.json +0 -309
- package/schema/equipment/item/BandageOrRemedy.schema.json +0 -53
- package/schema/equipment/item/Book.schema.json +0 -89
- package/schema/equipment/item/CeremonialItem.schema.json +0 -59
- package/schema/equipment/item/Clothes.schema.json +0 -10
- package/schema/equipment/item/Container.schema.json +0 -10
- package/schema/equipment/item/Elixir.schema.json +0 -103
- package/schema/equipment/item/EquipmentOfBlessedOnes.schema.json +0 -49
- package/schema/equipment/item/GemOrPreciousStone.schema.json +0 -69
- package/schema/equipment/item/IlluminationLightSource.schema.json +0 -120
- package/schema/equipment/item/IlluminationRefillsOrSupplies.schema.json +0 -10
- package/schema/equipment/item/Jewelry.schema.json +0 -113
- package/schema/equipment/item/Liebesspielzeug.schema.json +0 -10
- package/schema/equipment/item/LuxuryGood.schema.json +0 -53
- package/schema/equipment/item/MagicalArtifact.schema.json +0 -64
- package/schema/equipment/item/MusicalInstrument.schema.json +0 -49
- package/schema/equipment/item/OrienteeringAid.schema.json +0 -10
- package/schema/equipment/item/Poison.schema.json +0 -835
- package/schema/equipment/item/RopeOrChain.schema.json +0 -10
- package/schema/equipment/item/Stationary.schema.json +0 -10
- package/schema/equipment/item/ThievesTool.schema.json +0 -10
- package/schema/equipment/item/ToolOfTheTrade.schema.json +0 -93
- package/schema/equipment/item/TravelGearOrTool.schema.json +0 -10
- package/schema/equipment/item/Vehicle.schema.json +0 -36
- package/schema/equipment/item/Weapon.schema.json +0 -285
- package/schema/equipment/item/WeaponAccessory.schema.json +0 -10
- package/schema/equipment/item/_Herbary.schema.json +0 -62
- package/schema/equipment/item/_Item.schema.json +0 -384
- package/schema/equipment/item/_MeleeWeapon.schema.json +0 -164
- package/schema/equipment/item/_RangedWeapon.schema.json +0 -185
- package/schema/equipment/item/_Weapon.schema.json +0 -99
- package/schema/equipment/item/sub/ArmorType.schema.json +0 -52
- package/schema/equipment/item/sub/Reach.schema.json +0 -47
- package/schema/magicalActions/AnimistPower.schema.json +0 -488
- package/schema/magicalActions/AnimistPower_Tribe.schema.json +0 -47
- package/schema/magicalActions/Curse.schema.json +0 -332
- package/schema/magicalActions/DominationRitual.schema.json +0 -275
- package/schema/magicalActions/ElvenMagicalSong.schema.json +0 -196
- package/schema/magicalActions/GeodeRitual.schema.json +0 -327
- package/schema/magicalActions/JesterTrick.schema.json +0 -311
- package/schema/magicalActions/MagicalDance.schema.json +0 -198
- package/schema/magicalActions/MagicalMelody.schema.json +0 -193
- package/schema/magicalActions/MagicalRune.schema.json +0 -578
- package/schema/magicalActions/ZibiljaRitual.schema.json +0 -165
- package/schema/magicalActions/_MusicTradition.schema.json +0 -82
- package/schema/magicalActions/_SkillReference.schema.json +0 -20
- package/schema/prerequisites/ConditionalPrerequisites.schema.json +0 -15
- package/schema/prerequisites/DisplayOption.schema.json +0 -70
- package/schema/prerequisites/PrerequisiteGroups.schema.json +0 -1029
- package/schema/prerequisites/single/ActivatablePrerequisite.schema.json +0 -45
- package/schema/prerequisites/single/AncestorBloodPrerequisite.schema.json +0 -14
- package/schema/prerequisites/single/AnimistPowerPrerequisite.schema.json +0 -36
- package/schema/prerequisites/single/CulturePrerequisite.schema.json +0 -24
- package/schema/prerequisites/single/EnhancementPrerequisite.schema.json +0 -61
- package/schema/prerequisites/single/InfluencePrerequisite.schema.json +0 -28
- package/schema/prerequisites/single/PactPrerequisite.schema.json +0 -36
- package/schema/prerequisites/single/PrimaryAttributePrerequisite.schema.json +0 -39
- package/schema/prerequisites/single/PublicationPrerequisite.schema.json +0 -22
- package/schema/prerequisites/single/RacePrerequisite.schema.json +0 -28
- package/schema/prerequisites/single/RatedMinimumNumberPrerequisite.schema.json +0 -172
- package/schema/prerequisites/single/RatedPrerequisite.schema.json +0 -29
- package/schema/prerequisites/single/RatedSumPrerequisite.schema.json +0 -33
- package/schema/prerequisites/single/RulePrerequisite.schema.json +0 -22
- package/schema/prerequisites/single/SexPrerequisite.schema.json +0 -23
- package/schema/prerequisites/single/SexualCharacteristicPrerequisite.schema.json +0 -30
- package/schema/prerequisites/single/SocialStatusPrerequisite.schema.json +0 -24
- package/schema/prerequisites/single/StatePrerequisite.schema.json +0 -23
- package/schema/prerequisites/single/TextPrerequisite.schema.json +0 -64
- package/schema/prerequisites/single/TraditionPrerequisite.schema.json +0 -58
- package/schema/rule/CoreRule.schema.json +0 -1403
- package/schema/rule/FocusRule.schema.json +0 -76
- package/schema/rule/FocusRule_Subject.schema.json +0 -48
- package/schema/rule/OptionalRule.schema.json +0 -64
- package/schema/source/Publication.schema.json +0 -103
- package/schema/source/_Erratum.schema.json +0 -36
- package/schema/source/_PublicationRef.schema.json +0 -285
- package/schema/specialAbility/AdvancedCombatSpecialAbility.schema.json +0 -102
- package/schema/specialAbility/AdvancedKarmaSpecialAbility.schema.json +0 -80
- package/schema/specialAbility/AdvancedMagicalSpecialAbility.schema.json +0 -80
- package/schema/specialAbility/AdvancedSkillSpecialAbility.schema.json +0 -80
- package/schema/specialAbility/AncestorGlyph.schema.json +0 -80
- package/schema/specialAbility/BlessedTradition.schema.json +0 -354
- package/schema/specialAbility/BrawlingSpecialAbility.schema.json +0 -82
- package/schema/specialAbility/CeremonialItemSpecialAbility.schema.json +0 -87
- package/schema/specialAbility/CombatSpecialAbility.schema.json +0 -98
- package/schema/specialAbility/CombatStyleSpecialAbility.schema.json +0 -273
- package/schema/specialAbility/CommandSpecialAbility.schema.json +0 -82
- package/schema/specialAbility/FamiliarSpecialAbility.schema.json +0 -74
- package/schema/specialAbility/FatePointSexSpecialAbility.schema.json +0 -74
- package/schema/specialAbility/FatePointSpecialAbility.schema.json +0 -84
- package/schema/specialAbility/GeneralSpecialAbility.schema.json +0 -88
- package/schema/specialAbility/KarmaSpecialAbility.schema.json +0 -78
- package/schema/specialAbility/LiturgicalStyleSpecialAbility.schema.json +0 -260
- package/schema/specialAbility/LycantropicGift.schema.json +0 -74
- package/schema/specialAbility/MagicStyleSpecialAbility.schema.json +0 -260
- package/schema/specialAbility/MagicalSign.schema.json +0 -72
- package/schema/specialAbility/MagicalSpecialAbility.schema.json +0 -88
- package/schema/specialAbility/MagicalTradition.schema.json +0 -163
- package/schema/specialAbility/PactGift.schema.json +0 -254
- package/schema/specialAbility/ProtectiveWardingCircleSpecialAbility.schema.json +0 -86
- package/schema/specialAbility/Sermon.schema.json +0 -74
- package/schema/specialAbility/SexSpecialAbility.schema.json +0 -80
- package/schema/specialAbility/SikaryanDrainSpecialAbility.schema.json +0 -78
- package/schema/specialAbility/SkillStyleSpecialAbility.schema.json +0 -254
- package/schema/specialAbility/VampiricGift.schema.json +0 -78
- package/schema/specialAbility/Vision.schema.json +0 -74
- package/schema/specialAbility/_Tradition.schema.json +0 -23
- package/schema/specialAbility/sub/Language.schema.json +0 -222
- package/schema/specialAbility/sub/Script.schema.json +0 -90
- package/schema/specialAbility/sub/TradeSecret.schema.json +0 -72
- package/schema/specialAbility/sub/_LanguageScript.schema.json +0 -24
- package/schema/traditionArtifacts/ArcaneOrbEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/AttireEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/BowlEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/CauldronEnchantment.schema.json +0 -115
- package/schema/traditionArtifacts/ChronicleEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/DaggerRitual.schema.json +0 -176
- package/schema/traditionArtifacts/FoolsHatEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/InstrumentEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/Krallenkettenzauber.schema.json +0 -95
- package/schema/traditionArtifacts/OrbEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/RingEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/SickleRitual.schema.json +0 -95
- package/schema/traditionArtifacts/SpellSwordEnchantment.schema.json +0 -99
- package/schema/traditionArtifacts/StaffEnchantment.schema.json +0 -103
- package/schema/traditionArtifacts/ToyEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/Trinkhornzauber.schema.json +0 -95
- package/schema/traditionArtifacts/WandEnchantment.schema.json +0 -87
- package/schema/traditionArtifacts/WeaponEnchantment.schema.json +0 -95
- package/schema/traditionArtifacts/sub/AnimalShape.schema.json +0 -85
- package/schema/traditionArtifacts/sub/AnimalShapePath.schema.json +0 -47
- package/schema/traditionArtifacts/sub/AnimalShapeSize.schema.json +0 -59
- package/schema/traditionArtifacts/sub/Brew.schema.json +0 -47
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
|
+
import type { DerivedCharacteristicBase } from "../../gen/types.js";
|
|
2
3
|
import { MathOperation } from "./_MathExpression.ts";
|
|
3
4
|
export declare const DerivedCharacteristic: DB.Entity<"DerivedCharacteristic", {
|
|
4
5
|
position: DB.MemberDecl<DB.Integer, true>;
|
|
6
|
+
type: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"DerivedCharacteristicType", {
|
|
7
|
+
Energy: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"EnergyType", DB.Object<{
|
|
8
|
+
purchase: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicPurchase", DB.Object<{
|
|
9
|
+
improvementCost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ImprovementCost", {
|
|
10
|
+
A: DB.EnumCase<null>;
|
|
11
|
+
B: DB.EnumCase<null>;
|
|
12
|
+
C: DB.EnumCase<null>;
|
|
13
|
+
D: DB.EnumCase<null>;
|
|
14
|
+
}, []>>, true>;
|
|
15
|
+
maximum: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicBase", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
|
|
16
|
+
}>, []>>, false>;
|
|
17
|
+
permanentLoss: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicPermanentLoss", DB.Object<{
|
|
18
|
+
canBeBoughtBack: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicBuyBack", DB.Object<{
|
|
19
|
+
cost: DB.MemberDecl<DB.Integer, true>;
|
|
20
|
+
}>, []>>, false>;
|
|
21
|
+
}>, []>>, false>;
|
|
22
|
+
}>, []>>>;
|
|
23
|
+
Resistance: DB.EnumCase<null>;
|
|
24
|
+
}, []>>, false>;
|
|
5
25
|
calculation: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicCalculation", DB.Object<{
|
|
6
26
|
base: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicBase", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
|
|
7
27
|
modifiers: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicModifier", DB.Object<{
|
|
@@ -165,20 +185,6 @@ export declare const DerivedCharacteristic: DB.Entity<"DerivedCharacteristic", {
|
|
|
165
185
|
}, []>>, true>;
|
|
166
186
|
value: DB.MemberDecl<DB.Integer, true>;
|
|
167
187
|
}>, []>>>, false>;
|
|
168
|
-
purchasable: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicPurchase", DB.Object<{
|
|
169
|
-
improvementCost: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ImprovementCost", {
|
|
170
|
-
A: DB.EnumCase<null>;
|
|
171
|
-
B: DB.EnumCase<null>;
|
|
172
|
-
C: DB.EnumCase<null>;
|
|
173
|
-
D: DB.EnumCase<null>;
|
|
174
|
-
}, []>>, true>;
|
|
175
|
-
maximum: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicBase", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>>, true>;
|
|
176
|
-
}>, []>>, false>;
|
|
177
|
-
permanentLoss: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicPermanentLoss", DB.Object<{
|
|
178
|
-
canBeBoughtBack: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicBuyBack", DB.Object<{
|
|
179
|
-
cost: DB.MemberDecl<DB.Integer, true>;
|
|
180
|
-
}>, []>>, false>;
|
|
181
|
-
}>, []>>, false>;
|
|
182
188
|
}>, []>>, true>;
|
|
183
189
|
prerequisites: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"DerivedCharacteristicPrerequisites", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"PlainPrerequisites", DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.Enum<"PrerequisitesElement", {
|
|
184
190
|
Single: DB.EnumCase<DB.TypeArgument<DB.Param<"T", DB.Type>>>;
|
|
@@ -256,3 +262,6 @@ export declare const DerivedCharacteristic: DB.Entity<"DerivedCharacteristic", {
|
|
|
256
262
|
}>, []>>, false>;
|
|
257
263
|
}>, true>;
|
|
258
264
|
}, undefined>;
|
|
265
|
+
declare const DerivedCharacteristicBase: DB.TypeAlias<"DerivedCharacteristicBase", DB.IncludeIdentifier<DB.Param<string, DB.Type>[], MathOperation>, []>;
|
|
266
|
+
export declare const calculationContainsRaceBase: (base: DerivedCharacteristicBase) => boolean;
|
|
267
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
1
2
|
import * as DB from "tsondb/schema/dsl";
|
|
3
|
+
import { fromUniformCase } from "tsondb/schema/gen";
|
|
2
4
|
import { NestedTranslationMap } from "./Locale.js";
|
|
3
5
|
import { AttributeIdentifier } from "./_Identifier.js";
|
|
4
6
|
import { ImprovementCost } from "./_ImprovementCost.js";
|
|
@@ -14,6 +16,10 @@ export const DerivedCharacteristic = DB.Entity(import.meta.url, {
|
|
|
14
16
|
comment: "The position of the derived characteristic in lists. This has to be a unique value.",
|
|
15
17
|
type: DB.Integer({ minimum: 0 }),
|
|
16
18
|
}),
|
|
19
|
+
type: DB.Optional({
|
|
20
|
+
comment: "The derived characteristic may have a specific use in the game.",
|
|
21
|
+
type: DB.IncludeIdentifier(DerivedCharacteristicType),
|
|
22
|
+
}),
|
|
17
23
|
calculation: DB.Required({
|
|
18
24
|
comment: "Instructions for calculating the derived characteristic’s value.",
|
|
19
25
|
type: DB.IncludeIdentifier(DerivedCharacteristicCalculation),
|
|
@@ -59,6 +65,34 @@ export const DerivedCharacteristic = DB.Entity(import.meta.url, {
|
|
|
59
65
|
},
|
|
60
66
|
],
|
|
61
67
|
});
|
|
68
|
+
const DerivedCharacteristicType = DB.Enum(import.meta.url, {
|
|
69
|
+
name: "DerivedCharacteristicType",
|
|
70
|
+
comment: "The type of the derived characteristic, which determines how it can be used in the game.",
|
|
71
|
+
values: () => ({
|
|
72
|
+
Energy: DB.EnumCase({
|
|
73
|
+
comment: "The derived characteristic works like an energy in that it can be spent on various actions and abilities, and also be refilled based on certain conditions.",
|
|
74
|
+
type: DB.IncludeIdentifier(EnergyType),
|
|
75
|
+
}),
|
|
76
|
+
Resistance: DB.EnumCase({
|
|
77
|
+
comment: "The derived characteristic represents a resistance against certain effects.",
|
|
78
|
+
type: null,
|
|
79
|
+
}),
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
const EnergyType = DB.TypeAlias(import.meta.url, {
|
|
83
|
+
name: "EnergyType",
|
|
84
|
+
comment: "Additional values that can be defined for an energy.",
|
|
85
|
+
type: () => DB.Object({
|
|
86
|
+
purchase: DB.Optional({
|
|
87
|
+
comment: "If set, the energy’s maximum value can be improved by spending AP.\n\nIf the energy’s permanent losses can be bought back, points will not be able to be purchased unless all permanent losses have been bought back.",
|
|
88
|
+
type: DB.IncludeIdentifier(DerivedCharacteristicPurchase),
|
|
89
|
+
}),
|
|
90
|
+
permanentLoss: DB.Optional({
|
|
91
|
+
comment: "If set, the energy can suffer permanent losses that reduce its maximum value. It may also be possible to buy back these permanent losses.",
|
|
92
|
+
type: DB.IncludeIdentifier(DerivedCharacteristicPermanentLoss),
|
|
93
|
+
}),
|
|
94
|
+
}),
|
|
95
|
+
});
|
|
62
96
|
const DerivedCharacteristicCalculation = DB.TypeAlias(import.meta.url, {
|
|
63
97
|
name: "DerivedCharacteristicCalculation",
|
|
64
98
|
type: () => DB.Object({
|
|
@@ -70,23 +104,6 @@ const DerivedCharacteristicCalculation = DB.TypeAlias(import.meta.url, {
|
|
|
70
104
|
comment: "A list of modifiers that are applied to the base value. The modifiers are applied in the order they appear in the list.",
|
|
71
105
|
type: DB.Array(DB.IncludeIdentifier(DerivedCharacteristicModifier), { minItems: 1 }),
|
|
72
106
|
}),
|
|
73
|
-
purchasable: DB.Optional({
|
|
74
|
-
comment: "If set, the derived characteristic can be improved by spending AP.\n\nIf the derived characteristic’s permanent losses can be bought back, points will not be able to be purchased unless all permanent losses have been bought back.",
|
|
75
|
-
type: DB.IncludeIdentifier(DerivedCharacteristicPurchase),
|
|
76
|
-
}),
|
|
77
|
-
permanentLoss: DB.Optional({
|
|
78
|
-
comment: "If set, the derived characteristic can suffer permanent losses that reduce its maximum value. It may also be possible to buy back these permanent losses.",
|
|
79
|
-
type: DB.IncludeIdentifier(DerivedCharacteristicPermanentLoss),
|
|
80
|
-
}),
|
|
81
|
-
}),
|
|
82
|
-
});
|
|
83
|
-
const DerivedCharacteristicRaceBaseValue = DB.Enum(import.meta.url, {
|
|
84
|
-
name: "DerivedCharacteristicRaceBaseValue",
|
|
85
|
-
values: () => ({
|
|
86
|
-
LifePoints: DB.EnumCase({ type: null }),
|
|
87
|
-
Spirit: DB.EnumCase({ type: null }),
|
|
88
|
-
Toughness: DB.EnumCase({ type: null }),
|
|
89
|
-
Movement: DB.EnumCase({ type: null }),
|
|
90
107
|
}),
|
|
91
108
|
});
|
|
92
109
|
const DerivedCharacteristicPrimaryAttributeValue = DB.Enum(import.meta.url, {
|
|
@@ -101,10 +118,7 @@ const DerivedCharacteristicBaseValue = DB.Enum(import.meta.url, {
|
|
|
101
118
|
values: () => ({
|
|
102
119
|
Constant: DB.EnumCase({ type: DB.Integer() }),
|
|
103
120
|
Attribute: DB.EnumCase({ type: AttributeIdentifier() }),
|
|
104
|
-
RaceBaseValue: DB.EnumCase({
|
|
105
|
-
displayName: "Base Value from Race",
|
|
106
|
-
type: DB.IncludeIdentifier(DerivedCharacteristicRaceBaseValue),
|
|
107
|
-
}),
|
|
121
|
+
RaceBaseValue: DB.EnumCase({ displayName: "Base Value from Race", type: null }),
|
|
108
122
|
PrimaryAttribute: DB.EnumCase({
|
|
109
123
|
type: DB.IncludeIdentifier(DerivedCharacteristicPrimaryAttributeValue),
|
|
110
124
|
}),
|
|
@@ -114,6 +128,29 @@ const DerivedCharacteristicBase = DB.TypeAlias(import.meta.url, {
|
|
|
114
128
|
name: "DerivedCharacteristicBase",
|
|
115
129
|
type: () => DB.GenIncludeIdentifier(MathOperation, [DB.IncludeIdentifier(DerivedCharacteristicBaseValue)]),
|
|
116
130
|
});
|
|
131
|
+
export const calculationContainsRaceBase = (base) => {
|
|
132
|
+
switch (base.kind) {
|
|
133
|
+
case "Value":
|
|
134
|
+
switch (base.Value.kind) {
|
|
135
|
+
case "RaceBaseValue":
|
|
136
|
+
return true;
|
|
137
|
+
case "Constant":
|
|
138
|
+
case "Attribute":
|
|
139
|
+
case "PrimaryAttribute":
|
|
140
|
+
return false;
|
|
141
|
+
default:
|
|
142
|
+
return assertExhaustive(base.Value);
|
|
143
|
+
}
|
|
144
|
+
case "Addition":
|
|
145
|
+
case "Subtraction":
|
|
146
|
+
case "Multiplication":
|
|
147
|
+
case "Division":
|
|
148
|
+
case "Exponentiation": {
|
|
149
|
+
const [left, right] = fromUniformCase(base);
|
|
150
|
+
return calculationContainsRaceBase(left) || calculationContainsRaceBase(right);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
117
154
|
const DerivedCharacteristicModifierOperation = DB.Enum(import.meta.url, {
|
|
118
155
|
name: "DerivedCharacteristicModifierOperation",
|
|
119
156
|
values: () => ({
|
package/lib/types/Disease.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export declare const Disease: DB.Entity<"Disease", {
|
|
|
41
41
|
}>, [T: DB.Param<"T", DB.Type>]>>>;
|
|
42
42
|
}, [T: DB.Param<"T", DB.Type>]>>>, [T: DB.Param<"T", DB.Type>]>>, []>>, false>;
|
|
43
43
|
}>, []>>, false>;
|
|
44
|
+
isChildhoodDisease: DB.MemberDecl<DB.Boolean, true>;
|
|
45
|
+
isMagicalDisease: DB.MemberDecl<DB.Boolean, true>;
|
|
44
46
|
src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
|
|
45
47
|
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
46
48
|
occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
|
package/lib/types/Disease.js
CHANGED
|
@@ -14,6 +14,14 @@ export const Disease = DB.Entity(import.meta.url, {
|
|
|
14
14
|
comment: "AP value and prerequisites of the disease’s trade secret.",
|
|
15
15
|
type: DB.IncludeIdentifier(RecipeTradeSecret),
|
|
16
16
|
}),
|
|
17
|
+
isChildhoodDisease: DB.Required({
|
|
18
|
+
comment: "Whether the disease is a childhood disease.",
|
|
19
|
+
type: DB.Boolean(),
|
|
20
|
+
}),
|
|
21
|
+
isMagicalDisease: DB.Required({
|
|
22
|
+
comment: "Whether the disease is a magical disease.",
|
|
23
|
+
type: DB.Boolean(),
|
|
24
|
+
}),
|
|
17
25
|
src,
|
|
18
26
|
translations: NestedTranslationMap(DB.Required, "Disease", DiseaseTranslation),
|
|
19
27
|
}),
|
package/lib/types/Locale.d.ts
CHANGED
|
@@ -1327,6 +1327,13 @@ export declare const Locale: DB.Entity<"Locale", {
|
|
|
1327
1327
|
Volume: null;
|
|
1328
1328
|
Penalty: null;
|
|
1329
1329
|
"Binding Cost": null;
|
|
1330
|
+
"one or two of these special abilities can alternatively be replaced by advanced special abilities {$first} and/or {$second}": null;
|
|
1331
|
+
".input {$count :number} {{{$count} more by primary patron}}": null;
|
|
1332
|
+
Patron: null;
|
|
1333
|
+
"corresponding combat style special ability": null;
|
|
1334
|
+
"corresponding liturgical style special ability": null;
|
|
1335
|
+
"corresponding magic style special ability": null;
|
|
1336
|
+
"corresponding skill style special ability": null;
|
|
1330
1337
|
All: null;
|
|
1331
1338
|
"All Close Combat Techniques": null;
|
|
1332
1339
|
"All Ranged Combat Techniques": null;
|
package/lib/types/Locale.js
CHANGED
|
@@ -1361,6 +1361,13 @@ export const Locale = DB.Entity(import.meta.url, {
|
|
|
1361
1361
|
"Volume": null,
|
|
1362
1362
|
"Penalty": null,
|
|
1363
1363
|
"Binding Cost": null,
|
|
1364
|
+
"one or two of these special abilities can alternatively be replaced by advanced special abilities {$first} and/or {$second}": null,
|
|
1365
|
+
".input {$count :number} {{{$count} more by primary patron}}": null,
|
|
1366
|
+
"Patron": null,
|
|
1367
|
+
"corresponding combat style special ability": null,
|
|
1368
|
+
"corresponding liturgical style special ability": null,
|
|
1369
|
+
"corresponding magic style special ability": null,
|
|
1370
|
+
"corresponding skill style special ability": null,
|
|
1364
1371
|
// combat special ability -- applicable combat techniques
|
|
1365
1372
|
"All": null,
|
|
1366
1373
|
"All Close Combat Techniques": null,
|
|
@@ -71,6 +71,7 @@ export declare const Profession: DB.Entity<"Profession", {
|
|
|
71
71
|
}>, []>>, false>;
|
|
72
72
|
skills: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SkillsOptions", DB.Object<{
|
|
73
73
|
group: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
74
|
+
specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
74
75
|
ap_value: DB.MemberDecl<DB.Integer, true>;
|
|
75
76
|
}>, []>>, false>;
|
|
76
77
|
liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
|
|
@@ -79,7 +80,8 @@ export declare const Profession: DB.Entity<"Profession", {
|
|
|
79
80
|
}>, []>>, false>;
|
|
80
81
|
special_abilities: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
81
82
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
82
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
83
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
84
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
83
85
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
84
86
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
85
87
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -156,7 +158,8 @@ export declare const Profession: DB.Entity<"Profession", {
|
|
|
156
158
|
}>, []>>>;
|
|
157
159
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
158
160
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
159
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
161
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
162
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
160
163
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
161
164
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
162
165
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -342,7 +345,8 @@ export declare const Profession: DB.Entity<"Profession", {
|
|
|
342
345
|
}, []>>, true>;
|
|
343
346
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
344
347
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
345
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
348
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
349
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
346
350
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
347
351
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
348
352
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -419,7 +423,8 @@ export declare const Profession: DB.Entity<"Profession", {
|
|
|
419
423
|
}>, []>>>;
|
|
420
424
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
421
425
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
422
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
426
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
427
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
423
428
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
424
429
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
425
430
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -704,6 +709,7 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
|
|
|
704
709
|
}>, []>>, false>;
|
|
705
710
|
skills: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SkillsOptions", DB.Object<{
|
|
706
711
|
group: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
712
|
+
specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
707
713
|
ap_value: DB.MemberDecl<DB.Integer, true>;
|
|
708
714
|
}>, []>>, false>;
|
|
709
715
|
liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
|
|
@@ -712,7 +718,8 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
|
|
|
712
718
|
}>, []>>, false>;
|
|
713
719
|
special_abilities: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
714
720
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
715
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
721
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
722
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
716
723
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
717
724
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
718
725
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -789,7 +796,8 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
|
|
|
789
796
|
}>, []>>>;
|
|
790
797
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
791
798
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
792
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
799
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
800
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
793
801
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
794
802
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
795
803
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -975,7 +983,8 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
|
|
|
975
983
|
}, []>>, true>;
|
|
976
984
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
977
985
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
978
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
986
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
987
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
979
988
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
980
989
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
981
990
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1052,7 +1061,8 @@ export declare const ProfessionVersion: DB.Entity<"ProfessionVersion", {
|
|
|
1052
1061
|
}>, []>>>;
|
|
1053
1062
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
1054
1063
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1055
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1064
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1065
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1056
1066
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1057
1067
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1058
1068
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1329,6 +1339,7 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
|
|
|
1329
1339
|
}>, []>>, false>;
|
|
1330
1340
|
skills: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"SkillsOptions", DB.Object<{
|
|
1331
1341
|
group: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
1342
|
+
specific: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
1332
1343
|
ap_value: DB.MemberDecl<DB.Integer, true>;
|
|
1333
1344
|
}>, []>>, false>;
|
|
1334
1345
|
liturgies: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"LiturgiesOptions", DB.Object<{
|
|
@@ -1337,7 +1348,8 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
|
|
|
1337
1348
|
}>, []>>, false>;
|
|
1338
1349
|
special_abilities: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
1339
1350
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1340
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1351
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1352
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1341
1353
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1342
1354
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1343
1355
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1414,7 +1426,8 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
|
|
|
1414
1426
|
}>, []>>>;
|
|
1415
1427
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
1416
1428
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1417
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1429
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1430
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1418
1431
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1419
1432
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1420
1433
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1600,7 +1613,8 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
|
|
|
1600
1613
|
}, []>>, true>;
|
|
1601
1614
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
1602
1615
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1603
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1616
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1617
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1604
1618
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1605
1619
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1606
1620
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1677,7 +1691,8 @@ export declare const ProfessionPackage: DB.Entity<"ProfessionPackage", {
|
|
|
1677
1691
|
}>, []>>>;
|
|
1678
1692
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
1679
1693
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1680
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1694
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1695
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1681
1696
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1682
1697
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1683
1698
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1874,7 +1889,8 @@ export declare const ProfessionVariant: DB.Entity<"ProfessionVariant", {
|
|
|
1874
1889
|
}, []>>, true>;
|
|
1875
1890
|
value: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbility", {
|
|
1876
1891
|
Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1877
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1892
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1893
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1878
1894
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1879
1895
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1880
1896
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
@@ -1951,7 +1967,8 @@ export declare const ProfessionVariant: DB.Entity<"ProfessionVariant", {
|
|
|
1951
1967
|
}>, []>>>;
|
|
1952
1968
|
Selection: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ProfessionSpecialAbilitySelection", DB.Object<{
|
|
1953
1969
|
options: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantProfessionSpecialAbility", DB.Object<{
|
|
1954
|
-
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"
|
|
1970
|
+
id: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"ProfessionSpecialAbilityIdentifier", {
|
|
1971
|
+
Enhancement: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1955
1972
|
AdvancedCombatSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1956
1973
|
AdvancedKarmaSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
|
1957
1974
|
AdvancedMagicalSpecialAbility: DB.EnumCase<DB.ReferenceIdentifier>;
|
package/lib/types/Profession.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { isNotNullish } from "@elyukai/utils/nullable";
|
|
1
2
|
import * as DB from "tsondb/schema/dsl";
|
|
2
3
|
import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
|
|
3
4
|
import { AdvantageIdentifier, CantripIdentifier, CurriculumIdentifier, DisadvantageIdentifier, ExperienceLevelIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, ProfessionPackageIdentifier, ProfessionVersionIdentifier, SkillGroupIdentifier, SkillIdentifier, } from "./_Identifier.js";
|
|
4
|
-
import { CombatTechniqueIdentifier, LiturgyIdentifier, MagicalActionIdentifier,
|
|
5
|
+
import { CombatTechniqueIdentifier, LiturgyIdentifier, MagicalActionIdentifier, ProfessionSpecialAbilityIdentifier, RequirableSelectOptionIdentifier, SpellworkIdentifier, } from "./_IdentifierGroup.js";
|
|
5
6
|
import { ProfessionPrerequisites } from "./_Prerequisite.js";
|
|
6
7
|
import { NestedTranslationMap } from "./Locale.js";
|
|
7
8
|
import { Errata } from "./source/_Erratum.js";
|
|
@@ -305,7 +306,7 @@ const ConstantProfessionSpecialAbility = DB.TypeAlias(import.meta.url, {
|
|
|
305
306
|
type: () => DB.Object({
|
|
306
307
|
id: DB.Required({
|
|
307
308
|
comment: "The identifier of the special ability to grant.",
|
|
308
|
-
type: DB.IncludeIdentifier(
|
|
309
|
+
type: DB.IncludeIdentifier(ProfessionSpecialAbilityIdentifier),
|
|
309
310
|
}),
|
|
310
311
|
level: DB.Optional({
|
|
311
312
|
comment: "The level of the received special ability. If not specified and the special ability has levels, level 1 is used automatically.",
|
|
@@ -585,11 +586,20 @@ const SkillsOptions = DB.TypeAlias(import.meta.url, {
|
|
|
585
586
|
comment: "If specified, you may only choose from skills of the specified group.",
|
|
586
587
|
type: SkillGroupIdentifier(),
|
|
587
588
|
}),
|
|
589
|
+
specific: DB.Optional({
|
|
590
|
+
comment: "The list of specific skills to distribute AP to.",
|
|
591
|
+
type: DB.Array(SkillIdentifier(), { minItems: 2 }),
|
|
592
|
+
}),
|
|
588
593
|
ap_value: DB.Required({
|
|
589
594
|
comment: "The AP value you can buy skills for.",
|
|
590
595
|
type: DB.Integer({ minimum: 1 }),
|
|
591
596
|
}),
|
|
592
597
|
}),
|
|
598
|
+
customConstraints: ({ instanceContent, getInstanceById }) => [
|
|
599
|
+
(instanceContent.specific?.some(skillId => getInstanceById("Skill", skillId)?.group !== instanceContent.group) ?? false)
|
|
600
|
+
? "All selected skills must be from the selected group."
|
|
601
|
+
: undefined,
|
|
602
|
+
].filter(isNotNullish),
|
|
593
603
|
});
|
|
594
604
|
const LiturgiesOptions = DB.TypeAlias(import.meta.url, {
|
|
595
605
|
name: "LiturgiesOptions",
|
package/lib/types/Race.d.ts
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import * as DB from "tsondb/schema/dsl";
|
|
2
2
|
export declare const Race: DB.Entity<"Race", {
|
|
3
3
|
ap_value: DB.MemberDecl<DB.Integer, true>;
|
|
4
|
-
base_values: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"BaseValues", DB.
|
|
5
|
-
|
|
6
|
-
spirit: DB.MemberDecl<DB.Integer, true>;
|
|
7
|
-
toughness: DB.MemberDecl<DB.Integer, true>;
|
|
8
|
-
movement: DB.MemberDecl<DB.Integer, true>;
|
|
9
|
-
}>, []>>, true>;
|
|
10
|
-
attribute_adjustments: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"AttributeAdjustments", DB.Object<{
|
|
11
|
-
fixed: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"FixedAttributeAdjustment", DB.Object<{
|
|
12
|
-
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
13
|
-
value: DB.MemberDecl<DB.Integer, true>;
|
|
14
|
-
}>, []>>>, false>;
|
|
15
|
-
selectable: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectableAttributeAdjustment", DB.Object<{
|
|
16
|
-
list: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
17
|
-
value: DB.MemberDecl<DB.Integer, true>;
|
|
18
|
-
}>, []>>>, false>;
|
|
4
|
+
base_values: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"BaseValues", DB.NestedEntityMap<string, {
|
|
5
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
19
6
|
}>, []>>, true>;
|
|
20
7
|
automatic_advantages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"AutomaticAdvantageDisadvantage", DB.Object<{
|
|
21
8
|
id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
|
|
@@ -56,6 +43,16 @@ export declare const Race: DB.Entity<"Race", {
|
|
|
56
43
|
}>, true>;
|
|
57
44
|
variants: DB.MemberDecl<DB.ChildEntities<DB.Entity<"RaceVariant", {
|
|
58
45
|
race: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
46
|
+
attribute_adjustments: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"AttributeAdjustments", DB.Object<{
|
|
47
|
+
fixed: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"FixedAttributeAdjustment", DB.Object<{
|
|
48
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
49
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
50
|
+
}>, []>>>, false>;
|
|
51
|
+
selectable: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectableAttributeAdjustment", DB.Object<{
|
|
52
|
+
list: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
53
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
54
|
+
}>, []>>>, false>;
|
|
55
|
+
}>, []>>, true>;
|
|
59
56
|
common_cultures: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
60
57
|
common_advantages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"CommonnessRatedAdvantageDisadvantage", DB.Object<{
|
|
61
58
|
id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
|
|
@@ -154,6 +151,16 @@ export declare const Race: DB.Entity<"Race", {
|
|
|
154
151
|
}, undefined>;
|
|
155
152
|
export declare const RaceVariant: DB.Entity<"RaceVariant", {
|
|
156
153
|
race: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
154
|
+
attribute_adjustments: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"AttributeAdjustments", DB.Object<{
|
|
155
|
+
fixed: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"FixedAttributeAdjustment", DB.Object<{
|
|
156
|
+
id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
|
|
157
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
158
|
+
}>, []>>>, false>;
|
|
159
|
+
selectable: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"SelectableAttributeAdjustment", DB.Object<{
|
|
160
|
+
list: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, true>;
|
|
161
|
+
value: DB.MemberDecl<DB.Integer, true>;
|
|
162
|
+
}>, []>>>, false>;
|
|
163
|
+
}>, []>>, true>;
|
|
157
164
|
common_cultures: DB.MemberDecl<DB.Array<DB.ReferenceIdentifier>, false>;
|
|
158
165
|
common_advantages: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<DB.Param<string, DB.Type>[], DB.TypeAlias<"CommonnessRatedAdvantageDisadvantage", DB.Object<{
|
|
159
166
|
id: DB.MemberDecl<DB.TypeArgument<DB.Param<"Identifier", DB.Type>>, true>;
|
package/lib/types/Race.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { isNotNullish } from "@elyukai/utils/nullable";
|
|
1
2
|
import * as DB from "tsondb/schema/dsl";
|
|
2
3
|
import { CommonnessRatedAdvantageDisadvantage } from "./_CommonnessRatedAdvantageDisadvantage.js";
|
|
3
4
|
import { Dice, DieType } from "./_Dice.js";
|
|
4
5
|
import { AdvantageIdentifier, AttributeIdentifier, CultureIdentifier, DisadvantageIdentifier, EyeColorIdentifier, HairColorIdentifier, RaceIdentifier, } from "./_Identifier.js";
|
|
6
|
+
import { calculationContainsRaceBase, DerivedCharacteristic } from "./DerivedCharacteristic.js";
|
|
5
7
|
import { ExperienceLevel } from "./ExperienceLevel.js";
|
|
6
8
|
import { NestedTranslationMap } from "./Locale.js";
|
|
7
9
|
import { Errata } from "./source/_Erratum.js";
|
|
@@ -18,10 +20,6 @@ export const Race = DB.Entity(import.meta.url, {
|
|
|
18
20
|
comment: "The race’s base values.",
|
|
19
21
|
type: DB.IncludeIdentifier(BaseValues),
|
|
20
22
|
}),
|
|
21
|
-
attribute_adjustments: DB.Required({
|
|
22
|
-
comment: "Describes how to raise or lower maximum attribute values during character creation.",
|
|
23
|
-
type: DB.IncludeIdentifier(AttributeAdjustments),
|
|
24
|
-
}),
|
|
25
23
|
automatic_advantages: DB.Optional({
|
|
26
24
|
comment: "A list of automatically applied advantages. This does only work for advantages with no further configuration such as level or special selection.",
|
|
27
25
|
type: DB.Array(DB.GenIncludeIdentifier(AutomaticAdvantageDisadvantage, [AdvantageIdentifier()]), {
|
|
@@ -105,25 +103,29 @@ export const Race = DB.Entity(import.meta.url, {
|
|
|
105
103
|
keyPathInEntityMap: "name",
|
|
106
104
|
},
|
|
107
105
|
],
|
|
106
|
+
customConstraints: ({ instanceContent, getAllInstanceContainers, getDisplayNameAndId }) => {
|
|
107
|
+
const expectedBaseValues = getAllInstanceContainers("DerivedCharacteristic").filter(dc => calculationContainsRaceBase(dc.content.calculation.base));
|
|
108
|
+
const actualBaseValues = Object.keys(instanceContent.base_values);
|
|
109
|
+
return [
|
|
110
|
+
expectedBaseValues.length !== actualBaseValues.length ||
|
|
111
|
+
actualBaseValues.some(actual => !expectedBaseValues.some(expected => actual === expected.id))
|
|
112
|
+
? `The race needs to define base values for ${expectedBaseValues.map(dc => getDisplayNameAndId("DerivedCharacteristic", dc.id)).join(", ")}, but defines ${actualBaseValues.map(dcId => getDisplayNameAndId("DerivedCharacteristic", dcId)).join(", ")}.`
|
|
113
|
+
: null,
|
|
114
|
+
].filter(isNotNullish);
|
|
115
|
+
},
|
|
108
116
|
});
|
|
109
117
|
const BaseValues = DB.TypeAlias(import.meta.url, {
|
|
110
118
|
name: "BaseValues",
|
|
111
|
-
type: () => DB.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
comment: "The race’s Toughness base value.",
|
|
122
|
-
type: DB.Integer(),
|
|
123
|
-
}),
|
|
124
|
-
movement: DB.Required({
|
|
125
|
-
comment: "The race’s tactical movement rate.",
|
|
126
|
-
type: DB.Integer(),
|
|
119
|
+
type: () => DB.NestedEntityMap({
|
|
120
|
+
name: "RaceBaseValue",
|
|
121
|
+
namePlural: "RaceBaseValues",
|
|
122
|
+
comment: "The base value for a derived characteristic that is granted by the race.",
|
|
123
|
+
secondaryEntity: DerivedCharacteristic,
|
|
124
|
+
type: DB.Object({
|
|
125
|
+
value: DB.Required({
|
|
126
|
+
comment: "The base value for the derived characteristic that is granted by the race.",
|
|
127
|
+
type: DB.Integer(),
|
|
128
|
+
}),
|
|
127
129
|
}),
|
|
128
130
|
}),
|
|
129
131
|
});
|
|
@@ -233,6 +235,10 @@ export const RaceVariant = DB.Entity(import.meta.url, {
|
|
|
233
235
|
comment: "The associated race.",
|
|
234
236
|
type: RaceIdentifier(),
|
|
235
237
|
}),
|
|
238
|
+
attribute_adjustments: DB.Required({
|
|
239
|
+
comment: "Describes how to raise or lower maximum attribute values during character creation.",
|
|
240
|
+
type: DB.IncludeIdentifier(AttributeAdjustments),
|
|
241
|
+
}),
|
|
236
242
|
common_cultures: DB.Optional({
|
|
237
243
|
comment: "The list of common cultures.",
|
|
238
244
|
type: DB.Array(CultureIdentifier(), { minItems: 1 }),
|