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

Function consume_offering

src/pray.c:1445–1475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443}
1444
1445staticfn void
1446consume_offering(struct obj *otmp)
1447{
1448 if (Hallucination)
1449 switch (rn2(3)) {
1450 case 0:
1451 Your("sacrifice sprouts wings and a propeller and roars away!");
1452 break;
1453 case 1:
1454 Your("sacrifice puffs up, swelling bigger and bigger, and pops!");
1455 break;
1456 case 2:
1457 Your(
1458 "sacrifice collapses into a cloud of dancing particles and fades away!");
1459 break;
1460 }
1461 else if (Blind && u.ualign.type == A_LAWFUL)
1462 Your("sacrifice disappears!");
1463 else
1464 Your("sacrifice is consumed in a %s!",
1465 (u.ualign.type == A_LAWFUL)
1466 ? "flash of light"
1467 : (u.ualign.type == A_NEUTRAL)
1468 ? "plume of smoke"
1469 : "burst of flame");
1470 if (carried(otmp))
1471 useup(otmp);
1472 else
1473 useupf(otmp, 1L);
1474 exercise(A_WIS, TRUE);
1475}
1476
1477/* feedback when attempting to offer the Amulet on a "low altar" (not one of
1478 the high altars in the temples on the Astral Plane or Moloch's Sanctum) */

Callers 2

offer_corpseFunction · 0.85

Calls 5

rn2Function · 0.85
YourFunction · 0.85
useupFunction · 0.85
useupfFunction · 0.85
exerciseFunction · 0.85

Tested by

no test coverage detected