| 1067 | } |
| 1068 | |
| 1069 | staticfn void |
| 1070 | hmon_hitmon_weapon( |
| 1071 | struct _hitmon_data *hmd, |
| 1072 | struct monst *mon, |
| 1073 | struct obj *obj) /* obj is not NULL */ |
| 1074 | { |
| 1075 | /* is it not a melee weapon? */ |
| 1076 | if (/* if you strike with a bow... */ |
| 1077 | is_launcher(obj) |
| 1078 | /* or strike with a missile in your hand... */ |
| 1079 | || (!hmd->thrown && (is_missile(obj) || is_ammo(obj))) |
| 1080 | /* or use a pole at short range and not mounted... */ |
| 1081 | || (!hmd->thrown && !u.usteed && is_pole(obj) |
| 1082 | && !is_art(obj,ART_SNICKERSNEE)) |
| 1083 | /* or throw a missile without the proper bow... */ |
| 1084 | || (is_ammo(obj) && (hmd->thrown != HMON_THROWN |
| 1085 | || !ammo_and_launcher(obj, uwep)))) { |
| 1086 | hmon_hitmon_weapon_ranged(hmd, mon, obj); |
| 1087 | } else { |
| 1088 | hmon_hitmon_weapon_melee(hmd, mon, obj); |
| 1089 | if (hmd->doreturn) |
| 1090 | return; |
| 1091 | } |
| 1092 | } |
| 1093 | |
| 1094 | staticfn void |
| 1095 | hmon_hitmon_potion( |
no test coverage detected