called every turn for each living monster on the map, and the hero; caller makes sure that we're not called for DEADMONSTER() */
| 647 | /* called every turn for each living monster on the map, and the hero; |
| 648 | caller makes sure that we're not called for DEADMONSTER() */ |
| 649 | void |
| 650 | m_everyturn_effect(struct monst *mtmp) |
| 651 | { |
| 652 | boolean is_u = (mtmp == &gy.youmonst) ? TRUE : FALSE; |
| 653 | coordxy x = is_u ? u.ux : mtmp->mx, |
| 654 | y = is_u ? u.uy : mtmp->my; |
| 655 | |
| 656 | if (mtmp->data == &mons[PM_FOG_CLOUD]) { |
| 657 | /* don't leave a vapor cloud if some other gas cloud is already |
| 658 | present, or when flowing under closed doors so that visibility |
| 659 | changes aren't mixed with messages about doing such */ |
| 660 | if (!closed_door(x, y) && !visible_region_at(x, y)) |
| 661 | create_gas_cloud(x, y, 1, 0); /* harmless vapor */ |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | /* do whatever effects monster has after moving. |
| 666 | called for both monsters and polyed hero. |
no test coverage detected