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

Function region_dialogue

src/timeout.c:553–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551};
552
553staticfn void
554region_dialogue(void)
555{
556 boolean no_need_to_breathe, in_poison_gas_cloud;
557 long r = (HMagical_breathing & TIMEOUT), i = r / 2L;
558
559 /* might have poly'd into non-breather or moved out of gas cloud */
560 HMagical_breathing &= ~TIMEOUT;
561 no_need_to_breathe = Breathless;
562 in_poison_gas_cloud = region_danger();
563 HMagical_breathing |= r;
564 if (no_need_to_breathe || !in_poison_gas_cloud)
565 return;
566
567 if ((r % 2L) && i > 0L && i <= SIZE(region_texts))
568 pline("%s", region_texts[SIZE(region_texts) - i]);
569}
570
571/* when a status timeout is fatal, keep the status line indicator shown
572 during end of game rundown (and potential dumplog);

Callers 1

nh_timeoutFunction · 0.85

Calls 2

region_dangerFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected