MCPcopy Index your code
hub / github.com/NetHack/NetHack / cpostfx

Function cpostfx

src/eat.c:1128–1328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126
1127/* called after completely consuming a corpse */
1128staticfn void
1129cpostfx(int pm)
1130{
1131 int tmp = 0;
1132 int catch_lycanthropy = NON_PM;
1133 boolean check_intrinsics = FALSE;
1134
1135 /* in case `afternmv' didn't get called for previously mimicking
1136 gold, clean up now to avoid `eatmbuf' memory leak */
1137 if (ge.eatmbuf)
1138 (void) eatmdone();
1139
1140 switch (pm) {
1141 case PM_WRAITH:
1142 pluslvl(FALSE);
1143 break;
1144 case PM_HUMAN_WERERAT:
1145 catch_lycanthropy = PM_WERERAT;
1146 break;
1147 case PM_HUMAN_WEREJACKAL:
1148 catch_lycanthropy = PM_WEREJACKAL;
1149 break;
1150 case PM_HUMAN_WEREWOLF:
1151 catch_lycanthropy = PM_WEREWOLF;
1152 break;
1153 case PM_NURSE:
1154 if (Upolyd)
1155 u.mh = u.mhmax;
1156 else
1157 u.uhp = u.uhpmax;
1158 make_blinded(0L, !u.ucreamed);
1159 disp.botl = TRUE;
1160 check_intrinsics = TRUE; /* might also convey poison resistance */
1161 break;
1162 case PM_STALKER:
1163 if (!Invis) {
1164 set_itimeout(&HInvis, (long) rn1(100, 50));
1165 if (!Blind && !BInvis)
1166 self_invis_message();
1167 } else {
1168 if (!(HInvis & INTRINSIC))
1169 You_feel("hidden!");
1170 HInvis |= FROMOUTSIDE;
1171 HSee_invisible |= FROMOUTSIDE;
1172 }
1173 newsym(u.ux, u.uy);
1174 FALLTHROUGH;
1175 /*FALLTHRU*/
1176 case PM_YELLOW_LIGHT:
1177 case PM_GIANT_BAT:
1178 make_stunned((HStun & TIMEOUT) + 30L, FALSE);
1179 FALLTHROUGH;
1180 /*FALLTHRU*/
1181 case PM_BAT:
1182 make_stunned((HStun & TIMEOUT) + 30L, FALSE);
1183 break;
1184 case PM_GIANT_MIMIC:
1185 tmp += 10;

Callers 3

done_eatingFunction · 0.85
consume_tinFunction · 0.85
Finish_digestionFunction · 0.85

Calls 15

eatmdoneFunction · 0.85
pluslvlFunction · 0.85
make_blindedFunction · 0.85
set_itimeoutFunction · 0.85
self_invis_messageFunction · 0.85
You_feelFunction · 0.85
newsymFunction · 0.85
make_stunnedFunction · 0.85
livelog_printfFunction · 0.85
You_cantFunction · 0.85
dismount_steedFunction · 0.85
nomulFunction · 0.85

Tested by

no test coverage detected