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

Function you_were

src/were.c:191–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void
192you_were(void)
193{
194 char qbuf[QBUFSZ];
195 boolean controllable_poly = Polymorph_control && !(Stunned || Unaware);
196
197 if (Unchanging || u.umonnum == u.ulycn)
198 return;
199 if (controllable_poly) {
200 /* `+4' => skip "were" prefix to get name of beast */
201 Sprintf(qbuf, "Do you want to change into %s?",
202 an(mons[u.ulycn].pmnames[NEUTRAL] + 4));
203 if (!paranoid_query(ParanoidWerechange, qbuf))
204 return;
205 } else if (monster_nearby()) {
206 return;
207 }
208 gw.were_changes++;
209 (void) polymon(u.ulycn);
210}
211
212void
213you_unwere(boolean purify)

Callers 4

allmain.cFile · 0.85
peffect_waterFunction · 0.85
potionbreatheFunction · 0.85
mon_polyFunction · 0.85

Calls 4

anFunction · 0.85
paranoid_queryFunction · 0.85
monster_nearbyFunction · 0.85
polymonFunction · 0.85

Tested by

no test coverage detected