fix(mystery): improve mobile terminal and chips
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-05-10 05:53:32 -05:00
parent 29fd371b89
commit 33933b00d7
17 changed files with 122 additions and 18 deletions
+12 -3
View File
@@ -1,9 +1,18 @@
- [x] Need to add help text when user types "help". This should give them some common commands and explain the concepts behind text adventure games. It should also include an exceprt at the beginning from the opening text. "You arrive at the address, but you do not remember what has happened. The road behind you is gone...". The help text should disappear after the user types a new prompt (i.e., it's not persistent).
- [x] Need to add the tiles from mobile to desktop view.
- [ ] Enhance tiles with contextual awareness, enabling tiles to appear in rooms when appropriate (e.g. "attack rat").
- [x] Enhance tiles with contextual awareness, enabling tiles to appear in rooms when appropriate (e.g. "attack rat").
- [ ] Create a mechanic that asks "Are you sure?" before taking critical actions like attacking or other game-changing mechanics that might affect the final ending.
- [ ] Add a tile for USE
- [x] Add a tile for USE
- [ ] Add contextual awareness and autocomplete. For example a popup that appears above the USE text or when a user types "use". The user is able to autofill the rest of the thing by using the keyboard to toggle through the inv list and tab-complete the option, (or tap on mobile) "e.g. use (matches, light, letter) *on* (lamp)" - the word "on" there being suggested. Suggestions for autocomplete are in italics. This is one modern design element we're going to add.
- [x] Add a footer with "By [Ethan J Lewis](https://ethanjlewis.com) | [Source Code](https://half.st/ejlewis/halfstreet) | [GNU General Public License v3.0](https://half.st/ejlewis/halfstreet/src/branch/main/LICENSE)"
- [x] Add "Half Street" as ASCII Art to the intro text.
- [ ] Add logic to make the last sentence in the examined description conditional. This is where we'll list items in the room. (e.g., "The hallway runs further than the house should be wide. The dust on the floor is undisturbed except where you have walked. *The oil lamp is on the side table.*")
- [x] Add logic to make the last sentence in the examined description conditional. This is where we'll list items in the room. (e.g., "The hallway runs further than the house should be wide. The dust on the floor is undisturbed except where you have walked. *The oil lamp is on the side table.*")
- [ ] Create a new item with a mechanic: whiskey bottle. When the user drinks it they get drunk and are transported to the "drunk rooms" which are a bit of a maze and things get a little topsy-turvy. The player chances to lose an item (returning to its original spot) when they get drunk and wakes up several turns later somewhere else predetermined.
- [ ] Add lightened descriptions to darkened rooms. About half the rooms should be too dark to see anything (affects ability to move forward, can't see exits or entounters, except for maybe hints at the encounters, like sounds or shapes in the dark) Add frontmatter property to all rooms: (dark: true/false). Make text in darkened rooms a grey color.
- [x] Fix mobile - scrolling issue (page grows as the terminal grows).
- [x] Fix mobile - ascii text art at beginning too big to render
- [ ] Implement a simple "stealth mechanic", where sometimes it's advantageous to have the light out.
- [ ] Implement a simple (optional?) minimap in the UI? - Maybe tied to an item? Once you get the map the minimap appears? Can we POC it?
- [ ] Feature: Ability to retain console history, e.g., scroll through previous commands with up and down arrows.
- [ ] Feature: Grey italicized "type here..." text that appears near the terminal if the user doesn't click into the terminal within 30 seconds of entering the game or click the help button. The text disappears once a user clicks in the terminal, or selects a card.
- [ ]
+3
View File
@@ -0,0 +1,3 @@
views:
- type: table
name: Table
Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

+15
View File
@@ -13,11 +13,14 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'attack',
target: 'rat',
chipLabel: 'ATTACK RAT',
chipCommand: 'attack rat',
narration: narration('rat', 'attack-rat-resolved'),
to: 'resolved',
},
{
verb: 'wait',
chipLabel: 'WAIT',
narration: narration('rat', 'wait-stays'),
to: 'lurking',
},
@@ -39,6 +42,8 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'close',
target: 'window-guest',
chipLabel: 'CLOSE CURTAINS',
chipCommand: 'close curtains',
narration: narration('window-guest', 'close-window-guest-resolved'),
to: 'resolved',
},
@@ -61,6 +66,8 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'cut',
target: 'ivy-figure',
chipLabel: 'CUT VINES',
chipCommand: 'cut vines',
requires: { item: 'pruning-shears' },
narration: narration('ivy-figure', 'cut-ivy-figure-resolved'),
to: 'resolved',
@@ -68,6 +75,8 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'use',
target: 'ivy-figure',
chipLabel: 'USE SHEARS',
chipCommand: 'use vines with shears',
requires: { item: 'pruning-shears' },
narration: narration('ivy-figure', 'cut-ivy-figure-resolved'),
to: 'resolved',
@@ -91,6 +100,8 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'open',
target: 'covered-cage',
chipLabel: 'UNCOVER CAGE',
chipCommand: 'uncover cage',
narration: narration('covered-cage', 'open-covered-cage-resolved'),
to: 'resolved',
},
@@ -113,6 +124,8 @@ export const encounters: Record<string, EncounterDef> = {
{
verb: 'play',
target: 'piano-echo',
chipLabel: 'PLAY NOTE',
chipCommand: 'play note',
narration: narration('piano-echo', 'play-piano-echo-resolved'),
to: 'resolved',
},
@@ -134,6 +147,7 @@ export const encounters: Record<string, EncounterDef> = {
transitions: [
{
verb: 'wait',
chipLabel: 'WAIT',
narration: narration('breathing-wall', 'wait-resolved'),
to: 'resolved',
},
@@ -155,6 +169,7 @@ export const encounters: Record<string, EncounterDef> = {
transitions: [
{
verb: 'wait',
chipLabel: 'WAIT',
narration: narration('linen-shape', 'wait-resolved'),
to: 'resolved',
},
+1 -1
View File
@@ -21,4 +21,4 @@ Something human-shaped hangs among the ivy. The dining room is south.
The conservatory sweats in the dark.
## examined
The tiled floor is split by roots. The air smells of wet soil and cold iron. Pruning shears lie half-buried beneath a bench.
The tiled floor is split by roots. The air smells of wet soil and cold iron. A bench has been dragged beneath the blind glass roof.
+1 -1
View File
@@ -22,4 +22,4 @@ The hallway is west. A greenish light presses through glass to the north.
The dining room holds its place at the table.
## examined
The silver has tarnished black at the edges. The untouched plate is clean enough to show a dim shape behind you, though there is no one there. A candlestick rests beside it.
The silver has tarnished black at the edges. The untouched plate is clean enough to show a dim shape behind you, though there is no one there.
+1 -1
View File
@@ -19,4 +19,4 @@ A long hallway, lit by nothing. It runs further than the house should allow. An
The long hallway. It has not shortened.
## examined
The hallway runs further than the house should be wide. The dust on the floor is undisturbed except where you have walked. The oil lamp is on the side table. Doors wait north and west. Two more thresholds sit where the wall should be solid.
The hallway runs further than the house should be wide. The dust on the floor is undisturbed except where you have walked. Doors wait north and west. Two more thresholds sit where the wall should be solid.
+1 -1
View File
@@ -22,4 +22,4 @@ The servants' passage is west.
The laundry hangs white and silent.
## examined
Water darkens the floor beneath the hanging sheets, though none of them drip. A damp sheet has fallen into an empty basket.
Water darkens the floor beneath the hanging sheets, though none of them drip. An empty basket waits below the line.
+1 -1
View File
@@ -22,4 +22,4 @@ Something answers from elsewhere in the house, too soft to be music. A servants'
The music room waits on the same note.
## examined
The depressed piano key does not rise when touched. A tiny key rests on the music stand where sheet music should be.
The depressed piano key does not rise when touched. The music stand is empty, but its clips remain open.
+1 -1
View File
@@ -22,4 +22,4 @@ A cloth-covered cage hangs from a stand. The hallway is east.
The smoking room keeps its breath.
## examined
Cigar ash lies in a clean saucer. A silver lighter has been placed beside it with care. The covered cage moves once, though the room is still.
Cigar ash lies in a clean saucer. The cold hearth reflects the chairs in a narrow black curve.
+4
View File
@@ -68,6 +68,10 @@ export interface EncounterTransition {
verb: Verb
/** Required target noun id, or '*' for any target, or undefined for verb-only. */
target?: ItemId | EncounterId | '*'
/** Optional chip label shown by the UI instead of deriving one from ids. */
chipLabel?: string
/** Optional command injected by the UI chip instead of deriving one from ids. */
chipCommand?: string
/** Required item id in inventory (and optional state predicate). */
requires?: { item: ItemId; state?: Record<string, string | boolean | number> }
/** Phase to transition to, or 'resolved' / 'failed'. */