multi_reason is usually a literal string; here we generate one that has the causing monster's type included */
| 101 | /* multi_reason is usually a literal string; here we generate one that |
| 102 | has the causing monster's type included */ |
| 103 | void |
| 104 | dynamic_multi_reason(struct monst *mon, const char *verb, boolean by_gaze) |
| 105 | { |
| 106 | /* combination of noname_monnam() and m_monnam(), more or less; |
| 107 | accurate regardless of visibility or hallucination (only seen |
| 108 | if game ends) and without personal name (M2_PNAME excepted) */ |
| 109 | char *who = x_monnam(mon, ARTICLE_A, (char *) 0, |
| 110 | (SUPPRESS_IT | SUPPRESS_INVISIBLE |
| 111 | | SUPPRESS_HALLUCINATION | SUPPRESS_SADDLE |
| 112 | | SUPPRESS_NAME), |
| 113 | FALSE), |
| 114 | *p = gm.multireasonbuf; |
| 115 | |
| 116 | /* prefix info for done_in_by() */ |
| 117 | Sprintf(p, "%u:", mon->m_id); |
| 118 | p = eos(p); |
| 119 | Sprintf(p, "%s by %s%s", verb, |
| 120 | !by_gaze ? who : s_suffix(who), |
| 121 | !by_gaze ? "" : " gaze"); |
| 122 | gm.multi_reason = p; |
| 123 | } |
| 124 | |
| 125 | void |
| 126 | erode_armor(struct monst *mdef, int hurt) |
no test coverage detected