def __init__(self, ID, name, deck): ''' Constructor @param ID: id unique de la carte @param name: Nom @param deck: Les carte utilisable par le joueur ''' LivingEntity.__init__(self, ID, "player", name, 1, "normal", "effect", "description", "dialog", 30) self.deck = deck self.mana = 1 self.hand = {} self.fields = {} self.action = True for i in range(4): i self.piocheCarte()
def nextTour(self, tour): ''' Passe au tour suivant et augmente le mana en fonction du tour @param tour: Numero du tour ''' if (tour > 10): self.mana = 10 else: self.mana = tour LivingEntity.nextTour(self, tour) for key in self.fields: self.fields[key].nextTour(tour) if self.health <= 0: print(self.name + "Est mort " + self.toString())
def __init__(self, ID, Type, name, attack, damageType, effect, description, dialog, health): ''' Constructor ''' LivingEntity.__init__(self, ID, Type, name, attack, damageType, effect, description, dialog, health) #camouflage if self.effect == "camouflage": self.camouflage = True else: self.camouflage = False #shield if self.effect == "shield": self.shield = int(self.health) else: self.shield = 0 if self.effect == "charge": self.action = True