-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitems.py
56 lines (38 loc) · 1.07 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
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/python
# -*-coding:utf-8 -*
##!/usr/local/bin/python3
from header import *
class Inventory:
def __init__(self):
self.dictionary={}
self.size = 50
self.rect=pygame.Rect(LONGUEUR_FENETRE/4, HAUTEUR_FENETRE/4, LONGUEUR_FENETRE/2, HAUTEUR_FENETRE/2)
self.colour_bkg=(50, 50, 50)
def Afficher(self, fenetre):
fenetre.fill(self.colour_bkg, self.rect)
class Object:
def __init__(self, name):
self.name=name
self.atk=0
self.defense=0
self.cut_wood=0
self.weight=0
self.speed_bonus=0
self.heal=0
class Weapons(Object):
def __init__(self, name, atk, defense, weight):
Object.__init__(name)
self.atk=atk
self.defense=defense
self.weight=weight
class Sword(Weapons):
def __init__(self, name, atk, defense, weight, cut_wood):
Weapons.__init__(name, atk, defense, weight)
self.cut_wood=cut_wood
class Shield(Weapons):
def __init__(self, name, atk, defense, weight):
Weapons.__init__(name)
class Axe(Weapons):
def __init__(self, name, atk, defense, weight, cut_wood):
Weapons.__init__(name)
self.cut_wood=cut_wood