-
Notifications
You must be signed in to change notification settings - Fork 0
/
CEItems.py
39 lines (31 loc) · 989 Bytes
/
CEItems.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
#items
def printHi():
print("Hi")
input()
itemsList = []#list of game items
weaponsList = []#list of game weapons
clothesList = []#list of wearable items
class Item:
def __init__(self, name):
self.name = name
itemsList.append(self)#add the item to the itemsList[]
class Weapon:
def __init__(self, name, power, IsMelee, IsRanged):
self.name = name
self.power = power
IsMelee = False
IsRanged = False
weaponsList.append(self)
class Clothing:
def __init__(self, name, power):
self.name = name
self.power = power
self.coldResistance = 1
self.fashionrating = 1
clothesList.append(self)
BlackShoes = Item.Clothing("black shoes", 1)
Sword = Item.Weapon("sword", 5, True, False)
Paper = Item("paper")
Ink = Item("ink")
Dagger = Item.Weapon("dagger", 3, True, False)
Crossbow = Item.Weapon("crossbow", 3, False, True)