0ca1fc75 by Branden

#ruleset start

1 parent beca4159
...@@ -8,6 +8,7 @@ creation commands. ...@@ -8,6 +8,7 @@ creation commands.
8 8
9 """ 9 """
10 from evennia import DefaultCharacter 10 from evennia import DefaultCharacter
11 from random import randint
11 12
12 class Character(DefaultCharacter): 13 class Character(DefaultCharacter):
13 """ 14 """
...@@ -31,13 +32,22 @@ class Character(DefaultCharacter): ...@@ -31,13 +32,22 @@ class Character(DefaultCharacter):
31 """ 32 """
32 33
33 def at_object_creation(self): 34 def at_object_creation(self):
34 self.db.strength = 5 35
35 self.db.agility = 4 36 self.db.level = 1
36 self.db.magic = 2 37 self.db.HP = 100
38 self.db.EXP = 0
39
40 #Set all default attributes
41 self.db.strength = randint(3,18)
42 self.db.constitution = randint(3,18)
43 self.db.dexterity = randint(3,18)
44 self.db.intelligence = randint(3,18)
45 self.db.charisma = randint(3,18)
46 self.db.wisdom = randint(3,18)
37 47
38 48
39 def get_abilities(self): 49 def get_attributes(self):
40 return self.db.strength, self.db.agility, self.db.magic 50 return self.db.strength, self.db.constitution, self.db.dexterity, self.db.intelligence, self.db.charisma, self.db.wisdom
41 51
42 52
43 pass 53 pass
......
1 '''
2 Created on Dec 22, 2016
3
4 @author: Branden
5 '''
6
7 def add_EXP(character, amount):
8 "Add experience to a character, tracking level increases"
9
10 character.db.EXP += amount
11 if character.db.EXP >= (character.db.level + 1) ** 2:
12 character.db.level += 1
13 character.msg("You are now level %i!" % character.db.level)
14
15
16
...\ No newline at end of file ...\ No newline at end of file