parent
b7ac817014
commit
6c80140719
|
|
@ -1,3 +1,7 @@
|
||||||
|
## 0.2.4
|
||||||
|
|
||||||
|
fix: wrong golden eggs (https://github.com/fetus-hina/stat.ink/issues/1167)
|
||||||
|
|
||||||
## 0.2.3
|
## 0.2.3
|
||||||
|
|
||||||
feat: support big run
|
feat: support big run
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
|
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
|
||||||
|
|
||||||
export const AGENT_NAME = "s3si.ts";
|
export const AGENT_NAME = "s3si.ts";
|
||||||
export const S3SI_VERSION = "0.2.3";
|
export const S3SI_VERSION = "0.2.4";
|
||||||
export const NSOAPP_VERSION = "2.4.0";
|
export const NSOAPP_VERSION = "2.4.0";
|
||||||
export const WEB_VIEW_VERSION = "2.0.0-bd36a652";
|
export const WEB_VIEW_VERSION = "2.0.0-bd36a652";
|
||||||
export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts";
|
export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts";
|
||||||
|
|
|
||||||
|
|
@ -701,11 +701,14 @@ export class StatInkExporter implements GameExporter {
|
||||||
playedTime,
|
playedTime,
|
||||||
enemyResults,
|
enemyResults,
|
||||||
smellMeter,
|
smellMeter,
|
||||||
|
waveResults,
|
||||||
} = detail;
|
} = detail;
|
||||||
|
|
||||||
const startedAt = Math.floor(new Date(playedTime).getTime() / 1000);
|
const startedAt = Math.floor(new Date(playedTime).getTime() / 1000);
|
||||||
const golden_eggs = myResult.goldenDeliverCount +
|
const golden_eggs = waveResults.reduce(
|
||||||
memberResults.reduce((acc, i) => acc + i.goldenDeliverCount, 0);
|
(prev, i) => prev + i.teamDeliverCount,
|
||||||
|
0,
|
||||||
|
);
|
||||||
const power_eggs = myResult.deliverCount +
|
const power_eggs = myResult.deliverCount +
|
||||||
memberResults.reduce((p, i) => p + i.deliverCount, 0);
|
memberResults.reduce((p, i) => p + i.deliverCount, 0);
|
||||||
const bosses = Object.fromEntries(
|
const bosses = Object.fromEntries(
|
||||||
|
|
@ -723,9 +726,9 @@ export class StatInkExporter implements GameExporter {
|
||||||
const title_exp_after = detail.afterGradePoint;
|
const title_exp_after = detail.afterGradePoint;
|
||||||
|
|
||||||
let clear_waves: number;
|
let clear_waves: number;
|
||||||
if (detail.waveResults.length > 0) {
|
if (waveResults.length > 0) {
|
||||||
// when cleared, resultWave === 0, so we need to add 1.
|
// when cleared, resultWave === 0, so we need to add 1.
|
||||||
clear_waves = detail.waveResults.filter((i) => i.waveNumber < 4).length -
|
clear_waves = waveResults.filter((i) => i.waveNumber < 4).length -
|
||||||
1 + (resultWave === 0 ? 1 : 0);
|
1 + (resultWave === 0 ? 1 : 0);
|
||||||
} else {
|
} else {
|
||||||
clear_waves = 0;
|
clear_waves = 0;
|
||||||
|
|
@ -766,8 +769,8 @@ export class StatInkExporter implements GameExporter {
|
||||||
|
|
||||||
let fail_reason: StatInkCoopPostBody["fail_reason"] = null;
|
let fail_reason: StatInkCoopPostBody["fail_reason"] = null;
|
||||||
// failed
|
// failed
|
||||||
if (clear_waves !== 3 && detail.waveResults.length > 0) {
|
if (clear_waves !== 3 && waveResults.length > 0) {
|
||||||
const lastWave = detail.waveResults[detail.waveResults.length - 1];
|
const lastWave = waveResults[waveResults.length - 1];
|
||||||
if (lastWave.teamDeliverCount >= lastWave.deliverNorm) {
|
if (lastWave.teamDeliverCount >= lastWave.deliverNorm) {
|
||||||
fail_reason = "wipe_out";
|
fail_reason = "wipe_out";
|
||||||
}
|
}
|
||||||
|
|
@ -797,7 +800,7 @@ export class StatInkExporter implements GameExporter {
|
||||||
job_score: detail.jobScore,
|
job_score: detail.jobScore,
|
||||||
job_rate: detail.jobRate,
|
job_rate: detail.jobRate,
|
||||||
job_bonus: detail.jobBonus,
|
job_bonus: detail.jobBonus,
|
||||||
waves: await Promise.all(detail.waveResults.map((w) => this.mapWave(w))),
|
waves: await Promise.all(waveResults.map((w) => this.mapWave(w))),
|
||||||
players: await Promise.all([
|
players: await Promise.all([
|
||||||
this.mapCoopPlayer(true, myResult),
|
this.mapCoopPlayer(true, myResult),
|
||||||
...memberResults.map((p) => this.mapCoopPlayer(false, p)),
|
...memberResults.map((p) => this.mapCoopPlayer(false, p)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue