38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
export type HitLocationSlug = "rLeg" | "lLeg" | "abdomen" | "chest" | "rArm" | "lArm" | "head";
|
|
|
|
export interface HitLocationEntry {
|
|
slug: HitLocationSlug;
|
|
label: string;
|
|
min: number;
|
|
max: number;
|
|
}
|
|
|
|
export const SYSTEM_ID = "ringworld";
|
|
|
|
export const HIT_LOCATION_TABLE: HitLocationEntry[] = [
|
|
{ slug: "rLeg", label: "Right Leg", min: 1, max: 3 },
|
|
{ slug: "lLeg", label: "Left Leg", min: 4, max: 6 },
|
|
{ slug: "abdomen", label: "Abdomen", min: 7, max: 10 },
|
|
{ slug: "chest", label: "Chest", min: 11, max: 15 },
|
|
{ slug: "rArm", label: "Right Arm", min: 16, max: 17 },
|
|
{ slug: "lArm", label: "Left Arm", min: 18, max: 19 },
|
|
{ slug: "head", label: "Head", min: 20, max: 20 }
|
|
];
|
|
|
|
export const HIT_LOCATION_ORDER: HitLocationSlug[] = [
|
|
"rLeg",
|
|
"lLeg",
|
|
"abdomen",
|
|
"chest",
|
|
"rArm",
|
|
"lArm",
|
|
"head"
|
|
];
|
|
|
|
export const LIMB_LOCATIONS: HitLocationSlug[] = ["rArm", "lArm", "rLeg", "lLeg"];
|
|
export const LEG_LOCATIONS: HitLocationSlug[] = ["rLeg", "lLeg"];
|
|
|
|
export function isLimb(slug: HitLocationSlug): boolean {
|
|
return LIMB_LOCATIONS.includes(slug);
|
|
}
|