Skip to content

Commit

Permalink
fix: more battles, bubbles, upgradeVault desc
Browse files Browse the repository at this point in the history
  • Loading branch information
Morta1 committed Mar 1, 2025
1 parent 7396507 commit 18a0989
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/account/Worlds/World6/summoning/Battles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const COLOR_MAP = {

const Battles = ({ battles, armyHealth, armyDamage, highestEndlessLevel }) => {
const [hide, setHide] = useState(true);
battles[9] = getEndlessBattles(100, highestEndlessLevel);
battles[9] = getEndlessBattles(200, highestEndlessLevel);
return <>
<Stack direction={'row'} gap={2}>
<CardTitleAndValue value={armyDamage < 1e7 ? commaNotation(armyDamage) : notateNumber(armyDamage)}
Expand Down
2 changes: 1 addition & 1 deletion data/website-data.js

Large diffs are not rendered by default.

34 changes: 28 additions & 6 deletions pages/account/world-2/bubbles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ const Bubbles = () => {
const [classDiscount, setClassDiscount] = useState(false);
const [bargainTag, setBargainTag] = useState('0');
const [effThreshold, setEffThreshold] = useState(75);
const [levelThreshold, setLevelThreshold] = useState(100);
const [showMissingLevels, setShowMissingLevels] = useState(true);
const [hidePastThreshold, setHidePastThreshold] = useState(false);
const [hidePastLevelThreshold, setHidePastLevelThreshold] = useState(false);
const [bubblesGoals, setBubblesGoals] = useState();
const myFirstChemSet = useMemo(() => state?.account?.lab?.labBonuses?.find(bonus => bonus.name === 'My_1st_Chemistry_Set')?.active, [state?.account?.lab.vials]);

Expand All @@ -50,6 +52,10 @@ const Bubbles = () => {
if (fromStorage) {
setEffThreshold(parseInt(fromStorage));
}
const levelFromStorage = localStorage.getItem('levelThreshold');
if (fromStorage) {
setLevelThreshold(parseInt(levelFromStorage));
}
}, []);

const calcBubbleMatCost = (bubbleIndex, vialMultiplier = 1, bubbleLvl, baseCost, isLiquid, cauldronCostLvl,
Expand Down Expand Up @@ -175,13 +181,33 @@ const Bubbles = () => {
label={''}
value={effThreshold}
type={'number'}
inputProps={{ min: 0, max: 100 }}
slotProps={{
htmlInput: { min: 0, max: 100 }
}}
onChange={({ target }) => {
localStorage.setItem('effThreshold', target.value);
setEffThreshold(target.value)
}}
/>
</CardTitleAndValue>
<CardTitleAndValue cardSx={{ height: 'fit-content' }} title={'Level Threshold'} stackProps={{ gap: .5 }}>
<FormControlLabel
control={<Checkbox sx={{ my: 0 }} size={'small'} checked={hidePastLevelThreshold}
onChange={() => setHidePastLevelThreshold(!hidePastLevelThreshold)}/>}
label="Hide past threshold"/>
<TextField sx={{ width: 150 }}
label={''}
value={levelThreshold}
type={'number'}
slotProps={{
htmlInput: { min: 0, max: 100 }
}}
onChange={({ target }) => {
localStorage.setItem('levelThreshold', target.value);
setLevelThreshold(target.value);
}}
/>
</CardTitleAndValue>
<CardTitleAndValue cardSx={{ height: 'fit-content' }} title={'Misc'} stackProps={{ gap: 1 }}>
<Link underline={'hover'}
sx={{ cursor: 'pointer' }}
Expand Down Expand Up @@ -223,7 +249,7 @@ const Bubbles = () => {
effectHardCapPercent: thresholdLevelNeeded / (thresholdLevelNeeded + x2) * 100
}
}
if ((!bubbleMaxBonus || thresholdObj?.thresholdMissingLevels <= 0) && hidePastThreshold) return null;
if ((!bubbleMaxBonus || thresholdObj?.thresholdMissingLevels <= 0) && hidePastThreshold || (hidePastLevelThreshold && level > levelThreshold)) return null;
return <Stack key={rawName + '' + bubbleName + '' + index} direction={'row'} alignItems={'center'}
justifyContent={'space-around'} gap={2}>
<Stack alignItems={'center'}>
Expand Down Expand Up @@ -482,8 +508,4 @@ const FutureBubblesTooltip = () => {
</Stack>
}

const Wrapper = ({ condenseView, children, ...rest }) => {
return condenseView ? <Grid {...rest}>{children}</Grid> : <Stack {...rest}>{children}</Stack>
}

export default Bubbles;

0 comments on commit 18a0989

Please sign in to comment.