Skip to content

Commit 2cdd124

Browse files
authored
feat(ui): grow the Lobsterdex to 37 palettes with a golden mythic, deep links, and shiny dates (#115179)
* feat(ui): grow the Lobsterdex to 37 palettes with a golden mythic, deep links, and shiny dates * fix(ui): keep wave-2 lobster overlays module-local
1 parent 0b62823 commit 2cdd124

11 files changed

Lines changed: 533 additions & 62 deletions

File tree

‎ui/src/components/lobster-pet-contract.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,28 @@ export type LobsterPetPaletteId =
2020
| "oilslick"
2121
| "aurora"
2222
| "nebula"
23+
| "banana"
2324
| "mood"
25+
| "bee"
26+
| "rubberduck"
2427
| "clawtron"
2528
| "selene"
2629
| "geode"
2730
| "ghost"
2831
| "glass"
2932
| "split"
33+
| "sourdough"
34+
| "zombie"
35+
| "plush"
3036
| "cottoncandy"
37+
| "disco"
3138
| "pixel"
3239
| "blueprint"
3340
| "phosphor"
3441
| "heisenbug"
35-
| "retro";
42+
| "invisible"
43+
| "retro"
44+
| "goldenretro";
3645

3746
// Pass-through ledge visitors. Strangers are other lobsters; everyone else
3847
// is, at best, lobster-adjacent. None of them count for the Lobsterdex.

‎ui/src/components/lobster-pet-look.ts‎

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
LobsterPetPaletteId,
1515
LobsterPetPersonalityId,
1616
} from "./lobster-pet-contract.ts";
17-
import { lobsterPaletteName } from "./lobster-pet-lore.ts";
17+
import { lobsterPaletteName, lobsterRandomName } from "./lobster-pet-lore.ts";
1818
import { moonPhaseFraction } from "./lobster-pet-moon.ts";
1919
import {
2020
ACCESSORY_SPRITES,
@@ -35,6 +35,7 @@ import {
3535
MECHA_PLATES,
3636
NEBULA_STARS,
3737
OILSLICK_SHEEN,
38+
PALETTE_OVERLAYS,
3839
PASSER_SPRITES,
3940
PASSER_TITLES,
4041
PATTERNED_PALETTES,
@@ -74,26 +75,39 @@ const PALETTES: Array<[LobsterPetPalette, number]> = [
7475
[{ id: "oilslick", shell: "#15171d", claw: "#23262e" }, 2],
7576
[{ id: "aurora", shell: "#dce6f0", claw: "#e9f0f7" }, 2],
7677
[{ id: "nebula", shell: "#34255c", claw: "#4a3a7d" }, 2],
78+
[{ id: "banana", shell: "#f7e27d", claw: "#f3d55b" }, 2],
7779
// CSS custom properties are the palette color contract, so accent vars stay
7880
// intact through every look renderer rather than being parsed as hex values.
7981
[{ id: "mood", shell: "var(--accent, #7f77dd)", claw: "var(--accent-hover, #9a93e8)" }, 1.5],
82+
[{ id: "bee", shell: "#f4c531", claw: "#2b2b23" }, 1.5],
83+
[{ id: "rubberduck", shell: "#ffd93b", claw: "#ffb03b" }, 1.5],
8084
[{ id: "clawtron", shell: "#8d99a6", claw: "#a2aeba" }, 1],
8185
[{ id: "selene", shell: "#c9ced8", claw: "#d8dde5" }, 1],
8286
[{ id: "geode", shell: "#6b6474", claw: "#7d7588" }, 1],
8387
[{ id: "ghost", shell: "#dce8f2", claw: "#ecf3fa" }, 1],
8488
[{ id: "glass", shell: "#cfe4f4", claw: "#e0eef8" }, 1],
8589
[{ id: "split", shell: "#ff4f40", claw: "#ff775f" }, 1],
90+
[{ id: "sourdough", shell: "#d9a662", claw: "#e6bc82" }, 1],
91+
[{ id: "zombie", shell: "#9db08a", claw: "#86a17a" }, 1],
92+
[{ id: "plush", shell: "#e8967a", claw: "#f2b09a" }, 1],
8693
// Pastel pink/blue iridescence, after the famous Maine catches.
8794
[{ id: "cottoncandy", shell: "#f6a8c9", claw: "#a5c6f0" }, 0.8],
95+
[{ id: "disco", shell: "#b8c4d8", claw: "#cbd5e6" }, 0.8],
8896
[{ id: "pixel", shell: "#d84c3e", claw: "#ef8f6a" }, 0.7],
8997
[{ id: "blueprint", shell: "#123a66", claw: "#123a66" }, 0.7],
9098
[{ id: "phosphor", shell: "#0d2415", claw: "#0f2b19" }, 0.7],
9199
[{ id: "heisenbug", shell: "#262a33", claw: "#343945" }, 0.6],
100+
// CSS values, rather than parsed colors, are the palette contract. Like
101+
// mood's var() colors, translucent rgba() values must pass through intact.
102+
[{ id: "invisible", shell: "rgba(127,140,160,0.07)", claw: "rgba(127,140,160,0.07)" }, 0.55],
92103
// The grail: homage to the classic OpenClaw logo (big raised claw, smirk,
93104
// angry brows, white sticker outline). ~0.5% of sessions.
94105
[{ id: "retro", shell: "#e8262c", claw: "#f04a3e" }, 0.5],
106+
[{ id: "goldenretro", shell: "#e8b422", claw: "#f6cf5a" }, 0.1],
95107
];
96108

109+
const RETRO_GEOMETRY_PALETTES: ReadonlySet<LobsterPetPaletteId> = new Set(["retro", "goldenretro"]);
110+
97111
// Catalog order for collection UIs (Lobsterdex): common to grail.
98112
export const LOBSTER_PET_PALETTES: readonly LobsterPetPalette[] = PALETTES.map(
99113
([palette]) => palette,
@@ -195,40 +209,9 @@ const LOBSTER_PET_CLAW_MULS: Record<LobsterPetClawSize, number> = {
195209
mighty: 1.18,
196210
};
197211

198-
// Seeded pet names; rare palettes carry signature names. Shown via the
199-
// sprite's native title tooltip, so no i18n surface.
200-
const PET_NAMES = [
201-
"Pinchy",
202-
"Barnaby",
203-
"Thermidor",
204-
"Clawdette",
205-
"Sheldon",
206-
"Scuttles",
207-
"Bisque",
208-
"Crusty",
209-
"Snips",
210-
"Bubbles",
211-
"Clawdia",
212-
"Ferdinand",
213-
"Maple",
214-
"Pearl",
215-
"Biscuit",
216-
"Captain",
217-
"Ziggy",
218-
"Noodle",
219-
"Waffles",
220-
"Pippin",
221-
"Squirt",
222-
"Chip",
223-
"Clementine",
224-
"Moss",
225-
] as const;
226-
227212
export function lobsterPetName(look: LobsterPetLook, seed: number): string {
228213
const signatureName = lobsterPaletteName(look.palette.id);
229-
return signatureName !== look.palette.id
230-
? signatureName
231-
: expectDefined(PET_NAMES[(seed >>> 3) % PET_NAMES.length], "lobster pet name catalog entry");
214+
return signatureName !== look.palette.id ? signatureName : lobsterRandomName(seed);
232215
}
233216

234217
// A stranger wears a different palette than the resident pet.
@@ -319,7 +302,12 @@ export function createLobsterPetLook(seed: number, now: Date = new Date()): Lobs
319302
};
320303
// The LED rides the perky antenna tip. Keep the original antenna roll above
321304
// so adding Clawtron does not shift any later seeded trait.
322-
const preparedLook = palette.id === "clawtron" ? { ...look, antennae: "perky" as const } : look;
305+
let preparedLook = palette.id === "clawtron" ? { ...look, antennae: "perky" as const } : look;
306+
// The undead do not do perky. Preserve the antenna roll above so later
307+
// seeded traits stay aligned, then enforce the identity at the end.
308+
if (palette.id === "zombie") {
309+
preparedLook = { ...look, antennae: "droopy" };
310+
}
323311
if (isLobsterAnniversary(now)) {
324312
// Birthday dress code: everyone is the classic logo, party hats on.
325313
const retro = PALETTES.find(([entry]) => entry.id === "retro")?.[0];
@@ -342,6 +330,7 @@ export function renderLobsterSvg(
342330
} = {},
343331
) {
344332
const isPixel = look.palette.id === "pixel";
333+
const hasRetroGeometry = RETRO_GEOMETRY_PALETTES.has(look.palette.id);
345334
const openEyeStyle = options.shell || options.sleeping ? "display:none" : "";
346335
const closedEyeStyle =
347336
options.shell || options.sleeping ? "opacity:1" : options.standalone ? "display:none" : "";
@@ -358,13 +347,13 @@ export function renderLobsterSvg(
358347
isPixel
359348
? PIXEL_LOBSTER(openEyeStyle, closedEyeStyle)
360349
: svg`
361-
${look.palette.id === "retro" ? RETRO_ANTENNAE : ANTENNAE_SPRITES[look.antennae]}
350+
${hasRetroGeometry ? RETRO_ANTENNAE : ANTENNAE_SPRITES[look.antennae]}
362351
${look.tailFan ? TAIL_FAN : nothing}
363352
<g class="lob-claw lob-claw--l">
364353
<path d="M20 42 C5 37 0 47 5 57 C10 67 20 62 25 52 C28 45 25 42 20 42 Z" fill="var(--lob-claw)" />
365354
</g>
366355
${
367-
look.palette.id === "retro"
356+
hasRetroGeometry
368357
? nothing
369358
: svg`<g class="lob-claw lob-claw--r"><path d="M100 42 C115 37 120 47 115 57 C110 67 100 62 95 52 C92 45 95 42 100 42 Z" fill="var(--lob-claw)" /></g>`
370359
}
@@ -383,8 +372,9 @@ export function renderLobsterSvg(
383372
${look.palette.id === "blueprint" ? BLUEPRINT_MARKS : nothing}
384373
${look.palette.id === "clawtron" ? MECHA_PLATES : nothing}
385374
${look.palette.id === "selene" ? SELENE_MOON(selenePhase) : nothing}
375+
${PALETTE_OVERLAYS[look.palette.id] ?? nothing}
386376
${look.freckles && !PATTERNED_PALETTES.has(look.palette.id) ? FRECKLE_SPOTS : nothing}
387-
<ellipse cx="48" cy="28" rx="20" ry="11" fill="#ffffff" opacity="0.1" />
377+
${look.palette.id === "invisible" ? nothing : svg`<ellipse cx="48" cy="28" rx="20" ry="11" fill="#ffffff" opacity="0.1" />`}
388378
<g class="lob-eye-open" style=${openEyeStyle}>
389379
<circle cx="45" cy="32" r="5.5" fill="#0a1014" />
390380
<circle cx="75" cy="32" r="5.5" fill="#0a1014" />
@@ -402,18 +392,18 @@ export function renderLobsterSvg(
402392
`
403393
}
404394
${
405-
look.palette.id === "retro"
395+
hasRetroGeometry
406396
? svg`
407397
${RETRO_FACE}
408398
<g class="lob-claw lob-claw--r">${RETRO_MEGA_CLAW}</g>
409399
`
410400
: nothing
411401
}
412-
${options.grumpy && look.palette.id !== "retro" ? GRUMPY_FACE : nothing}
402+
${options.grumpy && !hasRetroGeometry ? GRUMPY_FACE : nothing}
413403
${look.accessory === "none" || options.shell ? nothing : ACCESSORY_SPRITES[look.accessory]}
414404
${
415405
// The retro grail's mega claw owns the same shoulder; it moves light.
416-
options.bindle && look.palette.id !== "retro" ? BINDLE : nothing
406+
options.bindle && !hasRetroGeometry ? BINDLE : nothing
417407
}
418408
${options.sailorCap && !options.shell && !HEADWEAR.has(look.accessory) ? SAILOR_CAP : nothing}
419409
</g>

‎ui/src/components/lobster-pet-lore.ts‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expectDefined } from "@openclaw/normalization-core";
12
import type { LobsterPetPaletteId } from "./lobster-pet-contract.ts";
23

34
type LobsterPaletteLore = {
@@ -16,25 +17,68 @@ const RARE_NAMES: Partial<Record<LobsterPetPaletteId, string>> = {
1617
oilslick: "Slick",
1718
aurora: "Borealis",
1819
nebula: "Cosmo",
20+
banana: "Peel",
1921
mood: "Ringo",
22+
bee: "Buzz",
23+
rubberduck: "Debuggy",
2024
clawtron: "Clawtron",
2125
selene: "Selene",
2226
geode: "Amethyst",
2327
ghost: "Boo",
2428
glass: "Prism",
2529
split: "Picasso",
30+
sourdough: "Boule",
31+
zombie: "Shambles",
32+
plush: "Buttons",
2633
cottoncandy: "Taffy",
34+
disco: "Boogie",
2735
blueprint: "Prototype",
2836
phosphor: "TTY",
2937
heisenbug: "Segfault",
38+
invisible: "Nobody",
3039
pixel: "Sprite",
3140
retro: "OG",
41+
goldenretro: "24K",
3242
};
3343

44+
const PET_NAMES = [
45+
"Pinchy",
46+
"Barnaby",
47+
"Thermidor",
48+
"Clawdette",
49+
"Sheldon",
50+
"Scuttles",
51+
"Bisque",
52+
"Crusty",
53+
"Snips",
54+
"Bubbles",
55+
"Clawdia",
56+
"Ferdinand",
57+
"Maple",
58+
"Pearl",
59+
"Biscuit",
60+
"Captain",
61+
"Ziggy",
62+
"Noodle",
63+
"Waffles",
64+
"Pippin",
65+
"Squirt",
66+
"Chip",
67+
"Clementine",
68+
"Moss",
69+
] as const;
70+
3471
export function lobsterPaletteName(paletteId: LobsterPetPaletteId): string {
3572
return RARE_NAMES[paletteId] ?? paletteId;
3673
}
3774

75+
export function lobsterRandomName(seed: number): string {
76+
return expectDefined(
77+
PET_NAMES[(seed >>> 3) % PET_NAMES.length],
78+
"lobster pet name catalog entry",
79+
);
80+
}
81+
3882
// Like pet names and bottle fortunes, Lobsterdex lore is an English-only
3983
// easter-egg channel rather than product UI copy.
4084
export const LOBSTER_PALETTE_LORE: Record<LobsterPetPaletteId, LobsterPaletteLore> = {
@@ -68,7 +112,13 @@ export const LOBSTER_PALETTE_LORE: Record<LobsterPetPaletteId, LobsterPaletteLor
68112
flavor: "Not from any ocean on this planet.",
69113
hint: "Came from very far away.",
70114
},
115+
banana: { flavor: "Banana. For scale.", hint: "For scale." },
71116
mood: { flavor: "Wears whatever color you're feeling.", hint: "Matches your vibe." },
117+
bee: { flavor: "Technically not a bee.", hint: "Do not tell the bees." },
118+
rubberduck: {
119+
flavor: "Listens to your bugs. Judges silently.",
120+
hint: "Quack.",
121+
},
72122
clawtron: { flavor: "60% rivets, 40% love.", hint: "Beep boop snip." },
73123
selene: { flavor: "Carries the current moon on its belly.", hint: "Waxes and wanes." },
74124
geode: { flavor: "Rock outside, amethyst inside.", hint: "Crack the surface." },
@@ -78,10 +128,17 @@ export const LOBSTER_PALETTE_LORE: Record<LobsterPetPaletteId, LobsterPaletteLor
78128
hint: "Easy to miss, hard to forget.",
79129
},
80130
split: { flavor: "Two lobsters, one shell.", hint: "Can't pick a side." },
131+
sourdough: {
132+
flavor: "Started from a starter. 24-hour proof.",
133+
hint: "Still proofing.",
134+
},
135+
zombie: { flavor: "Slightly used. Still friendly.", hint: "It's been better." },
136+
plush: { flavor: "Machine washable. Air dry only.", hint: "Soft to the touch." },
81137
cottoncandy: {
82138
flavor: "Pastel, like the famous Maine catch.",
83139
hint: "Sweeter than it looks.",
84140
},
141+
disco: { flavor: "Born under a mirror ball.", hint: "The night is still young." },
85142
blueprint: {
86143
flavor: "Final hardware pending approval.",
87144
hint: "Still on the drawing board.",
@@ -91,9 +148,11 @@ export const LOBSTER_PALETTE_LORE: Record<LobsterPetPaletteId, LobsterPaletteLor
91148
flavor: "Only renders right when nobody's watching.",
92149
hint: "Cannot be reproduced.",
93150
},
151+
invisible: { flavor: "It's right there. Look closer.", hint: "Trust me, it exists." },
94152
pixel: { flavor: "Rendered in 1987. Still runs.", hint: "Insert coin." },
95153
retro: {
96154
flavor: "The original: big claw, no apologies.",
97155
hint: "The one that started it all.",
98156
},
157+
goldenretro: { flavor: "One in a generation.", hint: "Worth the wait." },
99158
};

‎ui/src/components/lobster-pet-plans.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ export type LobsterLoadIdentity = {
260260
};
261261

262262
// Rare per-load identities, resolved on top of the seeded look: the Elder
263-
// outranks an old-friend return, and retro looks (grail or anniversary dress
264-
// code) are never repainted. Lobsterdex completion is snapshotted here too,
263+
// outranks an old-friend return, and retro-geometry looks (grail or anniversary
264+
// dress code) are never repainted. Lobsterdex completion is snapshotted here too,
265265
// so the golden ledge trim appears between loads, never mid-visit.
266266
export function resolveLobsterLoadIdentity(
267267
seed: number,
@@ -291,7 +291,7 @@ export function resolveLobsterLoadIdentity(
291291
},
292292
};
293293
}
294-
if (look.palette.id === "retro") {
294+
if (look.palette.id === "retro" || look.palette.id === "goldenretro") {
295295
return base;
296296
}
297297
const known = [...seen]

0 commit comments

Comments
 (0)