-
Notifications
You must be signed in to change notification settings - Fork 0
/
item.py
40 lines (29 loc) · 1.03 KB
/
item.py
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
37
38
39
40
from obj import ObjectWithAttributes, NamedObject, SubjectProto
class ItemProto (ObjectWithAttributes, NamedObject, SubjectProto):
def __init__ (self, name, **attributes):
ObjectWithAttributes.__init__ (self)
NamedObject.__init__ (self, name)
SubjectProto.__init__ (self, {}) # no special abilities
self.apply_attributes (attributes)
def discard (self):
pass
def upkeep_2 (self, game, owner, item):
return []
def upkeep_3 (self, game, owner, item):
return []
def movement_points_bonus (self, game, owner, item):
return 0
def movement (self, game, owner, item):
return []
def pre_combat (self, combat, owner, monster, item):
return []
def combat_turn (self, combat, owner, monster, item):
return []
def deal_with (self, game, owner, item):
return []
# Items that inherit from this class are considered Weapons.
class Weapon:
pass
# Items that inherit from this class are considered Tomes.
class Tome:
pass