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

Function append_honorific

src/shk.c:3601–3620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3599}
3600
3601staticfn void
3602append_honorific(char *buf)
3603{
3604 /* (chooses among [0]..[3] normally; [1]..[4] after the
3605 Wizard has been killed or invocation ritual performed) */
3606 static const char *const honored[] = {
3607 "good", "honored", "most gracious", "esteemed",
3608 "most renowned and sacred"
3609 };
3610
3611 Strcat(buf, honored[rn2(SIZE(honored) - 1) + u.uevent.udemigod]);
3612 if (is_vampire(gy.youmonst.data))
3613 Strcat(buf, (flags.female) ? " dark lady" : " dark lord");
3614 else if (maybe_polyd(is_elf(gy.youmonst.data), Race_if(PM_ELF)))
3615 Strcat(buf, (flags.female) ? " hiril" : " hir");
3616 else
3617 Strcat(buf, !is_human(gy.youmonst.data) ? " creature"
3618 : (flags.female) ? " lady"
3619 : " sir");
3620}
3621
3622void
3623splitbill(struct obj *obj, struct obj *otmp)

Callers 1

addtobillFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected