| 38 | } |
| 39 | |
| 40 | staticfn void |
| 41 | pre_mm_attack(struct monst *magr, struct monst *mdef) |
| 42 | { |
| 43 | boolean showit = FALSE; |
| 44 | |
| 45 | /* unhiding or unmimicking happens even if hero can't see it |
| 46 | because the formerly concealed monster is now in action */ |
| 47 | if (M_AP_TYPE(mdef)) { |
| 48 | seemimic(mdef); |
| 49 | showit |= gv.vis; |
| 50 | } else if (mdef->mundetected) { |
| 51 | mdef->mundetected = 0; |
| 52 | showit |= gv.vis; |
| 53 | } |
| 54 | if (M_AP_TYPE(magr)) { |
| 55 | seemimic(magr); |
| 56 | showit |= gv.vis; |
| 57 | } else if (magr->mundetected) { |
| 58 | magr->mundetected = 0; |
| 59 | showit |= gv.vis; |
| 60 | } |
| 61 | |
| 62 | if (gv.vis) { |
| 63 | if (!canspotmon(magr)) |
| 64 | map_invisible(magr->mx, magr->my); |
| 65 | else if (showit) |
| 66 | newsym(magr->mx, magr->my); |
| 67 | if (!canspotmon(mdef)) |
| 68 | map_invisible(mdef->mx, mdef->my); |
| 69 | else if (showit) |
| 70 | newsym(mdef->mx, mdef->my); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | /* feedback for when a monster-vs-monster attack misses */ |
| 75 | staticfn void |
no test coverage detected