-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlayer.py
More file actions
36 lines (27 loc) · 953 Bytes
/
Player.py
File metadata and controls
36 lines (27 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from sqlobject import *
class Player(SQLObject):
"""Player stats and other useful player info"""
#SQL stored fields
name = StringCol()
level = IntCol()
class = ForeignKey('Class')
race = ForeignKey('Race')
strength = IntCol()
stamina = IntCol()
intellect = IntCol()
wisdom = IntCol()
luck = IntCol()
alignment = ForeignKey('Alignment')
affinity = ForeignKey('Affinity')
deity = ForeignKey('Deity')
#Spells known by the player
spells = MultipleJoin('KnownSpell')
#Any non-magic ability known by the player
abilities = MultipleJoin('KnownAbility')
#water-walking, infravision, etc.
passiveSkills = MultipleJoin('PassiveSkill')
#transformation, blindness, curses, wereform, etc.
status = MultipleJoin('Status')
location = ForeignKey('PlayerLocation')
inventory = ForeignKey('PlayerInventory')
equipment = ForeignKey('PlayerEquipment')