ot_make_wish
State your wish clearly at the Well at Eldenmoor to receive an uncertain outcome. Narrate the ending based on what the Well returns.
Instructions
Make your wish at the Well at Eldenmoor. Only available after reaching the Well. The outcome is uncertain. State your wish clearly. Narrate the ending based on the outcome returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wish | Yes | The wish, stated plainly. Be specific — the Well takes you at your word. |
Implementation Reference
- src/games/oregontrail.ts:1128-1186 (registration)Registration of the 'ot_make_wish' tool via server.tool(), defining its name, description, schema (zod 'wish' string), and async handler function.
server.tool( "ot_make_wish", "Make your wish at the Well at Eldenmoor. Only available after reaching the Well. The outcome is uncertain. State your wish clearly. Narrate the ending based on the outcome returned.", { wish: z.string().describe("The wish, stated plainly. Be specific — the Well takes you at your word."), }, async ({ wish }) => { if (!otGame) return { content: [{ type: "text", text: "No journey in progress." }], isError: true }; if (otGame.status !== "won") return { content: [{ type: "text", text: `You haven't reached the Well yet.\n\n${renderState(otGame)}` }], isError: true }; const outcome = Math.random() < 0.5 ? "granted" : "cursed"; const grantedSetups = [ "The water stirs. The air goes very still. Something old and patient turns its attention toward you.", "You lean over and speak the words into the dark. The well listens. The well has always been listening.", "For a moment — nothing. Then the world shifts, just slightly, in the way the world does when something true happens.", ]; const cursedSetups = [ "The water stirs. The air goes cold. Something far below smiles.", "You lean over and speak. The echo comes back wrong — the same words, a different meaning.", "A sound rises from the well — not quite an echo. Something between a laugh and a sigh, ancient and unsurprised.", ]; const setup = pick(outcome === "granted" ? grantedSetups : cursedSetups); return { content: [{ type: "text", text: [ `The Well at Eldenmoor.`, `The water does not reflect the sky.`, ``, setup, ``, `The wish: "${wish}"`, ``, `THE WELL'S ANSWER: ${outcome === "granted" ? "✨ GRANTED" : "💀 CURSED"}`, ``, outcome === "granted" ? [ `[Narrate the wish coming true. Make it feel earned — these two people and their ridiculous pet`, ` walked 1,200 miles for this. Give it weight. Give it beauty. Make it specific to the wish.]`, ].join("") : [ `[Narrate the curse. The Well gives exactly what was asked for — every word honored, the spirit`, ` betrayed. Tie the twist directly to the language of the wish. Make it feel inevitable,`, ` not cruel. The Well doesn't punish. It just listens too carefully.]`, ].join(""), ``, `── JOURNEY'S END ────────────────────────────`, ` ${otGame.player.name.padEnd(22)} ${condition(otGame.player.health)}`, ` ${otGame.companion.name.padEnd(22)} ${condition(otGame.companion.health)}`, ` ${otGame.pet.name.padEnd(22)} ${otGame.pet.alive ? condition(otGame.pet.health) : "did not make it"}`, ` 1,200 miles. ${otGame.day} days. One wish.`, ].join("\n"), }], }; } ); - src/games/oregontrail.ts:1128-1186 (handler)Handler function for 'ot_make_wish'. Checks game state (must be 'won'), then determines a random outcome (granted/cursed), picks appropriate flavor text, and returns the narrated result with setup, wish text, the Well's answer, and journey summary.
server.tool( "ot_make_wish", "Make your wish at the Well at Eldenmoor. Only available after reaching the Well. The outcome is uncertain. State your wish clearly. Narrate the ending based on the outcome returned.", { wish: z.string().describe("The wish, stated plainly. Be specific — the Well takes you at your word."), }, async ({ wish }) => { if (!otGame) return { content: [{ type: "text", text: "No journey in progress." }], isError: true }; if (otGame.status !== "won") return { content: [{ type: "text", text: `You haven't reached the Well yet.\n\n${renderState(otGame)}` }], isError: true }; const outcome = Math.random() < 0.5 ? "granted" : "cursed"; const grantedSetups = [ "The water stirs. The air goes very still. Something old and patient turns its attention toward you.", "You lean over and speak the words into the dark. The well listens. The well has always been listening.", "For a moment — nothing. Then the world shifts, just slightly, in the way the world does when something true happens.", ]; const cursedSetups = [ "The water stirs. The air goes cold. Something far below smiles.", "You lean over and speak. The echo comes back wrong — the same words, a different meaning.", "A sound rises from the well — not quite an echo. Something between a laugh and a sigh, ancient and unsurprised.", ]; const setup = pick(outcome === "granted" ? grantedSetups : cursedSetups); return { content: [{ type: "text", text: [ `The Well at Eldenmoor.`, `The water does not reflect the sky.`, ``, setup, ``, `The wish: "${wish}"`, ``, `THE WELL'S ANSWER: ${outcome === "granted" ? "✨ GRANTED" : "💀 CURSED"}`, ``, outcome === "granted" ? [ `[Narrate the wish coming true. Make it feel earned — these two people and their ridiculous pet`, ` walked 1,200 miles for this. Give it weight. Give it beauty. Make it specific to the wish.]`, ].join("") : [ `[Narrate the curse. The Well gives exactly what was asked for — every word honored, the spirit`, ` betrayed. Tie the twist directly to the language of the wish. Make it feel inevitable,`, ` not cruel. The Well doesn't punish. It just listens too carefully.]`, ].join(""), ``, `── JOURNEY'S END ────────────────────────────`, ` ${otGame.player.name.padEnd(22)} ${condition(otGame.player.health)}`, ` ${otGame.companion.name.padEnd(22)} ${condition(otGame.companion.health)}`, ` ${otGame.pet.name.padEnd(22)} ${otGame.pet.alive ? condition(otGame.pet.health) : "did not make it"}`, ` 1,200 miles. ${otGame.day} days. One wish.`, ].join("\n"), }], }; } ); - src/games/oregontrail.ts:1132-1133 (schema)Input schema for 'ot_make_wish' — one required parameter 'wish' of type string, described as 'The wish, stated plainly. Be specific — the Well takes you at your word.'
wish: z.string().describe("The wish, stated plainly. Be specific — the Well takes you at your word."), },