118 lines
5.6 KiB
Plaintext
118 lines
5.6 KiB
Plaintext
// Shared declarations for the whole project.
|
|
//
|
|
// This node is never played. Declaring every variable in one place means the
|
|
// compiler catches typos ("$reputaton") instead of silently creating a second
|
|
// variable at runtime.
|
|
//
|
|
// Writing rules the code deliberately does not enforce (Skill Bible §7 / refactor plan §2.1):
|
|
// - Wrong Truth failures carry no failure signal in the prose — the UI banner is the only tell.
|
|
// - Documentary routes are gated on Act and errand state, never on a voice.
|
|
//
|
|
// Modifier Yarn commands (see YarnSkillCommands):
|
|
// <<skill_mod scene facework 2>> — source key "scene" = situational; clear on scene exit
|
|
// <<clear_skill_mods scene>>
|
|
// Other source keys (drunk, injured, …) are state buckets.
|
|
|
|
title: Declarations
|
|
---
|
|
// How much the door staff likes you.
|
|
<<declare $reputation = 0 as number>>
|
|
|
|
// Written by <<check>> (YarnSkillCommands). Never <<set>> these by hand.
|
|
<<declare $check_result = false as bool>>
|
|
<<declare $check_roll = 0 as number>>
|
|
<<declare $check_total = 0 as number>>
|
|
<<declare $check_dc = 0 as number>>
|
|
<<declare $check_modifier = 0 as number>>
|
|
<<declare $check_degree = "" as string>>
|
|
<<declare $check_skill = "" as string>>
|
|
|
|
// Used by top_skill
|
|
<<declare $winner = "" as string>>
|
|
<<declare $previous_winner = "" as string>>
|
|
|
|
// Candidate lean. Three permanently-live readings of who the PC is; they are
|
|
// not mutually exclusive and never resolve into a canonical identity.
|
|
//
|
|
// DESIGN DECISION 2026-08-16 — amends the "no code ever reads lean" guardrail in
|
|
// docs/candidate-system-implementation-plan.md §6.1: scenes are meant to tilt
|
|
// toward one reading and NPCs are meant to act on the current tilt, so that a
|
|
// player who thinks they have settled on a path gets challenged on it in the
|
|
// next scene. Reading lean through top_skill(...) is therefore sanctioned, as in
|
|
// SC101_Asks_Candidate_Chevalier_Cassian_Thal_Talk. top_skill returns its FIRST
|
|
// argument on a tie, which is why made_asset is passed first — the Made Asset
|
|
// bias on an even score is deliberate, not an accident of argument order.
|
|
//
|
|
// What the amendment does NOT license: a stored winner. There is still no
|
|
// $dominant_candidate, no ground-truth identity field, and nothing in save data
|
|
// beyond these three integers. $winner above is scratch, recomputed per use.
|
|
<<declare $self_lean_made_asset = 0 as number>>
|
|
<<declare $self_lean_journalist = 0 as number>>
|
|
<<declare $self_lean_inheritor = 0 as number>>
|
|
|
|
// Scene witnessed. Convention: $seen_<scene_id>.
|
|
<<declare $seen_sc_101 = false as bool>>
|
|
|
|
// Clue coverage flags. One per registry clue id ($found_<clue_id>). Writers
|
|
// <<set>> these at the discovery beat alongside the lean write. Lean tracks
|
|
// belief (and can move on a Wrong Truth failure); $found_* tracks coverage.
|
|
// No code reads these.
|
|
<<declare $found_made_asset_object = false as bool>>
|
|
<<declare $found_made_asset_testimony = false as bool>>
|
|
<<declare $found_made_asset_document = false as bool>>
|
|
<<declare $found_made_asset_intuition = false as bool>>
|
|
|
|
<<declare $found_journalist_object = false as bool>>
|
|
<<declare $found_journalist_testimony = false as bool>>
|
|
<<declare $found_journalist_document = false as bool>>
|
|
<<declare $found_journalist_intuition = false as bool>>
|
|
|
|
<<declare $found_inheritor_object = false as bool>>
|
|
<<declare $found_inheritor_testimony = false as bool>>
|
|
<<declare $looking_for_doss = false as bool>>
|
|
<<declare $had_the_estate_drink = false as bool>>
|
|
<<declare $found_inheritor_document = false as bool>>
|
|
<<declare $found_inheritor_intuition = false as bool>>
|
|
|
|
// Exploration gating. Clue availability is exploration-gated, never skill-gated.
|
|
// Convention: $visited_<location_id> on first arrival; $errand_<errand_id> when
|
|
// an errand reaches the state that matters. Writers <<set>> these from scene
|
|
// content. unlockFlag fields in candidates.json may only name these families.
|
|
<<declare $visited_desk = false as bool>>
|
|
<<declare $visited_back_office = false as bool>>
|
|
<<declare $visited_archives = false as bool>>
|
|
<<declare $visited_coat_check = false as bool>>
|
|
<<declare $visited_press_room = false as bool>>
|
|
<<declare $visited_private_box = false as bool>>
|
|
<<declare $visited_membership_ledger = false as bool>>
|
|
<<declare $errand_door_list = false as bool>>
|
|
<<declare $errand_find_contact = false as bool>>
|
|
<<declare $errand_ask_about_name = false as bool>>
|
|
<<declare $spoke_to_bartender = false as bool>>
|
|
<<declare $revealed_fugue_to_bartender = false as bool>>
|
|
|
|
// Player name substitution. Uppercase [PC] in the Skill Bible means the full,
|
|
// formal form (STANDING ORDER, PROVENANCE); lowercase [pc] means the familiar
|
|
// short form (CONFLUENCE, FACEWORK). Two variables, not one — collapsing them
|
|
// loses a characterisation rule the bible states for four separate voices.
|
|
// Defaults are placeholders; naming the PC is design's call.
|
|
<<declare $player_name = "Vesper" as string>>
|
|
<<declare $player_name_full = "Vesper Adaire" as string>>
|
|
|
|
// Club alias. Smart variable: deterministically derived from $player_name via
|
|
// AliasNameGenerator.alias_name (hash-seeded pick from two word pools), so it
|
|
// is never in sync-drift and never <<set>> by hand. Same real name always
|
|
// yields the same alias; the alias itself bears no resemblance to the input.
|
|
<<declare $player_alias = alias_name($player_name) as string>>
|
|
|
|
// Information about history and symbols
|
|
<<declare $sat_down_at_table = false as bool>>
|
|
<<declare $saw_knights_atlantean_cross_on_place_card = false as bool>>
|
|
|
|
// Character dialogue gates
|
|
<<declare $spoke_to_chevalier_cassian_thal = false as bool>>
|
|
<<declare $spoke_to_bradford_kane = false as bool>>
|
|
<<declare $inquired_about_cyprus = false as bool>>
|
|
<<declare $declared_candidate_to_chevalier_cassian_thal = false as bool>>
|
|
===
|