Esempio n. 1
0
def run(num_tav, set_race):
    print(num_tav)
    tav_list = []
    while num_tav != 0:

        gen_NPC.run(set_race)
        propname, sex = gen_NPC.run(set_race)
        tavern1 = open('tavnames1.txt')
        name1 = tavern1.readlines()
        name1 = random.choice(name1).strip()

        tavern2 = open('tavnames2.txt')
        name2 = tavern2.readlines()
        name2 = random.choice(name2).strip()
        tavern_name = 'The ' + name1 + ' ' + name2
        sort = random.choice(config.tavern_sort)
        tav_list.append(tavern_name + '.\nThe inkeeper is a ' + sex + ' ' +
                        set_race + " named " + propname + '. \nIt\'s a ' +
                        sort + ' ' + 'located in the ' +
                        random.choice(config.area) + ' part of town.\n')
        #    tavwrite.append(tav_info)
        num_tav = num_tav - 1

    tav_info = '\n'.join(tav_list)
    del tav_list[:]
    return tav_info
    print(tav_info)
Esempio n. 2
0
def run(genstore, set_race):

    genstore_list = []

    while genstore != 0:

        gen_NPC.run(set_race)
        propname, sex = gen_NPC.run(set_race)
        if sex == 'male':
            pronoun = 'his'
        else:  #female
            pronoun = 'her'

        store = open('general_store' + '.txt')
        name1 = store.readlines()
        name1 = random.choice(name1).strip()
        genstore_list.append(propname + 'is the proprietor \"' + name1 +
                             '\" a general store. \nA ' +
                             random.choice(config.descriptors) + ' ' +
                             set_race + ' ' + pronoun +
                             ' store can be found in the ' +
                             random.choice(config.area) +
                             ' section of town.\n')
        genstore = genstore - 1

    genstore_info = '\n'.join(genstore_list)
    return genstore_info
Esempio n. 3
0
def run(num_smith, set_race):

    smith_list = []

    while num_smith != 0:

        gen_NPC.run(set_race)
        propname, sex = gen_NPC.run(set_race)
        if sex == 'male':
            pronoun = 'his'
        else:  #female
            pronoun = 'her'
        smith_list.append(propname + 'is a ' +
                          random.choice(config.descriptors) + ' blacksmith ' +
                          pronoun + ' forge can be found in the ' +
                          random.choice(config.area) + ' part of town.\n')
        num_smith = num_smith - 1

    smith_info = '\n'.join(smith_list)
    return smith_info
Esempio n. 4
0
def run(num_lib, set_race):
    lib_list = []
    while num_lib != 0: 
        
        gen_NPC.run(set_race)
        propname, sex = gen_NPC.run(set_race)
        if sex == 'male': 
            pronoun = 'He'
        else: #female
            pronoun = 'She'
        

        
        randlib = open('Library.txt')
        name1 = randlib.readlines()
        name1 = random.choice(name1).strip()
        lib_list.append(propname + 'is the head Librarian at The ' + name1 + '. The Library is found in the ' + random.choice(config.area) + ' dstrict.\n')
        num_lib -=  1

    lib_info = '\n'.join(lib_list) 
    return lib_info
Esempio n. 5
0
def run(num_market, set_race):    
    market_list = []
    while num_market != 0:
        
        gen_NPC.run(set_race)
        propname, sex = gen_NPC.run(set_race)
        if sex == 'male': 
            pronoun = 'His'
        else: #female
            pronoun = 'Her'
        
        randmarket = random.choice(config.rand_stores)
        store = open(randmarket + '.txt')
        name1 = store.readlines()
        name1 = random.choice(name1).strip()
        market_list.append(propname +  'is a ' + random.choice(config.descriptors) + ' ' + randmarket + '.\n' + pronoun + ' store, ' + name1 + ', is found towards the ' + random.choice(config.area) + ' part of town.\n\n')

        num_market = num_market - 1
    
    market_info = '\n'.join(market_list)
    return market_info