/** * BRAMBLE FAIR CONTESTS (T21, 2026-10-14; design sheets fair-contests-1..6 in the backend's design-references; plan * `.cursor/task-plans/2026-10-14-t21-fair-contests-shipment.md`; PLAN_1_TO_40.md E4 and E12). * * Four things to do at the fair, each judged by Fair Marshal Hobb, each paying its placing once an hour per player (the * hourly slate `FairFolkState.done` carries `contest-`, so a placing cannot be farmed; another go is always free, * it just pays nothing more that hour): * * - the archery butts: three rounds of three arrows at the contest butts, scored 1 to 5 an arrow; * - the greasy piglet chase: catch as many greased piglets as you can inside a minute; * - the livestock show: brush a show lamb, give it an apple, lead it to the ring and present it (judged on care); * - the herding trial: round loose lambs into the fold before time runs out (a sheepdog pup does half the work). * * Rewards are placeholders (balance is done last). Every number is a WORLD tile. The pure rules live here so the client * and the backend read the same figures; the server's `fairContests.ts` runs the sessions. */ import type { StorySkill } from './storyQuests.js'; export type FairContestId = 'butts' | 'piglets' | 'show' | 'herd'; export declare const FAIR_CONTEST_IDS: readonly FairContestId[]; /** The ribbon a placing earns: one item, a few per placing (gold 3, silver 2, bronze 1). */ export declare const FAIR_RIBBON_KIND = "fairribbon"; /** npc_action ids the Marshal answers (the client sends them on untouched). */ export declare const FAIR_CONTEST_ACTION_PREFIX = "fairc:"; export declare const FAIR_CONTEST_ACTIONS: { readonly board: "fairc:board"; readonly butts: "fairc:butts"; readonly piglets: "fairc:piglets"; readonly show: "fairc:show"; readonly present: "fairc:present"; readonly herd: "fairc:herd"; }; export declare const FAIR_CONTEST_OPTION_LABELS: Readonly>; /** The actions on the animals themselves (a show lamb, a loose lamb, a greased piglet). */ export declare const FAIR_ANIMAL_ACTIONS: { readonly brush: "fairc:brush"; readonly feed: "fairc:feed"; readonly lead: "fairc:lead"; readonly herd: "fairc:herd-lamb"; readonly catch: "fairc:catch"; }; /** Who the two kinds of lamb are, and the piglets (NPC `name`s: the client dresses their menus by name). */ export declare const FAIR_SHOW_LAMB_NAME = "Show Lamb"; export declare const FAIR_LOOSE_LAMB_NAME = "Loose Lamb"; export declare const FAIR_PIGLET_NAME = "Greased Piglet"; export declare const FAIR_PUP_NAME = "Nye's Pup"; export type FairPlacing = 'gold' | 'silver' | 'bronze' | 'none'; export type FairPrize = { coins: number; xp: number; ribbons: number; }; export type FairContestDef = { id: FairContestId; title: string; /** The skill its XP is paid in (placeholders). */ skill: StorySkill; blurb: string; prizes: Readonly>; }; export declare const FAIR_CONTESTS: Readonly>; /** The slate id a contest's prize is recorded under for the hour. */ export declare const fairContestDoneId: (id: FairContestId) => string; /** * Every slate id the contests can write: the hour's placing (`contest-`) and its consolation (`contest--c`). The * fair folk's saved record keeps these (`normalizeFairFolkState`), so a relog or a restart inside the hour cannot pay a * contest's ribbons, coins and XP a second time. */ export declare const FAIR_CONTEST_DONE_IDS: readonly string[]; export type FairContestRect = { minX: number; maxX: number; minZ: number; maxZ: number; }; /** * The contest meadow: the low basin east of the fair's pens (the 2026-10-14 survey: grass at height 0 to 2 between the pens' * plateau and the shore cliff, a few rocks to clear). Levelled to one height and eased into the land, like the fair itself. */ export declare const FAIR_MEADOW: FairContestRect; export declare const FAIR_MEADOW_HEIGHT = 2; export declare const FAIR_MEADOW_EASE = 3; /** The tile a signpost at the meadow's mouth stands on, and what it says. */ export declare const FAIR_MEADOW_SIGN: { readonly x: 903; readonly z: 649; readonly text: "Fair Contests"; }; /** The fold (the pup's pen and the show lambs' home): a rail fence, a gap on the east side. */ export declare const FAIR_FOLD: FairContestRect; export declare const FAIR_FOLD_GAP: readonly { x: number; z: number; }[]; /** Inside the fold, where a herded lamb counts (strictly inside the fence). */ export declare const FAIR_FOLD_INSIDE: FairContestRect; /** The three show lambs graze inside the fold. */ export declare const FAIR_SHOW_LAMB_SPOTS: readonly { x: number; z: number; }[]; /** The loose lambs graze on the meadow in front of the fold and its gate. */ export declare const FAIR_LOOSE_LAMB_SPOTS: readonly { x: number; z: number; }[]; /** The piglet arena: rail fence, a gap in the south side. Piglets stay inside. */ export declare const FAIR_PIGLET_ARENA: FairContestRect; export declare const FAIR_PIGLET_GATE: readonly { x: number; z: number; }[]; export declare const FAIR_PIGLET_SPOTS: readonly { x: number; z: number; }[]; export declare const FAIR_PIGLET_LEASH = 3; /** The contest butts: a row at z 650, shot from marks six tiles north (the drill's firing position is z - 6). */ export declare const FAIR_BUTT_PREFIX = "fair-butt-"; export declare const FAIR_BUTT_ROW_Z = 650; export declare const FAIR_BUTT_FIRING_Z: number; export declare const FAIR_BUTT_XS: readonly number[]; export declare const FAIR_BUTT_IDS: readonly string[]; /** The chained bows' rack on the firing line (anyone may shoot with no bow in hand, as at Brindlecross). */ export declare const FAIR_BUTT_BOWS: { readonly x: 921; readonly z: number; }; export declare function isFairButtTargetId(id: string | undefined | null): boolean; export declare const FAIR_BUTTS_ROUNDS = 3; export declare const FAIR_BUTTS_ARROWS = 3; export declare const FAIR_BUTTS_TIERS: { readonly gold: 24; readonly silver: 18; readonly bronze: 12; }; /** * One arrow's score, 1 to 5: one plus how many of four rolls (each 0 to 1) fall under the archer's chance. The chance climbs * with Archery (0.25 at level 1 to 0.6 at level 30 and over), so a better shot scores more and nobody is certain. */ export declare function fairArrowScore(archery: number, rolls: readonly number[]): number; export declare function fairButtsPlacing(total: number): FairPlacing; export declare const FAIR_PIGLET_TIME_MS = 60000; /** A piglet slips a catch more often than not: the chance a try holds it. */ export declare const FAIR_PIGLET_CATCH_CHANCE = 0.45; /** How close a player must be to try (tiles), and the pause between tries (ms). */ export declare const FAIR_PIGLET_REACH = 2; export declare const FAIR_PIGLET_TRY_MS = 1200; /** A caught piglet goes back to the crate and is out again in the arena after this long. */ export declare const FAIR_PIGLET_RETURN_MS = 12000; export declare const FAIR_PIGLETS_TIERS: { readonly gold: 5; readonly silver: 3; readonly bronze: 2; }; export declare function fairPigletsPlacing(caught: number): FairPlacing; /** Inside the ring's fence (types/backend fairGreen.ts FAIR_RING x 884-895, z 639-646): a lamb led in here is presented. */ export declare const FAIR_RING_INSIDE: FairContestRect; /** What a show lamb is given (an apple off the fair's own orchard). */ export declare const FAIR_SHOW_FEED_KIND = "apple"; /** Care points: a brush and an apple are two each, arriving within the time is one. Judged on care, never on luck. */ export declare const FAIR_SHOW_CARE: { readonly brush: 2; readonly feed: 2; readonly prompt: 1; }; export declare const FAIR_SHOW_PROMPT_MS: number; export declare const FAIR_SHOW_TIERS: { readonly gold: 5; readonly silver: 4; readonly bronze: 2; }; /** A led lamb's pace (tiles a tick, the stray ewes' and the warthog's), how close behind it walks, and when it catches up by itself. */ export declare const FAIR_SHOW_LEAD: { readonly speed: 0.22; readonly heel: 1.8; readonly teleport: 14; }; /** A lamb led away is back in the fold after this long (or when its player's show is over). */ export declare const FAIR_SHOW_RESPAWN_MS = 25000; export declare function fairShowPoints(brushed: boolean, fed: boolean, promptly: boolean): number; export declare function fairShowPlacing(points: number): FairPlacing; /** Three loose lambs, a fold, a clock. A lamb is penned when it is led through the gate and in (or, with a pup out, rounded up for you). */ export declare const FAIR_HERD_LAMBS = 3; export declare const FAIR_HERD_TIME_MS: number; /** The trial's marks: all three penned inside 90 seconds is gold, 150 silver, anything inside the three minutes bronze. */ export declare const FAIR_HERD_TIERS: { readonly gold: 90000; readonly silver: 150000; }; /** With a pup out a lamb is rounded up on the click, after this pause (the pup runs her in). */ export declare const FAIR_HERD_PUP_PAUSE_MS = 4000; export declare function fairHerdPlacing(penned: number, elapsedMs: number): FairPlacing; /** * Nye's pup (E12): earned by the quest `nyesPup` (A Dog for the Flock), which asks for a win at the fair's herding trial after * Nye's Strays is done. It walks at your heel in the pet's place (the member beagle stays home while it is out), and is called * or sent home from Shepherd Nye's or Drover Alwyn's menu. Nothing is saved about it but the away flag. */ export declare const FAIR_PUP_ACTIONS: { readonly call: "fairc:pup-call"; readonly home: "fairc:pup-home"; }; export declare const FAIR_PUP_OPTION_LABELS: Readonly>; //# sourceMappingURL=fairContests.d.ts.map