def majorCaosManifestation(self,fighters): #print('major curse') res=d100() if(res>96): self.catastrophicalCaosManifestation(fighters) return -4 if(res>81): self.addWaitEvent([d10(),'self.changeFaction(\''+self.fazione+ '\')']) self.fazione='A' return -5 if(res>71): self.mag=self.mag-1 return -6 if(res>61): self.r=self.r-10 self.br=self.br-1 return -7 if(res>51): self.fe=self.fe-10 self.wound(0) #check if is dead return -8 if(res>41): self.fol=self.fol+1 return -9 if(res>13): #add imps to the fighters fighters.append(pg('Daemon Imps',35,0,40,33,40,30,33,15,1,12,4,3,3,0,0,0,weapon('claws','sword','sword'),0,'A')) return -10 if(res>11): self.mag=0 return -11
def shoot(self,rikt,b): try: #Skjuter skott global listaEnemyBeam beam=weapon(5,rikt) beamy=self.rect.y+22 beamx=self.rect.x+b beam.rect.y=beamy beam.rect.x=beamx listaEnemyBeam.add(beam) except: print("något gick fel (class enemy def shoot)")
def __init__(self,nome=None,ac=0,ab=0,f=0,r=0,ag=0,i=0,vol=0,sim=0,a=0,fe=0,bf=0,br=0,m=0,mag=0,fol=0,pf=0,arma=weapon('sword','sword','sword'),armatura=0,fazione=0): self.status=0 #variabili d'ambiente self.posizione=0 #0 mischia 1 distante 2 riparato distante self.mira=False #true o false se ha mirato self.schivata=False #ha già schivato in questo round self.cantDodge=True #non so schivare? self.parata=0 #numero di parate fatte nel round self.maxFend=0 #può parare? self.nemico=-1 self.sharpshooter=10 self.hasChanneling=True self.channelingTime=0 self.knowSpell=[] #list of list - [name, kind, function, round requested], kind= attack, defence, buffer, evocation, self.waitEvent=[] #list of event that have a timer [timer, callback] self.azioni=2 #number of action in a round self.nome=nome self.ab=(ab) self.ac=(ac) self.f=(f) self.r=(r) self.ag=(ag) self.i=(i) self.vol=(vol) self.sim=(sim) self.a=(a) self.fe=(fe) self.bf=(bf) self.br=(br) self.m=(m) self.mag=(mag) self.fol=(fol) self.pf=(pf) self.arma=(arma) self.armatura=(armatura) self.fazione=fazione self.ini=d10()+int(ag) if(self.arma.kind=="bow"): self.posizione=1 if(self.mag>=1): self.posizione=1
def catastrophicalCaosManifestation(self,fighters): debug_print(self.nome,'OH MY GOD - CHTULHU IS HERE') res=d100() if(res>81): self.status=-1 self.fe=-5 return -12 if(res>71): self.fe=self.fe-d10() self.wound(0) return -13 if(res>61): for i in range(0,self.mag): fighters.append(pg('Evoc '+str(i)+' Daemon',50,40,45,45,50,35,50,15,2,15,4,4,4,0,0,0,weapon('claws','sword','sword'),0,'A')) return -14 #evoca demoni minori (self.mag demoni) if(res>51): self.mag=0 return -15 if(res>41): self.fol=self.fol+d10() return -16 if(res>31): if(d10()>5):#critico random self.status=-1 self.fe=-5 return -17 if(res>21): time=d10()*6 self.addWaitEvent([d10(),'self.setAction(\''+str(self.azioni)+ '\')']) self.addWaitEvent([d10(),'self.setBr(\''+str(self.br)+ '\')']) self.azioni=0 self.br=0 return -18 if(res>11): self.r=self.r-20 self.br=self.br-2 return -19 for f in fighters: f.fe=f.fe-1