diff --git a/components/analyzer/EditableBuilds.tsx b/components/analyzer/EditableBuilds.tsx index e7dd057e1..a28a5fb80 100644 --- a/components/analyzer/EditableBuilds.tsx +++ b/components/analyzer/EditableBuilds.tsx @@ -68,6 +68,11 @@ const EditableBuilds: React.FC = ({ ? otherBuild.headAbilities[0] : "SSU"; + const shoesAbility = build.shoesAbilities ? build.shoesAbilities[0] : "SSU"; + const otherShoesAbility = otherBuild.shoesAbilities + ? otherBuild.shoesAbilities[0] + : "SSU"; + return ( <> @@ -120,6 +127,18 @@ const EditableBuilds: React.FC = ({ setValue={(value: number) => setLde(value)} /> )} + {shoesAbility === "DR" && ( + + setBonusAp({ + ...bonusAp, + [shoesAbility]: !bonusAp[shoesAbility], + }) + } + /> + )} {showOther && ( @@ -158,6 +177,18 @@ const EditableBuilds: React.FC = ({ setValue={(value: number) => setOtherLde(value)} /> )} + {otherShoesAbility === "DR" && ( + + setOtherBonusAp({ + ...otherBonusAp, + [otherShoesAbility]: !otherBonusAp[otherShoesAbility], + }) + } + /> + )} )} diff --git a/components/analyzer/HeadOnlyToggle.tsx b/components/analyzer/HeadOnlyToggle.tsx index cfda0b917..e449e1334 100644 --- a/components/analyzer/HeadOnlyToggle.tsx +++ b/components/analyzer/HeadOnlyToggle.tsx @@ -5,7 +5,7 @@ import { useMyTheme } from "hooks/common"; import React from "react"; interface HeadOnlyToggleProps { - ability: "OG" | "CB"; + ability: "OG" | "CB" | "DR"; active: boolean; setActive: () => void; } @@ -30,13 +30,14 @@ const HeadOnlyToggle: React.FC = ({ isChecked={active} onChange={() => setActive()} mr="0.5em" + mb={4} /> {active && ability === "OG" && ( - + +15{t`AP`}{" "} {["SSU", "RSU", "RES"].map((ability) => ( @@ -46,7 +47,7 @@ const HeadOnlyToggle: React.FC = ({ )} {active && ability === "CB" && ( - + +10{t`AP`}{" "} {["ISM", "ISS", "REC", "RSU", "SSU", "SCU"].map((ability) => ( @@ -55,6 +56,16 @@ const HeadOnlyToggle: React.FC = ({ ))} )} + {active && ability === "DR" && ( + + +10{t`AP`}{" "} + {["RSU", "SSU", "RES"].map((ability) => ( + + + + ))} + + )} ); }; diff --git a/hooks/useAbilityEffects/index.ts b/hooks/useAbilityEffects/index.ts index 586b6b41e..039a20a9f 100644 --- a/hooks/useAbilityEffects/index.ts +++ b/hooks/useAbilityEffects/index.ts @@ -104,6 +104,14 @@ function buildToAP( } }); + if (build.shoesAbilities[0] === "DR" && bonusAp["DR"]) { + for (const ability of ["RSU", "SSU", "RES"]) { + const a = ability as Ability; + const existing = AP[a] ?? 0; + AP[a] = existing + 10; + } + } + let subWorth = 3; build.clothingAbilities.forEach((ability, index) => { diff --git a/pages/analyzer.tsx b/pages/analyzer.tsx index 854c04533..2e94126ed 100644 --- a/pages/analyzer.tsx +++ b/pages/analyzer.tsx @@ -117,6 +117,8 @@ const BuildAnalyzerPage = () => { leftIcon={} onClick={() => setShowSettings(!showSettings)} my="1rem" + size="sm" + variant="outline" > {showSettings ? t`Hide settings` : t`Show settings`}