- for (I=1; I<=NDWARVES-1; I++) {
- if(game.dloc[I] == game.loc)
- game.dloc[I]=DALTLC;
- game.odloc[I]=game.dloc[I];
+ for (int i=1; i<=NDWARVES-1; i++) {
+ if(game.dloc[i] == game.loc)
+ game.dloc[i]=DALTLC;
+ game.odloc[i]=game.dloc[i];
if(kk != 0)
do {
game.newloc=MOD(labs(TRAVEL[kk])/1000,1000);
/* Have we avoided a dwarf enciounter? */
bool avoided = (game.newloc > 300 ||
!INDEEP(game.newloc) ||
if(kk != 0)
do {
game.newloc=MOD(labs(TRAVEL[kk])/1000,1000);
/* Have we avoided a dwarf enciounter? */
bool avoided = (game.newloc > 300 ||
!INDEEP(game.newloc) ||
- game.odloc[I]=game.dloc[I];
- game.dloc[I]=TK[j];
- 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) {
+ game.odloc[i]=game.dloc[i];
+ game.dloc[i]=TK[j];
+ 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.
/* 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.
if(game.clock1 < 0)game.clock2=game.clock2-1;
if(game.clock2 == 0) goto L11000;
if(game.prop[LAMP] == 1)game.limit=game.limit-1;
if(game.clock1 < 0)game.clock2=game.clock2-1;
if(game.clock2 == 0) goto L11000;
if(game.prop[LAMP] == 1)game.limit=game.limit-1;
/* Once he's panicked, and clock2 has run out, we come here to set up the
* storage room. The room has two locs, hardwired as 115 (ne) and 116 (sw).
/* Once he's panicked, and clock2 has run out, we come here to set up the
* storage room. The room has two locs, hardwired as 115 (ne) and 116 (sw).