* Simple-minded "can it be here?" routine */
| 377 | * Simple-minded "can it be here?" routine |
| 378 | */ |
| 379 | staticfn boolean |
| 380 | e_survives_at(struct entity *etmp, coordxy x, coordxy y) |
| 381 | { |
| 382 | if (noncorporeal(etmp->edata)) |
| 383 | return TRUE; |
| 384 | if (is_pool(x, y)) |
| 385 | return (boolean) ((is_u(etmp) && (Wwalking || Amphibious || Breathless |
| 386 | || Swimming || Flying || Levitation)) |
| 387 | || is_swimmer(etmp->edata) |
| 388 | || is_flyer(etmp->edata) |
| 389 | || is_floater(etmp->edata)); |
| 390 | /* must force call to lava_effects in e_died if is_u */ |
| 391 | if (is_lava(x, y)) |
| 392 | return (boolean) ((is_u(etmp) && (Levitation || Flying)) |
| 393 | || likes_lava(etmp->edata) |
| 394 | || is_flyer(etmp->edata)); |
| 395 | if (is_db_wall(x, y)) |
| 396 | return (boolean) (is_u(etmp) ? Passes_walls |
| 397 | : passes_walls(etmp->edata)); |
| 398 | return TRUE; |
| 399 | } |
| 400 | |
| 401 | staticfn void |
| 402 | e_died( |
no test coverage detected