Ejemplo n.º 1
0
 def classRace(self):
     return random.choice([
         random.choice(races.elves),
         races.HalfElf(),
         races.Human(),
         random.choice(races.gnomes)
     ])
Ejemplo n.º 2
0
 def classRace(self):
     return random.choice([
         races.Tiefling(),
         races.Human(),
         races.HalfElf(),
         races.Dragonborn()
     ])
Ejemplo n.º 3
0
 def classRace(self):
     return random.choice([
         races.Dragonborn(),
         random.choice(races.dwarfs),
         races.HalfOrc(),
         races.Human()
     ])
Ejemplo n.º 4
0
 def classRace(self):
     return random.choice([
         random.choice(races.elves),
         races.HalfElf(),
         races.Human(),
         races.Tiefling()
     ])
async def make_race(ctx, race_cls, subrace: str = ""):
    if race_cls == races.Elf:
        return races.Elf(subrace)
    if race_cls == races.Human:
        return races.Human()
    if race_cls == races.Dragonborn:
        return races.Dragonborn(subrace)
    if race_cls == races.Dwarf:
        return races.Dwarf(subrace)
    if race_cls == races.Gnome:
        # you've been gnomed
        return races.Gnome(subrace)
    if race_cls == races.Halfling:
        return races.Halfling(subrace)
    if race_cls == races.HalfOrc:
        return races.HalfOrc()
    if race_cls == races.Tiefling:
        return races.Tiefling()

    raise ValueError(f'race {race_cls} does not exist')
Ejemplo n.º 6
0
import argparse
import races
# import goblin

game = open("myGame.txt", "w")

parser = argparse.ArgumentParser(description='SakaRPG')
parser.add_argument('-c',
                    '--create',
                    type=str,
                    metavar='',
                    help="create a new character")
args = parser.parse_args()

if args.create:
    new = races.Human(args.create)
    game.write(f'{args.create} \n')
    game.write(f'{new.atribs}')

game = open("myGame.txt")
content = game.read()

game.close()
print(content)