From 1b80e5022be316fe7e1bc15fc52edfeebe398bbb Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Mon, 25 May 2020 19:02:13 +0300 Subject: [PATCH] works on mobile --- .../src/components/analyzer/BuildAnalyzerPage.tsx | 6 +++++- frontend-react/src/components/analyzer/BuildStats.tsx | 2 +- frontend-react/src/hooks/useAbilityEffects.ts | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx index 78b69b684..3b67cf29f 100644 --- a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx +++ b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx @@ -69,7 +69,11 @@ const BuildAnalyzerPage: React.FC = () => { otherFocused={otherFocused} /> )} - {showSettings && ( diff --git a/frontend-react/src/components/analyzer/BuildStats.tsx b/frontend-react/src/components/analyzer/BuildStats.tsx index 169adbcf5..997d0521f 100644 --- a/frontend-react/src/components/analyzer/BuildStats.tsx +++ b/frontend-react/src/components/analyzer/BuildStats.tsx @@ -89,7 +89,7 @@ const BuildStats: React.FC = ({ <> - + toggleChart()} /> diff --git a/frontend-react/src/hooks/useAbilityEffects.ts b/frontend-react/src/hooks/useAbilityEffects.ts index c9716b602..284dbd2c4 100644 --- a/frontend-react/src/hooks/useAbilityEffects.ts +++ b/frontend-react/src/hooks/useAbilityEffects.ts @@ -30,11 +30,14 @@ function buildToAP(build: Partial) { }) } + let subWorth = 3 + if (build.clothing) { build.clothing.forEach((ability, index) => { if (ability !== "UNKNOWN") { + if (ability === "AD") subWorth *= 2 const existing = AP[ability] ?? 0 - const toAdd = index === 0 ? 10 : 3 + const toAdd = index === 0 ? 10 : subWorth AP[ability] = existing + toAdd } }) @@ -769,7 +772,6 @@ export default function useAbilityEffects(build: Partial) { const effectHit = getEffect(highMidLowHit, amount) const effectAtZeroHit = getEffect(highMidLowHit, 0) - console.log("effectHit", effectHit) toReturn.push({ title: `Baller 55dmg explosion hitbox size`,