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

Function peffects

src/potion.c:1332–1425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330}
1331
1332int
1333peffects(struct obj *otmp)
1334{
1335 switch (otmp->otyp) {
1336 case POT_RESTORE_ABILITY:
1337 case SPE_RESTORE_ABILITY:
1338 peffect_restore_ability(otmp);
1339 break;
1340 case POT_HALLUCINATION:
1341 peffect_hallucination(otmp);
1342 break;
1343 case POT_WATER:
1344 peffect_water(otmp);
1345 break;
1346 case POT_BOOZE:
1347 peffect_booze(otmp);
1348 break;
1349 case POT_ENLIGHTENMENT:
1350 peffect_enlightenment(otmp);
1351 break;
1352 case SPE_INVISIBILITY:
1353 case POT_INVISIBILITY:
1354 peffect_invisibility(otmp);
1355 break;
1356 case POT_SEE_INVISIBLE: /* tastes like fruit juice in Rogue */
1357 case POT_FRUIT_JUICE:
1358 peffect_see_invisible(otmp);
1359 break;
1360 case POT_PARALYSIS:
1361 peffect_paralysis(otmp);
1362 break;
1363 case POT_SLEEPING:
1364 peffect_sleeping(otmp);
1365 break;
1366 case POT_MONSTER_DETECTION:
1367 case SPE_DETECT_MONSTERS:
1368 if (peffect_monster_detection(otmp))
1369 return 1;
1370 break;
1371 case POT_OBJECT_DETECTION:
1372 case SPE_DETECT_TREASURE:
1373 if (peffect_object_detection(otmp))
1374 return 1;
1375 break;
1376 case POT_SICKNESS:
1377 peffect_sickness(otmp);
1378 break;
1379 case POT_CONFUSION:
1380 peffect_confusion(otmp);
1381 break;
1382 case POT_GAIN_ABILITY:
1383 peffect_gain_ability(otmp);
1384 break;
1385 case POT_SPEED:
1386 case SPE_HASTE_SELF:
1387 peffect_speed(otmp);
1388 break;
1389 case POT_BLINDNESS:

Callers 3

fuzzer_savelifeFunction · 0.85
dopotionFunction · 0.85
spelleffectsFunction · 0.85

Calls 15

peffect_restore_abilityFunction · 0.85
peffect_hallucinationFunction · 0.85
peffect_waterFunction · 0.85
peffect_boozeFunction · 0.85
peffect_enlightenmentFunction · 0.85
peffect_invisibilityFunction · 0.85
peffect_see_invisibleFunction · 0.85
peffect_paralysisFunction · 0.85
peffect_sleepingFunction · 0.85
peffect_object_detectionFunction · 0.85
peffect_sicknessFunction · 0.85

Tested by

no test coverage detected