chiark / gitweb /
Reduce wait times to something more resembling a real pirate
[ypp-sc-tools.web-live.git] / yoweb-scrape
index 270c09243a9d863d2c24ae570eb29dc7f7894c39..3d9e857beaabe7d4622f3185cd6d4ff0c6c43350 100755 (executable)
@@ -43,6 +43,7 @@ import re as regexp
 import random
 import curses
 import termios
+import random
 from optparse import OptionParser
 from StringIO import StringIO
 
@@ -68,7 +69,7 @@ duty_puzzles = ([ 'Navigating', 'Battle Navigation' ] +
                core_duty_puzzles +
                [ 'Treasure Haul' ])
 
-standingvals = ('Able/Distinguished/Respected/Master'+
+standingvals = ('Able/Proficient/Distinguished/Respected/Master'+
                '/Renowned/Grand-Master/Legendary/Ultimate').split('/')
 standing_limit = len(standingvals)
 
@@ -142,7 +143,7 @@ class Fetcher:
                min_age = 1
                need_wait = 0
                for age in ages:
-                       if age < min_age and age < 300:
+                       if age < min_age and age <= 5:
                                debug('Fetcher   morewait min=%d age=%d' %
                                        (min_age, age))
                                need_wait = max(need_wait, min_age - age)
@@ -476,7 +477,7 @@ class PirateAboard:
                                return pa.pi
                        debug('PirateAboard refresh %d > %d  %s' % (
                                age, guide, pa.name))
-                       imaginary = [2,6]
+                       imaginary = [2,4]
                else:
                        imaginary = [1]
                wait = fetcher.need_wait(now, imaginary)
@@ -1213,8 +1214,7 @@ actions:
 
 display modes (for --display) apply to ship-aid:
  --display=dumb       just print new information, scrolling the screen
- --display=overwrite  use cursor motion, selective clear, etc. to redraw at top
-''')
+ --display=overwrite  use cursor motion, selective clear, etc. to redraw at top''')
        ao = pa.add_option
        ao('-O','--ocean',dest='ocean', metavar='OCEAN', default=None,
                help='select ocean OCEAN')