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

Function dosinkring

src/do.c:497–661  ·  view source on GitHub ↗

obj is a ring being dropped over a kitchen sink */

Source from the content-addressed store, hash-verified

495
496/* obj is a ring being dropped over a kitchen sink */
497staticfn void
498dosinkring(struct obj *obj)
499{
500 struct obj *otmp, *otmp2;
501 boolean ideed = TRUE;
502 boolean nosink = FALSE;
503
504 You("drop %s down the drain.", doname(obj));
505 obj->in_use = TRUE; /* block free identification via interrupt */
506 switch (obj->otyp) { /* effects that can be noticed without eyes */
507 case RIN_SEARCHING:
508 You("thought %s got lost in the sink, but there it is!", yname(obj));
509 goto giveback;
510 case RIN_SLOW_DIGESTION:
511 pline_The("ring is regurgitated!");
512 giveback:
513 obj->in_use = FALSE;
514 dropx(obj);
515 trycall(obj);
516 return;
517 case RIN_LEVITATION:
518 pline_The("sink quivers upward for a moment.");
519 break;
520 case RIN_POISON_RESISTANCE:
521 You("smell rotten %s.", makeplural(fruitname(FALSE)));
522 break;
523 case RIN_AGGRAVATE_MONSTER:
524 pline("Several %s buzz angrily around the sink.",
525 Hallucination ? makeplural(rndmonnam(NULL)) : "flies");
526 break;
527 case RIN_SHOCK_RESISTANCE:
528 pline("Static electricity surrounds the sink.");
529 break;
530 case RIN_CONFLICT:
531 Soundeffect(se_drain_noises, 50);
532 You_hear("loud noises coming from the drain.");
533 break;
534 case RIN_SUSTAIN_ABILITY: /* KMH */
535 pline_The("%s flow seems fixed.", hliquid("water"));
536 break;
537 case RIN_GAIN_STRENGTH:
538 pline_The("%s flow seems %ser now.",
539 hliquid("water"),
540 (obj->spe < 0) ? "weak" : "strong");
541 break;
542 case RIN_GAIN_CONSTITUTION:
543 pline_The("%s flow seems %ser now.",
544 hliquid("water"),
545 (obj->spe < 0) ? "less" : "great");
546 break;
547 case RIN_INCREASE_ACCURACY: /* KMH */
548 pline_The("%s flow %s the drain.",
549 hliquid("water"),
550 (obj->spe < 0) ? "misses" : "hits");
551 break;
552 case RIN_INCREASE_DAMAGE:
553 pline_The("water's force seems %ser now.",
554 (obj->spe < 0) ? "small" : "great");

Callers 1

dropFunction · 0.85

Calls 15

YouFunction · 0.85
donameFunction · 0.85
ynameFunction · 0.85
pline_TheFunction · 0.85
dropxFunction · 0.85
trycallFunction · 0.85
makepluralFunction · 0.85
fruitnameFunction · 0.85
rndmonnamFunction · 0.85
You_hearFunction · 0.85
hliquidFunction · 0.85
obj_resistsFunction · 0.85

Tested by

no test coverage detected