MCPcopy Create free account
hub / github.com/NetHack/NetHack / familiar_level_msg

Function familiar_level_msg

src/do.c:1447–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1445}
1446
1447staticfn void
1448familiar_level_msg(void)
1449{
1450 static const char *const fam_msgs[4] = {
1451 "You have a sense of deja vu.",
1452 "You feel like you've been here before.",
1453 "This place %s familiar...", 0 /* no message */
1454 };
1455 static const char *const halu_fam_msgs[4] = {
1456 "Whoa! Everything %s different.",
1457 "You are surrounded by twisty little passages, all alike.",
1458 "Gee, this %s like uncle Conan's place...", 0 /* no message */
1459 };
1460 const char *mesg;
1461 char buf[BUFSZ];
1462 int which = rn2(4);
1463
1464 if (Hallucination)
1465 mesg = halu_fam_msgs[which];
1466 else
1467 mesg = fam_msgs[which];
1468 if (mesg && strchr(mesg, '%')) {
1469 DISABLE_WARNING_FORMAT_NONLITERAL
1470 Sprintf(buf, mesg, !Blind ? "looks" : "seems");
1471 RESTORE_WARNING_FORMAT_NONLITERAL
1472 mesg = buf;
1473 }
1474 if (mesg)
1475 pline1(mesg);
1476}
1477
1478void
1479goto_level(

Callers 1

goto_levelFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected