* Can etmp jump from death? */
| 528 | * Can etmp jump from death? |
| 529 | */ |
| 530 | staticfn boolean |
| 531 | e_jumps(struct entity *etmp) |
| 532 | { |
| 533 | int tmp = 4; /* out of 10 */ |
| 534 | |
| 535 | if (is_u(etmp) ? (Unaware || Fumbling) |
| 536 | : (helpless(etmp->emon) |
| 537 | || !etmp->edata->mmove || etmp->emon->wormno)) |
| 538 | return FALSE; |
| 539 | |
| 540 | if (is_u(etmp) ? Confusion : etmp->emon->mconf) |
| 541 | tmp -= 2; |
| 542 | |
| 543 | if (is_u(etmp) ? Stunned : etmp->emon->mstun) |
| 544 | tmp -= 3; |
| 545 | |
| 546 | if (is_db_wall(etmp->ex, etmp->ey)) |
| 547 | tmp -= 2; /* less room to maneuver */ |
| 548 | |
| 549 | debugpline2("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); |
| 550 | return (tmp >= rnd(10)) ? TRUE : FALSE; |
| 551 | } |
| 552 | |
| 553 | staticfn void |
| 554 | do_entity(struct entity *etmp) |
no test coverage detected