@@ -345,13 +345,13 @@ async function puzzle1() {
345
345
choice : "anything"
346
346
} ;
347
347
348
- const somethingOrAnything = randomInt ( 0 , 2 ) ;
348
+ const somethingOrAnything = randomYes ( 0.5 ) ;
349
349
350
350
let choice = await menu ( [
351
351
{ text : "" , choice : "nothing" } ,
352
- somethingOrAnything === 0 ? optionSomething : optionAnything ,
352
+ ! somethingOrAnything ? optionSomething : optionAnything ,
353
353
{ text : "I don't feel anything..." , choice : "nothing" } ,
354
- somethingOrAnything === 1 ? optionSomething : optionAnything ,
354
+ ! ! somethingOrAnything ? optionSomething : optionAnything ,
355
355
{ text : `I feel ${ randomMsg ( [ "everything" , "EVERYTHING" ] ) } !..` , choice : "everything" }
356
356
] ) ;
357
357
@@ -599,12 +599,21 @@ async function scene4_world(note) {
599
599
] ;
600
600
601
601
if ( note . id . includes ( "-" ) ) {
602
- choices = choices . toSpliced ( 4 , 0 , {
602
+ const insertIdx = choices . findIndex ( c => c . choice === "hint" ) ;
603
+ choices = choices . toSpliced ( insertIdx , 0 , {
603
604
text : "In English, please!" ,
604
605
choice : "inEnglish"
605
606
} ) ;
606
607
}
607
608
609
+ if ( note . meta . link ) {
610
+ const insertIdx = choices . findIndex ( c => c . choice === "followLanguage" ) ;
611
+ choices = choices . toSpliced ( insertIdx , 0 , {
612
+ text : "Follow link." ,
613
+ choice : "followLink"
614
+ } ) ;
615
+ }
616
+
608
617
const choice = await menu ( choices , showMenu ) ;
609
618
showMenu = false ;
610
619
@@ -713,6 +722,33 @@ async function scene4_world(note) {
713
722
showNote = true ;
714
723
showMenu = true ;
715
724
}
725
+
726
+ if ( choice === "followLink" ) {
727
+ if ( note . meta . link . startsWith ( "http" ) ) {
728
+ window . open ( note . meta . link , "_blank" ) ;
729
+ }
730
+ else {
731
+ const nextNote = game . notes . find ( n => {
732
+ // count breadcrumbs or not?
733
+ if ( n . id === note . meta . link ) {
734
+ return true ;
735
+ }
736
+ return false ;
737
+ } ) ;
738
+
739
+ if ( nextNote ) {
740
+ note = nextNote ;
741
+ game . state . breadCrumbs . push ( note . id ) ;
742
+ game . saveState ( ) ;
743
+ }
744
+ else {
745
+ await reachedEOW ( ) ;
746
+ noteColor = randomNoteColor ( note ) ;
747
+ }
748
+ showNote = true ;
749
+ showMenu = true ;
750
+ }
751
+ }
716
752
717
753
if ( choice === "copy" ) {
718
754
const wasCopied = await copyToClipboard ( note . original ) ;
0 commit comments