mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: start on final design
This commit is contained in:
1 parent
298b89b227
commit
afa0cfaeef
21 files changed
+178
-116
No files matched your search
@@ -1,18 +1,21 @@
|
||||
import { RatingPlayer } from '../../commands/ratingLeaderboard';
|
||||
import { RatingStats } from '../blitz/getAccountInfo';
|
||||
import { BkrlComprehensive1Entry, BkrlMinimalEntry } from '../streams/bkrl';
|
||||
import { BkrlSuperset1Entry } from '../streams/bkrl';
|
||||
|
||||
export function deltaBkrlBlitzStats(
|
||||
a: BkrlComprehensive1Entry,
|
||||
b: RatingStats,
|
||||
a: BkrlSuperset1Entry,
|
||||
b1: RatingStats,
|
||||
b2: RatingPlayer,
|
||||
) {
|
||||
return {
|
||||
battles: b.battles - a.battles,
|
||||
damageDealt: b.damage_dealt - a.damageDealt,
|
||||
damageReceived: b.damage_received - a.damageReceived,
|
||||
hits: b.hits - a.hits,
|
||||
kills: b.frags - a.kills,
|
||||
shots: b.shots - a.shots,
|
||||
survived: b.survived_battles - a.survived,
|
||||
wins: b.wins - a.wins,
|
||||
} satisfies Omit<BkrlComprehensive1Entry, keyof BkrlMinimalEntry>;
|
||||
battles: b1.battles - a.battles,
|
||||
damageDealt: b1.damage_dealt - a.damageDealt,
|
||||
damageReceived: b1.damage_received - a.damageReceived,
|
||||
hits: b1.hits - a.hits,
|
||||
kills: b1.frags - a.kills,
|
||||
shots: b1.shots - a.shots,
|
||||
survived: b1.survived_battles - a.survived,
|
||||
wins: b1.wins - a.wins,
|
||||
score: b2.score - a.score,
|
||||
} satisfies Omit<BkrlSuperset1Entry, 'id'>;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TreeType } from '../../components/Tanks';
|
||||
import { SupplementaryStatsRandom } from '../blitz/getAccountInfo';
|
||||
import { SupplementaryStats } from '../blitz/getAccountInfo';
|
||||
import { tankDefinitions } from '../blitzkrieg/tankDefinitions';
|
||||
import { DiffedTankStats } from '../blitzstars/getStatsInPeriod';
|
||||
import { tankAverages } from '../blitzstars/tankAverages';
|
||||
@@ -51,7 +51,6 @@ export async function filterStats(
|
||||
0,
|
||||
);
|
||||
const supplementary = {
|
||||
type: 'random',
|
||||
WN8:
|
||||
filteredOrder.reduce<number>(
|
||||
(accumulator, id) =>
|
||||
@@ -70,7 +69,7 @@ export async function filterStats(
|
||||
: accumulator,
|
||||
0,
|
||||
) / battlesOfTanksWithTankDefinition,
|
||||
} satisfies SupplementaryStatsRandom;
|
||||
} satisfies SupplementaryStats;
|
||||
|
||||
return { stats, supplementary, filteredOrder };
|
||||
}
|
||||
Reference in new issue
Block a user