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

Function peffect_acid

src/potion.c:1296–1315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294}
1295
1296staticfn void
1297peffect_acid(struct obj *otmp)
1298{
1299 if (Acid_resistance) {
1300 /* Not necessarily a creature who _likes_ acid */
1301 pline("This tastes %s.", Hallucination ? "tangy" : "sour");
1302 } else {
1303 int dmg;
1304
1305 pline("This burns%s!",
1306 otmp->blessed ? " a little" : otmp->cursed ? " a lot"
1307 : " like acid");
1308 dmg = d(otmp->cursed ? 2 : 1, otmp->blessed ? 4 : 8);
1309 losehp(Maybe_Half_Phys(dmg), "potion of acid", KILLED_BY_AN);
1310 exercise(A_CON, FALSE);
1311 }
1312 if (Stoned)
1313 fix_petrification();
1314 gp.potion_unkn++; /* holy/unholy water can burn like acid too */
1315}
1316
1317staticfn void
1318peffect_polymorph(struct obj *otmp)

Callers 1

peffectsFunction · 0.85

Calls 5

dFunction · 0.85
losehpFunction · 0.85
exerciseFunction · 0.85
fix_petrificationFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected