0ca1fc75 by Branden

#ruleset start

1 parent beca4159
......@@ -8,6 +8,7 @@ creation commands.
"""
from evennia import DefaultCharacter
from random import randint
class Character(DefaultCharacter):
"""
......@@ -31,13 +32,22 @@ class Character(DefaultCharacter):
"""
def at_object_creation(self):
self.db.strength = 5
self.db.agility = 4
self.db.magic = 2
self.db.level = 1
self.db.HP = 100
self.db.EXP = 0
#Set all default attributes
self.db.strength = randint(3,18)
self.db.constitution = randint(3,18)
self.db.dexterity = randint(3,18)
self.db.intelligence = randint(3,18)
self.db.charisma = randint(3,18)
self.db.wisdom = randint(3,18)
def get_abilities(self):
return self.db.strength, self.db.agility, self.db.magic
def get_attributes(self):
return self.db.strength, self.db.constitution, self.db.dexterity, self.db.intelligence, self.db.charisma, self.db.wisdom
pass
......
'''
Created on Dec 22, 2016
@author: Branden
'''
def add_EXP(character, amount):
"Add experience to a character, tracking level increases"
character.db.EXP += amount
if character.db.EXP >= (character.db.level + 1) ** 2:
character.db.level += 1
character.msg("You are now level %i!" % character.db.level)
\ No newline at end of file