Be sure this corresponds with what happens to player-thrown objects in * dothrow.c (for consistency). --KAA * Returns FALSE if object still exists (not destroyed). */
| 159 | * Returns FALSE if object still exists (not destroyed). |
| 160 | */ |
| 161 | staticfn boolean |
| 162 | drop_throw( |
| 163 | struct obj *obj, |
| 164 | boolean ohit, |
| 165 | coordxy x, |
| 166 | coordxy y) |
| 167 | { |
| 168 | boolean broken; |
| 169 | |
| 170 | if (obj->otyp == CREAM_PIE || obj->oclass == VENOM_CLASS |
| 171 | || (ohit && obj->otyp == EGG)) { |
| 172 | broken = TRUE; |
| 173 | } else { |
| 174 | broken = (ohit && should_mulch_missile(obj)); |
| 175 | } |
| 176 | |
| 177 | if (broken) { |
| 178 | delobj(obj); |
| 179 | } else { |
| 180 | if (down_gate(x, y) != -1) |
| 181 | broken = ship_object(obj, x, y, FALSE); |
| 182 | if (!broken) { |
| 183 | struct monst *mtmp = m_at(x, y); |
| 184 | if (!(broken = flooreffects(obj, x, y, "fall"))) { |
| 185 | place_object(obj, x, y); |
| 186 | if (!mtmp && u_at(x, y)) |
| 187 | mtmp = &gy.youmonst; |
| 188 | if (mtmp && ohit) |
| 189 | passive_obj(mtmp, obj, (struct attack *) 0); |
| 190 | stackobj(obj); |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | gt.thrownobj = 0; |
| 195 | return broken; |
| 196 | } |
| 197 | |
| 198 | /* calculate multishot volley count for mtmp throwing otmp (if not ammo) or |
| 199 | shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */ |
no test coverage detected