mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-09 12:46:10 -05:00
Support for blob 4 shots in analyzer
+ fixed L-3 showing curling damage in multiples. + fixed "1 hit" typoed to "1 hits" Closes #1065
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { DamageType } from "./types";
|
||||
import type objectDamages from "./object-dmg.json";
|
||||
import type { MainWeaponId } from "../in-game-lists";
|
||||
|
||||
export const MAX_LDE_INTENSITY = 21;
|
||||
export const MAX_AP = 57;
|
||||
@@ -158,3 +159,12 @@ export const objectDamageJsonKeyPriority: Record<
|
||||
UltraStamp_Throw_BombCore: null,
|
||||
UltraStamp_Throw: null,
|
||||
};
|
||||
|
||||
export const multiShot: Partial<Record<MainWeaponId, number>> = {
|
||||
// L-3
|
||||
300: 3,
|
||||
// H-3
|
||||
310: 3,
|
||||
// Bloblobber
|
||||
3030: 4,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
StatFunctionInput,
|
||||
SubWeaponParams,
|
||||
} from "./types";
|
||||
import { DAMAGE_TYPE } from "./constants";
|
||||
import { DAMAGE_TYPE, multiShot } from "./constants";
|
||||
import { INK_CONSUME_TYPES } from "./types";
|
||||
import invariant from "tiny-invariant";
|
||||
import {
|
||||
@@ -71,7 +71,7 @@ export function buildStats({
|
||||
? framesToSeconds(mainWeaponParams.KeepChargeFullFrame)
|
||||
: undefined,
|
||||
speedType: mainWeaponParams.WeaponSpeedType ?? "Normal",
|
||||
isTripleShooter: Boolean(mainWeaponParams.TripleShotSpanFrame),
|
||||
multiShots: multiShot[weaponSplId],
|
||||
},
|
||||
stats: {
|
||||
specialPoint: specialPoint(input),
|
||||
@@ -385,7 +385,7 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] {
|
||||
shotsToSplat: shotsToSplat({
|
||||
value,
|
||||
type,
|
||||
isTripleShooter: Boolean(args.mainWeaponParams.TripleShotSpanFrame),
|
||||
multiShots: multiShot[args.weaponSplId],
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -396,15 +396,17 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] {
|
||||
function shotsToSplat({
|
||||
value,
|
||||
type,
|
||||
isTripleShooter,
|
||||
multiShots,
|
||||
}: {
|
||||
value: number;
|
||||
type: DamageType;
|
||||
isTripleShooter: boolean;
|
||||
multiShots?: number;
|
||||
}) {
|
||||
if (type !== "NORMAL_MAX" && type !== "NORMAL_MAX_FULL_CHARGE") return;
|
||||
if (!["NORMAL_MAX", "NORMAL_MAX_FULL_CHARGE", "DIRECT"].includes(type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const multiplier = isTripleShooter ? 3 : 1;
|
||||
const multiplier = multiShots ? multiShots : 1;
|
||||
|
||||
return Math.ceil(1000 / (value * multiplier));
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export interface AnalyzedBuild {
|
||||
maxChargeHoldSeconds?: number;
|
||||
fullChargeSeconds?: number;
|
||||
speedType: NonNullable<MainWeaponParams["WeaponSpeedType"]> | "Normal";
|
||||
isTripleShooter: boolean;
|
||||
multiShots?: number;
|
||||
};
|
||||
stats: {
|
||||
specialPoint: Stat;
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Toggle } from "~/components/Toggle";
|
||||
import { useSetTitle } from "~/hooks/useSetTitle";
|
||||
import type { AnalyzedBuild, Stat } from "~/modules/analyzer";
|
||||
import { MAX_LDE_INTENSITY, useAnalyzeBuild } from "~/modules/analyzer";
|
||||
import { damageTypeToWeaponType } from "~/modules/analyzer/constants";
|
||||
import {
|
||||
lastDitchEffortIntensityToAp,
|
||||
SPECIAL_EFFECTS,
|
||||
@@ -478,7 +479,7 @@ export default function BuildAnalyzerPage() {
|
||||
>
|
||||
<DamageTable
|
||||
values={analyzed.stats.damages}
|
||||
isTripleShooter={analyzed.weapon.isTripleShooter}
|
||||
multiShots={analyzed.weapon.multiShots}
|
||||
subWeaponId={analyzed.weapon.subWeaponSplId}
|
||||
/>
|
||||
</StatCategory>
|
||||
@@ -831,11 +832,11 @@ function ModifiedByAbilities({ abilities }: { abilities: Stat["modifiedBy"] }) {
|
||||
|
||||
function DamageTable({
|
||||
values,
|
||||
isTripleShooter,
|
||||
multiShots,
|
||||
subWeaponId,
|
||||
}: {
|
||||
values: AnalyzedBuild["stats"]["damages"];
|
||||
isTripleShooter: AnalyzedBuild["weapon"]["isTripleShooter"];
|
||||
multiShots: AnalyzedBuild["weapon"]["multiShots"];
|
||||
subWeaponId: SubWeaponId;
|
||||
}) {
|
||||
const { t } = useTranslation(["weapons", "analyzer"]);
|
||||
@@ -856,9 +857,10 @@ function DamageTable({
|
||||
</thead>
|
||||
<tbody>
|
||||
{values.map((val) => {
|
||||
const damage = isTripleShooter
|
||||
? `${val.value}+${val.value}+${val.value}`
|
||||
: val.value;
|
||||
const damage =
|
||||
multiShots && damageTypeToWeaponType[val.type] === "MAIN"
|
||||
? new Array(multiShots).fill(val.value).join(" + ")
|
||||
: val.value;
|
||||
|
||||
const typeRowName = damageTypeTranslationString({
|
||||
damageType: val.type,
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Skade",
|
||||
"damage.header.distance": "Distance",
|
||||
"damage.toSplat": "Våbnet skal bruge {{count}} træffere for at udskadliggøre en fjende.",
|
||||
"damage.toSplat_other": "Våbnet skal bruge {{count}} træffere for at udskadliggøre en fjende.",
|
||||
"damage.NORMAL_MIN": "Minimum",
|
||||
"damage.NORMAL_MAX": "Maksimum",
|
||||
"damage.NORMAL_MAX_FULL_CHARGE": "Maksimum (ved Fuld opladning)",
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"damage.header.type": "Typ",
|
||||
"damage.header.damage": "Schaden",
|
||||
"damage.header.distance": "Reichweite",
|
||||
"damage.toSplat": "{{count}} Treffer bis erledigt",
|
||||
"damage.toSplat_other": "{{count}} Treffer bis erledigt",
|
||||
"damage.NORMAL_MIN": "Minimum",
|
||||
"damage.NORMAL_MAX": "Maximum",
|
||||
"damage.DIRECT": "Direkt",
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Damage",
|
||||
"damage.header.distance": "Distance",
|
||||
"damage.toSplat": "{{count}} hits to splat",
|
||||
"damage.toSplat_one": "{{count}} hit to splat",
|
||||
"damage.toSplat_other": "{{count}} hits to splat",
|
||||
"damage.NORMAL_MIN": "Minimum",
|
||||
"damage.NORMAL_MAX": "Maximum",
|
||||
"damage.NORMAL_MAX_FULL_CHARGE": "Maximum (Fully charged)",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
"damage.header.type": "Tipo",
|
||||
"damage.header.damage": "Daño",
|
||||
"damage.header.distance": "Distancia",
|
||||
"damage.toSplat": "{{count}} golpes para reventar",
|
||||
"damage.toSplat_other": "{{count}} golpes para reventar",
|
||||
"damage.NORMAL_MIN": "Mínimo",
|
||||
"damage.NORMAL_MAX": "Máximo",
|
||||
"damage.DIRECT": "Directo",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Dégâts",
|
||||
"damage.header.distance": "Distance",
|
||||
"damage.toSplat": "{{count}} coups pour liquider",
|
||||
"damage.toSplat_other": "{{count}} coups pour liquider",
|
||||
"damage.NORMAL_MIN": "Minimum",
|
||||
"damage.NORMAL_MAX": "Maximum",
|
||||
"damage.DIRECT": "Direct",
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
"damage.header.type": "タイプ",
|
||||
"damage.header.damage": "ダメージ",
|
||||
"damage.header.distance": "距離",
|
||||
"damage.toSplat": "{{count}} 確定数",
|
||||
"damage.toSplat_other": "{{count}} 確定数",
|
||||
"damage.NORMAL_MIN": "最小",
|
||||
"damage.NORMAL_MAX": "最大",
|
||||
"damage.NORMAL_MAX_FULL_CHARGE": "最大 (フルチャージ)",
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"damage.header.type": "Type",
|
||||
"damage.header.damage": "Schade",
|
||||
"damage.header.distance": "Afstand",
|
||||
"damage.toSplat": "{{count}} treffers nodig om vijand uit te schakelen",
|
||||
"damage.toSplat_other": "{{count}} treffers nodig om vijand uit te schakelen",
|
||||
"damage.NORMAL_MIN": "Minimum",
|
||||
"damage.NORMAL_MAX": "Maximum",
|
||||
"damage.DIRECT": "Direct",
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"damage.header.type": "Тип",
|
||||
"damage.header.damage": "Урон",
|
||||
"damage.header.distance": "Дальнобойность",
|
||||
"damage.toSplat": "{{count}} выстрел(ов) для плюха",
|
||||
"damage.toSplat_other": "{{count}} выстрел(ов) для плюха",
|
||||
"damage.NORMAL_MIN": "Минимум",
|
||||
"damage.NORMAL_MAX": "Максимум",
|
||||
"damage.DIRECT": "Прямое попадание",
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"damage.header.type": "类型",
|
||||
"damage.header.damage": "伤害",
|
||||
"damage.header.distance": "距离",
|
||||
"damage.toSplat": "{{count}} 确",
|
||||
"damage.toSplat_other": "{{count}} 确",
|
||||
"damage.NORMAL_MIN": "最小值",
|
||||
"damage.NORMAL_MAX": "最大值",
|
||||
"damage.DIRECT": "直击",
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**108/111**
|
||||
**108/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
|
||||
- damage.toSplat_one
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
- torpedoExplanation
|
||||
@@ -57,7 +58,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**95/111**
|
||||
**95/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -65,6 +66,7 @@
|
||||
- objCalcAd
|
||||
- stat.specialLostSplattedByRP
|
||||
- stat.quickRespawnTimeSplattedByRP
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
@@ -138,7 +140,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**92/111**
|
||||
**92/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -149,6 +151,7 @@
|
||||
- stat.shootingRunSpeed
|
||||
- stat.shootingRunSpeedCharging
|
||||
- stat.shootingRunSpeedFullCharge
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
@@ -296,7 +299,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**92/111**
|
||||
**92/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -307,6 +310,7 @@
|
||||
- stat.shootingRunSpeed
|
||||
- stat.shootingRunSpeedCharging
|
||||
- stat.shootingRunSpeedFullCharge
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
@@ -466,7 +470,7 @@
|
||||
|
||||
### 🔴 analyzer.json
|
||||
|
||||
**0/111**
|
||||
**0/112**
|
||||
|
||||
### 🔴 badges.json
|
||||
|
||||
@@ -526,11 +530,12 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**108/111**
|
||||
**108/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
|
||||
- damage.toSplat_one
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
- torpedoExplanation
|
||||
@@ -579,7 +584,7 @@
|
||||
|
||||
### 🔴 analyzer.json
|
||||
|
||||
**0/111**
|
||||
**0/112**
|
||||
|
||||
### 🟢 badges.json
|
||||
|
||||
@@ -734,7 +739,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**95/111**
|
||||
**95/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -742,6 +747,7 @@
|
||||
- objCalcAd
|
||||
- stat.specialLostSplattedByRP
|
||||
- stat.quickRespawnTimeSplattedByRP
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
@@ -855,7 +861,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**102/111**
|
||||
**102/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -863,6 +869,7 @@
|
||||
- objCalcAd
|
||||
- stat.specialLostSplattedByRP
|
||||
- stat.quickRespawnTimeSplattedByRP
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
@@ -952,7 +959,7 @@
|
||||
|
||||
### 🟡 analyzer.json
|
||||
|
||||
**95/111**
|
||||
**95/112**
|
||||
|
||||
<details>
|
||||
<summary>Missing</summary>
|
||||
@@ -960,6 +967,7 @@
|
||||
- objCalcAd
|
||||
- stat.specialLostSplattedByRP
|
||||
- stat.quickRespawnTimeSplattedByRP
|
||||
- damage.toSplat_one
|
||||
- damage.NORMAL_MAX_FULL_CHARGE
|
||||
- damage.DIRECT_MIN
|
||||
- damage.DIRECT_MAX
|
||||
|
||||
Reference in New Issue
Block a user