ot_status
Check the current state of a journey: party health, supplies, location, and recent events. Free, no cost.
Instructions
Check the current state of the journey — party health, supplies, location, and recent events. Free, no cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/games/oregontrail.ts:1118-1126 (registration)Registration of the 'ot_status' tool via server.tool(), which defines the name, description, schema (empty), and async handler.
server.tool( "ot_status", "Check the current state of the journey — party health, supplies, location, and recent events. Free, no cost.", {}, async () => { if (!otGame) return { content: [{ type: "text", text: "No journey in progress. Call ot_new_game to begin." }] }; return { content: [{ type: "text", text: renderState(otGame) }] }; } ); - src/games/oregontrail.ts:1119-1125 (handler)The async handler function for 'ot_status' — checks if game exists, and returns the current rendered game state.
"ot_status", "Check the current state of the journey — party health, supplies, location, and recent events. Free, no cost.", {}, async () => { if (!otGame) return { content: [{ type: "text", text: "No journey in progress. Call ot_new_game to begin." }] }; return { content: [{ type: "text", text: renderState(otGame) }] }; } - src/games/oregontrail.ts:1121-1121 (schema)Input schema for 'ot_status' — an empty object (no parameters needed).
{}, - src/games/oregontrail.ts:627-683 (helper)The renderState helper function that generates the status display string used by ot_status.
function renderState(state: OtState): string { const stop = state.trailStops[state.currentStopIndex]; const next = state.trailStops[state.currentStopIndex + 1] ?? null; const lines: string[] = []; lines.push(`━━━ THE WELL AT ELDENMOOR ━━━`); lines.push(`Day ${state.day} | Mile ${state.mile} of ${TOTAL_MILES} | ${TOTAL_MILES - state.mile} miles remaining`); lines.push(`Location: ${stop.name}${next ? ` → Next: ${next.name} (${next.mile - state.mile} mi)` : ""}`); lines.push(``); lines.push(`PARTY`); lines.push(` ${state.player.name.padEnd(22)} [${bar(state.player.health)}] ${String(state.player.health).padStart(3)}hp ${condition(state.player.health)}`); lines.push(` ${state.companion.name.padEnd(22)} [${bar(state.companion.health)}] ${String(state.companion.health).padStart(3)}hp ${condition(state.companion.health)}`); if (state.pet.alive) { const petLabel = `${state.pet.name} (${state.pet.species})`.slice(0, 22).padEnd(22); lines.push(` ${petLabel} [${bar(state.pet.health)}] ${String(state.pet.health).padStart(3)}hp ${condition(state.pet.health)}`); } else { lines.push(` ${state.pet.name.padEnd(22)} [gone] We don't talk about it.`); } lines.push(``); lines.push(`SUPPLIES`); lines.push(` Food: ${state.supplies.food} days | Medicine: ${state.supplies.medicine} doses | Ammo: ${state.supplies.ammo} rounds`); lines.push(` Money: $${state.supplies.money} | Wagon parts: ${state.supplies.parts} | Oxen: ${state.supplies.oxen}`); lines.push(``); lines.push(`Weather: ${state.weather}`); if (state.pendingRiver) { lines.push(`⚠ RIVER CROSSING — choose a method with ot_cross_river before traveling further`); lines.push(` ford (fast, risky) | caulk (medium risk) | ferry (safe, costs $15) | wait (costs food + 2 days)`); } if (stop.canTrade) { lines.push(`🏪 Trading available — ot_buy to restock | ot_sell to unload surplus (at a loss)`); } if (state.status === "at_stop") { lines.push(`📍 ${stop.desc}`); } if (state.status === "won") { lines.push(``); lines.push(`✨ You stand at The Well at Eldenmoor.`); lines.push(` The water does not reflect the sky. The air hums.`); lines.push(` Call ot_make_wish — choose your words carefully.`); } if (state.status === "game_over") { lines.push(``); lines.push(`💀 The journey has ended. The Well remains beyond reach.`); } if (state.eventLog.length > 0) { lines.push(``); lines.push(`RECENT EVENTS`); for (const e of state.eventLog.slice(-4)) lines.push(` · ${e}`); } return lines.join("\n"); } - src/games/oregontrail.ts:43-43 (helper)The OtStatus type definition — a union type with possible status values used by the game state, defined right above the state interface.
type OtStatus = "traveling" | "at_stop" | "river_crossing" | "won" | "lost" | "game_over";