Advertisement
Guest User

evennia char

a guest
Nov 12th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. class Character(DefaultCharacter):
  2. # [...]
  3. def at_object_creation(self):
  4. """
  5. Called only at initial creation. This is a rather silly
  6. example since ability scores should vary from Character to
  7. Character and is usually set during some character
  8. generation step instead.
  9. """
  10. #set persistent attributes
  11. self.db.strength = 5
  12. self.db.agility = 4
  13. self.db.magic = 2
  14.  
  15. def get_abilities(self):
  16. """
  17. Simple access method to return ability
  18. scores as a tuple (str,agi,mag)
  19. """
  20. return self.db.strength, self.db.agility, self.db.magic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement