def useSkill(self, s, players):

        if s == 1:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1
            else:
                mdmg = 10 + self.AP
                if self.duration[1] > 0:
                    if self.duration[2] > 0:
                        mdmg += 10 + self.AP
                    else:
                        mdmg += int(10 + 0.5 * self.AP)
                        
                if self.isai:             #AI projectile launch
                    project=self.AIproj(20,20,players)
                    if project==0: return -1
                    
                    
                # projectile check
                else:
                    if self.adamage==30:
                        drawrange(self.zero(self.location-60),(self.location+60))
                    else:
                        drawrange(self.zero(self.location-20),self.location+20)
                    project=[False,0]
                    while(True):
                        project=self.testProj(20,20)
                        if project==0: return -1
                        
                        if project[0]: break;
                    
                
                self.cooltime[0] = 4        
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.proj.setproj(mdmg,project[1],4)
                window.getAlarm(self.name+"Q 사용함")
                return 0
                
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            else:
                self.duration[1] = 3
                self.cooltime[1] = 5
                window.getAlarm(self.name+"W 활성화됨")
                return 0
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                self.duration[2] = 8
                self.cooltime[2] = 13
                window.getAlarm(self.name+"궁 활성화됨")
                return 0    
    def useSkill(self, s, players):
        
        mdmg = 0
        pdmg = 0
        fdmg = 0

        skillto = 0
        if s == 1:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1    
            else:
                skillto=self.choosetarget(players,10,1)
                if skillto > -1:
                    pdmg = int(20 + self.AP)
                    self.cooltime[0] = 3
                    needopp = True
                else: return -1  
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            else:
                self.cooltime[1] = 4
                self.duration[1] = 1
               
            return 0   
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                if self.adamage==30:
                    drawrange(self.zero(self.location-90),(self.location+90))
                else:
                    drawrange(self.zero(self.location-30),self.location+30)
                project=[False,0]
                while(True):
                    project=self.testProj(30,30)
                    if project==0: return -1
                    if project[0]: break;
                
                
                self.cooltime[2] = 4        
                nontarget=True
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.proj.setproj(0, project[1],6)
            return -1
        return [pdmg, mdmg, fdmg,[skillto]]
Exemplo n.º 3
0
    def useSkill(self, s, players):
        
        mdmg = 0
        pdmg = 0
        fdmg = 0

        skillto = 0
        if s == 1:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1    
            elif self.usedQ1:
                skillto=self.choosetarget(players,3,1)
                if skillto > -1:
                    pdmg = int((20 + self.AD)*0.5)
                    self.cooltime[0] = 3
                    needopp = True
                    self.usedQ1=False
                else: return -1  
            else:
                skillto=self.choosetarget(players,3,1)
                if skillto > -1:
                    pdmg = int((20 + self.AD))
                    needopp = True
                    self.usedQ1=True
                else: return -1  
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            else:
                if self.isai:             #AI projectile launch
                    project=self.AIproj(30,30,players)
                    if project==0: return -1
                else:
                    if self.adamage==30:
                        drawrange(self.zero(self.location-90),(self.location+90))
                    else:
                        drawrange(self.zero(self.location-30),self.location+30)
                    project=[False,0]
                    while(True):
                        project=self.testProj(30,30)
                        if project==0: return -1
                        if project[0]: break;
                
                 
                self.cooltime[1] = 5        
                nontarget=True
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.proj.setproj(0, project[1],4)
                
            return 0   
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                skillto=self.choosetarget(players,25,3)
                
                if skillto > -1 and self.isbehindof(players[skillto]):
                    pdmg = int(30 + self.AD)
                    self.cooltime[2] = 8
                    self.location = players[skillto].location
                    self.character.Move(self.location)
                    needopp = True
                else: return -1  
        return [pdmg, mdmg, fdmg,[skillto]] 
    def useSkill(self, s, players):

        if s == 1:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1
            else:
                if self.HP<=35:
                    mb.showinfo(None, "체력이 부족합니다")
                    return -1
                
                mdmg = 10 + int(self.MaxHP/5)
                
                        
                if self.isai:             #AI projectile launch
                    project=self.AIproj(20,20,players)
                    if project==0: return -1
                    
                    
                # projectile check
                else:
                    if self.adamage==30:
                        drawrange(self.zero(self.location-30),(self.location+30))
                    else:
                        drawrange(self.zero(self.location-10),self.location+10)
                    project=[False,0]
                    while(True):
                        project=self.testProj(10,10)
                        if project==0: return -1
                        
                        if project[0]: break;
                    
                
                self.cooltime[0] = 2        
                self.giveDamage(players,35, 0)
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.proj.setproj(mdmg,project[1],3)
                window.getAlarm(self.name+"Q 사용함")
                return 0
                
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            if self.Wactive: return -1
            else:
                self.additionalHP=int(self.MaxHP*0.3)
                self.addMaxhp(self.additionalHP)
                window.getAlarm(self.name+"W 활성화됨")
                self.Wactive=True
                return 0
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                self.duration[2] = 5
                self.cooltime[2] = 12
                window.getAlarm(self.name+"궁 활성화됨")
                return 0    
 def useSkill(self, s,players):
     
     
     
     if s == 1:
         if self.cooltime[s - 1] > 0:
             mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
             return -1 
         else:
             mdmg = 20 + 0.5*self.AP
            
             # projectile check
             if self.adamage==30:
                 drawrange(self.zero(self.location-30),(self.location+30))
             else:
                 drawrange(self.zero(self.location-10),self.location+10)
             project=[False,0]
             while(True):
                 project=self.testProj(10,10)
                 if project==0: return -1
                 
                 if project[0]: break;
                 
             
             self.cooltime[0] = 8        
             winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
             self.hand.setproj(mdmg,project[1],4)
             
     elif s == 2:
         if self.cooltime[s - 1] > 0:
             mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
             return -1
         else:
             mdmg = 30 + self.AP
            
             # projectile check
             if self.adamage==30:
                 drawrange(self.zero(self.location-45),(self.location+45))
             else:
                 drawrange(self.zero(self.location-15),self.location+15)
             project=[False,0]
             while(True):
                 project=self.testProj(15,15)
                 if project==0: return -1
                 
                 if project[0]: break;
                 
             
             self.cooltime[1] = 6        
             winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
             self.mine.setproj(mdmg,project[1],4)
             
          
          
     elif s == 3:
         if self.cooltime[s - 1] > 0:
             mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
             return -1
         else:
             mdmg = 40 + self.AP
            
             # projectile check
             if self.adamage==30:
                 drawrange(self.zero(self.location-90),(self.location+90))
             else:
                 drawrange(self.zero(self.location-30),self.location+30)
             project=[False,0]
             while(True):
                 project=self.testProj(30,30)
                 if project==0: return -1
                 
                 if project[0]: break;
                 
             
             self.cooltime[2] = 10        
             winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
             self.bomb.setproj(mdmg,project[1],4)
             
        
     return 0
Exemplo n.º 6
0
    def useSkill(self, s,players):
        
        mdmg = 0
        pdmg = 0
        fdmg = 0

        skillto=0
        if s == 1:
            if self.Qhit>-1:
                self.goto(players[self.Qhit].location)
                skillto=self.Qhit
                self.Qhit=-1
                
                pdmg=20+self.AD
                needopp=True
                
                return [pdmg,mdmg,fdmg,[skillto]] 
            
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1
            else:
              
                if self.adamage==30:
                    drawrange(self.zero(self.location-45),(self.location+45))
                else:
                    drawrange(self.zero(self.location-15),self.location+15)
                project=[False,0]
                while(True):
                    project=self.testProj(15,15)
                    if project==0: return -1
                    if project[0]: break;
                
                self.cooltime[0] = 4        
                nontarget=True
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.sound.setproj(0, project[1],2)
                
                
                return 0
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            else:
                skillto=self.multitarget(players,self.location-3,self.location+3,2)
                if skillto==None: return 0              #used skill but there was no players in range
                
                print(skillto)
                pdmg=int(20+0.5*self.AD)
                self.cooltime[1]=2
                
                return [pdmg,mdmg,fdmg,skillto] 
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                if self.shadow.dur>0:
                    self.location=self.shadow.location
                    obs=self.character.Move(self.shadow.location)
                    self.shadow.reset()
                    self.cooltime[2] = 4
                    self.obstacle(0, players,obs)
                else:
                    if self.adamage==30:
                        drawrange(self.zero(self.location-60),(self.location+15))
                    else:
                        drawrange(self.zero(self.location-20),self.location+5)
                    
                    while(True):
                        project=self.testProj(5,20)
                        if project==0: return -1
                        if project[0]: break;
                    
                   
                    self.shadow.setproj(0, project[1],4)
                    rangepen.clear()
                    winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                    
                return 0
    def useSkill(self, s,players):
        
        mdmg = 0
        pdmg = 0
        fdmg = 0

        skillto=0
        skillto2=0
        if s == 1:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[0])
                return -1    
            else:
               # mdmg=10+self.AP*0.5
                r=15
                
                if self.duration[1]>1: r*=2
                if self.adamage==30: r*=3
                drawrange(self.zero(self.location+5),(self.location+r))
                rangepen.clear()
                drawrange(self.zero(self.location-r),self.zero(self.location-5))
                skillto=self.multitarget(players,self.zero(self.location+5),self.location+r,1)
                
                rangepen.clear()
                
                skillto2=self.multitarget(players,self.zero(self.location-r),self.zero(self.location-5),1)
                #print(skillto,skillto2)
                if skillto==None and skillto2==None: return -1
                elif skillto==None: skillto=skillto2
                elif skillto2!=None and skillto!=None: skillto.extend(skillto2)
                
                mdmg=int(10+self.AP)
                self.cooltime[0]=4
                needopp=True
                #nn  n1 1n 11
                    
                return [pdmg,mdmg,fdmg,skillto] 
            
        elif s == 2:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[1])
                return -1
            else:
                self.effects[2]=1
                self.effects[1]=2
                self.cooltime[1]=5
                self.duration[1]=2
                
                
                return 0   
             
        elif s == 3:
            if self.cooltime[s - 1] > 0:
                mb.showinfo(None, "아직 쿨타임이 돌아오지 않았습니다! %d 턴 남음" %self.cooltime[2])
                return -1
            else:
                self.Uuse+=1
                mdmg=10+self.AP*0.5
                r=30
                if self.duration[1]>1: r*=2
                
                if self.adamage==30: r*=3
                
                
                
                drawrange(self.zero(self.location-r),self.location+r)
                project=[False,0]
                while(True):
                    if self.duration[1]>1: project=self.testProj(60,60)
                    else: project=self.testProj(30,30)
                    if project==0: return -1
                    if project[0]: break;
                    
                
                        
                
                winsound.PlaySound('sound\\place.wav', winsound.SND_ASYNC)
                self.proj.setproj(mdmg, project[1],2)
                
                
                return 0