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

Function sink_backs_up

src/fountain.c:804–826  ·  view source on GitHub ↗

find a ring in a sink */

Source from the content-addressed store, hash-verified

802
803/* find a ring in a sink */
804void
805sink_backs_up(coordxy x, coordxy y)
806{
807 char buf[BUFSZ];
808
809 if (!Blind)
810 Strcpy(buf, "Muddy waste pops up from the drain");
811 else if (!Deaf)
812 Strcpy(buf, "You hear a sloshing sound"); /* Deaf-aware */
813 else
814 Sprintf(buf, "Something splashes you in the %s", body_part(FACE));
815 pline("%s%s.", !Deaf ? "Flupp! " : "", buf);
816
817 if (!(levl[x][y].looted & S_LRING)) { /* once per sink */
818 if (!Blind)
819 You_see("a ring shining in its midst.");
820 (void) mkobj_at(RING_CLASS, x, y, TRUE);
821 newsym(x, y);
822 exercise(A_DEX, TRUE);
823 exercise(A_WIS, TRUE); /* a discovery! */
824 levl[x][y].looted |= S_LRING;
825 }
826}
827
828/*fountain.c*/

Callers 2

kick_nondoorFunction · 0.85
dipsinkFunction · 0.85

Calls 6

body_partFunction · 0.85
You_seeFunction · 0.85
mkobj_atFunction · 0.85
newsymFunction · 0.85
exerciseFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected