joust or martial arts punch is knocking the target back; that might kill 'mon' (via trap) before known_hitum() has a chance to do so; return True if we kill mon, False otherwise */
| 1939 | kill 'mon' (via trap) before known_hitum() has a chance to do so; |
| 1940 | return True if we kill mon, False otherwise */ |
| 1941 | staticfn boolean |
| 1942 | mhurtle_to_doom( |
| 1943 | struct monst *mon, /* target monster */ |
| 1944 | int tmp, /* amount of pending damage */ |
| 1945 | struct permonst **mptr) /* caller's cached copy of mon->data */ |
| 1946 | { |
| 1947 | /* only hurtle if pending physical damage (tmp) isn't going to kill mon */ |
| 1948 | if (tmp < mon->mhp) { |
| 1949 | mhurtle(mon, u.dx, u.dy, 1); |
| 1950 | /* update caller's cached mon->data in case mon was pushed into |
| 1951 | a polymorph trap or is a vampshifter whose current form has |
| 1952 | been killed by a trap so that it reverted to original form */ |
| 1953 | *mptr = mon->data; |
| 1954 | if (DEADMONSTER(mon)) |
| 1955 | return TRUE; |
| 1956 | } |
| 1957 | return FALSE; /* mon isn't dead yet */ |
| 1958 | } |
| 1959 | |
| 1960 | /* gamelog version of "you've broken never-hit-with-wielded-weapon conduct; |
| 1961 | the conduct is tracked in known_hitum(); we're called by hmon_hitmon() */ |
no test coverage detected