import { marksmenWeekKey } from './marksmenRange.js'; import type { StorySkill } from './storyQuests.js'; export declare const HOPE_FAIR_NAME = "The Hope Town Fair of Firsts"; export declare const HOPE_FAIR_SHORT_NAME = "Hope Town Fair of Firsts"; /** * The fair's green, east of Hope Town's wall (wall x 305, south wall z 916) and north of Hollin Brook (the brook runs from z 939), west of the Ford Road * (x 353-355): flat grass at height 0, a few trees to clear. The brief's box (z 920-960) is cut by the brook, so the fair sits on the clear stretch north of it. */ export declare const HOPE_FAIR_BOX: { readonly minX: 308; readonly maxX: 351; readonly minZ: 918; readonly maxZ: 938; }; /** The Fair Lane: worn dirt, two wide, from the town's south walkway (x 272) east along the wall's foot to the green. */ export declare const HOPE_FAIR_LANE: { readonly minX: 273; readonly maxX: 307; readonly minZ: 919; readonly maxZ: 920; }; /** The signpost at the lane's mouth, where the walkway passes. */ export declare const HOPE_FAIR_SIGN: { readonly x: 275; readonly z: 921; readonly text: "Hope Town Fair of Firsts"; }; /** The trampled ring in the middle of the green (worn dirt, no fence). */ export declare const HOPE_FAIR_RING: { readonly minX: 322; readonly maxX: 337; readonly minZ: 923; readonly maxZ: 931; }; export declare function inHopeFair(x: number, z: number, pad?: number): boolean; /** Is this tile on the Fair Lane? */ export declare function inHopeFairLane(x: number, z: number): boolean; export type HopeContestId = 'catch' | 'chop' | 'bake' | 'dash'; export declare const HOPE_CONTEST_IDS: readonly HopeContestId[]; export declare function isHopeContestId(id: unknown): id is HopeContestId; /** The ribbon a placing earns: the Bramble Fair's own item (gold 3, silver 2, bronze 1). */ export declare const HOPE_FAIR_RIBBON_KIND = "fairribbon"; export type HopePlacing = 'gold' | 'silver' | 'bronze' | 'none'; export type HopePrize = { coins: number; xp: number; ribbons: number; }; export type HopeContestDef = { id: HopeContestId; title: string; /** The stall's name on the board and in the chat ("First Catch"). */ short: string; /** The skill its XP is paid in (placeholders). */ skill: StorySkill; /** Is a bigger score better ('high') or a smaller one ('low', a time)? */ better: 'high' | 'low'; blurb: string; prizes: Readonly>; }; export declare const HOPE_CONTESTS: Readonly>; /** An unfinished try is forgotten after this long (a contest left half done costs nothing and pays nothing). */ export declare const HOPE_SESSION_TTL_MS: number; /** A placing pays once a window per player per contest; another go is always free but pays nothing more in the window. */ export declare const HOPE_PRIZE_WINDOW_MS: number; export declare const HOPE_CATCH_TIME_MS: number; /** A cast every this often at most (the float needs a moment); a quicker click does nothing. */ export declare const HOPE_CATCH_CAST_MS = 3000; /** The chance a cast brings a bite. */ export declare const HOPE_CATCH_BITE = 0.65; /** The trough is fished from within this many tiles of it. */ export declare const HOPE_CATCH_REACH = 3; export declare const HOPE_CATCH_COUNT = 3; export type HopeFishKind = 'minnow' | 'roach'; export type HopeFish = { kind: HopeFishKind; grams: number; }; export declare const HOPE_ROACH_SHARE = 0.15; export declare const HOPE_MINNOW_GRAMS: { readonly min: 4; readonly max: 18; }; export declare const HOPE_ROACH_GRAMS: { readonly min: 20; readonly max: 45; }; export declare const HOPE_CATCH_TIERS: { readonly gold: 100; readonly silver: 70; readonly bronze: 40; }; /** What a bite is: a roach now and then, else a minnow; both weights drawn evenly from their range. `kindRoll` and `weightRoll` are in [0, 1). */ export declare function hopeCatchFish(kindRoll: number, weightRoll: number): HopeFish; /** The score: the three heaviest, in grams. */ export declare function hopeCatchScore(grams: readonly number[]): number; export declare function hopeCatchPlacing(score: number): HopePlacing; export declare const HOPE_CHOP_BLOCKS = 3; /** Clean swings that split a block. */ export declare const HOPE_CHOP_SWINGS = 6; export declare const HOPE_CHOP_SWING_MS = 700; /** Roughly one swing in five glances off the knot and does not count. */ export declare const HOPE_CHOP_GLANCE = 0.2; /** A block is chopped from within this many tiles of it (Chebyshev). */ export declare const HOPE_CHOP_REACH = 2; export declare const HOPE_CHOP_CAP_MS = 90000; export declare const HOPE_CHOP_TIERS_MS: { readonly gold: 26000; readonly silver: 38000; readonly bronze: 60000; }; export declare function hopeChopPlacing(ms: number): HopePlacing; /** What the judge accepts, and the care each bake earns: the plain loaf, and the honey loaf that took a pot of honey and a sack of flour. */ export declare const HOPE_BAKE_GOODS: Readonly>; /** A sprig of wild thyme given with the bake is one more point of care (it is eaten by the judge, so no loop). */ export declare const HOPE_BAKE_GARNISH_KIND = "wildthyme"; export declare const HOPE_BAKE_GARNISH_POINTS = 1; export declare const HOPE_BAKE_TIERS: { readonly gold: 5; readonly silver: 4; readonly bronze: 3; }; export declare function hopeBakePoints(kind: string | undefined, garnished: boolean): number; export declare function hopeBakePlacing(points: number): HopePlacing; /** The start and finish line, and the seven cones to go round in order (each counts when you pass within HOPE_DASH_REACH of it). */ export declare const HOPE_DASH_START: { readonly x: 340; readonly z: 934; }; export declare const HOPE_DASH_CONES: ReadonlyArray<{ x: number; z: number; }>; export declare const HOPE_DASH_REACH = 1.8; /** The dash is entered standing on the mark: within this many tiles of the start. */ export declare const HOPE_DASH_MARK = 2.5; /** Running drops the egg: each drop costs this much time, and the next can fall no sooner than the gap after. */ export declare const HOPE_DASH_DROP_MS = 5000; export declare const HOPE_DASH_DROP_GAP_MS = 1500; export declare const HOPE_DASH_CAP_MS = 90000; /** Time plus drops. A steady walk of the course is about 12 seconds. */ export declare const HOPE_DASH_TIERS_MS: { readonly gold: 17000; readonly silver: 26000; readonly bronze: 45000; }; export declare function hopeDashPlacing(ms: number): HopePlacing; /** The length of the course, start to cones to start (tiles, straight lines). */ export declare function hopeDashLength(): number; export declare const HOPE_BOARD_SIZE = 5; export declare const HOPE_BOARD_TIMER_KEY = "hope-fair-firsts"; /** The week the board belongs to (UTC ISO week, "2026-W43"): it starts again each Monday. */ export declare const hopeFairWeekKey: typeof marksmenWeekKey; export type HopeBoardRow = { name: string; value: number; at: number; }; export type HopeBoards = Record; /** `paid` is the hour's slate: `|` to when the placing was paid (older than the window is dropped on write). */ export type HopeFairSave = { week: string; boards: HopeBoards; paid: Record; }; export declare function emptyHopeBoards(): HopeBoards; export declare function emptyHopeFairSave(nowMs: number): HopeFairSave; export declare const HOPE_PAID_MAX = 4000; /** The best row first: a bigger value for 'high' contests, a smaller one for times; a tie goes to whoever scored it first. */ export declare function rankHopeRows(id: HopeContestId, rows: readonly HopeBoardRow[]): HopeBoardRow[]; /** Would `value` beat `than` on this contest? */ export declare function hopeBeats(id: HopeContestId, value: number, than: number): boolean; /** The save as the world stored it, or a fresh one: nothing unreadable is trusted, an old week's boards are dropped, the paid slate is kept. */ export declare function parseHopeFairSave(raw: unknown, nowMs: number): HopeFairSave; /** 1-based place on a contest's board, or 0 when not on it. */ export declare function hopePlaceOf(rows: readonly HopeBoardRow[], name: string): number; /** * A finished try goes on its contest's board: one place per name (only a better try replaces a worse one), a new week starts a fresh board, and a value of nothing * is never written. Returns the new save, whether it changed, and the place. */ export declare function recordHopeScore(save: HopeFairSave, id: HopeContestId, name: string, value: number, nowMs: number): { save: HopeFairSave; changed: boolean; place: number; }; /** How a board value reads: grams, seconds with a tenth, or care points. */ export declare function hopeValueText(id: HopeContestId, value: number): string; export declare function hopeBoardLine(id: HopeContestId, rows: readonly HopeBoardRow[]): string; export declare function hopeBoardText(save: HopeFairSave): string; /** npc_action ids the fair's people answer (the client sends them on untouched). */ export declare const HOPE_FAIR_ACTION_PREFIX = "hfair:"; export declare const HOPE_FAIR_ACTIONS: { readonly board: "hfair:board"; readonly ribbons: "hfair:ribbons"; readonly catch: "hfair:catch"; readonly weigh: "hfair:weigh"; readonly chop: "hfair:chop"; readonly bake: "hfair:bake"; readonly dash: "hfair:dash"; readonly stop: "hfair:stop"; }; export declare const HOPE_FAIR_OPTION_LABELS: Readonly>; /** What the clickable props are (questprop ids: the style's part before the colon). */ export declare const HOPE_PROP: { readonly trough: "hfcatch"; readonly block: "hfchop"; readonly table: "hfbake"; readonly board: "hfboard"; }; export type HopeFairProp = { readonly id: string; readonly style: string; readonly x: number; readonly z: number; readonly name: string; }; export declare const HOPE_FAIR_PROPS: ReadonlyArray; /** The hover names of the clickable props, by style (the client reads this). */ export declare const HOPE_FAIR_PROP_NAMES: Readonly>; export declare function hopeFairPropByStyle(style: string | undefined): HopeFairProp | null; /** The Blender model a fair prop draws with (stand-ins from the game's own kit; backend upgrades list `hope-fair-*`). */ export declare function hopeFairPropModel(prop: string | undefined, style?: string): string | null; export declare const HOPE_FAIR_LINES: { readonly needMark: "Stand on the mark by me first, so the course is fair."; readonly alreadyRunning: "Your try is on. Finish it, or call it off from my menu."; readonly inFight: "Finish your fight first. The fair will keep."; readonly noTry: "You have nothing running here."; readonly stopped: "Called off. Nothing is scored and nothing is paid."; readonly paidThisHour: "Your placing for this contest is already in the book this hour: another go is free but pays nothing more until the hour turns."; }; export declare const HOPE_FAIR_RULES_TEXT = "Four contests, each the first step of a skill and each scored on how well you do it, not on your level: First Catch (fishing), First Chop (woodcutting), First Bake (cooking) and the Egg and Spoon Dash (walking). A gold takes three Fair Ribbons, a silver two and a bronze one, with a few coins; each pays once an hour. The Firsts Board lists this week's best five of each and starts again on Monday."; export type HopeFairPersonId = 'reeve' | 'judge' | 'baker' | 'weigh' | 'chop' | 'spoon'; export type HopeFairFolk = { readonly id: HopeFairPersonId; readonly name: string; readonly place: string; readonly x: number; readonly z: number; readonly faceX: number; readonly faceZ: number; readonly leash: number; readonly speak: string; readonly extras: ReadonlyArray<{ readonly id: string; readonly label: string; readonly say: string; }>; /** The server-answered options on the menu, in order (labels in HOPE_FAIR_OPTION_LABELS). */ readonly actions: ReadonlyArray; /** A counter of their own: existing goods only, never food; the cook BUYS what players cook. */ readonly shop?: { readonly title: string; readonly stock: ReadonlyArray<{ readonly kind: string; readonly price: number; }>; readonly buys: Readonly>; }; }; /** The six people (sheet hope-fair-5: these names are fixed). */ export declare const HOPE_FAIR_NAMES: { readonly reeve: "Reeve Odalys Wren"; readonly judge: "Judge Barnaby Quill"; readonly baker: "Baker Hettie Crumb"; readonly weigh: "Weigh-Master Tobias Reed"; readonly chop: "Chop-Marshal Garrick Holt"; readonly spoon: "Spoon-Starter Fenna Dray"; }; export declare const HOPE_FAIR_FOLK: ReadonlyArray; export declare function hopeFairFolkByName(name: string | undefined): HopeFairFolk | null; export declare function hopeFairFolkById(id: string | undefined): HopeFairFolk | null; /** The fair's animals: harmless kinds only (a pig, a sheep, a sheepdog are never a fight); backend npcs spawn them by name. */ export declare const HOPE_FAIR_ANIMALS: ReadonlyArray<{ readonly id: string; readonly kind: 'pig' | 'sheep' | 'sheepdog'; readonly name: string; readonly x: number; readonly z: number; readonly leash: number; }>; export declare const HOPE_FAIR_ANIMAL_NAMES: readonly string[]; //# sourceMappingURL=hopeFair.d.ts.map