Пример #1
0
#AHQ Helper - Henchman
#Current Features:

import ahq


#Dungeon settings
dungeon_level = 1
rooms = 0
module = "Standard"

table_treasure = ahq.import_table('Modules/'+module+'/treasure.csv')
table_race = ahq.import_table('Modules/'+module+'/races.csv')
table_corridor = ahq.import_table('Modules/'+module+'/corridors.csv')
table_specialdoors = ahq.import_table('Modules/'+module+'/specialdoors.csv')
table_doors = ahq.import_table('Modules/'+module+'/rooms.csv')
table_classes = ahq.import_table('Modules/'+module+'/classes.csv')

garth = ahq.Character()
garth.roll_character()
garth.print_character()
garth.assign_class()
garth.print_character()  
                               




    

Пример #2
0
import ahq

table_race = ahq.import_table("Modules/Standard/races.csv")
table_class = ahq.import_table("Modules/Standard/classes.csv")

class Character(object):
    """An AHQ Character"""


    def __init__(self):
        self.name = "Unknown"
        self.aclass = "Unknown"
        self.stats = {}
        
        created = False
        while not created:
            self.race = input("What race is this character?\n")
            if self.race in table_race.keys():
                created = True
            else:
                print("That is not an option.")
                print("Select from:")
                print(table_race.keys())
                      
    def roll_character(self):
        '''Rolls a character. Race should be full subject from table_race'''
        
        self.ws = max(d(1,6),d(1,6))+self.race['ws']
        self.bs = max(d(1,6),d(1,6))+self.race['bs']
        self.st = max(d(1,4),d(1,4))+self.race['st']
        self.to = max(d(1,4),d(1,4))+self.race['to']