@optolith/entity-descriptions 0.4.10 → 0.4.12
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/lib/creator.d.ts +1 -1
- package/lib/entities/activatable.d.ts +1 -1
- package/lib/entities/activatable.js +69 -1
- package/lib/entities/culture.d.ts +2 -0
- package/lib/entities/culture.js +20 -14
- package/lib/entities/curriculum.js +103 -19
- package/lib/entities/derivedCharacteristic.d.ts +0 -2
- package/lib/entities/derivedCharacteristic.js +5 -10
- package/lib/entities/disease.d.ts +1 -1
- package/lib/entities/disease.js +5 -1
- package/lib/entities/elixir.d.ts +1 -1
- package/lib/entities/elixir.js +12 -10
- package/lib/entities/equipment.d.ts +6 -5
- package/lib/entities/equipment.js +19 -6
- package/lib/entities/equipmentPackage.d.ts +1 -1
- package/lib/entities/influence.d.ts +1 -1
- package/lib/entities/liturgicalChant.d.ts +1 -1
- package/lib/entities/partial/activatableNameChunks.d.ts +11 -3
- package/lib/entities/partial/activatableNameChunks.js +27 -12
- package/lib/entities/partial/adventurePointsValue.d.ts +2 -2
- package/lib/entities/partial/animalTypes.d.ts +1 -1
- package/lib/entities/partial/animalTypes.js +2 -1
- package/lib/entities/partial/commonnessRatedAdvantagesAndDisadvantages.d.ts +4 -4
- package/lib/entities/partial/commonnessRatedAdvantagesAndDisadvantages.js +56 -13
- package/lib/entities/partial/dice.d.ts +1 -1
- package/lib/entities/partial/enhancements.d.ts +1 -1
- package/lib/entities/partial/herbary.d.ts +1 -1
- package/lib/entities/partial/map.d.ts +1 -1
- package/lib/entities/partial/map.js +1 -1
- package/lib/entities/partial/markdown.d.ts +2 -2
- package/lib/entities/partial/markdown.js +4 -1
- package/lib/entities/partial/mathOperation.d.ts +1 -1
- package/lib/entities/partial/prerequisites/displayOption.d.ts +1 -1
- package/lib/entities/partial/prerequisites/index.d.ts +3 -3
- package/lib/entities/partial/prerequisites/index.js +1 -1
- package/lib/entities/partial/prerequisites/part.d.ts +1 -1
- package/lib/entities/partial/prerequisites/prerequisiteGroups.d.ts +2 -2
- package/lib/entities/partial/prerequisites/prerequisiteGroups.js +10 -7
- package/lib/entities/partial/prerequisites/single/activatable.d.ts +2 -2
- package/lib/entities/partial/prerequisites/single/animistPower.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/blessedTradition.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/culture.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/enhancement.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/influence.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/magicalTradition.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/pact.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/personalityTrait.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/primaryAttribute.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/profession.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/publication.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/race.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/rated.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/rated.js +2 -2
- package/lib/entities/partial/prerequisites/single/ratedMinimumNumber.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/ratedSum.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/rule.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/sex.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/sexualCharacteristic.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/socialStatus.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/state.d.ts +1 -1
- package/lib/entities/partial/prerequisites/single/text.d.ts +1 -1
- package/lib/entities/partial/professions.d.ts +1 -1
- package/lib/entities/partial/professions.js +2 -4
- package/lib/entities/partial/rated/activatable/castingTime.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/checkResultBased.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/checkResultBased.js +3 -1
- package/lib/entities/partial/rated/activatable/cost.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/duration.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/effect.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/index.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/range.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/speed.d.ts +1 -1
- package/lib/entities/partial/rated/activatable/targetCategory.d.ts +1 -1
- package/lib/entities/partial/rated/improvementCost.d.ts +1 -1
- package/lib/entities/partial/rated/skillCheck.d.ts +1 -1
- package/lib/entities/partial/rated/skillCheck.js +5 -3
- package/lib/entities/partial/reader.d.ts +1 -1
- package/lib/entities/partial/responsiveText.d.ts +1 -1
- package/lib/entities/poison.d.ts +1 -1
- package/lib/entities/poison.js +20 -9
- package/lib/entities/profession.d.ts +2 -2
- package/lib/entities/profession.js +116 -21
- package/lib/entities/race.d.ts +3 -1
- package/lib/entities/race.js +89 -68
- package/lib/entities/skill.d.ts +1 -1
- package/lib/entities/spell.d.ts +4 -2
- package/lib/entities/spell.js +4 -4
- package/lib/helpers/getTypes.d.ts +1 -1
- package/lib/helpers/locale.d.ts +1 -1
- package/lib/helpers/translate.d.ts +1 -1
- package/lib/index.d.ts +131 -129
- package/lib/references/index.d.ts +1 -1
- package/lib/references/page.d.ts +1 -1
- package/lib/references/pageRange.d.ts +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InfluencePrerequisite } from "optolith
|
|
1
|
+
import type { InfluencePrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MagicalTraditionPrerequisite } from "optolith
|
|
1
|
+
import type { MagicalTraditionPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
3
|
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PactPrerequisite } from "optolith
|
|
1
|
+
import type { PactPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PersonalityTraitPrerequisite } from "optolith
|
|
1
|
+
import type { PersonalityTraitPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrimaryAttributePrerequisite } from "optolith
|
|
1
|
+
import type { PrimaryAttributePrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
3
|
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProfessionPrerequisite } from "optolith
|
|
1
|
+
import type { ProfessionPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetAllChildInstancesForParent } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PublicationPrerequisite } from "optolith
|
|
1
|
+
import type { PublicationPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RacePrerequisite } from "optolith
|
|
1
|
+
import type { RacePrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RatedPrerequisite } from "optolith
|
|
1
|
+
import type { RatedPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { attributedCustomName } from "../../markdown.js";
|
|
2
2
|
import { MISSING_VALUE } from "../../unknown.js";
|
|
3
3
|
import { printDisplayOption } from "../displayOption.js";
|
|
4
4
|
/**
|
|
@@ -9,7 +9,7 @@ export const printRatedPrerequisite = (getInstanceById, locale, prerequisite) =>
|
|
|
9
9
|
return printDisplayOption(locale.translateMap, prerequisite.display_option);
|
|
10
10
|
}
|
|
11
11
|
return {
|
|
12
|
-
value: `${
|
|
12
|
+
value: `${attributedCustomName(locale.translateMap, getInstanceById, "prerequisite", (t) => t.abbreviation ?? t.name, prerequisite.id) ?? MISSING_VALUE} ${prerequisite.value.toFixed()}`,
|
|
13
13
|
sentenceType: undefined,
|
|
14
14
|
isMeta: false,
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RatedMinimumNumberPrerequisite } from "optolith
|
|
1
|
+
import type { RatedMinimumNumberPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RatedSumPrerequisite } from "optolith
|
|
1
|
+
import type { RatedSumPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RulePrerequisite } from "optolith
|
|
1
|
+
import type { RulePrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
3
|
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SexualCharacteristicPrerequisite } from "optolith
|
|
1
|
+
import type { SexualCharacteristicPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
3
|
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SocialStatusPrerequisite } from "optolith
|
|
1
|
+
import type { SocialStatusPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StatePrerequisite } from "optolith
|
|
1
|
+
import type { StatePrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../../../../helpers/getTypes.js";
|
|
3
3
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
4
4
|
import type { PrerequisitePart } from "../part.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TextPrerequisite } from "optolith
|
|
1
|
+
import type { TextPrerequisite } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleEnvironment } from "../../../../helpers/locale.js";
|
|
3
3
|
import type { PrerequisitePart } from "../part.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Profession_ID, ProfessionPackage } from "optolith
|
|
1
|
+
import type { Profession_ID, ProfessionPackage } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetAllChildInstancesForParent, GetAllInstances } from "../../helpers/getTypes.js";
|
|
3
3
|
import type { TranslateMap } from "../../helpers/translate.js";
|
|
4
4
|
import type { IdMap } from "../../index.js";
|
|
@@ -9,11 +9,9 @@ export const getBaseProfessionPackageForCurriculum = (getAllInstances, getChildI
|
|
|
9
9
|
if (baseProfession === undefined) {
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
-
return reduceWhile(getChildInstancesForInstanceId("ProfessionVersion", baseProfession.id), (_acc, version) => getChildInstancesForInstanceId("ProfessionPackage", version.id).find(professionPackage => professionPackage.content.experience_level ===
|
|
13
|
-
idMap.ExperienceLevel.Experienced), isNotNullish, undefined);
|
|
12
|
+
return reduceWhile(getChildInstancesForInstanceId("ProfessionVersion", baseProfession.id), (_acc, version) => getChildInstancesForInstanceId("ProfessionPackage", version.id).find(professionPackage => professionPackage.content.experience_level === idMap.ExperienceLevel.Experienced), isNotNullish, undefined);
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
16
15
|
* Gets the name of a profession, regardless of the profession version.
|
|
17
16
|
*/
|
|
18
|
-
export const getProfessionName = (translateMap, getChildInstancesForInstanceId, professionId) => translateMap(getChildInstancesForInstanceId("ProfessionVersion", professionId)[0]
|
|
19
|
-
?.content.translations)?.name.default;
|
|
17
|
+
export const getProfessionName = (translateMap, getChildInstancesForInstanceId, professionId) => translateMap(getChildInstancesForInstanceId("ProfessionVersion", professionId)[0]?.content.translations)?.name.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CastingTime, FastCastingTime, FastSkillNonModifiableCastingTime, SlowCastingTime, SlowSkillNonModifiableCastingTime } from "optolith
|
|
1
|
+
import type { CastingTime, FastCastingTime, FastSkillNonModifiableCastingTime, SlowCastingTime, SlowSkillNonModifiableCastingTime } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type StdReader } from "../../reader.js";
|
|
3
3
|
/**
|
|
4
4
|
* Renders the text for a non-modifiable casting time of a fast activatable skill.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckResultBasedModifier, CheckResultValue } from "optolith
|
|
1
|
+
import type { CheckResultBasedModifier, CheckResultValue } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type StdReader } from "../../reader.js";
|
|
3
3
|
interface CheckResultBased {
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mapNullableDefault } from "@optolith/helpers/nullable";
|
|
2
2
|
import { assertExhaustive } from "@optolith/helpers/typeSafety";
|
|
3
|
-
import { divisionFormatter, multiplicationFormatter
|
|
3
|
+
import { divisionFormatter, multiplicationFormatter } from "../../mathOperation.js";
|
|
4
4
|
import { translateR } from "../../reader.js";
|
|
5
5
|
const renderCheckResultBaseValue = (baseValue) => {
|
|
6
6
|
switch (baseValue.kind) {
|
|
@@ -8,6 +8,8 @@ const renderCheckResultBaseValue = (baseValue) => {
|
|
|
8
8
|
return translateR("QL");
|
|
9
9
|
case "SkillPoints":
|
|
10
10
|
return translateR("SP");
|
|
11
|
+
case "SkillRating":
|
|
12
|
+
return translateR("SR");
|
|
11
13
|
default:
|
|
12
14
|
return assertExhaustive(baseValue);
|
|
13
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
|
-
import type { CheckResultBasedModifier, DurationUnitValue, ElvenMagicalSongPermanentCost, FirstPersonMagicalMelodyCost, NonModifiableOneTimeCostPerCountable, NonModifiableSustainedCost, OneTimeCost, OneTimeCostMap, ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace, SkillModificationLevel_ID, SustainedCost } from "optolith
|
|
2
|
+
import type { CheckResultBasedModifier, DurationUnitValue, ElvenMagicalSongPermanentCost, FirstPersonMagicalMelodyCost, NonModifiableOneTimeCostPerCountable, NonModifiableSustainedCost, OneTimeCost, OneTimeCostMap, ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace, SkillModificationLevel_ID, SustainedCost } from "@optolith/database-schema/gen";
|
|
3
3
|
import { type LocaleMap } from "../../../../helpers/translate.js";
|
|
4
4
|
import { type StdEnv, type StdReader } from "../../reader.js";
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CastingTimeDuringLovemaking, CheckResultBasedDuration, DurationForSustained, FixedDuration, Immediate, MusicDuration, PermanentDuration, ResponsiveText } from "optolith
|
|
1
|
+
import type { CastingTimeDuringLovemaking, CheckResultBasedDuration, DurationForSustained, FixedDuration, Immediate, MusicDuration, PermanentDuration, ResponsiveText } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { LocaleMap } from "../../../../helpers/translate.js";
|
|
3
3
|
import { type StdReader } from "../../reader.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivatableSkillEffect } from "optolith
|
|
1
|
+
import type { ActivatableSkillEffect } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { RawDefinitionListEntityDescriptionSectionItem } from "../../../../index.js";
|
|
3
3
|
import { type StdReader } from "../../reader.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FastOneTimePerformanceParameters, FastSustainedPerformanceParameters, OneTimePerformanceParameters, ResponsiveTextOptional, SlowOneTimePerformanceParameters, SlowSustainedPerformanceParameters } from "optolith
|
|
1
|
+
import type { FastOneTimePerformanceParameters, FastSustainedPerformanceParameters, OneTimePerformanceParameters, ResponsiveTextOptional, SlowOneTimePerformanceParameters, SlowSustainedPerformanceParameters } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { RawDefinitionListEntityDescriptionSectionItem } from "../../../../index.js";
|
|
3
3
|
import type { StdReader } from "../../reader.js";
|
|
4
4
|
type RenderedPerformanceParameters = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckResultBasedRange, FixedRange, Range, RangeValue } from "optolith
|
|
1
|
+
import type { CheckResultBasedRange, FixedRange, Range, RangeValue } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type StdReader } from "../../reader.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns the text for the non-modifiable range of an activatable skill.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FastSkillModificationLevelConfig, SkillModificationLevel, SlowSkillModificationLevelConfig } from "optolith
|
|
1
|
+
import type { FastSkillModificationLevelConfig, SkillModificationLevel, SlowSkillModificationLevelConfig } from "@optolith/database-schema/gen";
|
|
2
2
|
/**
|
|
3
3
|
* The speed of an activatable skill.
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AffectedTargetCategories } from "optolith
|
|
1
|
+
import type { AffectedTargetCategories } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type RawDefinitionListEntityDescriptionSectionItem } from "../../../../index.js";
|
|
3
3
|
import { type StdReader } from "../../reader.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ImprovementCost } from "optolith
|
|
1
|
+
import type { ImprovementCost } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type RawDefinitionListEntityDescriptionSectionItem } from "../../../index.js";
|
|
3
3
|
import { type StdReader } from "../reader.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SkillCheckPenalty as GeneralSkillCheckPenalty, MagicalRuneCombatTechniqueCheckPenalty, SkillCheck } from "optolith
|
|
1
|
+
import type { SkillCheckPenalty as GeneralSkillCheckPenalty, MagicalRuneCombatTechniqueCheckPenalty, SkillCheck } from "@optolith/database-schema/gen";
|
|
2
2
|
import { type IdMap } from "../../../index.js";
|
|
3
3
|
import { type StdReader } from "../reader.js";
|
|
4
4
|
/**
|
|
@@ -8,8 +8,8 @@ import { MISSING_VALUE } from "../unknown.js";
|
|
|
8
8
|
export const renderSkillCheck = (check) => Reader.asks(({ translate, translateMap, getInstanceById }) => ({
|
|
9
9
|
label: translate("Check"),
|
|
10
10
|
value: check
|
|
11
|
-
.map(id => translateMap(getInstanceById("Attribute", id)?.translations)
|
|
12
|
-
|
|
11
|
+
.map(id => translateMap(getInstanceById("Attribute", id)?.translations)?.abbreviation ??
|
|
12
|
+
MISSING_VALUE)
|
|
13
13
|
.join("/"),
|
|
14
14
|
}));
|
|
15
15
|
const renderSkillCheckPenalty = (idMap, penalty) => {
|
|
@@ -53,7 +53,9 @@ const renderSkillCheckPenalty = (idMap, penalty) => {
|
|
|
53
53
|
export const renderSkillCheckWithPenalty = (check, checkPenalty, idMap) => checkPenalty === undefined
|
|
54
54
|
? renderSkillCheck(check)
|
|
55
55
|
: renderSkillCheck(check).thenW(checkText => renderSkillCheckPenalty(idMap, checkPenalty)
|
|
56
|
-
.then(penaltyText => responsiveTranslateR(" (modified by {$modifier})", " (−{$modifier})", {
|
|
56
|
+
.then(penaltyText => responsiveTranslateR(" (modified by {$modifier})", " (−{$modifier})", {
|
|
57
|
+
modifier: penaltyText,
|
|
58
|
+
}))
|
|
57
59
|
.map(penaltyText => ({
|
|
58
60
|
...checkText,
|
|
59
61
|
value: checkText.value + penaltyText,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
|
-
import type { ChildEntityMap, EntityMap, FastSkillModificationLevelConfig, ResponsiveText, ResponsiveTextOptional, SkillModificationLevel, SlowSkillModificationLevelConfig } from "optolith
|
|
2
|
+
import type { ChildEntityMap, EntityMap, FastSkillModificationLevelConfig, ResponsiveText, ResponsiveTextOptional, SkillModificationLevel, SlowSkillModificationLevelConfig } from "@optolith/database-schema/gen";
|
|
3
3
|
import type { IdArgsVariant } from "tsondb/schema/gen";
|
|
4
4
|
import type { GetAllChildInstancesForParent, GetAllInstances, GetInstanceById } from "../../helpers/getTypes.js";
|
|
5
5
|
import type { FormatNumber, LocaleCompare, LocaleJoin, LocaleJoinType } from "../../helpers/locale.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
|
-
import type { ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace } from "optolith
|
|
2
|
+
import type { ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace } from "@optolith/database-schema/gen";
|
|
3
3
|
import { type LocaleMap } from "../../helpers/translate.js";
|
|
4
4
|
import { type StdEnv } from "./reader.js";
|
|
5
5
|
/**
|
package/lib/entities/poison.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivatableIdentifier, RatedIdentifier } from "optolith
|
|
1
|
+
import type { ActivatableIdentifier, RatedIdentifier } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetInstanceById } from "../helpers/getTypes.js";
|
|
3
3
|
import type { IdMap } from "../index.js";
|
|
4
4
|
import type { GetResolvedSelectOptionById } from "./partial/prerequisites/single/activatable.js";
|
package/lib/entities/poison.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isNotNullish, mapNullable } from "@elyukai/utils/nullable";
|
|
|
3
3
|
import { sign } from "@elyukai/utils/string/number";
|
|
4
4
|
import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
5
5
|
import { createEntityDescriptionCreator } from "../creator.js";
|
|
6
|
-
import { renderDice
|
|
6
|
+
import { renderDice } from "./partial/dice.js";
|
|
7
7
|
import { renderAlternativeNames, renderChance, renderLaboratoryLevel, renderResistance, } from "./partial/herbary.js";
|
|
8
8
|
import { renderMathOperation } from "./partial/mathOperation.js";
|
|
9
9
|
import { printPlainGeneralPrerequisites } from "./partial/prerequisites/index.js";
|
|
@@ -93,6 +93,12 @@ const renderSourceTypeBasedValues = (translate, translateMap, getInstanceById, s
|
|
|
93
93
|
return {
|
|
94
94
|
level: renderLevel(translate, translateMap, sourceType.AnimalVenom.level),
|
|
95
95
|
sourceType: translate("animal venom"),
|
|
96
|
+
tradeSecret: mapNullable(sourceType.AnimalVenom.complexity, complexity => complexity.kind === "Complex"
|
|
97
|
+
? {
|
|
98
|
+
apValue: complexity.Complex.ap_value,
|
|
99
|
+
prerequisites: complexity.Complex.prerequisites,
|
|
100
|
+
}
|
|
101
|
+
: undefined),
|
|
96
102
|
};
|
|
97
103
|
case "AlchemicalPoison": {
|
|
98
104
|
const translation = translateMap(sourceType.AlchemicalPoison.translations);
|
|
@@ -156,10 +162,19 @@ const renderStart = (translate, translateMap, start) => {
|
|
|
156
162
|
switch (start.kind) {
|
|
157
163
|
case "Immediate":
|
|
158
164
|
return translate("immediate");
|
|
159
|
-
case "
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
165
|
+
case "ExpressionBased":
|
|
166
|
+
return renderMathOperation(start.ExpressionBased.value, value => {
|
|
167
|
+
switch (value.kind) {
|
|
168
|
+
case "Constant":
|
|
169
|
+
return value.Constant.toFixed();
|
|
170
|
+
case "Dice":
|
|
171
|
+
return renderDice(translate, value.Dice);
|
|
172
|
+
case "CircleOfDamnation":
|
|
173
|
+
return translate("CoD");
|
|
174
|
+
default:
|
|
175
|
+
return assertExhaustive(value);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
163
178
|
case "Indefinite":
|
|
164
179
|
return translateMap(start.Indefinite.translations)?.description ?? MISSING_VALUE;
|
|
165
180
|
default:
|
|
@@ -170,10 +185,6 @@ const renderDuration = (translate, translateMap, duration) => {
|
|
|
170
185
|
switch (duration.kind) {
|
|
171
186
|
case "Instant":
|
|
172
187
|
return translate("instant");
|
|
173
|
-
case "Constant":
|
|
174
|
-
return formatTimeSpan(translate, ResponsiveTextSize.Full, duration.Constant.unit, duration.Constant.value);
|
|
175
|
-
case "DiceBased":
|
|
176
|
-
return formatTimeSpan(translate, ResponsiveTextSize.Full, duration.DiceBased.unit, renderDiceAndFlat(translate, duration.DiceBased.dice, duration.DiceBased.flat));
|
|
177
188
|
case "ExpressionBased":
|
|
178
189
|
return renderMathOperation(duration.ExpressionBased.value, value => {
|
|
179
190
|
switch (value.kind) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { MagicalActionIdentifier,
|
|
1
|
+
import type { MagicalActionIdentifier, ProfessionSpecialAbilityIdentifier, RatedIdentifier } from "@optolith/database-schema/gen";
|
|
2
2
|
import type { GetAllChildInstancesForParent, GetAllInstances, GetInstanceById } from "../helpers/getTypes.js";
|
|
3
3
|
import { type GetResolvedSelectOptionById } from "./partial/prerequisites/single/activatable.js";
|
|
4
4
|
/**
|
|
5
5
|
* Get a JSON representation of the rules text for a profession version.
|
|
6
6
|
*/
|
|
7
7
|
export declare const getProfessionVersionEntityDescription: import("../creator.js").EntityDescriptionCreator<"ProfessionVersion", {
|
|
8
|
-
getInstanceById: GetInstanceById<"Publication" | "ExperienceLevel" | "Advantage" | "Disadvantage" |
|
|
8
|
+
getInstanceById: GetInstanceById<"Publication" | "ExperienceLevel" | "Advantage" | "Disadvantage" | ProfessionSpecialAbilityIdentifier["kind"] | "Aspect" | RatedIdentifier["kind"] | "Race" | "Culture" | MagicalActionIdentifier["kind"] | "SkillGroup" | "Cantrip" | "Blessing">;
|
|
9
9
|
getAllInstances: GetAllInstances<"SkillGroup">;
|
|
10
10
|
getChildInstancesForInstanceId: GetAllChildInstancesForParent<"ProfessionPackage" | "ProfessionVariant">;
|
|
11
11
|
getResolvedSelectOptionById: GetResolvedSelectOptionById;
|
|
@@ -7,7 +7,7 @@ import { omitKeys } from "@elyukai/utils/object";
|
|
|
7
7
|
import { compareNumber } from "@elyukai/utils/ordering";
|
|
8
8
|
import { Reader } from "@elyukai/utils/reader";
|
|
9
9
|
import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
10
|
-
import { fromUniformCase } from "tsondb/schema/gen";
|
|
10
|
+
import { Case, fromUniformCase } from "tsondb/schema/gen";
|
|
11
11
|
import { createEntityDescriptionCreator } from "../creator.js";
|
|
12
12
|
import { combineNameComponents, getNameComponents, renderActivatableNameComponents, renderCombinedActivatableNameComponents, } from "./partial/activatableNameChunks.js";
|
|
13
13
|
import { renderCommonnessRatedAdvantagesOrDisadvantages, renderValueWithPossibleTranslation, } from "./partial/commonnessRatedAdvantagesAndDisadvantages.js";
|
|
@@ -103,7 +103,7 @@ const renderCombatTechniquesOption = (option) => isNotEmpty(option.fixed)
|
|
|
103
103
|
})), firstTextR);
|
|
104
104
|
const completeTextR = fixedTextR.then(fixedText => option.rest_rating_modifier === undefined
|
|
105
105
|
? Reader.of(fixedText)
|
|
106
|
-
: translateR("{$previous},
|
|
106
|
+
: translateR("{$previous}, the others {$rating}", {
|
|
107
107
|
previous: fixedText,
|
|
108
108
|
rating: option.rest_rating_modifier + 6,
|
|
109
109
|
}));
|
|
@@ -123,10 +123,36 @@ const getTotalingAPValues = (professionPackages, selector) => {
|
|
|
123
123
|
options[0].ap_value
|
|
124
124
|
: options.map(option => option?.ap_value ?? 0).join("/");
|
|
125
125
|
};
|
|
126
|
-
const renderSkillsOption = (professionPackages, skillGroup) =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
const renderSkillsOption = (professionPackages, skillGroup) => allSame(professionPackages.filter(pkg => pkg.content.options?.skills?.group === skillGroup.id), on(pkg => pkg.content.options?.skills?.specific, deepEqual))
|
|
127
|
+
? (mapNullable(getTotalingAPValues(professionPackages, pkg => pkg.content.options?.skills?.group === skillGroup.id
|
|
128
|
+
? pkg.content.options.skills
|
|
129
|
+
: undefined), apValue => professionPackages[0].content.options?.skills?.specific === undefined
|
|
130
|
+
? translateR("{$apValue} AP to improve other {$skillsOfGroup}", {
|
|
131
|
+
apValue,
|
|
132
|
+
skillsOfGroup: skillGroup.nameOfSkillsOfGroup,
|
|
133
|
+
})
|
|
134
|
+
: Reader.traverse(professionPackages[0].content.options.skills.specific, id => attributedNameR("profession", "Skill", id).map(name => name ?? MISSING_VALUE))
|
|
135
|
+
.thenW(localeSortR)
|
|
136
|
+
.thenW(list => translateR("{$apValue} AP to distribute among the following skills: {$list}", {
|
|
137
|
+
apValue,
|
|
138
|
+
list: list.join(", "),
|
|
139
|
+
}))) ?? Reader.of(undefined))
|
|
140
|
+
: Reader.traverse(professionPackages, pkg => {
|
|
141
|
+
const skillsOption = pkg.content.options?.skills;
|
|
142
|
+
return skillsOption === undefined
|
|
143
|
+
? Reader.of("—")
|
|
144
|
+
: skillsOption.specific === undefined
|
|
145
|
+
? translateR("{$apValue} AP to improve other {$skillsOfGroup}", {
|
|
146
|
+
apValue: skillsOption.ap_value,
|
|
147
|
+
skillsOfGroup: skillGroup.nameOfSkillsOfGroup,
|
|
148
|
+
})
|
|
149
|
+
: Reader.traverse(skillsOption.specific, id => attributedNameR("profession", "Skill", id).map(name => name ?? MISSING_VALUE))
|
|
150
|
+
.thenW(localeSortR)
|
|
151
|
+
.thenW(list => translateR("maximum SR per skill: {$maxSR}", { maxSR: 8 }).then(maxSRText => translateR("{$apValue} AP to distribute among the following skills: {$list}", {
|
|
152
|
+
apValue: skillsOption.ap_value,
|
|
153
|
+
list: list.join(", ") + parensIf(maxSRText),
|
|
154
|
+
})));
|
|
155
|
+
}).map(list => list.join(" / "));
|
|
130
156
|
const renderCantripList = (cantripIds) => Reader.traverse(cantripIds, id => attributedNameR("profession", "Cantrip", id).map(name => name ?? MISSING_VALUE))
|
|
131
157
|
.thenW(localeSortR)
|
|
132
158
|
.map(list => list.join(", "));
|
|
@@ -256,7 +282,69 @@ const renderVariantLiturgiesOption = (baseOptions, variantOptions) => renderVari
|
|
|
256
282
|
apValue,
|
|
257
283
|
})),
|
|
258
284
|
});
|
|
259
|
-
const
|
|
285
|
+
const getEnhancementBaseName = (translate, enhancement, parentName) => {
|
|
286
|
+
switch (enhancement.parent.kind) {
|
|
287
|
+
case "Spell":
|
|
288
|
+
return translate("Spell Enhancement {$spell}", { spell: parentName });
|
|
289
|
+
case "Ritual":
|
|
290
|
+
return translate("Ritual Enhancement {$ritual}", { ritual: parentName });
|
|
291
|
+
case "LiturgicalChant":
|
|
292
|
+
case "Ceremony":
|
|
293
|
+
return translate("Liturgical Enhancement {$liturgicalChantOrCeremony}", {
|
|
294
|
+
liturgicalChantOrCeremony: parentName,
|
|
295
|
+
});
|
|
296
|
+
default:
|
|
297
|
+
return assertExhaustive(enhancement.parent);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
const isEnhancementNameComponents = (components) => components.id.kind === "Enhancement";
|
|
301
|
+
const isActivatableNameComponents = (components) => !isEnhancementNameComponents(components);
|
|
302
|
+
const getEnhancementNameComponents = (getInstanceById, translate, translateMap, id) => {
|
|
303
|
+
const instance = getInstanceById("Enhancement", id);
|
|
304
|
+
if (instance === undefined) {
|
|
305
|
+
return undefined;
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
id: Case("Enhancement", id),
|
|
309
|
+
parent: instance.parent,
|
|
310
|
+
base: getEnhancementBaseName(translate, instance, attributedName(translateMap, getInstanceById, "profession", instance.parent) ?? MISSING_VALUE),
|
|
311
|
+
options: translateMap(instance.translations)?.name ?? MISSING_VALUE,
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
const renderEnhancementNameComponents = (chunk) => [chunk.base, chunk.options].join(" ");
|
|
315
|
+
const isCombinedEnhancementNameComponents = (components) => Array.isArray(components.id);
|
|
316
|
+
const combineEnhancementNameComponents = (chunks) => {
|
|
317
|
+
if (allSame(chunks, (a, b) => deepEqual(a.parent, b.parent)) && isNotEmpty(chunks)) {
|
|
318
|
+
const [first, ...rest] = chunks;
|
|
319
|
+
return {
|
|
320
|
+
id: [first.id, ...rest.map(chunk => chunk.id)],
|
|
321
|
+
parent: first.parent,
|
|
322
|
+
base: first.base,
|
|
323
|
+
options: [
|
|
324
|
+
[first.id, first.options],
|
|
325
|
+
...rest.map((chunk) => [
|
|
326
|
+
chunk.id,
|
|
327
|
+
chunk.options,
|
|
328
|
+
]),
|
|
329
|
+
],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
return undefined;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
const renderCombinedEnhancementNameComponents = (chunk) => [
|
|
337
|
+
chunk.base,
|
|
338
|
+
chunk.options
|
|
339
|
+
.map(([optionId, optionName]) => attributedInstance(optionName, optionId.kind, optionId.Enhancement, {
|
|
340
|
+
context: `"profession"`,
|
|
341
|
+
}))
|
|
342
|
+
.join(" + "),
|
|
343
|
+
].join(" ");
|
|
344
|
+
const getSpecialAbilityNameComponents = (getInstanceById, getResolvedSelectOptionById, translate, translateMap, option) => {
|
|
345
|
+
if (option.id.kind === "Enhancement") {
|
|
346
|
+
return getEnhancementNameComponents(getInstanceById, translate, translateMap, option.id.Enhancement);
|
|
347
|
+
}
|
|
260
348
|
const instance = getInstanceById(option.id);
|
|
261
349
|
if (instance === undefined) {
|
|
262
350
|
return undefined;
|
|
@@ -264,26 +352,33 @@ const getSpecialAbilityNameComponents = (getInstanceById, getResolvedSelectOptio
|
|
|
264
352
|
return getNameComponents(translate, option.id, option.options, option.level, "nameBuilderRules" in instance ? instance.nameBuilderRules : undefined, instance.translations, t => t.name, getResolvedSelectOptionById, true);
|
|
265
353
|
};
|
|
266
354
|
const wrapActivatableInAttributedString = (text, id) => attributedInstance(text, id.kind, fromUniformCase(id), { context: '"prerequisite"' });
|
|
355
|
+
const renderSingleActivatableNameChunk = (translateMap, chunk) => chunk === undefined
|
|
356
|
+
? MISSING_VALUE
|
|
357
|
+
: wrapActivatableInAttributedString(isEnhancementNameComponents(chunk)
|
|
358
|
+
? renderEnhancementNameComponents(chunk)
|
|
359
|
+
: renderActivatableNameComponents(translateMap, chunk, false), chunk.id);
|
|
267
360
|
const renderSpecialAbilityName = (specialAbility) => Reader.asks(({ translate, translateMap, localeJoin, getInstanceById, getResolvedSelectOptionById, }) => {
|
|
268
361
|
switch (specialAbility.kind) {
|
|
269
362
|
case "Constant": {
|
|
270
|
-
const chunk = getSpecialAbilityNameComponents(getInstanceById, getResolvedSelectOptionById, translate, specialAbility.Constant);
|
|
271
|
-
return chunk
|
|
272
|
-
? MISSING_VALUE
|
|
273
|
-
: wrapActivatableInAttributedString(renderActivatableNameComponents(translateMap, chunk, false), chunk.id);
|
|
363
|
+
const chunk = getSpecialAbilityNameComponents(getInstanceById, getResolvedSelectOptionById, translate, translateMap, specialAbility.Constant);
|
|
364
|
+
return renderSingleActivatableNameChunk(translateMap, chunk);
|
|
274
365
|
}
|
|
275
366
|
case "Selection": {
|
|
276
|
-
const chunks = specialAbility.Selection.options.map(option => getSpecialAbilityNameComponents(getInstanceById, getResolvedSelectOptionById, translate, option));
|
|
367
|
+
const chunks = specialAbility.Selection.options.map(option => getSpecialAbilityNameComponents(getInstanceById, getResolvedSelectOptionById, translate, translateMap, option));
|
|
277
368
|
const possiblyCombined = isNotEmpty(specialAbility.Selection.options) && chunks.every(isNotNullish)
|
|
278
|
-
?
|
|
369
|
+
? chunks.every(isEnhancementNameComponents)
|
|
370
|
+
? combineEnhancementNameComponents(chunks)
|
|
371
|
+
: chunks.every(isActivatableNameComponents)
|
|
372
|
+
? combineNameComponents(chunks)
|
|
373
|
+
: undefined
|
|
279
374
|
: undefined;
|
|
280
375
|
if (possiblyCombined === undefined) {
|
|
281
|
-
return localeJoin(chunks.map(chunk => chunk
|
|
282
|
-
? MISSING_VALUE
|
|
283
|
-
: wrapActivatableInAttributedString(renderActivatableNameComponents(translateMap, chunk, false), chunk.id)), "disjunction");
|
|
376
|
+
return localeJoin(chunks.map(chunk => renderSingleActivatableNameChunk(translateMap, chunk)), "disjunction");
|
|
284
377
|
}
|
|
285
378
|
else {
|
|
286
|
-
return
|
|
379
|
+
return isCombinedEnhancementNameComponents(possiblyCombined)
|
|
380
|
+
? renderCombinedEnhancementNameComponents(possiblyCombined)
|
|
381
|
+
: wrapActivatableInAttributedString(renderCombinedActivatableNameComponents(translateMap, possiblyCombined, false, list => localeJoin(list, "disjunction")), possiblyCombined.id);
|
|
287
382
|
}
|
|
288
383
|
}
|
|
289
384
|
default:
|
|
@@ -612,10 +707,10 @@ export const getProfessionVersionEntityDescription = createEntityDescriptionCrea
|
|
|
612
707
|
value,
|
|
613
708
|
})
|
|
614
709
|
.run(env),
|
|
615
|
-
renderValueWithPossibleTranslation("Suggested Advantages", entry.suggested_advantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Advantage", values).run(env), translation.suggested_advantages).run(env),
|
|
616
|
-
renderValueWithPossibleTranslation("Suggested Disadvantages", entry.suggested_disadvantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Disadvantage", values).run(env), translation.suggested_disadvantages).run(env),
|
|
617
|
-
renderValueWithPossibleTranslation("Unsuitable Advantages", entry.unsuitable_advantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Advantage", values).run(env), translation.unsuitable_advantages).run(env),
|
|
618
|
-
renderValueWithPossibleTranslation("Unsuitable Disadvantages", entry.unsuitable_disadvantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Disadvantage", values).run(env), translation.unsuitable_disadvantages).run(env),
|
|
710
|
+
renderValueWithPossibleTranslation("Suggested Advantages", entry.suggested_advantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Advantage", values, translate("none")).run(env), translation.suggested_advantages).run(env),
|
|
711
|
+
renderValueWithPossibleTranslation("Suggested Disadvantages", entry.suggested_disadvantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Disadvantage", values, translate("none")).run(env), translation.suggested_disadvantages).run(env),
|
|
712
|
+
renderValueWithPossibleTranslation("Unsuitable Advantages", entry.unsuitable_advantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Advantage", values, translate("none")).run(env), translation.unsuitable_advantages).run(env),
|
|
713
|
+
renderValueWithPossibleTranslation("Unsuitable Disadvantages", entry.unsuitable_disadvantages, values => renderCommonnessRatedAdvantagesOrDisadvantages("Disadvantage", values, translate("none")).run(env), translation.unsuitable_disadvantages).run(env),
|
|
619
714
|
renderProfessionVariants(professionPackages)
|
|
620
715
|
.map(value => value === undefined
|
|
621
716
|
? undefined
|
package/lib/entities/race.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { CountInstances, GetAllChildInstancesForParent, GetInstanceById } from "../helpers/getTypes.js";
|
|
2
|
+
import type { GetResolvedSelectOptionById } from "./partial/prerequisites/single/activatable.js";
|
|
2
3
|
/**
|
|
3
4
|
* Get a JSON representation of the rules text for a race.
|
|
4
5
|
*/
|
|
5
6
|
export declare const getRaceEntityDescription: import("../creator.js").EntityDescriptionCreator<"Race", {
|
|
6
|
-
getInstanceById: GetInstanceById<"Publication" | "Attribute" | "Advantage" | "Disadvantage" | "Culture">;
|
|
7
|
+
getInstanceById: GetInstanceById<"Publication" | "Attribute" | "Advantage" | "Disadvantage" | "Culture" | "DerivedCharacteristic">;
|
|
7
8
|
countInstances: CountInstances<"Attribute">;
|
|
8
9
|
getChildInstancesForInstanceId: GetAllChildInstancesForParent<"RaceVariant">;
|
|
10
|
+
getResolvedSelectOptionById: GetResolvedSelectOptionById;
|
|
9
11
|
}, import("../index.js").EntityDescription>;
|