| 585 | } |
| 586 | |
| 587 | void |
| 588 | nh_timeout(void) |
| 589 | { |
| 590 | struct prop *upp; |
| 591 | struct kinfo *kptr; |
| 592 | boolean was_flying; |
| 593 | int sleeptime; |
| 594 | int m_idx; |
| 595 | int baseluck = (flags.moonphase == FULL_MOON) ? 1 : 0; |
| 596 | |
| 597 | if (flags.friday13) |
| 598 | baseluck -= 1; |
| 599 | |
| 600 | if (svq.quest_status.killed_leader) |
| 601 | baseluck -= 4; |
| 602 | |
| 603 | if (Role_if(PM_ARCHEOLOGIST) && uarmh && uarmh->otyp == FEDORA) |
| 604 | baseluck += 1; |
| 605 | |
| 606 | if (u.uluck != baseluck |
| 607 | && svm.moves % ((u.uhave.amulet || u.ugangr) ? 300 : 600) == 0) { |
| 608 | /* Cursed luckstones stop bad luck from timing out; blessed luckstones |
| 609 | * stop good luck from timing out; normal luckstones stop both; |
| 610 | * neither is stopped if you don't have a luckstone. |
| 611 | * Luck is based at 0 usually, +1 if a full moon and -1 on Friday 13th |
| 612 | */ |
| 613 | int time_luck = stone_luck(FALSE); |
| 614 | boolean nostone = !carrying(LUCKSTONE) && !stone_luck(TRUE); |
| 615 | |
| 616 | if (u.uluck > baseluck && (nostone || time_luck < 0)) |
| 617 | u.uluck--; |
| 618 | else if (u.uluck < baseluck && (nostone || time_luck > 0)) |
| 619 | u.uluck++; |
| 620 | } |
| 621 | if (u.uinvulnerable) |
| 622 | return; /* things past this point could kill you */ |
| 623 | if (Stoned) |
| 624 | stoned_dialogue(); |
| 625 | if (Slimed) |
| 626 | slime_dialogue(); |
| 627 | if (Vomiting) |
| 628 | vomiting_dialogue(); |
| 629 | if (Strangled) |
| 630 | choke_dialogue(); |
| 631 | if (Sick) |
| 632 | sickness_dialogue(); |
| 633 | if (HLevitation & TIMEOUT) |
| 634 | levitation_dialogue(); |
| 635 | if (HPasses_walls & TIMEOUT) |
| 636 | phaze_dialogue(); |
| 637 | if (HMagical_breathing & TIMEOUT) |
| 638 | region_dialogue(); |
| 639 | if (HSleepy & TIMEOUT) |
| 640 | sleep_dialogue(); |
| 641 | if (u.mtimedone && !--u.mtimedone) { |
| 642 | if (Unchanging) |
| 643 | u.mtimedone = rnd(100 * gy.youmonst.data->mlevel + 1); |
| 644 | else if (is_were(gy.youmonst.data)) |
no test coverage detected