X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=5a3f2002683de89e3c78aad525adb756b0a447a0;hb=70b5b191fd43dfe3f2e4661c3ea6b27e037625b5;hp=10fce6503f348e9673b9e70add4fa4eaf3d1e61c;hpb=a3c14ba0770c1881e4a0af68d8b9f235968961d3;p=open-adventure.git diff --git a/main.c b/main.c index 10fce65..5a3f200 100644 --- a/main.c +++ b/main.c @@ -264,7 +264,7 @@ bool spotted_by_pirate(int i) /* 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 + * 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) @@ -273,9 +273,7 @@ bool spotted_by_pirate(int i) for (int 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])) { - if (HERE(j)) - k=1; + if (j==PYRAM && (game.loc==PLAC[PYRAM] || game.loc==PLAC[EMRALD])) { return true; } if (TOTING(j)) { @@ -297,7 +295,6 @@ bool spotted_by_pirate(int i) game.dloc[PIRATE]=game.chloc; game.odloc[PIRATE]=game.chloc; game.dseen[PIRATE]=false; - return true; } if (HERE(j)) @@ -904,7 +901,7 @@ static void listobjects(void) static bool do_command(FILE *cmdin) /* Get and execute a command */ { - long KQ, VERB, KK, V1, V2; + long KQ, VERB, V1, V2; long i, k, KMOD; static long igo = 0; static long obj = 0;