@@ -561,48 +561,53 @@ nh_timeout()
561
561
baseluck -= 4 ;
562
562
563
563
if (u .uluck != baseluck ) {
564
- int timeout = 600 ;
565
- int time_luck = stone_luck (FALSE);
566
- /* Cursed luckstones slow bad luck timing out; blessed luckstones
567
- * slow good luck timing out; normal luckstones slow both;
568
- * neither is affected if you don't have a luckstone.
564
+ int timeout = 600 ;
565
+ int time_luck = stone_luck (FALSE);
566
+
567
+ /* Cursed luckstones slow bad luck timing out; blessed luckstones
568
+ * slow good luck timing out; normal luckstones slow both;
569
+ * neither is affected if you don't have a luckstone.
569
570
* Luck is based at 0 usually, +1 if a full moon and -1 on Friday 13th
570
571
*/
571
- if (has_luckitem () && (!time_luck
572
- || (time_luck > 0 && u .uluck > baseluck )
573
- || (time_luck < 0 && u .uluck < baseluck ))) {
574
-
575
- /* The slowed timeout depends on the distance between your
576
- * luck (not including luck bonuses) and your base luck.
577
- *
578
- * distance timeout
579
- * --------------------
580
- * 1 24800
581
- * 2 24200
582
- * 3 23200
583
- * 4 21800
584
- * 5 20000
585
- * 6 17800
586
- * 7 15200
587
- * 8 12200
588
- * 9 8800
589
- * 10 5000
590
- * 11 800
591
- */
592
- int base_dist = u .uluck - baseluck ;
593
- int slow_timeout = 25000 - 200 * (base_dist * base_dist );
594
- if (slow_timeout > timeout ) timeout = slow_timeout ;
595
- }
596
-
597
- if (u .uhave .amulet || u .ugangr ) timeout = timeout / 2 ;
598
-
599
- if (moves >= u .luckturn + timeout ) {
600
- if (u .uluck > baseluck )
601
- u .uluck -- ;
602
- else if (u .uluck < baseluck )
603
- u .uluck ++ ;
572
+ if (has_luckitem ()
573
+ && (!time_luck
574
+ || (time_luck > 0 && u .uluck > baseluck )
575
+ || (time_luck < 0 && u .uluck < baseluck ))) {
576
+
577
+ /* The slowed timeout depends on the distance between your
578
+ * luck (not including luck bonuses) and your base luck.
579
+ *
580
+ * distance timeout
581
+ * --------------------
582
+ * 1 24800
583
+ * 2 24200
584
+ * 3 23200
585
+ * 4 21800
586
+ * 5 20000
587
+ * 6 17800
588
+ * 7 15200
589
+ * 8 12200
590
+ * 9 8800
591
+ * 10 5000
592
+ * 11 800
593
+ */
594
+ int base_dist = u .uluck - baseluck ;
595
+ int slow_timeout = 25000 - 200 * (base_dist * base_dist );
596
+
597
+ if (slow_timeout > timeout )
598
+ timeout = slow_timeout ;
599
+ }
600
+
601
+ if (u .uhave .amulet || u .ugangr )
602
+ timeout = timeout / 2 ;
603
+
604
+ if (moves >= u .luckturn + timeout ) {
605
+ if (u .uluck > baseluck )
606
+ u .uluck -- ;
607
+ else if (u .uluck < baseluck )
608
+ u .uluck ++ ;
604
609
u .luckturn = moves ;
605
- }
610
+ }
606
611
}
607
612
if (HPasses_walls )
608
613
phasing_dialogue ();
0 commit comments