diff --git a/html/common.tsx b/html/common.tsx index 8f3cea8..432d35c 100644 --- a/html/common.tsx +++ b/html/common.tsx @@ -47,9 +47,32 @@ export const eggbug_emotions = { alt="eggbug, smiling" /> ), + frowning: ( + eggbug, frowning + ), + revengeance: ( + ULTRA EGGBUG REVENGEANCE, MEGA. THERE IS FIRE. THERE IS TRISCAR. EGGBUG REVENGEANCE. YOU ARE. DIE! + ), + jpeg_annihilation: ( + eggbug dissolving as the image gets more and more jpeg + ), } as const; -export const EggbugImg = ({ type }: { type: keyof typeof eggbug_emotions }) => +export type EggbugEmotion = keyof typeof eggbug_emotions; + +export const EggbugImg = ({ type }: { type: EggbugEmotion }) => eggbug_emotions[type]; export const render_and_copy = (elem: VNode, pretty = false) => { diff --git a/html/eggbug-spamclick-battle.tsx b/html/eggbug-spamclick-battle.tsx index 864537b..4697bc3 100644 --- a/html/eggbug-spamclick-battle.tsx +++ b/html/eggbug-spamclick-battle.tsx @@ -1,8 +1,14 @@ -import { EggbugImg, HCenter, Main, render_and_copy } from "./common.tsx"; +import { + EggbugEmotion, + EggbugImg, + HCenter, + Main, + render_and_copy, +} from "./common.tsx"; -const Eggbug = () => ( +const Eggbug = ({ type = "smiling" }: { type?: EggbugEmotion }) => ( - + ); @@ -52,13 +58,15 @@ const BattleFrame = ({ health, last_health, max_health, + phase, }: { health: number; last_health: number; max_health: number; + phase: 1 | 2; }) => (
- +
); @@ -66,25 +74,53 @@ const BattleFrame = ({ const Defeated = ({ last_health, max_health, + phase, }: { last_health: number; max_health: number; -}) => ( -
- - - eggbug is physically unharmed, emotionally destroyed
- ...
- ok eggbug is fine now
- "re bug" to "killbug"
- submit runs to{" "} - - #KILLing eggbug rapidly - -
-); + phase: 1 | 2; +}) => + phase == 1 ? ( +
+ + + + eggbug is physically unharmed, emotionally destroyed
+ ...
+ ok eggbug is fine now
+ "re bug" to "killbug"
+ submit runs to{" "} + + #KILLing eggbug rapidly + {" "} +
+ click again
+ at you OWN PREIL! +
+ +
+ ) : ( +
+ +
+ WHAT HAVE YOU DONE +
+ ); -const DamageNumber = ({ n }: { n: number }) => ( +const DamageNumber = ({ + dmg, + max_dmg, + shl, +}: { + dmg: number; + max_dmg: number; + shl: number; +}) => (
( // or preact! // anything with *actual typing* style={{ - top: `calc(${100 * Math.random()}px + 15%)`, - left: `calc(${100 * Math.random()}px + 25%)`, + top: `${Math.floor(50 * Math.random())}%`, + left: `${Math.floor(50 * Math.random()) + 25 - shl}%`, // tried some exponential stuff but it was too unwieldy // i think this still accomplishes that punch - fontSize: `calc(${n / 200} * 2rem + 0.5rem)`, + fontSize: `calc(${dmg / max_dmg} * 5rem + 0.5rem)`, }} > -
{Math.round(n).toString()}
+
{Math.round(dmg).toString()}
); @@ -109,6 +145,7 @@ const Battle = ({ last_health = health, damage_multiplier = 10, damage_bonus = 1, + phase = 1, }: // ...rest Partial<{ max_health: number; @@ -116,6 +153,7 @@ Partial<{ last_health: number; damage_multiplier: number; damage_bonus: number; + phase?: 1 | 2; }>) => health > 0 ? (
@@ -124,9 +162,15 @@ Partial<{ health={health} last_health={last_health} max_health={max_health} + phase={phase} /> {health < last_health && ( - + )}
) : ( - + ); // a timer would be flippin rad @@ -148,7 +197,7 @@ Partial<{ // (because it would have to) render_and_copy(
- + {/* */}
); diff --git a/html/random-tag-of-the-day.tsx b/html/random-tag-of-the-day.tsx index a4798b6..6d86fa4 100644 --- a/html/random-tag-of-the-day.tsx +++ b/html/random-tag-of-the-day.tsx @@ -29,6 +29,10 @@ const tags = [ "rats", "worldwide music wednesday", "chaos magick", + "tea", + "journaling", + "digital collage", + "gamedev", ]; const default_repeat = 4; diff --git a/static/eggbug-jpeg-annihilation.gif b/static/eggbug-jpeg-annihilation.gif new file mode 100644 index 0000000..0efde2b Binary files /dev/null and b/static/eggbug-jpeg-annihilation.gif differ diff --git a/static/eggbug-revengeance.png b/static/eggbug-revengeance.png new file mode 100644 index 0000000..0db9117 Binary files /dev/null and b/static/eggbug-revengeance.png differ diff --git a/static/eggbug-sad.png b/static/eggbug-sad.png new file mode 100644 index 0000000..64f1489 Binary files /dev/null and b/static/eggbug-sad.png differ