X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=actions1.c;h=0a1155d800c355058c63506e76519b8c2b7f0891;hb=cf219e920bb038c9ac2c879adcfd048dc13bf3bc;hp=79c0ea719c497ac138efb711af7b5c68beab3243;hpb=484ca4e9fd956e431c64d0465dbacd59215d23e4;p=open-adventure.git diff --git a/actions1.c b/actions1.c index 79c0ea7..0a1155d 100644 --- a/actions1.c +++ b/actions1.c @@ -65,6 +65,7 @@ L4000: VERB=K; case 31: goto L8320; /* FLY */ case 32: goto L8330; /* LISTEN */ case 33: goto L8340; /* ZZZZ */ + case 34: goto L8350; /* SEED */ } BUG(23); @@ -105,6 +106,7 @@ L4090: switch (VERB-1) { case 31: goto L9320; /* FLY */ case 32: return(2011); /* LISTEN */ case 33: goto L8340; /* ZZZZ */ + case 34: goto L8350; /* SEED */ } BUG(24); @@ -623,4 +625,14 @@ L8340: if(!AT(RESER) && LOC != FIXED[RESER]-1) return(2011); RSPEAK(241); return(2); +/* Seed. Expected in game logs to replicate the LCG state */ + +L8350: { + long sv; + int n; + n = sscanf(raw_input, "seed %ld\n", &sv); + if (n >= 1) + set_seed(sv); + return(2); + } }