| 3942 | } |
| 3943 | |
| 3944 | void |
| 3945 | do_stone_mon( |
| 3946 | struct monst *magr, |
| 3947 | struct attack *mattk, |
| 3948 | struct monst *mdef, struct mhitm_data *mhm) |
| 3949 | { |
| 3950 | struct permonst *pd = mdef->data; |
| 3951 | |
| 3952 | /* may die from the acid if it eats a stone-curing corpse */ |
| 3953 | if (munstone(mdef, FALSE)) |
| 3954 | goto post_stone; |
| 3955 | if (poly_when_stoned(pd)) { |
| 3956 | mon_to_stone(mdef); |
| 3957 | mhm->damage = 0; |
| 3958 | return; |
| 3959 | } |
| 3960 | if (!resists_ston(mdef)) { |
| 3961 | if (gv.vis && canseemon(mdef)) |
| 3962 | pline_mon(mdef, "%s turns to stone!", Monnam(mdef)); |
| 3963 | monstone(mdef); |
| 3964 | post_stone: |
| 3965 | if (!DEADMONSTER(mdef)) { |
| 3966 | mhm->hitflags = M_ATTK_MISS; |
| 3967 | mhm->done = TRUE; |
| 3968 | return; |
| 3969 | } else if (mdef->mtame && !gv.vis) { |
| 3970 | You(brief_feeling, "peculiarly sad"); |
| 3971 | } |
| 3972 | mhm->hitflags = (M_ATTK_DEF_DIED |
| 3973 | | (grow_up(magr, mdef) ? 0 : M_ATTK_AGR_DIED)); |
| 3974 | mhm->done = TRUE; |
| 3975 | return; |
| 3976 | } |
| 3977 | mhm->damage = (mattk->adtyp == AD_STON ? 0 : 1); |
| 3978 | } |
| 3979 | |
| 3980 | void |
| 3981 | mhitm_ad_phys( |
no test coverage detected