feedback when frustrated monster couldn't cast a spell */
| 60 | |
| 61 | /* feedback when frustrated monster couldn't cast a spell */ |
| 62 | staticfn void |
| 63 | cursetxt(struct monst *mtmp, boolean undirected) |
| 64 | { |
| 65 | if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) { |
| 66 | const char *point_msg; /* spellcasting monsters are impolite */ |
| 67 | |
| 68 | if (undirected) |
| 69 | point_msg = "all around, then curses"; |
| 70 | else if ((Invis && !perceives(mtmp->data) |
| 71 | && (mtmp->mux != u.ux || mtmp->muy != u.uy)) |
| 72 | || is_obj_mappear(&gy.youmonst, STRANGE_OBJECT) |
| 73 | || u.uundetected) |
| 74 | point_msg = "and curses in your general direction"; |
| 75 | else if (Displaced && (mtmp->mux != u.ux || mtmp->muy != u.uy)) |
| 76 | point_msg = "and curses at your displaced image"; |
| 77 | else |
| 78 | point_msg = "at you, then curses"; |
| 79 | |
| 80 | pline_mon(mtmp, "%s points %s.", Monnam(mtmp), point_msg); |
| 81 | } else if ((!(svm.moves % 4) || !rn2(4))) { |
| 82 | if (!Deaf) |
| 83 | Norep("You hear a mumbled curse."); /* Deaf-aware */ |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /* choose a spell for monster to cast */ |
| 88 | staticfn int |