Esempio n. 1
0
 try:
     print ('You are using the Final Fantasy Mystic Quest "A Terrible Secret" '
            'randomizer version %s.' % VERSION)
     ALL_OBJECTS = [g for g in globals().values()
                    if isinstance(g, type) and issubclass(g, TableObject)
                    and g not in [TableObject]]
     run_interface(ALL_OBJECTS, snes=True)
     if get_global_label() == "FFMQ_NA_1.1":
         DemoPlay = CharacterObject.get(0)
         DemoPlay.name_text = [texttable[c] for c in "Abyssnym"]
         while len(DemoPlay.name_text) < 16:
             DemoPlay.name_text += [0x03]
     hexify = lambda x: "{0:0>2}".format("%x" % x)
     numify = lambda x: "{0: >3}".format(x)
     minmax = lambda x: (min(x), max(x))
     clean_and_write(ALL_OBJECTS)
     if get_global_label() == "FFMQ_NA_1.1":
         write_title_screen(get_outfile(), get_seed(), get_flags())
         enemy_jump = 0xef8e
     elif get_global_label() == "FFMQ_JP":
         enemy_jump = 0xef92
     x = raw_input("Do you want to give Benjamin the power "
                   "to jump over enemies? (y/n) ")
     if x and x[0].lower() == 'y':
         f = open(get_outfile(), "r+b")
         f.seek(enemy_jump)
         f.write(chr(0x80))
         f.close()
     rewrite_snes_meta("FFMQ-R", VERSION, megabits=24, lorom=True)
     finish_interface()
 except Exception, e:
Esempio n. 2
0
    remaining = [j.index for j in JobCommandObject.every
                 if j.index != 20 and j.index != start_choice]
    random.shuffle(remaining)
    assert len(addrs) == len(remaining) == 20
    for addr, j in zip(addrs, remaining):
        f.seek(addr)
        f.write(chr(map_job_crystal(j)))
    f.close()
    return values


if __name__ == "__main__":
    try:
        print ('You are using the FF5 "Grand Cross" '
               'randomizer version %s.' % VERSION)
        ALL_OBJECTS = [g for g in globals().values()
                       if isinstance(g, type) and issubclass(g, TableObject)
                       and g not in [TableObject]]
        run_interface(ALL_OBJECTS, snes=True)
        hexify = lambda x: "{0:0>2}".format("%x" % x)
        numify = lambda x: "{0: >3}".format(x)
        minmax = lambda x: (min(x), max(x))
        randomize_crystal_shards()
        randomize_rng()
        clean_and_write(ALL_OBJECTS)
        rewrite_snes_meta("FF5-GC", VERSION, lorom=False)
        finish_interface()
    except Exception, e:
        print "ERROR: %s" % e
        raw_input("Press Enter to close this program.")