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

Function intervene

src/wizard.c:784–810  ·  view source on GitHub ↗

Here, we make trouble for the poor shmuck who actually managed to do in the Wizard. */

Source from the content-addressed store, hash-verified

782/* Here, we make trouble for the poor shmuck who actually
783 managed to do in the Wizard. */
784void
785intervene(void)
786{
787 int which = Is_astralevel(&u.uz) ? rnd(4) : rn2(6);
788
789 /* cases 0 and 5 don't apply on the Astral level */
790 switch (which) {
791 case 0:
792 case 1:
793 You_feel("vaguely nervous.");
794 break;
795 case 2:
796 if (!Blind)
797 You("notice a %s glow surrounding you.", hcolor(NH_BLACK));
798 rndcurse();
799 break;
800 case 3:
801 aggravate();
802 break;
803 case 4:
804 (void) nasty((struct monst *) 0);
805 break;
806 case 5:
807 resurrect();
808 break;
809 }
810}
811
812/* Wizard of Yendor is being removed from play (dead or escaped the dungeon);
813 keep the bookkeeping for him up to date */

Callers 1

allmain.cFile · 0.85

Calls 9

rndFunction · 0.85
rn2Function · 0.85
You_feelFunction · 0.85
YouFunction · 0.85
hcolorFunction · 0.85
rndcurseFunction · 0.85
aggravateFunction · 0.85
nastyFunction · 0.85
resurrectFunction · 0.85

Tested by

no test coverage detected