* Apply fire_damage() to an entire chain. * * Return number of objects destroyed. --ALI */
| 4547 | * Return number of objects destroyed. --ALI |
| 4548 | */ |
| 4549 | int |
| 4550 | fire_damage_chain( |
| 4551 | struct obj *chain, |
| 4552 | boolean force, |
| 4553 | boolean here, |
| 4554 | coordxy x, coordxy y) |
| 4555 | { |
| 4556 | struct obj *obj, *nobj; |
| 4557 | int num = 0; |
| 4558 | |
| 4559 | /* erode_obj() relies on bhitpos if target objects aren't carried by |
| 4560 | the hero or a monster, to check visibility controlling feedback */ |
| 4561 | gb.bhitpos.x = x, gb.bhitpos.y = y; |
| 4562 | |
| 4563 | for (obj = chain; obj; obj = nobj) { |
| 4564 | nobj = here ? obj->nexthere : obj->nobj; |
| 4565 | if (fire_damage(obj, force, x, y)) |
| 4566 | ++num; |
| 4567 | } |
| 4568 | |
| 4569 | if (num && (Blind && !couldsee(x, y))) |
| 4570 | You("smell smoke."); |
| 4571 | return num; |
| 4572 | } |
| 4573 | |
| 4574 | /* obj has been thrown or dropped into lava; damage is worse than mere fire */ |
| 4575 | boolean |
no test coverage detected