- game.dseen[I]=(game.dseen[I] && INDEEP(LOC)) || (game.dloc[I] == LOC || game.odloc[I] == LOC);
- if(!game.dseen[I]) goto L6030;
- game.dloc[I]=LOC;
- if(I != 6) goto L6027;
-
-/* The pirate's spotted him. He leaves him alone once we've found chest. K
- * counts if a treasure is here. If not, and tally=1 for an unseen chest, let
- * the pirate be spotted. Note that PLACE(CHEST)=0 might mean that he's
- * thrown it to the troll, but in that case he's seen the chest (PROP=0). */
-
- if(LOC == game.chloc || PROP[CHEST] >= 0) goto L6030;
- K=0;
- /* 6020 */ for (J=50; J<=MAXTRS; J++) {
-/* Pirate won't take pyramid from plover room or dark room (too easy!). */
- if(J == PYRAM && (LOC == PLAC[PYRAM] || LOC == PLAC[EMRALD])) goto L6020;
- if(TOTING(J)) goto L6021;
-L6020: if(HERE(J))K=1;
- } /* end loop */
- if(game.tally == 1 && K == 0 && PLACE[CHEST] == 0 && HERE(LAMP) && PROP[LAMP]
- == 1) goto L6025;
- if(game.odloc[6] != game.dloc[6] && PCT(20))RSPEAK(127);
- goto L6030;
-
-L6021: if(PLACE[CHEST] != 0) goto L6022;
-/* Install chest only once, to insure it is the last treasure in the list. */
- MOVE(CHEST,game.chloc);
- MOVE(MESSAG,game.chloc2);
-L6022: RSPEAK(128);
- /* 6023 */ for (J=50; J<=MAXTRS; J++) {
- if(J == PYRAM && (LOC == PLAC[PYRAM] || LOC == PLAC[EMRALD])) goto L6023;
- if(AT(J) && FIXED[J] == 0)CARRY(J,LOC);
- if(TOTING(J))DROP(J,game.chloc);
-L6023: /*etc*/ ;
- } /* end loop */
-L6024: game.dloc[6]=game.chloc;
- game.odloc[6]=game.chloc;
- game.dseen[6]=false;
- goto L6030;
-
-L6025: RSPEAK(186);
- MOVE(CHEST,game.chloc);
- MOVE(MESSAG,game.chloc2);
- goto L6024;
-
-/* This threatening little dwarf is in the room with him! */
-
-L6027: game.dtotal=game.dtotal+1;
- if(game.odloc[I] != game.dloc[I]) goto L6030;
- ATTACK=ATTACK+1;
- if(game.knfloc >= 0)game.knfloc=LOC;
- if(randrange(1000) < 95*(game.dflag-2))STICK=STICK+1;
-L6030: /*etc*/ ;
- } /* end loop */
-
-/* Now we know what's happening. Let's tell the poor sucker about it.
- * Note that various of the "knife" messages must have specific relative
- * positions in the RSPEAK database. */
-
- if(game.dtotal == 0) goto L2000;
- SETPRM(1,game.dtotal,0);
- RSPEAK(4+1/game.dtotal);
- if(ATTACK == 0) goto L2000;
- if(game.dflag == 2)game.dflag=3;
- SETPRM(1,ATTACK,0);
- K=6;
- if(ATTACK > 1)K=250;
- RSPEAK(K);
- SETPRM(1,STICK,0);
- RSPEAK(K+1+2/(1+STICK));
- if(STICK == 0) goto L2000;
- game.oldlc2=LOC;
- goto L99;
+ game.dseen[I]=(game.dseen[I] && INDEEP(game.loc)) || (game.dloc[I] == game.loc || game.odloc[I] == game.loc);
+ if(!game.dseen[I]) continue;
+ game.dloc[I]=game.loc;
+ if(I == PIRATE) {
+ /* The pirate's spotted him. He leaves him alone once we've
+ * found chest. K counts if a treasure is here. If not, and
+ * tally=1 for an unseen chest, let the pirate be spotted.
+ * Note that game.place(CHEST)=0 might mean that he's thrown
+ * it to the troll, but in that case he's seen the chest
+ * (game.prop=0). */
+ if(game.loc == game.chloc || game.prop[CHEST] >= 0)
+ continue;
+ K=0;
+ for (J=MINTRS; J<=MAXTRS; J++) {
+ /* Pirate won't take pyramid from plover room or dark
+ * room (too easy!). */
+ if(J == PYRAM && (game.loc == PLAC[PYRAM] || game.loc == PLAC[EMRALD]))
+ goto L6020;
+ if(TOTING(J)) {
+ goto L6021;
+ }
+ L6020:
+ if(HERE(J))
+ K=1;
+ }
+ if(game.tally == 1 && K == 0 && game.place[CHEST] == 0 && HERE(LAMP) && game.prop[LAMP] == 1) {
+ RSPEAK(186);
+ MOVE(CHEST,game.chloc);
+ MOVE(MESSAG,game.chloc2);
+ goto L6024;
+ }
+ if(game.odloc[PIRATE] != game.dloc[PIRATE] && PCT(20))
+ RSPEAK(127);
+ continue;
+
+ L6021:
+ if(game.place[CHEST] == 0) {
+ /* Install chest only once, to insure it is the last treasure in
+ * the list. */
+ MOVE(CHEST,game.chloc);
+ MOVE(MESSAG,game.chloc2);
+ }
+ RSPEAK(128);
+ for (J=MINTRS; J<=MAXTRS; J++) {
+ if (!(J == PYRAM && (game.loc == PLAC[PYRAM] || game.loc == PLAC[EMRALD]))) {
+ if(AT(J) && game.fixed[J] == 0)
+ CARRY(J,game.loc);
+ if(TOTING(J))
+ DROP(J,game.chloc);
+ }
+ }
+ L6024:
+ game.dloc[PIRATE]=game.chloc;
+ game.odloc[PIRATE]=game.chloc;
+ game.dseen[PIRATE]=false;
+ continue;
+ }