| 1092 | } |
| 1093 | |
| 1094 | staticfn void |
| 1095 | hmon_hitmon_potion( |
| 1096 | struct _hitmon_data *hmd, |
| 1097 | struct monst *mon, |
| 1098 | struct obj *obj) /* obj is not NULL */ |
| 1099 | { |
| 1100 | if (obj->quan > 1L) |
| 1101 | obj = splitobj(obj, 1L); |
| 1102 | else |
| 1103 | setuwep((struct obj *) 0); |
| 1104 | freeinv(obj); |
| 1105 | potionhit(mon, obj, |
| 1106 | hmd->hand_to_hand ? POTHIT_HERO_BASH : POTHIT_HERO_THROW); |
| 1107 | if (DEADMONSTER(mon)) { |
| 1108 | hmd->doreturn = TRUE; |
| 1109 | hmd->retval = FALSE; /* killed */ |
| 1110 | return; |
| 1111 | } |
| 1112 | hmd->hittxt = TRUE; |
| 1113 | /* in case potion effect causes transformation */ |
| 1114 | hmd->mdat = mon->data; |
| 1115 | hmd->dmg = (hmd->mdat == &mons[PM_SHADE]) ? 0 : 1; |
| 1116 | } |
| 1117 | |
| 1118 | staticfn void |
| 1119 | hmon_hitmon_misc_obj( |
no test coverage detected