mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-23 06:04:32 +01:00
feat: start of mechanics
This commit is contained in:
1 parent
01409985a2
commit
da1af66c77
6 files changed
+37
-21
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import type { CompensationComponent } from "@protos/blitz_static_compensation_component";
|
||||
import type { TankCatalogComponent } from "@protos/blitz_static_tank_component";
|
||||
import {
|
||||
ShellUpgrageSingleChange_AttributeName,
|
||||
TankAttributeChange_AttributeName,
|
||||
} from "@protos/blitz_static_tank_upgrade_single_stage";
|
||||
import type { Tank } from "../../protos/tank";
|
||||
import { aggregateStageParameters } from "./aggregateStageParameters";
|
||||
import {
|
||||
characteristics,
|
||||
@@ -19,13 +18,12 @@ export type ComputedCharacteristics = Record<
|
||||
|
||||
export function computeCharacteristics(
|
||||
id: string,
|
||||
tank: TankCatalogComponent,
|
||||
compensation: CompensationComponent,
|
||||
tank: Tank,
|
||||
state: TankState
|
||||
) {
|
||||
const parameters = aggregateStageParameters(
|
||||
tank.base_stats!,
|
||||
tank.upgrade_stages.slice(0, state.stage)
|
||||
tank.tank!.base_stats!,
|
||||
tank.tank!.upgrade_stages.slice(0, state.stage)
|
||||
);
|
||||
|
||||
const computed: Partial<ComputedCharacteristics> = {};
|
||||
@@ -97,7 +95,6 @@ export function computeCharacteristics(
|
||||
tank,
|
||||
parameters,
|
||||
id,
|
||||
compensation,
|
||||
});
|
||||
computed[name] = value;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user