-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitems.py
46 lines (31 loc) · 1.15 KB
/
items.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
41
42
43
44
# E Y E B L I N K
# ====================================== ITEMS ============================================
class Object:
def __init__(self):
raise NotImplementedError("Do not create raw objects.")
def __str__(self):
return self.name
class GrapheneBag(Object):
def __init__(self):
self.name = "Graphene bag"
self.description = "It's a composite graphene bag. You can store things on it."
self.damage = 2
class Videophone(Object):
def __init__(self):
self.name = "Videophone"
self.description = "It's an old COM terminal."
self.damage = 3
class ShockStick(Object):
def __init__(self):
self.name = "ShockStick"
self.description = "It's a self defense weapon. Pressing a switch releases an energy blast."
self.damage = 8
class Consumable:
def __init__(self):
raise NotImplementedError("Do not create raw Consumable objects.")
def __str__(self):
return "{} (+{} HP)".format(self.name, self.healing_value)
class RecoveryPill(Consumable):
def __init__(self):
self.name = "Recovery pill"
self.healing_value = 10