do whatever effects monster has after moving. called for both monsters and polyed hero. for hero, called after location changes, to prevent spam messages for hero getting enveloped in a cloud. for monsters, called before location changes, because monsters don't have "previous location" field */
| 669 | for monsters, called before location changes, |
| 670 | because monsters don't have "previous location" field */ |
| 671 | void |
| 672 | m_postmove_effect(struct monst *mtmp) |
| 673 | { |
| 674 | boolean is_u = (mtmp == &gy.youmonst) ? TRUE : FALSE; |
| 675 | coordxy x = is_u ? u.ux0 : mtmp->mx, |
| 676 | y = is_u ? u.uy0 : mtmp->my; |
| 677 | |
| 678 | /* Hezrous create clouds of stench. This does not cost a move. */ |
| 679 | if (mtmp->data == &mons[PM_HEZROU]) /* stench */ |
| 680 | create_gas_cloud(x, y, 1, 8); |
| 681 | else if (mtmp->data == &mons[PM_STEAM_VORTEX] && !mtmp->mcan) |
| 682 | create_gas_cloud(x, y, 1, 0); /* harmless vapor */ |
| 683 | } |
| 684 | |
| 685 | /* returns 1 if monster died moving, 0 otherwise */ |
| 686 | /* The whole dochugw/m_move/distfleeck/mfndpos section is serious spaghetti |
no test coverage detected