@optolith/entity-descriptions 0.4.26 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/entities/activatable.d.ts +2 -2
- package/lib/entities/activatable.js +17 -21
- package/lib/entities/equipment.d.ts +2 -2
- package/lib/entities/equipment.js +7 -7
- package/lib/entities/liturgicalChant.js +7 -3
- package/lib/entities/partial/enhancements.js +2 -2
- package/lib/entities/partial/map.d.ts +25 -36
- package/lib/entities/partial/map.js +16 -15
- package/lib/entities/partial/prerequisites/prerequisiteGroups.js +9 -2
- package/lib/entities/partial/prerequisites/single/enhancement.d.ts +7 -3
- package/lib/entities/partial/prerequisites/single/enhancement.js +19 -25
- package/lib/entities/partial/rated/activatable/castingTime.d.ts +5 -5
- package/lib/entities/partial/rated/activatable/castingTime.js +6 -3
- package/lib/entities/partial/rated/activatable/cost.d.ts +20 -14
- package/lib/entities/partial/rated/activatable/cost.js +62 -27
- package/lib/entities/partial/rated/activatable/duration.d.ts +3 -3
- package/lib/entities/partial/rated/activatable/index.d.ts +6 -6
- package/lib/entities/partial/rated/activatable/index.js +4 -4
- package/lib/entities/partial/reader.d.ts +10 -0
- package/lib/entities/partial/reader.js +5 -1
- package/lib/entities/partial/units/timeSpan.d.ts +23 -15
- package/lib/entities/partial/units/timeSpan.js +17 -3
- package/lib/entities/poison.js +9 -9
- package/lib/entities/spell.js +34 -18
- package/lib/helpers/enums.d.ts +2 -1
- package/lib/helpers/enums.js +1 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -10
|
@@ -3,6 +3,7 @@ import { isNotNullish, mapNullable } from "@optolith/helpers/nullable";
|
|
|
3
3
|
import { assertExhaustive } from "@optolith/helpers/typeSafety";
|
|
4
4
|
import { Case } from "../../../../helpers/enums.js";
|
|
5
5
|
import { getInstanceByIdFnR, modifiableBySpeedR } from "../../reader.js";
|
|
6
|
+
import { appendNoteIfNeeded } from "../../responsiveText.js";
|
|
6
7
|
import { formatCombinedTimeSpanR, formatTimeSpanR } from "../../units/timeSpan.js";
|
|
7
8
|
import { MISSING_VALUE } from "../../unknown.js";
|
|
8
9
|
import { appendNonModifiableSuffix, ModifiableParameter } from "./nonModifiableSuffix.js";
|
|
@@ -10,16 +11,18 @@ import { Speed } from "./speed.js";
|
|
|
10
11
|
const deriveModifiableCastingTime = (modificationLevelId) => getInstanceByIdFnR().thenW(getInstanceById => mapNullable(getInstanceById("SkillModificationLevel", modificationLevelId), modificationLevel => modifiableBySpeedR("casting_time", modificationLevel).map(castingTime => typeof castingTime === "number"
|
|
11
12
|
? { value: castingTime, unit: Case("Actions") }
|
|
12
13
|
: castingTime)) ?? Reader.of(undefined));
|
|
13
|
-
const renderModifiableCastingTime = (value) => deriveModifiableCastingTime(value.initial_modification_level)
|
|
14
|
+
const renderModifiableCastingTime = (value) => deriveModifiableCastingTime(value.initial_modification_level)
|
|
15
|
+
.thenW(castingTime => castingTime === undefined ? Reader.of(MISSING_VALUE) : formatCombinedTimeSpanR(castingTime))
|
|
16
|
+
.thenW(text => appendNoteIfNeeded(value.translations, text));
|
|
14
17
|
const renderCastingTimeDuringLovemaking = (value) => formatCombinedTimeSpanR(value);
|
|
15
18
|
/**
|
|
16
19
|
* Renders the text for a non-modifiable casting time of a fast activatable skill.
|
|
17
20
|
*/
|
|
18
|
-
export const renderFastSkillNonModifiableCastingTime = (value) => formatTimeSpanR(Case("Actions"), value.actions);
|
|
21
|
+
export const renderFastSkillNonModifiableCastingTime = (value) => formatTimeSpanR(Case("Actions"), value.actions).thenW(text => appendNoteIfNeeded(value.translations, text));
|
|
19
22
|
/**
|
|
20
23
|
* Get the text for a non-modifiable casting time of a slow activatable skill.
|
|
21
24
|
*/
|
|
22
|
-
export const renderSlowSkillNonModifiableCastingTime = (value) => formatCombinedTimeSpanR(value);
|
|
25
|
+
export const renderSlowSkillNonModifiableCastingTime = (value) => formatCombinedTimeSpanR(value).thenW(text => appendNoteIfNeeded(value.translations, text));
|
|
23
26
|
/**
|
|
24
27
|
* Translate casting time.
|
|
25
28
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
|
-
import type { CheckResultBasedModifier, DurationUnitValue, ElvenMagicalSongPermanentCost, FirstPersonMagicalMelodyCost, NonModifiableOneTimeCostPerCountable, NonModifiableSustainedCost, OneTimeCost,
|
|
3
|
-
import { type LocaleMap
|
|
2
|
+
import type { CheckResultBasedModifier, DurationUnitValue, ElvenMagicalSongPermanentCost, FirstPersonMagicalMelodyCost, NonModifiableOneTimeCostPerCountable, NonModifiableSustainedCost, OneTimeCost, ResponsiveText, ResponsiveTextOptional, ResponsiveTextReplace, SkillModificationLevel_ID, StandaloneCostMap, SustainedCost } from "@optolith/database-schema/gen";
|
|
3
|
+
import { type LocaleMap } from "../../../../helpers/translate.js";
|
|
4
4
|
import { type StdEnv, type StdReader } from "../../reader.js";
|
|
5
|
-
import { type ResponsiveTextSize } from "../../responsiveText.js";
|
|
6
5
|
/**
|
|
7
6
|
* Returns the text for the modifiable one-time cost of an activatable skill.
|
|
8
7
|
*/
|
|
@@ -29,7 +28,7 @@ type NonModifiableOneTimeCost = {
|
|
|
29
28
|
/**
|
|
30
29
|
* Returns the text for a non-modifiable one-time cost of an activatable skill.
|
|
31
30
|
*/
|
|
32
|
-
export declare const renderNonModifiableOneTimeCost: (value: NonModifiableOneTimeCost, shouldAppendNonModifiableSuffix: boolean) => StdReader<string, "t" | "tm" | "rts" | "eu" | "nms" | "lj">;
|
|
31
|
+
export declare const renderNonModifiableOneTimeCost: (value: NonModifiableOneTimeCost, shouldAppendNonModifiableSuffix: boolean) => StdReader<string, "t" | "tm" | "f" | "rts" | "eu" | "nms" | "lj">;
|
|
33
32
|
type IndefiniteCost = {
|
|
34
33
|
modifier?: CheckResultBasedModifier;
|
|
35
34
|
translations: LocaleMap<{
|
|
@@ -41,27 +40,34 @@ type IndefiniteCost = {
|
|
|
41
40
|
*/
|
|
42
41
|
export declare const renderIndefiniteCost: (value: IndefiniteCost, shouldAppendNonModifiableSuffix: boolean) => StdReader<string, "t" | "tm" | "rts" | "eu" | "nms">;
|
|
43
42
|
/**
|
|
44
|
-
* Returns the text for a one-time cost map of an activatable skill.
|
|
43
|
+
* Returns the text for a standalone one-time cost map of an activatable skill.
|
|
45
44
|
*/
|
|
46
|
-
export declare const
|
|
45
|
+
export declare const renderStandaloneCostMap: (value: StandaloneCostMap) => Reader<StdEnv<"tm" | "t" | "rts"> & {
|
|
46
|
+
translate: import("../../../../helpers/translate.js").Translate;
|
|
47
|
+
energyUnit: import("../../units/energy.js").EnergyUnit;
|
|
48
|
+
}, string>;
|
|
47
49
|
/**
|
|
48
50
|
* Returns the text for the cost of a one-time activatable skill.
|
|
49
51
|
*/
|
|
50
|
-
export declare const renderOneTimeCost: (value: OneTimeCost) => StdReader<string, "t" | "tm" | "lj" | "rts" | "eu" | "s" | "nms" | "ibi", "SkillModificationLevel">;
|
|
52
|
+
export declare const renderOneTimeCost: (value: OneTimeCost) => StdReader<string, "t" | "tm" | "f" | "lj" | "rts" | "eu" | "s" | "nms" | "ibi", "SkillModificationLevel">;
|
|
51
53
|
/**
|
|
52
54
|
* Returns the text for the non-modifiable cost of a sustained activatable skill.
|
|
53
55
|
*/
|
|
54
56
|
export declare const renderNonModifiableSustainedCost: (value: NonModifiableSustainedCost) => Reader<{
|
|
55
|
-
translate: Translate;
|
|
57
|
+
translate: import("../../../../helpers/translate.js").Translate;
|
|
56
58
|
energyUnit: import("../../units/energy.js").EnergyUnit;
|
|
57
59
|
} & {
|
|
58
|
-
translate: Translate;
|
|
59
|
-
responsiveTextSize: ResponsiveTextSize;
|
|
60
|
-
} &
|
|
60
|
+
translate: import("../../../../helpers/translate.js").Translate;
|
|
61
|
+
responsiveTextSize: import("../../responsiveText.js").ResponsiveTextSize;
|
|
62
|
+
} & {
|
|
63
|
+
responsiveTextSize: import("../../responsiveText.js").ResponsiveTextSize;
|
|
64
|
+
} & {
|
|
65
|
+
translate: import("../../../../helpers/translate.js").Translate;
|
|
66
|
+
} & StdEnv<"f" | "tm" | "t" | "rts"> & StdEnv<"tm" | "t" | "rts" | "eu", never, never, never>, string>;
|
|
61
67
|
/**
|
|
62
68
|
* Returns the text for the cost of a sustained activatable skill.
|
|
63
69
|
*/
|
|
64
|
-
export declare const renderSustainedCost: (value: SustainedCost) => StdReader<string, "t" | "tm" | "rts" | "eu" | "s" | "nms" | "ibi", "SkillModificationLevel">;
|
|
70
|
+
export declare const renderSustainedCost: (value: SustainedCost) => StdReader<string, "t" | "tm" | "f" | "rts" | "eu" | "s" | "nms" | "ibi", "SkillModificationLevel">;
|
|
65
71
|
type MagicalActionCost = {
|
|
66
72
|
kind: "Fixed";
|
|
67
73
|
Fixed: NonModifiableOneTimeCost;
|
|
@@ -86,10 +92,10 @@ type MagicalActionCost = {
|
|
|
86
92
|
};
|
|
87
93
|
} | {
|
|
88
94
|
kind: "Map";
|
|
89
|
-
Map:
|
|
95
|
+
Map: StandaloneCostMap;
|
|
90
96
|
};
|
|
91
97
|
/**
|
|
92
98
|
* Generates the text for the cost specific to a magical action.
|
|
93
99
|
*/
|
|
94
|
-
export declare const renderMagicalActionCost: (cost: MagicalActionCost) => StdReader<string, "t" | "tm" | "rts" | "eu" | "nms" | "lj">;
|
|
100
|
+
export declare const renderMagicalActionCost: (cost: MagicalActionCost) => StdReader<string, "t" | "tm" | "f" | "rts" | "eu" | "nms" | "lj">;
|
|
95
101
|
export {};
|
|
@@ -2,11 +2,10 @@ import { identity } from "@elyukai/utils/function";
|
|
|
2
2
|
import { Reader } from "@elyukai/utils/reader";
|
|
3
3
|
import { mapNullable } from "@optolith/helpers/nullable";
|
|
4
4
|
import { assertExhaustive } from "@optolith/helpers/typeSafety";
|
|
5
|
-
import { responsiveTranslate, } from "../../../../helpers/translate.js";
|
|
6
5
|
import { renderResponsiveMap } from "../../map.js";
|
|
7
6
|
import { formatEnergyFnR, formatEnergyR, getInstanceByIdFnR, modifiableBySpeedR, responsiveLocaleJoinR, responsiveR, responsiveTextR, responsiveTranslateR, translateMapR, translateR, } from "../../reader.js";
|
|
8
|
-
import { appendNoteIfNeeded, replaceTextIfNeeded
|
|
9
|
-
import {
|
|
7
|
+
import { appendNoteIfNeeded, replaceTextIfNeeded } from "../../responsiveText.js";
|
|
8
|
+
import { formatCombinedTimeSpanR } from "../../units/timeSpan.js";
|
|
10
9
|
import { MISSING_VALUE } from "../../unknown.js";
|
|
11
10
|
import { appendCheckResultModifier } from "./checkResultBased.js";
|
|
12
11
|
import { wrapIfMinimum } from "./isMinimumMaximum.js";
|
|
@@ -64,12 +63,6 @@ const appendIntervalToCostR = (interval, baseCost) => interval === undefined
|
|
|
64
63
|
cost: baseCost,
|
|
65
64
|
interval: formattedInterval,
|
|
66
65
|
}));
|
|
67
|
-
const appendIntervalToCost = (translate, responsiveTextSize, interval, baseCost) => interval === undefined
|
|
68
|
-
? baseCost
|
|
69
|
-
: responsiveTranslate(translate, responsiveTextSize, "{$cost} per {$interval}", "{$cost}/{$interval}", {
|
|
70
|
-
cost: baseCost,
|
|
71
|
-
interval: formatCombinedTimeSpan(translate, responsiveTextSize, interval, true),
|
|
72
|
-
});
|
|
73
66
|
/**
|
|
74
67
|
* Returns the text for a non-modifiable one-time cost of an activatable skill.
|
|
75
68
|
*/
|
|
@@ -77,7 +70,7 @@ export const renderNonModifiableOneTimeCost = (value, shouldAppendNonModifiableS
|
|
|
77
70
|
.thenW(base => appendFamiliarsTrickLPCostIfNeeded(value.lp_value, base))
|
|
78
71
|
.thenW(base => appendPerCountableToCostIfNeeded(value.per, base))
|
|
79
72
|
.then(base => appendPermanentCostIfNeeded(value.permanent_value, base))
|
|
80
|
-
.
|
|
73
|
+
.thenW(base => appendIntervalToCostR(value.interval, base))
|
|
81
74
|
.then(base => appendElvenPermanentCostIfNeeded(value.permanent, base))
|
|
82
75
|
.then(base => wrapIfMinimum(value.is_minimum, base))
|
|
83
76
|
.then(base => appendNoteIfNeeded(value.translations, base))
|
|
@@ -119,22 +112,56 @@ const renderMultipleOneTimeCosts = (type, value) => {
|
|
|
119
112
|
.then(text => appendNonModifiableIfRequested(text));
|
|
120
113
|
};
|
|
121
114
|
/**
|
|
122
|
-
* Returns the text for a one-time cost map of an activatable skill.
|
|
115
|
+
* Returns the text for a standalone one-time cost map of an activatable skill.
|
|
123
116
|
*/
|
|
124
|
-
export const
|
|
125
|
-
.thenW(formatEnergy => renderResponsiveMap(value, option => option.value, formatEnergy, value.options.every(option => option.permanent_value !== undefined)
|
|
117
|
+
export const renderStandaloneCostMap = (value) => renderResponsiveMap(value, option => Reader.of(option.value), formatEnergyR, value.options.every(option => option.value.permanentValue !== undefined)
|
|
126
118
|
? {
|
|
127
|
-
surround: values =>
|
|
119
|
+
surround: values => translateR(", {$value} of which are permanent", {
|
|
128
120
|
value: values,
|
|
129
121
|
}),
|
|
130
122
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- is checked beforehand
|
|
131
|
-
getAdditionalValue: option => option.
|
|
123
|
+
getAdditionalValue: option => option.permanentValue,
|
|
124
|
+
}
|
|
125
|
+
: undefined);
|
|
126
|
+
/**
|
|
127
|
+
* Returns the text for a one-time cost map of an activatable skill.
|
|
128
|
+
*/
|
|
129
|
+
const renderOneTimeCostMap = (value) => {
|
|
130
|
+
switch (value.kind) {
|
|
131
|
+
case "Modifiable":
|
|
132
|
+
return renderResponsiveMap(value.Modifiable.map, option => deriveModifiableCost(option.initialModificationLevel).map(cost => cost ?? MISSING_VALUE), formatEnergyR, value.Modifiable.map.options.every(option => option.value.permanentValue !== undefined)
|
|
133
|
+
? {
|
|
134
|
+
surround: values => translateR(", {$value} of which are permanent", {
|
|
135
|
+
value: values,
|
|
136
|
+
}),
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- is checked beforehand
|
|
138
|
+
getAdditionalValue: option => option.permanentValue,
|
|
139
|
+
}
|
|
140
|
+
: undefined);
|
|
141
|
+
case "NonModifiable":
|
|
142
|
+
return renderResponsiveMap(value.NonModifiable.map, option => Reader.of(option.value), formatEnergyR, value.NonModifiable.map.options.every(option => option.value.permanentValue !== undefined)
|
|
143
|
+
? {
|
|
144
|
+
surround: values => translateR(", {$value} of which are permanent", {
|
|
145
|
+
value: values,
|
|
146
|
+
}),
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- is checked beforehand
|
|
148
|
+
getAdditionalValue: option => option.permanentValue,
|
|
149
|
+
}
|
|
150
|
+
: undefined).then(text => appendNonModifiableSuffix(ModifiableParameter.Cost, text));
|
|
151
|
+
default:
|
|
152
|
+
return assertExhaustive(value);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
const renderSustainedCostMap = (value) => {
|
|
156
|
+
switch (value.kind) {
|
|
157
|
+
case "Modifiable":
|
|
158
|
+
return renderResponsiveMap(value.Modifiable.map, option => deriveModifiableCost(option.initialModificationLevel).map(cost => cost ?? MISSING_VALUE), singleValue => formatEnergyR(singleValue).thenW(energy => appendIntervalToCostR(value.Modifiable.interval, energy)));
|
|
159
|
+
case "NonModifiable":
|
|
160
|
+
return renderResponsiveMap(value.NonModifiable.map, option => Reader.of(option.value), singleValue => formatEnergyR(singleValue).thenW(energy => appendIntervalToCostR(value.NonModifiable.interval, energy))).then(text => appendNonModifiableSuffix(ModifiableParameter.Cost, text));
|
|
161
|
+
default:
|
|
162
|
+
return assertExhaustive(value);
|
|
132
163
|
}
|
|
133
|
-
|
|
134
|
-
.then(text => appendNonModifiableSuffix(ModifiableParameter.Cost, text)));
|
|
135
|
-
const renderSustainedCostMap = (value) => formatEnergyFnR
|
|
136
|
-
.thenW(formatEnergy => Reader.ask().thenW(({ translate, responsiveTextSize }) => renderResponsiveMap(value, option => option.value, singleValue => appendIntervalToCost(translate, responsiveTextSize, value.interval, formatEnergy(singleValue)))))
|
|
137
|
-
.then(text => appendNonModifiableSuffix(ModifiableParameter.Cost, text));
|
|
164
|
+
};
|
|
138
165
|
/**
|
|
139
166
|
* Returns the text for the cost of a one-time activatable skill.
|
|
140
167
|
*/
|
|
@@ -155,7 +182,7 @@ export const renderOneTimeCost = (value) => {
|
|
|
155
182
|
const buildSustainedCost = (activationCost, intervalCost, interval) => {
|
|
156
183
|
const activationCostWithLabel = responsiveR(() => translateR("activation").map(label => `${activationCost} (${label})`), () => Reader.of(activationCost)).thenW(identity);
|
|
157
184
|
const intervalCostWithLabel = appendIntervalToCostR(interval, intervalCost);
|
|
158
|
-
return activationCostWithLabel.
|
|
185
|
+
return activationCostWithLabel.thenW(activationStr => intervalCostWithLabel.map(intervalStr => `${activationStr} + ${intervalStr}`));
|
|
159
186
|
};
|
|
160
187
|
const renderModifiableSustainedCost = (value) => deriveModifiableCost(value.initial_modification_level).thenW(cost => cost === undefined
|
|
161
188
|
? Reader.of(MISSING_VALUE)
|
|
@@ -173,20 +200,28 @@ export const renderNonModifiableSustainedCost = (value) => formatEnergyFnR
|
|
|
173
200
|
const getIntervalCost = value.is_minimum === true
|
|
174
201
|
? responsiveTranslateR("half of the activation cost", "50%")
|
|
175
202
|
: Reader.of(formatEnergy(value.value / 2));
|
|
176
|
-
return getIntervalCost.
|
|
203
|
+
return getIntervalCost.thenW(intervalCost => buildSustainedCost(activationCost, intervalCost, value.interval));
|
|
177
204
|
})
|
|
178
205
|
.thenW(base => appendPerCountableToCostIfNeeded(value.per, base))
|
|
179
206
|
.then(base => wrapIfMinimum(value.is_minimum, base))
|
|
180
207
|
.then(base => appendNonModifiableSuffix(ModifiableParameter.Cost, base));
|
|
181
|
-
|
|
182
|
-
* Returns the text for the cost of a sustained activatable skill.
|
|
183
|
-
*/
|
|
184
|
-
export const renderSustainedCost = (value) => {
|
|
208
|
+
const renderSingleSustainedCost = (value) => {
|
|
185
209
|
switch (value.kind) {
|
|
186
210
|
case "Modifiable":
|
|
187
211
|
return renderModifiableSustainedCost(value.Modifiable);
|
|
188
212
|
case "NonModifiable":
|
|
189
213
|
return renderNonModifiableSustainedCost(value.NonModifiable);
|
|
214
|
+
default:
|
|
215
|
+
return assertExhaustive(value);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Returns the text for the cost of a sustained activatable skill.
|
|
220
|
+
*/
|
|
221
|
+
export const renderSustainedCost = (value) => {
|
|
222
|
+
switch (value.kind) {
|
|
223
|
+
case "Single":
|
|
224
|
+
return renderSingleSustainedCost(value.Single);
|
|
190
225
|
case "Map":
|
|
191
226
|
return renderSustainedCostMap(value.Map);
|
|
192
227
|
default:
|
|
@@ -220,7 +255,7 @@ export const renderMagicalActionCost = (cost) => {
|
|
|
220
255
|
value: cost.All.minimum,
|
|
221
256
|
}));
|
|
222
257
|
case "Map":
|
|
223
|
-
return
|
|
258
|
+
return renderStandaloneCostMap(cost.Map);
|
|
224
259
|
default:
|
|
225
260
|
return assertExhaustive(cost);
|
|
226
261
|
}
|
|
@@ -4,7 +4,7 @@ import { type StdReader } from "../../reader.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns the text for a duration that is based on an expression.
|
|
6
6
|
*/
|
|
7
|
-
export declare const renderExpressionBasedDuration: (value: ExpressionBasedDuration) => StdReader<string, "t" | "tm" | "rts">;
|
|
7
|
+
export declare const renderExpressionBasedDuration: (value: ExpressionBasedDuration) => StdReader<string, "t" | "tm" | "f" | "rts">;
|
|
8
8
|
type OneTimeDuration = {
|
|
9
9
|
kind: "Immediate";
|
|
10
10
|
Immediate?: Immediate;
|
|
@@ -34,11 +34,11 @@ type OneTimeDuration = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Returns the text for the duration of a one-time activatable skill.
|
|
36
36
|
*/
|
|
37
|
-
export declare const renderOneTimeDuration: (value: OneTimeDuration) => StdReader<string, "t" | "tm" | "rts">;
|
|
37
|
+
export declare const renderOneTimeDuration: (value: OneTimeDuration) => StdReader<string, "t" | "tm" | "f" | "rts">;
|
|
38
38
|
/**
|
|
39
39
|
* Returns the text for the duration of a sustained activatable skill.
|
|
40
40
|
*/
|
|
41
|
-
export declare const renderSustainedDuration: (value: DurationForSustained | undefined) => StdReader<string, "t" | "rts">;
|
|
41
|
+
export declare const renderSustainedDuration: (value: DurationForSustained | undefined) => StdReader<string, "t" | "tm" | "f" | "rts">;
|
|
42
42
|
/**
|
|
43
43
|
* Returns the text for the duration of a musical activatable skill.
|
|
44
44
|
*/
|
|
@@ -10,11 +10,11 @@ type RenderedPerformanceParameters = {
|
|
|
10
10
|
/**
|
|
11
11
|
* Get the texts for all fast one-time performance parameters.
|
|
12
12
|
*/
|
|
13
|
-
export declare const renderFastOneTimePerformanceParameters: (value: FastOneTimePerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
13
|
+
export declare const renderFastOneTimePerformanceParameters: (value: FastOneTimePerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
14
14
|
/**
|
|
15
15
|
* Get the texts for all fast sustained performance parameters.
|
|
16
16
|
*/
|
|
17
|
-
export declare const renderFastSustainedPerformanceParameters: (value: FastSustainedPerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
17
|
+
export declare const renderFastSustainedPerformanceParameters: (value: FastSustainedPerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
18
18
|
/**
|
|
19
19
|
* Renders the performance parameters for a fast activatable skill.
|
|
20
20
|
*/
|
|
@@ -24,15 +24,15 @@ export declare const renderFastPerformanceParameters: (value: {
|
|
|
24
24
|
} | {
|
|
25
25
|
kind: "Sustained";
|
|
26
26
|
Sustained: FastSustainedPerformanceParameters;
|
|
27
|
-
}) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
27
|
+
}) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
28
28
|
/**
|
|
29
29
|
* Get the texts for all slow one-time performance parameters.
|
|
30
30
|
*/
|
|
31
|
-
export declare const renderSlowOneTimePerformanceParameters: <CastingTime>(renderCastingTime: (value: CastingTime) => StdReader<string, "t" | "rts" | "nms" | "ibi", "SkillModificationLevel">, value: OneTimePerformanceParameters<CastingTime>) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
31
|
+
export declare const renderSlowOneTimePerformanceParameters: <CastingTime>(renderCastingTime: (value: CastingTime) => StdReader<string, "t" | "tm" | "f" | "rts" | "nms" | "ibi", "SkillModificationLevel">, value: OneTimePerformanceParameters<CastingTime>) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
32
32
|
/**
|
|
33
33
|
* Get the texts for all slow sustained performance parameters.
|
|
34
34
|
*/
|
|
35
|
-
export declare const renderSlowSustainedPerformanceParameters: (value: SlowSustainedPerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
35
|
+
export declare const renderSlowSustainedPerformanceParameters: (value: SlowSustainedPerformanceParameters) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
36
36
|
/**
|
|
37
37
|
* Renders the performance parameters for a slow activatable skill.
|
|
38
38
|
*/
|
|
@@ -42,7 +42,7 @@ export declare const renderSlowPerformanceParameters: (value: {
|
|
|
42
42
|
} | {
|
|
43
43
|
kind: "Sustained";
|
|
44
44
|
Sustained: SlowSustainedPerformanceParameters;
|
|
45
|
-
}) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
45
|
+
}) => StdReader<RenderedPerformanceParameters, "t" | "tm" | "f" | "lj" | "eu" | "rts" | "nms" | "ibi", "SkillModificationLevel">;
|
|
46
46
|
/**
|
|
47
47
|
* Diff the generated text with the static translation and combine them into a single text, highlighting the differences.
|
|
48
48
|
*/
|
|
@@ -9,7 +9,7 @@ import { Speed } from "./speed.js";
|
|
|
9
9
|
* Get the texts for all fast one-time performance parameters.
|
|
10
10
|
*/
|
|
11
11
|
export const renderFastOneTimePerformanceParameters = (value) => renderFastCastingTime(value.casting_time)
|
|
12
|
-
.thenW(castingTime => renderOneTimeCost(value.cost).then(cost => renderRange(value.range).
|
|
12
|
+
.thenW(castingTime => renderOneTimeCost(value.cost).then(cost => renderRange(value.range).thenW(range => renderOneTimeDuration(value.duration).map(duration => ({
|
|
13
13
|
castingTime,
|
|
14
14
|
cost,
|
|
15
15
|
range,
|
|
@@ -20,7 +20,7 @@ export const renderFastOneTimePerformanceParameters = (value) => renderFastCasti
|
|
|
20
20
|
* Get the texts for all fast sustained performance parameters.
|
|
21
21
|
*/
|
|
22
22
|
export const renderFastSustainedPerformanceParameters = (value) => renderFastCastingTime(value.casting_time)
|
|
23
|
-
.thenW(castingTime => renderSustainedCost(value.cost).then(cost => renderRange(value.range).
|
|
23
|
+
.thenW(castingTime => renderSustainedCost(value.cost).then(cost => renderRange(value.range).thenW(range => renderSustainedDuration(value.duration).map(duration => ({
|
|
24
24
|
castingTime,
|
|
25
25
|
cost,
|
|
26
26
|
range,
|
|
@@ -44,7 +44,7 @@ export const renderFastPerformanceParameters = (value) => {
|
|
|
44
44
|
* Get the texts for all slow one-time performance parameters.
|
|
45
45
|
*/
|
|
46
46
|
export const renderSlowOneTimePerformanceParameters = (renderCastingTime, value) => renderCastingTime(value.casting_time)
|
|
47
|
-
.thenW(castingTime => renderOneTimeCost(value.cost).then(cost => renderRange(value.range).
|
|
47
|
+
.thenW(castingTime => renderOneTimeCost(value.cost).then(cost => renderRange(value.range).thenW(range => renderOneTimeDuration(value.duration).map(duration => ({
|
|
48
48
|
castingTime,
|
|
49
49
|
cost,
|
|
50
50
|
range,
|
|
@@ -55,7 +55,7 @@ export const renderSlowOneTimePerformanceParameters = (renderCastingTime, value)
|
|
|
55
55
|
* Get the texts for all slow sustained performance parameters.
|
|
56
56
|
*/
|
|
57
57
|
export const renderSlowSustainedPerformanceParameters = (value) => renderSlowCastingTime(value.casting_time)
|
|
58
|
-
.thenW(castingTime => renderSustainedCost(value.cost).then(cost => renderRange(value.range).
|
|
58
|
+
.thenW(castingTime => renderSustainedCost(value.cost).then(cost => renderRange(value.range).thenW(range => renderSustainedDuration(value.duration).map(duration => ({
|
|
59
59
|
castingTime,
|
|
60
60
|
cost,
|
|
61
61
|
range,
|
|
@@ -147,6 +147,16 @@ export declare const attributedNameR: <E extends { [K in keyof EntityMap]: Entit
|
|
|
147
147
|
translateMap: TranslateMap;
|
|
148
148
|
getInstanceById: GetInstanceById<E>;
|
|
149
149
|
}, string | undefined>;
|
|
150
|
+
/**
|
|
151
|
+
* Retrieves the `name` property of the specified entry in an attributed string.
|
|
152
|
+
*/
|
|
153
|
+
export declare const attributedNameFromInstanceR: (instance: {
|
|
154
|
+
translations: LocaleMap<{
|
|
155
|
+
name: string;
|
|
156
|
+
}>;
|
|
157
|
+
} | undefined, context: string, ...args: IdArgsVariant) => Reader<{
|
|
158
|
+
translateMap: TranslateMap;
|
|
159
|
+
}, string | undefined>;
|
|
150
160
|
/**
|
|
151
161
|
* Applies a function to the translation of the specified entry and renders it in an attributed string.
|
|
152
162
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNotNullish } from "@elyukai/utils/nullable";
|
|
2
2
|
import { Reader } from "@elyukai/utils/reader";
|
|
3
3
|
import { assertExhaustive } from "@elyukai/utils/typeSafety";
|
|
4
|
-
import { attributedCustomName, attributedName, customName } from "./markdown.js";
|
|
4
|
+
import { attributedCustomName, attributedName, attributedNameFromInstance, customName, } from "./markdown.js";
|
|
5
5
|
import { Speed } from "./rated/activatable/speed.js";
|
|
6
6
|
import { responsive, ResponsiveTextSize } from "./responsiveText.js";
|
|
7
7
|
import { formatEnergy } from "./units/energy.js";
|
|
@@ -55,6 +55,10 @@ export const strictNameR = (...args) => nameR(...args).map(name => name ?? MISSI
|
|
|
55
55
|
* Retrieves the `name` property of the specified entry in an attributed string.
|
|
56
56
|
*/
|
|
57
57
|
export const attributedNameR = (context, ...args) => Reader.asks(env => attributedName(env.translateMap, env.getInstanceById, context, ...args));
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves the `name` property of the specified entry in an attributed string.
|
|
60
|
+
*/
|
|
61
|
+
export const attributedNameFromInstanceR = (instance, context, ...args) => Reader.asks(env => attributedNameFromInstance(env.translateMap, instance, context, ...args));
|
|
58
62
|
/**
|
|
59
63
|
* Applies a function to the translation of the specified entry and renders it in an attributed string.
|
|
60
64
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Case } from "tsondb/schema/gen";
|
|
3
|
+
import type { Format, LocaleMap, Translate, TranslateMap } from "../../../helpers/translate.js";
|
|
3
4
|
import type { StdEnv } from "../reader.js";
|
|
4
5
|
import { type ResponsiveTextSize } from "../responsiveText.js";
|
|
5
6
|
/**
|
|
@@ -7,32 +8,39 @@ import { type ResponsiveTextSize } from "../responsiveText.js";
|
|
|
7
8
|
*/
|
|
8
9
|
export type TimeSpanUnit = "Seconds" | "Minutes" | "Hours" | "Days" | "Weeks" | "Months" | "Years" | "Decades" | "Centuries" | "Actions" | "CombatRounds" | "SeductionActions" | "Rounds";
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Possible units to use for time spans, including the possibility of creating your own.
|
|
11
12
|
*/
|
|
12
|
-
export
|
|
13
|
+
export type TimeSpanUnitObject = {
|
|
13
14
|
kind: TimeSpanUnit;
|
|
14
|
-
} |
|
|
15
|
+
} | Case<"Custom", {
|
|
16
|
+
translations: LocaleMap<{
|
|
17
|
+
name: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
fullNumber: string;
|
|
20
|
+
full: string;
|
|
21
|
+
compressedNumber: string;
|
|
22
|
+
compressed: string;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
15
25
|
/**
|
|
16
26
|
* Returns the text for a time span unit.
|
|
17
27
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
export declare const formatTimeSpan: (translate: Translate, translateMap: TranslateMap, format: Format, responsiveTextSize: ResponsiveTextSize, unit: TimeSpanUnitObject | TimeSpanUnit, value: number | string, interval?: boolean) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the text for a time span unit.
|
|
31
|
+
*/
|
|
32
|
+
export declare const formatCombinedTimeSpan: (translate: Translate, translateMap: TranslateMap, format: Format, responsiveTextSize: ResponsiveTextSize, object: {
|
|
33
|
+
unit: TimeSpanUnitObject;
|
|
22
34
|
value: number | string;
|
|
23
35
|
}, interval?: boolean) => string;
|
|
24
36
|
/**
|
|
25
37
|
* Returns the text for a time span unit.
|
|
26
38
|
*/
|
|
27
|
-
export declare const formatTimeSpanR: (unit:
|
|
28
|
-
kind: TimeSpanUnit;
|
|
29
|
-
} | TimeSpanUnit, value: number | string, interval?: boolean) => Reader<StdEnv<"t" | "rts">, string>;
|
|
39
|
+
export declare const formatTimeSpanR: (unit: TimeSpanUnitObject | TimeSpanUnit, value: number | string, interval?: boolean) => Reader<StdEnv<"t" | "tm" | "f" | "rts">, string>;
|
|
30
40
|
/**
|
|
31
41
|
* Returns the text for a time span unit.
|
|
32
42
|
*/
|
|
33
43
|
export declare const formatCombinedTimeSpanR: (object: {
|
|
34
|
-
unit:
|
|
35
|
-
kind: TimeSpanUnit;
|
|
36
|
-
};
|
|
44
|
+
unit: TimeSpanUnitObject;
|
|
37
45
|
value: number | string;
|
|
38
|
-
}, interval?: boolean) => Reader<StdEnv<"t" | "rts">, string>;
|
|
46
|
+
}, interval?: boolean) => Reader<StdEnv<"t" | "tm" | "f" | "rts">, string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Reader } from "@elyukai/utils/reader";
|
|
2
2
|
import { responsive } from "../responsiveText.js";
|
|
3
|
+
import { MISSING_VALUE } from "../unknown.js";
|
|
3
4
|
// prettier-ignore
|
|
4
5
|
const timeSpanUnitTranslationKeys = {
|
|
5
6
|
Seconds: [".input {$value :number} .input {$style :string} {{{$value} seconds}}", "{$value} seconds", ".input {$value :number} .input {$style :string} {{{$value} s}}", "{$value} s"],
|
|
@@ -19,7 +20,20 @@ const timeSpanUnitTranslationKeys = {
|
|
|
19
20
|
/**
|
|
20
21
|
* Returns the text for a time span unit.
|
|
21
22
|
*/
|
|
22
|
-
export const formatTimeSpan = (translate, responsiveTextSize, unit, value, interval = false) => {
|
|
23
|
+
export const formatTimeSpan = (translate, translateMap, format, responsiveTextSize, unit, value, interval = false) => {
|
|
24
|
+
if (typeof unit === "object" && unit.kind === "Custom") {
|
|
25
|
+
const translation = translateMap(unit.Custom.translations);
|
|
26
|
+
if (translation === undefined) {
|
|
27
|
+
return MISSING_VALUE;
|
|
28
|
+
}
|
|
29
|
+
return responsive(responsiveTextSize, () => format(typeof value === "number" ? translation.fullNumber : translation.full, {
|
|
30
|
+
value,
|
|
31
|
+
style: interval ? "interval" : "default",
|
|
32
|
+
}), () => format(typeof value === "number" ? translation.compressedNumber : translation.compressed, {
|
|
33
|
+
value,
|
|
34
|
+
style: interval ? "interval" : "default",
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
23
37
|
const [fullNumberKey, fullKey, compressedNumberKey, compressedKey] = timeSpanUnitTranslationKeys[typeof unit === "string" ? unit : unit.kind];
|
|
24
38
|
return responsive(responsiveTextSize, () => translate(typeof value === "number" ? fullNumberKey : fullKey, {
|
|
25
39
|
value,
|
|
@@ -32,11 +46,11 @@ export const formatTimeSpan = (translate, responsiveTextSize, unit, value, inter
|
|
|
32
46
|
/**
|
|
33
47
|
* Returns the text for a time span unit.
|
|
34
48
|
*/
|
|
35
|
-
export const formatCombinedTimeSpan = (translate, responsiveTextSize, object, interval = false) => formatTimeSpan(translate, responsiveTextSize, object.unit, object.value, interval);
|
|
49
|
+
export const formatCombinedTimeSpan = (translate, translateMap, format, responsiveTextSize, object, interval = false) => formatTimeSpan(translate, translateMap, format, responsiveTextSize, object.unit, object.value, interval);
|
|
36
50
|
/**
|
|
37
51
|
* Returns the text for a time span unit.
|
|
38
52
|
*/
|
|
39
|
-
export const formatTimeSpanR = (unit, value, interval) => Reader.asks(({ translate, responsiveTextSize }) => formatTimeSpan(translate, responsiveTextSize, unit, value, interval));
|
|
53
|
+
export const formatTimeSpanR = (unit, value, interval) => Reader.asks(({ translate, translateMap, format, responsiveTextSize }) => formatTimeSpan(translate, translateMap, format, responsiveTextSize, unit, value, interval));
|
|
40
54
|
/**
|
|
41
55
|
* Returns the text for a time span unit.
|
|
42
56
|
*/
|
package/lib/entities/poison.js
CHANGED
|
@@ -42,7 +42,7 @@ const renderLevel = (translate, translateMap, level) => {
|
|
|
42
42
|
return assertExhaustive(level);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
const renderAddiction = (translate, translateMap, getInstanceById, addiction) => [
|
|
45
|
+
const renderAddiction = (translate, translateMap, format, getInstanceById, addiction) => [
|
|
46
46
|
ensureNonEmpty([
|
|
47
47
|
mapNullable(renderChance(translate, translateMap, addiction), chance => chance +
|
|
48
48
|
parensIf(addiction.check === undefined
|
|
@@ -60,7 +60,7 @@ const renderAddiction = (translate, translateMap, getInstanceById, addiction) =>
|
|
|
60
60
|
].filter(isNotNullish))?.join(", "),
|
|
61
61
|
mapNullable(addiction.withdrawalPrevention, withdrawalPrevention => translate(".input {$value :number} {{{$value} applications every {$interval}}}", {
|
|
62
62
|
value: withdrawalPrevention.amount,
|
|
63
|
-
interval: formatTimeSpan(translate, ResponsiveTextSize.Full, { kind: "Days" }, (() => {
|
|
63
|
+
interval: formatTimeSpan(translate, translateMap, format, ResponsiveTextSize.Full, { kind: "Days" }, (() => {
|
|
64
64
|
switch (withdrawalPrevention.interval.kind) {
|
|
65
65
|
case "Constant":
|
|
66
66
|
return withdrawalPrevention.interval.Constant.value;
|
|
@@ -74,7 +74,7 @@ const renderAddiction = (translate, translateMap, getInstanceById, addiction) =>
|
|
|
74
74
|
]
|
|
75
75
|
.filter(isNotNullish)
|
|
76
76
|
.join("; ");
|
|
77
|
-
const renderIntoxicantValues = (translate, translateMap, getInstanceById, intoxicant) => {
|
|
77
|
+
const renderIntoxicantValues = (translate, translateMap, format, getInstanceById, intoxicant) => {
|
|
78
78
|
const translation = translateMap(intoxicant.translations);
|
|
79
79
|
return {
|
|
80
80
|
ingestion: translation?.ingestion ?? MISSING_VALUE,
|
|
@@ -84,10 +84,10 @@ const renderIntoxicantValues = (translate, translateMap, getInstanceById, intoxi
|
|
|
84
84
|
special: translation?.special,
|
|
85
85
|
addiction: intoxicant.addiction === undefined
|
|
86
86
|
? undefined
|
|
87
|
-
: renderAddiction(translate, translateMap, getInstanceById, intoxicant.addiction),
|
|
87
|
+
: renderAddiction(translate, translateMap, format, getInstanceById, intoxicant.addiction),
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
const renderSourceTypeBasedValues = (translate, translateMap, getInstanceById, sourceType) => {
|
|
90
|
+
const renderSourceTypeBasedValues = (translate, translateMap, format, getInstanceById, sourceType) => {
|
|
91
91
|
switch (sourceType.kind) {
|
|
92
92
|
case "AnimalVenom":
|
|
93
93
|
return {
|
|
@@ -112,7 +112,7 @@ const renderSourceTypeBasedValues = (translate, translateMap, getInstanceById, s
|
|
|
112
112
|
.join(", "),
|
|
113
113
|
...(sourceType.AlchemicalPoison.intoxicant === undefined
|
|
114
114
|
? undefined
|
|
115
|
-
: renderIntoxicantValues(translate, translateMap, getInstanceById, sourceType.AlchemicalPoison.intoxicant)),
|
|
115
|
+
: renderIntoxicantValues(translate, translateMap, format, getInstanceById, sourceType.AlchemicalPoison.intoxicant)),
|
|
116
116
|
typicalIngredients: translation?.typical_ingredients.join(", "),
|
|
117
117
|
priceOfIngedientsPerLevel: translate("{$cost} per level", {
|
|
118
118
|
cost: translate(".input {$value :number} {{{$value} silverthalers}}", {
|
|
@@ -144,7 +144,7 @@ const renderSourceTypeBasedValues = (translate, translateMap, getInstanceById, s
|
|
|
144
144
|
sourceType: translate("plant poison"),
|
|
145
145
|
...(sourceType.PlantPoison.intoxicant === undefined
|
|
146
146
|
? undefined
|
|
147
|
-
: renderIntoxicantValues(translate, translateMap, getInstanceById, sourceType.PlantPoison.intoxicant)),
|
|
147
|
+
: renderIntoxicantValues(translate, translateMap, format, getInstanceById, sourceType.PlantPoison.intoxicant)),
|
|
148
148
|
};
|
|
149
149
|
case "DemonicPoison": {
|
|
150
150
|
const translation = translateMap(sourceType.DemonicPoison.translations);
|
|
@@ -241,13 +241,13 @@ const renderValueCost = (translate, translateMap, cost, value) => value === unde
|
|
|
241
241
|
* Get a JSON representation of the rules text for a poison.
|
|
242
242
|
*/
|
|
243
243
|
export const getPoisonEntityDescription = createEntityDescriptionCreator(({ getInstanceById, getResolvedSelectOptionById, idMap }, locale, { content: entry }) => {
|
|
244
|
-
const { translate, translateMap, join: localeJoin, compare: localeCompare } = locale;
|
|
244
|
+
const { translate, translateMap, format, join: localeJoin, compare: localeCompare } = locale;
|
|
245
245
|
const translation = translateMap(entry.translations);
|
|
246
246
|
if (translation === undefined) {
|
|
247
247
|
return undefined;
|
|
248
248
|
}
|
|
249
249
|
const applicationType = renderApplicationType(translate, localeJoin, localeCompare, entry.application_type);
|
|
250
|
-
const { level, sourceType, ingestion, sideEffect, overdose, legality, special, addiction, typicalIngredients, priceOfIngedientsPerLevel, laboratory, brewingDifficulty, prerequisitesBrewingProcess, tradeSecret, note, } = renderSourceTypeBasedValues(translate, translateMap, getInstanceById, entry.source_type);
|
|
250
|
+
const { level, sourceType, ingestion, sideEffect, overdose, legality, special, addiction, typicalIngredients, priceOfIngedientsPerLevel, laboratory, brewingDifficulty, prerequisitesBrewingProcess, tradeSecret, note, } = renderSourceTypeBasedValues(translate, translateMap, format, getInstanceById, entry.source_type);
|
|
251
251
|
return {
|
|
252
252
|
title: translation.name,
|
|
253
253
|
className: "poison",
|