Better easter egg handling

This commit is contained in:
Juno 2026-03-04 21:43:09 -05:00
parent 436db6afbb
commit 83f504c7a7

View file

@ -90,11 +90,15 @@ const Main: Component = () => {
return ret;
});
const isX = (types: girlTypes[]) => {
if (selectedTypes().length !== types.length) return false;
var included = true;
types.forEach((t) => (included = included && selectedTypes().includes(t)));
return included;
};
const isHolly = createMemo(() => {
if (selectedTypes().length !== 5) {
return false;
}
const types = [
girlTypes.Robot,
girlTypes.Gamer,
@ -102,27 +106,16 @@ const Main: Component = () => {
girlTypes.Nerd,
girlTypes.Deer,
];
var included = true;
types.forEach((t) => (included = included && selectedTypes().includes(t)));
console.log(types, selectedTypes());
return included;
return isX(types);
});
const isAbyss = createMemo(() => {
if (selectedTypes().length !== 2) {
return false;
}
const types = [girlTypes.Knight, girlTypes.Sister];
var included = true;
types.forEach((t) => (included = included && selectedTypes().includes(t)));
console.log(types, selectedTypes());
return included;
return isX(types);
});
const isJuno = createMemo(() => {
if (selectedTypes().length !== 7) {
return false;
}
const types = [
girlTypes.Princess,
girlTypes.Fox,
@ -132,17 +125,25 @@ const Main: Component = () => {
girlTypes.Rat,
girlTypes.Dragon,
];
var included = true;
types.forEach((t) => (included = included && selectedTypes().includes(t)));
console.log(types, selectedTypes());
return included;
return isX(types);
});
const isDrgn = createMemo(() => {
const types = [
girlTypes.Dragon,
girlTypes.Gamer,
girlTypes.Plushy,
girlTypes.Nerd,
girlTypes.PoolToy,
];
return isX(types);
});
return (
<div class="bg-emerald-950 text-white font-[Grixel] h-screen overflow-hidden flex flex-col justify-between">
<div class="flex bg-emerald-950 text-white font-[Grixel] overflow-y-auto ">
<div class="flex-1 m-2 my-1 overflow-y-auto">
<h2 class="m-2">Choose defending Pokémon types</h2>
<h2 class="m-2">Choose defending Girl types</h2>
<div class="flex flex-wrap">
{allTypes.map((t) => (
<button
@ -177,6 +178,7 @@ const Main: Component = () => {
</div>
{isJuno() && <h5>eyes emoji</h5>}
{isHolly() && <h5>hi :3</h5>}
{isDrgn() && <h5>drgn!!!</h5>}
{isAbyss() && <h5>hi {"<3"}</h5>}
{selectedTypes().length > 0 && (
<button