X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=travel.py;h=a3529386307527ca7be6fe4da259d385002d6602;hp=c9731eb7e2a812ff448c1e89f3a59e416a694dbd;hb=3b780dd57e295b57ba78649e008fede10e07cdd9;hpb=8a3757df59ce5726b44347c0c7ca0a2c132386f4 diff --git a/travel.py b/travel.py index c9731eb..a352938 100755 --- a/travel.py +++ b/travel.py @@ -42,6 +42,9 @@ # This says that, from 11, 49 takes him to 8 unless game.prop(3)=0, in which # case he goes to 9. Verb 50 takes him to 9 regardless of game.prop(3). # +# In addition, it looks as though the action verb value 1 is a sentinel used +# when a table entry would have no motions at all in it. +# import sys, yaml # This is the original travel table from section 3 of adventure.text @@ -674,40 +677,67 @@ section3 = ( def destdecode(dest): "Decode a destinatio nnumber" if dest <= 300: - return '["move", %s]' % locnames[dest] + return '["goto", %s]' % locnames[dest] elif dest <= 500: - return '["goto", %s]' % (dest - 300) + return '["special", %s]' % (dest - 300) else: return '["speak", %s]' % (msgnames[dest - 500]) +def conddecode(cond): + # If M=0 it's unconditional. + # If 0