diff --git a/packages/website/src/config/characteristics.ts b/packages/website/src/config/characteristics.ts index b8d568ba2..037a177dd 100644 --- a/packages/website/src/config/characteristics.ts +++ b/packages/website/src/config/characteristics.ts @@ -26,8 +26,16 @@ export const characteristics = { damage: { type: CharacteristicType.Number, - compute({ shell }) { - return shell.armor_damage; + compute({ shell, environment, equalizer, script }) { + let coefficient = 1; + + if (environment.equalize) coefficient *= equalizer.damage; + + script("", (script) => { + coefficient *= script.something; + }); + + return coefficient * shell.armor_damage; }, }, diff --git a/packages/website/src/config/characteristicsGroups.ts b/packages/website/src/config/characteristicsGroups.ts index b99e0ca45..ad41111f0 100644 --- a/packages/website/src/config/characteristicsGroups.ts +++ b/packages/website/src/config/characteristicsGroups.ts @@ -1,3 +1,5 @@ +import type { CaseType } from "@blitzkit/core"; +import type { GunDefinition } from "@blitzkit/protos"; import type { CharacteristicsGroup } from "../types/characteristics"; export const characteristicsGroups: CharacteristicsGroup[] = [ @@ -67,8 +69,10 @@ export const characteristicsGroups: CharacteristicsGroup[] = [ order: [ { name: "gun_type", - render({ output }) { - return GunType[output as GunType]; + render({ output, strings }) { + return strings.common.gun_types[ + output as CaseType + ]; }, }, { name: "dpm", decimals: 0, units: "hp", localize: true }, diff --git a/packages/website/src/types/characteristics.ts b/packages/website/src/types/characteristics.ts index 4dbf6c0d0..396e3aa6d 100644 --- a/packages/website/src/types/characteristics.ts +++ b/packages/website/src/types/characteristics.ts @@ -1,6 +1,7 @@ import type { Strings } from "@blitzkit/i18n"; import type { EngineDefinition, + Equalizer, GunDefinition, ShellDefinition, TankDefinition, @@ -29,6 +30,8 @@ export interface CharacteristicContext { state: TankState; environment: TankEnvironment; + equalizer: Equalizer; + tank: TankDefinition; engine: EngineDefinition; track: TrackDefinition;