monp grants a wish and then leaves the game */
| 2793 | |
| 2794 | /* *monp grants a wish and then leaves the game */ |
| 2795 | void |
| 2796 | mongrantswish(struct monst **monp) |
| 2797 | { |
| 2798 | struct monst *mon = *monp; |
| 2799 | int mx = mon->mx, my = mon->my, glyph = glyph_at(mx, my); |
| 2800 | |
| 2801 | /* remove the monster first in case wish proves to be fatal |
| 2802 | (blasted by artifact), to keep it out of resulting bones file */ |
| 2803 | mongone(mon); |
| 2804 | *monp = 0; /* inform caller that monster is gone */ |
| 2805 | /* hide that removal from player--map is visible during wish prompt */ |
| 2806 | tmp_at(DISP_ALWAYS, glyph); |
| 2807 | tmp_at(mx, my); |
| 2808 | /* grant the wish */ |
| 2809 | makewish(); |
| 2810 | /* clean up */ |
| 2811 | tmp_at(DISP_END, 0); |
| 2812 | } |
| 2813 | |
| 2814 | void |
| 2815 | djinni_from_bottle(struct obj *obj) |
no test coverage detected