-
Notifications
You must be signed in to change notification settings - Fork 0
/
cardClass.py
145 lines (131 loc) · 4.48 KB
/
cardClass.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
from SystemClass import all_character
class card:
def __init__(self, halo, character, level, attrSet, sklSlot, skillSet, equipSet, nickname, quality, wishSet,
amuletclass):
self.halo = halo
self.character = character
self.level = level
self.attrSet = attrSet
self.sklSlot = sklSlot
self.skillSet = skillSet
self.equipSet = equipSet
self.quality = quality
self.wishSet = wishSet
self.amuletclass = amuletclass
def tostring(self):
text = ''
text += all_character['name'][self.character]
text += " LV:"
text += self.level
text += " "
text += self.attrSet.tostring()
return text
class myCard(card):
def __init__(self, halo, character, level, attrSet, sklSlot, skillSet, equipSet, nickname, quality, wishSet,
amuletclass):
super(myCard, self).__init__(halo, character, level, attrSet, sklSlot, skillSet, equipSet, nickname, quality,
wishSet, amuletclass)
def make_gu_text(self):
text = ''
text += self.halo
text += "\n"
text += all_character['data'][self.character]
text += " "
text += self.level
text += " "
text += str(self.sklSlot + 1)
text += " "
text += str(self.quality)
text += "\n"
text += self.wishSet.make_gu_text()
text += "\n"
text += self.amuletclass.make_gu_text()
text += "\n"
text += self.attrSet.make_gu_text()
text += "\n"
text += self.equipSet.make_gu_text()
text += "\n"
text += self.skillSet.make_gu_text()
return text
class enemyCard(card):
def __init__(self, halo, character, level, attrSet, sklSlot, skillSet, equipSet, nickname, quality, wishSet,
amuletclass):
super(enemyCard, self).__init__(halo, character, level, attrSet, sklSlot, skillSet, equipSet, nickname, quality,
wishSet, amuletclass)
self.nickname = nickname
def make_gu_text(self):
text = ''
text += all_character['data'][self.character]
if self.nickname != "":
text += "_" + self.nickname
text += " "
text += self.level
text += " "
text += str(self.sklSlot + 1)
text += " "
text += str(self.quality)
text += "\n"
text += self.wishSet.make_gu_text()
text += "\n"
text += self.amuletclass.make_gu_text()
text += "\n"
text += self.attrSet.make_gu_text()
text += "\n"
text += self.equipSet.make_gu_text()
text += "\n"
text += self.skillSet.make_gu_text()
return text
def tostring(self):
if self.nickname != "":
return self.nickname
else:
text = super(enemyCard, self).tostring()
return text
class STATCard:
def __init__(self, cardType, attrs1, attrs2, attrs3, attrs4, attrs5, nickname, wishSet, amuletclass):
self.cardType = cardType
self.attrs1 = attrs1
self.attrs2 = attrs2
self.attrs3 = attrs3
self.attrs4 = attrs4
self.attrs5 = attrs5
self.nickname = nickname
self.wishSet = wishSet
self.amuletclass = amuletclass
def make_gu_text(self):
text = ''
text += all_character['data'][self.cardType]
if self.nickname != "":
text += "_" + self.nickname
text += " "
text += "STAT"
text += "\n"
text += self.wishSet.make_gu_text()
text += "\n"
text += self.amuletclass.make_gu_text()
text += "\n"
text += " ".join(str(i) for i in self.attrs1)
text += "\n"
text += " ".join(str(i) for i in self.attrs2)
text += "\n"
text += " ".join(str(i) for i in self.attrs3)
text += "\n"
text += " ".join(str(i) for i in self.attrs4)
text += "\n"
text += " ".join(str(i) for i in self.attrs5)
return text
def tostring(self):
if self.nickname != "":
return self.nickname
text = ''
text += all_character['name'][self.cardType]
text += " STAT "
text += " AD:"
text += str(self.attrs1[0])
text += " SPEED:"
text += str(self.attrs2[0])
text += " SHIED:"
text += str(self.attrs3[3])
text += " MAXHP:"
text += str(self.attrs3[0])
return text