Card multiplication! Useful? Who knows!
This commit is contained in:
parent
93957b0ff7
commit
8a08b97c7b
1 changed files with 5 additions and 0 deletions
5
mtg.py
5
mtg.py
|
@ -141,6 +141,11 @@ class Card:
|
|||
self.store()
|
||||
def __repr__(self):
|
||||
return 'Card: [{2}] {0}: {1} [{3}/{4}]'.format(self.name, ' '.join([a.capitalize() for a in self.attributes]), self.cost, self.power, self.toughness)
|
||||
def __mul__(self, other):
|
||||
result = []
|
||||
for i in xrange(other):
|
||||
result.append(copy.copy(self))
|
||||
return result
|
||||
def store(self):
|
||||
self.__stored = copy.copy(self)
|
||||
def restore(self):
|
||||
|
|
Loading…
Reference in a new issue