it is unchivalrous for a knight to attack the defenseless or from behind */
| 328 | |
| 329 | /* it is unchivalrous for a knight to attack the defenseless or from behind */ |
| 330 | void |
| 331 | check_caitiff(struct monst *mtmp) |
| 332 | { |
| 333 | if (u.ualign.record <= -10) |
| 334 | return; |
| 335 | |
| 336 | if (Role_if(PM_KNIGHT) && u.ualign.type == A_LAWFUL |
| 337 | && !is_undead(mtmp->data) |
| 338 | && (helpless(mtmp) |
| 339 | || (mtmp->mflee && !mtmp->mavenge))) { |
| 340 | You("caitiff!"); |
| 341 | adjalign(-1); |
| 342 | } else if (Role_if(PM_SAMURAI) && mtmp->mpeaceful) { |
| 343 | /* attacking peaceful creatures is bad for the samurai's giri */ |
| 344 | You("dishonorably attack the innocent!"); |
| 345 | adjalign(-1); |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | /* maybe unparalyze monster */ |
| 350 | void |
no test coverage detected