Files
blitzkit/packages/website/src/config/characteristics.ts
T

48 lines
1.0 KiB
TypeScript
Raw Normal View History

2026-08-31 20:13:31 -05:00
import {
CharacteristicType,
type Characteristic,
} from "../types/characteristics";
export const characteristics = {
gun_type: {
type: CharacteristicType.Enum,
compute({ gun }) {
return gun.gun_type!.$case;
},
},
clip_size: {
type: CharacteristicType.Number,
should_render({ gun }) {
return gun.gun_type!.$case !== "regular";
},
compute({ gun }) {
if (gun.gun_type!.$case === "regular") return 1;
return gun.gun_type!.value.shell_count;
},
},
damage: {
type: CharacteristicType.Number,
2026-10-04 16:42:35 -05:00
compute({ shell, environment, equalizer, script }) {
let coefficient = 1;
if (environment.equalize) coefficient *= equalizer.damage;
script("", (script) => {
coefficient *= script.something;
});
return coefficient * shell.armor_damage;
2026-10-01 20:11:12 -05:00
},
},
2026-08-31 20:13:31 -05:00
2026-10-01 20:11:12 -05:00
module_damage: {
type: CharacteristicType.Number,
compute({ shell }) {
return shell.module_damage;
2026-08-31 20:13:31 -05:00
},
},
} satisfies Record<string, Characteristic>;