Skip to content

Commit

Permalink
feat: killroy upgrades + move to w2
Browse files Browse the repository at this point in the history
  • Loading branch information
Morta1 committed Sep 14, 2024
1 parent e68fc33 commit fc9aa74
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 74 deletions.
22 changes: 22 additions & 0 deletions components/account/Worlds/World2/Killroy/Monsters.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Card, CardContent, Stack, Typography } from '@mui/material';
import { notateNumber, prefix } from '@utility/helpers';
import React from 'react';

const Monsters = ({ killroy }) => {
return (
<Stack direction={'row'} flexWrap={'wrap'} gap={1}>
{killroy?.list?.map(({ rawName, world, killRoyKills, icon }, index) => {
return <Card key={rawName + index}>
<CardContent>
<Stack alignItems={'center'} gap={1}>
<img src={`${prefix}data/${icon}.png`} alt=""/>
<Typography>{notateNumber(killRoyKills ?? 0, 'Big')}</Typography>
</Stack>
</CardContent>
</Card>
})}
</Stack>
);
};

export default Monsters;
40 changes: 40 additions & 0 deletions components/account/Worlds/World2/Killroy/Schedule.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Card, CardContent, Stack, Typography } from '@mui/material';
import { format, isValid } from 'date-fns';
import React from 'react';
import { prefix } from '@utility/helpers';

const Schedule = ({ schedule }) => {
return (
<Stack direction={'row'} flexWrap={'wrap'} gap={1}>
{schedule?.map(({ classes, date, monsters }, classesIndex) => {
return <Card key={`schedule-${classesIndex}`} sx={{ width: 330 }}>
<CardContent>
<Typography sx={{ ml: 1, mb: 2 }}>{isValid(date)
? format(date, 'dd/MM/yyyy HH:mm:ss')
: null}</Typography>
<Stack direction={'row'} gap={1}>
{classes.map(({ className, classIndex }, classIdIndex) => {
const monsterFaceId = monsters?.[classIdIndex];
return <React.Fragment key={`schedule-${classesIndex}-classId-${classIdIndex}`}>
<Card variant={'outlined'}>
<CardContent>
<Stack alignItems={'center'}>
<Stack direction={'row'} alignItems={'center'}>
<img src={`${prefix}data/ClassIcons${classIndex}.png`} alt=""/>
<img src={`${prefix}data/Mface${monsterFaceId}.png`} alt=""/>
</Stack>
<Typography>{className}</Typography>
</Stack>
</CardContent>
</Card>
</React.Fragment>
})}
</Stack>
</CardContent>
</Card>
})}
</Stack>
);
};

export default Schedule;
27 changes: 27 additions & 0 deletions components/account/Worlds/World2/Killroy/Upgrades.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Card, CardContent, Divider, Stack, Typography } from '@mui/material';
import React from 'react';
import { prefix } from '@utility/helpers';

const Upgrades = ({ killroy }) => {
return (
<Stack direction={'row'} alignItems={'center'} flexWrap={'wrap'} gap={1}>
{killroy?.upgrades?.map(({ level, description, upgrade }, index) => <Card key={`upgrade-${index}`}
sx={{ height: 200, width: 350 }}>
<CardContent>
<Stack direction={'row'} gap={2}>
<img style={{ objectFit: 'contain' }} src={`${prefix}etc/Killroy_${index}.png`} alt=""/>
<Stack>
<Typography>Lv. {level}</Typography>
<Divider sx={{ my: 1 }}/>
<Typography>{upgrade}</Typography>
<Typography>{description}</Typography>
</Stack>
</Stack>
</CardContent>
</Card>)}
</Stack>
);
};

export default Upgrades;

2 changes: 1 addition & 1 deletion components/common/NavBar/AppDrawer/AccountDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const worldsData = {
{ label: 'sigils', icon: 'data/LabBonus12' },
{ label: 'arcadeShop', icon: 'data/PachiBall1' },
{ label: 'islands', icon: 'data/Island1' },
{ label: 'killroy', icon: 'etc/Killroy_Skull' },
{ label: 'weeklyBosses', icon: 'etc/SWR_Containment' },
{ label: 'kangaroo', icon: 'data/RooA' },
{ label: 'voteBallot', icon: 'etc/VoteBallot' }
Expand Down Expand Up @@ -85,7 +86,6 @@ const worldsData = {
{ label: 'breeding', icon: 'data/ClassIcons52' },
{ label: 'laboratory', icon: 'data/ClassIcons53' },
{ label: 'rift', icon: 'data/Mface75' },
{ label: 'killroyPrime', icon: 'etc/KillroyPrime' },
{ label: 'tome', icon: 'etc/Tome_0' }
]
},
Expand Down
9 changes: 8 additions & 1 deletion data/patch-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import React from 'react';

/* eslint-disable react/jsx-key */
export const patchNotes = [
{
ver: '3.2.78',
gameVer: '2.0.13',
date: '14/09/2024',
features: ['Added killroy\'s upgrades and moved killroy page to world 2'],
fixes: []
},
{
ver: '3.2.77',
gameVer: '2.0.13',
Expand All @@ -11,7 +18,7 @@ export const patchNotes = [
'Added green stacks leaderboard under General',
'Added some more description to the login dialog to hopefully prevent repeated questions',
'Fixed a bug where meals appeared on a different order.',
'Fixed calculations for bean trade in farming page',
'Fixed calculations for bean trade in farming page'
],
fixes: []
},
Expand Down
35 changes: 35 additions & 0 deletions pages/account/world-2/killroy.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { NextSeo } from 'next-seo';
import React, { useContext } from 'react';
import { AppContext } from '@components/common/context/AppProvider';
import { Stack } from '@mui/material';
import { CardTitleAndValue } from '@components/common/styles';
import { notateNumber } from '@utility/helpers';
import { getKillroySchedule } from '@parsers/misc';
import Tabber from '@components/common/Tabber';
import Monsters from '@components/account/Worlds/World2/Killroy/Monsters';
import Schedule from '@components/account/Worlds/World2/Killroy/Schedule';
import Upgrades from '@components/account/Worlds/World2/Killroy/Upgrades';

const MyComponent = () => {
const { state } = useContext(AppContext);
const { killroy } = state?.account || { deathNote: {} };
const schedule = getKillroySchedule(state?.account, state?.characters, state?.account?.serverVars);
return <>
<NextSeo
title="Killroy | Idleon Toolbox"
description="Keep track of kill roy kills progression"
/>
<Stack direction={'row'} flexWrap={'wrap'} gap={1}>
<CardTitleAndValue title={'Skulls'} value={notateNumber(killroy?.skulls)} icon={'etc/Killroy_Skull.png'}/>
<CardTitleAndValue title={'Total Kills'} value={notateNumber(killroy.totalKills)} />
<CardTitleAndValue title={'Total Damage Multi'} value={`${killroy.totalDamageMulti}x`}/>
</Stack>
<Tabber tabs={['Schedule', 'Upgrades', 'Monsters']}>
<Schedule schedule={schedule}/>
<Upgrades killroy={killroy}/>
<Monsters killroy={killroy}/>
</Tabber>
</>
};

export default MyComponent;
71 changes: 0 additions & 71 deletions pages/account/world-4/killroy-prime.jsx

This file was deleted.

36 changes: 35 additions & 1 deletion parsers/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,44 @@ export const getMiniBossesData = (account) => {
}

export const getKillRoy = (idleonData, charactersData, accountData, serverVars) => {
const skulls = accountData?.accountOptions?.[105];
const killRoyKills = tryToParse(idleonData?.KRbest);
const totalKills = Object.values(killRoyKills || {}).reduce((sum, num) => sum + num, 0);
const totalDamageMulti = 1 + Math.floor(Math.pow(totalKills, 0.4)) / 100;
const unlockedThirdKillRoy = accountData?.accountOptions?.[227] === 1;
const rooms = unlockedThirdKillRoy ? 3 : 2;
const killRoyClasses = getKillRoyClasses(rooms, accountData, serverVars);
const upgrades = [
{
level: accountData?.accountOptions?.[106],
description: 'Increases your maximum time in room. Base time is 100 seconds.',
upgrade: '+1 Second Timer'
},
{
level: accountData?.accountOptions?.[107],
description: 'Increases chance for Talent Point drop, depends on how many Talent Point drops already got',
upgrade: '+ Talent Drops'
},
{
level: accountData?.accountOptions?.[108],
description: 'Increases chance of dropping skulls by mobs',
upgrade: '+1% Bonus Skulls'
},
{
level: accountData?.accountOptions?.[109],
description: 'Faster Respawn',
},
{
level: accountData?.accountOptions?.[110],
description: 'Mobs can drop Dungeon Credits now',
upgrade: 'Dungeon Drops'
},
{
level: accountData?.accountOptions?.[111],
description: 'Mobs can drop Pearls now',
upgrade: 'Pearl Drops'
}
];
return {
list: deathNote.map((monster) => {
const monsterWithIcon = { ...monster, icon: `Mface${monsters?.[monster.rawName].MonsterFace}` };
Expand All @@ -913,7 +945,9 @@ export const getKillRoy = (idleonData, charactersData, accountData, serverVars)
totalKills,
totalDamageMulti,
rooms,
killRoyClasses
killRoyClasses,
upgrades,
skulls
};
}

Expand Down
Binary file added public/etc/Killroy_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/etc/Killroy_Skull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fc9aa74

Please sign in to comment.