comparison rogue3/rip.c @ 21:8bd134f676be

rogue3: improve log messages when Amulet is found
author edwarj4
date Thu, 12 Nov 2009 12:53:29 +0000
parents a86ae56e1ed6
children 63dcd855bc8e
comparison
equal deleted inserted replaced
20:bbf072f8bafa 21:8bd134f676be
323 *killer == 'o' || *killer == 'u') 323 *killer == 'o' || *killer == 'u')
324 strcat(logmessage, "n "); 324 strcat(logmessage, "n ");
325 else 325 else
326 strcat(logmessage, " "); 326 strcat(logmessage, " ");
327 strcat(logmessage, killer); 327 strcat(logmessage, killer);
328 if (max_level > level) 328 if (amulet)
329 sprintf(ltemp, " on level %d [max %d]\n", level, max_level); 329 sprintf(ltemp, " on level %d [max %d] with the Amulet\n",
330 level, max_level);
330 else 331 else
331 sprintf(ltemp, " on level %d\n", level); 332 sprintf(ltemp, " on level %d\n", level);
332 strcat(logmessage, ltemp); 333 strcat(logmessage, ltemp);
333 } 334 }
334 else if (flags == 1) /* quit */ 335 else if (flags == 1) /* quit */
335 { 336 {
336 if (max_level > level) 337 if (amulet)
337 sprintf(ltemp, "quit on level %d [max %d]\n", level, max_level); 338 sprintf(ltemp, "quit on level %d [max %d] with the Amulet\n",
339 level, max_level);
338 else 340 else
339 sprintf(ltemp, "quit on level %d\n", level); 341 sprintf(ltemp, "quit on level %d\n", level);
340 strcat(logmessage, ltemp); 342 strcat(logmessage, ltemp);
341 } 343 }
342 else if (flags == 2) /* won */ 344 else if (flags == 2) /* won */
343 { 345 {
344 sprintf(ltemp, "escaped with the Amulet found on level %d\n", max_level); 346 sprintf(ltemp, "escaped with the Amulet [deepest level :%d]\n",
347 max_level);
345 strcat(logmessage, ltemp); 348 strcat(logmessage, ltemp);
346 } 349 }
347 else 350 else
348 return; 351 return;
349 352