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

Function get_mplname

src/mplayer.c:71–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71staticfn void
72get_mplname(struct monst *mtmp, char *nam)
73{
74 boolean fmlkind = is_female(mtmp->data);
75 const char *devnam;
76
77 devnam = dev_name();
78 if (!devnam)
79 Strcpy(nam, fmlkind ? "Eve" : "Adam");
80 else if (fmlkind && !!strcmp(devnam, "Janet"))
81 Strcpy(nam, rn2(2) ? "Maud" : "Eve");
82 else
83 Strcpy(nam, devnam);
84
85 if (fmlkind || !strcmp(nam, "Janet"))
86 mtmp->female = 1;
87 else
88 mtmp->female = 0;
89 Strcat(nam, " the ");
90 Strcat(nam, rank_of((int) mtmp->m_lev, monsndx(mtmp->data),
91 (boolean) mtmp->female));
92}
93
94staticfn void
95mk_mplayer_armor(struct monst *mon, short typ)

Callers 1

mk_mplayerFunction · 0.85

Calls 3

dev_nameFunction · 0.85
rn2Function · 0.85
rank_ofFunction · 0.85

Tested by

no test coverage detected