-
Notifications
You must be signed in to change notification settings - Fork 309
/
data.ts
47 lines (39 loc) · 1.44 KB
/
data.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { AttributeString } from "@actor/types.ts";
import { PhysicalItemSource } from "@item/base/data/index.ts";
import {
BasePhysicalItemSource,
Investable,
PhysicalItemTraits,
PhysicalSystemData,
PhysicalSystemSource,
} from "@item/physical/data.ts";
import type { EquipmentTrait, OtherEquipmentTag } from "./types.ts";
type EquipmentSource = BasePhysicalItemSource<"equipment", EquipmentSystemSource>;
interface EquipmentSystemSource extends Investable<PhysicalSystemSource> {
traits: EquipmentTraits;
/**
* Data for apex items: the attribute upgraded and, in case of multiple apex items, whether the upgrade has been
* selected
*/
apex?: {
attribute: AttributeString;
selected?: boolean;
};
usage: { value: string };
/** Doubly-embedded adjustments, attachments, talismans etc. */
subitems: PhysicalItemSource[];
}
interface EquipmentSystemData
extends Omit<EquipmentSystemSource, SourceOmission>,
Omit<Investable<PhysicalSystemData>, "traits"> {
apex?: {
attribute: AttributeString;
selected: boolean;
};
stackGroup: null;
}
type SourceOmission = "bulk" | "hp" | "identification" | "items" | "material" | "price" | "temporary" | "usage";
interface EquipmentTraits extends PhysicalItemTraits<EquipmentTrait> {
otherTags: OtherEquipmentTag[];
}
export type { EquipmentSource, EquipmentSystemData, EquipmentSystemSource, EquipmentTrait };