Skip to content

Commit

Permalink
gensave: fix for new crewman format (with full_tours)
Browse files Browse the repository at this point in the history
  • Loading branch information
ec429 committed May 18, 2015
1 parent 8260f10 commit 64dae98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gensave.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ def gencrews(line, i):
ms = int(words[0])
ml = int(words[1])
tops = int(words[2])
acid = words[3]
ft = int(words[3])
acid = words[4]
z = '_'.join((salt, str(i), line))
ha = zlib.crc32(z) & 0xffffffff
random.seed(ha)
skill = poisson(ms)
lrate = poisson(ml)
tops = random.randint(0, tops)
if windows:
return "%s %c:%s,%u,%u,%s"%(stat, cls, float_to_hex(skill), lrate, tops, acid)
return "%s %c:%s,%u,%u,%u,%s"%(stat, cls, float_to_hex(skill), lrate, tops, ft, acid)
else:
return "%s %c:%u,%u,%u,%s"%(stat, cls, skill, lrate, tops, acid)
return "%s %c:%u,%u,%u,%u,%s"%(stat, cls, skill, lrate, tops, ft, acid)

windows = '--windows' in sys.argv

Expand Down

0 comments on commit 64dae98

Please sign in to comment.