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

Function piousness

src/insight.c:3234–3271  ·  view source on GitHub ↗

used for self-probing */

Source from the content-addressed store, hash-verified

3232
3233/* used for self-probing */
3234char *
3235piousness(boolean showneg, const char *suffix)
3236{
3237 static char buf[32]; /* bigger than "insufficiently neutral" */
3238 const char *pio;
3239
3240 /* note: piousness 20 matches MIN_QUEST_ALIGN (quest.h) */
3241 if (u.ualign.record >= 20)
3242 pio = "piously";
3243 else if (u.ualign.record > 13)
3244 pio = "devoutly";
3245 else if (u.ualign.record > 8)
3246 pio = "fervently";
3247 else if (u.ualign.record > 3)
3248 pio = "stridently";
3249 else if (u.ualign.record == 3)
3250 pio = "";
3251 else if (u.ualign.record > 0)
3252 pio = "haltingly";
3253 else if (u.ualign.record == 0)
3254 pio = "nominally";
3255 else if (!showneg)
3256 pio = "insufficiently";
3257 else if (u.ualign.record >= -3)
3258 pio = "strayed";
3259 else if (u.ualign.record >= -8)
3260 pio = "sinned";
3261 else
3262 pio = "transgressed";
3263
3264 Sprintf(buf, "%s", pio);
3265 if (suffix && (!showneg || u.ualign.record >= 0)) {
3266 if (u.ualign.record != 3)
3267 Strcat(buf, " ");
3268 Strcat(buf, suffix);
3269 }
3270 return buf;
3271}
3272
3273/* stethoscope or probing applied to monster -- one-line feedback */
3274void

Callers 2

attributes_enlightenmentFunction · 0.85
ustatuslineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected