Skip to content

Commit b98d7d6

Browse files
committed
fix: villager exp + icons
1 parent 6b10d9c commit b98d7d6

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

components/account/Worlds/World5/Hole/Study.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ const Study = ({ hole }) => {
1414
const [, , , , study] = hole?.villagers || [];
1515
return <>
1616
<Stack mb={1} direction={'row'} gap={{ xs: 1, md: 3 }} flexWrap={'wrap'}>
17-
<CardTitleAndValue title={'Study rate'} value={`${hole?.studies?.studyPerHour} / hr` || '0'} icon={'etc/Study_Rate.png'}
17+
<CardTitleAndValue title={'Study rate'} value={`${commaNotation(hole?.studies?.studyPerHour)} / hr` || '0'} icon={'etc/Study_Rate.png'}
1818
imgStyle={{ width: 22, height: 22 }}/>
1919
<CardTitleAndValue title={'Level'} value={study?.level}/>
20+
<CardTitleAndValue title={'Exp'} value={`${study?.exp} / ${study?.expReq}`}/>
2021
<ExpRateCard title={'Exp rate'} expRate={study?.expRate} />
21-
<CardTitleAndValue title={'Exp rate'} value={`${commaNotation(study?.expRate?.value)} / hr`}/>
2222
<CardTitleAndValue title={'Time to level'}
2323
value={study?.timeLeft >= 0 && study?.expRate?.value > 0 ? msToDate(study?.timeLeft) : '0'}/>
2424
<CardTitleAndValue title={'Opals invested'} value={study?.opalInvested || '0'} icon={'data/Opal.png'}

parsers/world-5/hole.js

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ const getVillagerExpPerHour = (holesObject, accountData, t, leastOpalInvestedVil
402402
const eventBonus = getEventShopBonus(accountData, 6);
403403
const grimoireBonus = getGrimoireBonus(accountData?.grimoire?.upgrades, 29);
404404
const arcadeBonus = (getArcadeBonus(accountData?.arcade?.shop, 'Villager_XP_multi')?.bonus ?? 0);
405-
const companionBonus = isCompanionBonusActive(accountData, 13) ? 3 : 0;
405+
const companionBonus = isCompanionBonusActive(accountData, 13) ? 1 : 0;
406406
const statueBonus = getStatueBonus(accountData?.statues, 'StatueG29');
407407
const jarBonuses = getJarBonus({ holesObject, i: 4 })
408408
+ (getJarBonus({ holesObject, i: 9 })
@@ -438,7 +438,7 @@ const getVillagerExpPerHour = (holesObject, accountData, t, leastOpalInvestedVil
438438
const breakdown = [
439439
{ name: 'Opal Dividends', value: getBucketBonus({ ...holesObject, t: 0, i: 25 }) },
440440
{ name: 'Schematics', value: getCosSchematic(holesObject) },
441-
{ name: 'Companion', value: companionBonus },
441+
{ name: 'Companion', value: companionBonus ? 3 : 0 },
442442
{ name: 'Statue', value: statueBonus },
443443
{ name: 'Jar', value: jarBonuses },
444444
{ name: 'Event shop', value: 25 * eventBonus },
@@ -452,13 +452,17 @@ const getVillagerExpPerHour = (holesObject, accountData, t, leastOpalInvestedVil
452452
getCosmoBonus({ majik: holesObject?.villageMajiks, t: 1, i: 1 }) +
453453
getCosmoBonus({ majik: holesObject?.villageMajiks, t: 1, i: 2 })
454454
},
455-
{ name: 'Monument', value: getMonumentBonus({ holesObject, t: 0, i: 3 }) +
456-
getMonumentBonus({ holesObject, t: 1, i: 3 }) },
457-
{ name: 'Measurements', value: getMeasurementBonus({ holesObject, accountData, t: 7 }) +
458-
getMeasurementBonus({ holesObject, accountData, t: 0 }) },
455+
{
456+
name: 'Monument', value: getMonumentBonus({ holesObject, t: 0, i: 3 }) +
457+
getMonumentBonus({ holesObject, t: 1, i: 3 })
458+
},
459+
{
460+
name: 'Measurements', value: getMeasurementBonus({ holesObject, accountData, t: 7 }) +
461+
getMeasurementBonus({ holesObject, accountData, t: 0 })
462+
},
459463
{ name: 'Cards', value: cardBonus },
460464
{ name: 'Bell', value: getBellBonus({ holesObject, t: 1 }) },
461-
{ name: 'Summoning', value: getWinnerBonus(accountData, '+{% Villager EXP') },
465+
{ name: 'Summoning', value: getWinnerBonus(accountData, '+{% Villager EXP') }
462466
];
463467
breakdown.sort((a, b) => a?.name.localeCompare(b?.name, 'en'))
464468
return {
@@ -468,20 +472,20 @@ const getVillagerExpPerHour = (holesObject, accountData, t, leastOpalInvestedVil
468472
}
469473

470474
const getVillagerExpReq = (level, index) => {
471-
return 1 === level && 0 === index ? 5 : 0 === index
472-
? 10 * ((10 + 7 * Math.pow(level, 2.1)) * Math.pow(2.1, level)
473-
* (1 + 0.75 * Math.max(0, level - 4))
474-
* Math.pow(3.4, Math.min(1, Math.max(0, Math.floor(1e5 / 100247.3)))
475-
* Math.max(0, level - 12)) - 1.5)
476-
: 1 === index
477-
? 30 * (10 + 6 * Math.pow(level, 1.8)) * Math.pow(1.57, level)
478-
: 2 === index
479-
? 50 * (10 + 5 * Math.pow(level, 1.7)) * Math.pow(1.4, level)
480-
: 3 === index
481-
? 120 * (30 + 10 * Math.pow(level, 2)) * Math.pow(2, level)
482-
: 4 === index
483-
? 500 * (10 + 5 * Math.pow(level, 1.3)) * Math.pow(1.13, level)
484-
: 10 * Math.pow(10, 20);
475+
return 1 === level && 0 === index ? 5 : 0 === index ? 10 * (-1.5 + (10 + 7 * Math.pow(level, 2.1))
476+
* Math.pow(2.1, level)
477+
* (1 + .75 * Math.max(0, level - 4))
478+
* Math.pow(3.4, Math.min(1, Math.max(0, Math.floor((1E5 + 248.3) / 100247.3)))
479+
* Math.max(0, level - 12))) :
480+
1 === index ? 30 * (10 + 6 * Math.pow(level, 1.8))
481+
* Math.pow(1.57, level) : 2 === index ? 50
482+
* (10 + 5 * Math.pow(level, 1.7))
483+
* Math.pow(1.4, level) : 3 === index ? 120
484+
* (30 + 10 * Math.pow(level, 2))
485+
* Math.pow(2, level) : 4 === index ? 500
486+
* (10 + 5 * Math.pow(level, 1.3))
487+
* Math.pow(1.13, level) : 10 * Math.pow(10, 20);
488+
485489
}
486490
const getStudyReq = (holesObject, t) => {
487491
return 4e3 *

0 commit comments

Comments
 (0)