-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModuleMathAssaut.py
28 lines (23 loc) · 1013 Bytes
/
ModuleMathAssaut.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
from ModuleMath import Math
from random import *
class MathAssaut(Math):
def __init__(self, nom="Rieman", pv=95, pa=10, pd=10):
super(MathAssaut, self).__init__(nom=nom, pv=pv, pa=pa)
self.pd = pd
self.modeAttaque[5] = ["Elimination confirmée", self.eliminationconfirmer]
self.modeAttaque[6] = ["Echanger ", self.echanger]
def eliminationconfirmer(self, ennemi): # grosse frappe
if super().peutattaquer(ennemi):
n = random()
if n < 0.75:
ennemi.blesse(2*self.PA)
print("Touché")
if ennemi.PV == 0:
self.PV = self.PV+3 # Tuer c'est bon pour la santé
print("Elimination confirmé")
def echanger(self, ennemi): # echange de bons procédés
if ennemi.PA >= 6:
ennemi.PA = ennemi.PA-1
self.PV = self.PV+5
def information(self):
return super().information() + " <Assaut>"