Пример #1
0
    def onAtt(self, targetID):
        if self.pos == 'HERO' and self.getSelfWeapon() != None:
            self.getSelfWeapon().onAtt(targetID)
        elif self.pos == 'WEAPON':
            self.loseDurable()

        Spell.onAtt(self, targetID)
Пример #2
0
 def __init__(self):
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Teleport.__init__(self)
     Dialog.__init__(self)
Пример #3
0
 def __init__(self):
     NPCObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Motion.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     AI.__init__(self)
Пример #4
0
	def __init__(self):
		NPCObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
Пример #5
0
	def onTimer(self, tid, userArg):
		"""
		shyloo method.
		引擎回调timer触发
		"""
		#DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg))
		GameObject.onTimer(self, tid, userArg)
		Spell.onTimer(self, tid, userArg)
Пример #6
0
	def onTimer(self, tid, userArg):
		"""
		KBEngine method.
		引擎回调timer触发
		"""
		#DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg))
		GameObject.onTimer(self, tid, userArg)
		Spell.onTimer(self, tid, userArg)
Пример #7
0
	def __init__(self):
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
Пример #8
0
	def onTimer(self, tid, userArg):
		"""
		KBEngine method.
		引擎回调timer触发
		"""
		#DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.className, self.id, tid, userArg))
		GameObject.onTimer(self, tid, userArg)
		Spell.onTimer(self, tid, userArg)
Пример #9
0
    def onTimer(self, tid, userArg):
        """
		KBEngine method.
		引擎回调timer触发
		"""
        #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg))
        NPCObject.onTimer(self, tid, userArg)
        Spell.onTimer(self, tid, userArg)
        AI.onTimer(self, tid, userArg)
Пример #10
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     NPCObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Motion.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     AI.__init__(self)
Пример #11
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
Пример #12
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Dialog.__init__(self)
		Teleport.__init__(self)
Пример #13
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     SkillBox.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Dialog.__init__(self)
     Teleport.__init__(self)
Пример #14
0
    def onCauseDamage(self, targetID, damage):
        #from recvDamage()
        if self.poison == 1:
            entity = self.getEntityByID(targetID)
            if entity != None and entity.pos.isdigit():
                self.makeTargetDie(targetID)

        if self.suckBlood == 1:
            self.causeHeal(self.avatarID, damage)

        Spell.onCauseDamageA(self, targetID, damage)
Пример #15
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     SkillBox.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Dialog.__init__(self)
     Motion.__init__(self)
     Teleport.__init__(self)
Пример #16
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        NPCObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        AI.__init__(self)

        if self.modelID == 20002001:
            self.layer = 1  # entity所在的层,可以设置多个不同的navmesh层来寻路
Пример #17
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
		
		if self.modelID == 20002001:
			self.layer = 1 # entity所在的层,可以设置多个不同的navmesh层来寻路
Пример #18
0
 def onRoundEnd(self, isSelf):
     if self.isDestroyed:
         return
     self.isAbled = 0
     for buff in self.buffList:
         buff.onRoundEnd(isSelf)
     if self.chooseDataStore['active']:
         self.allClients.onEndChoose()
         self.chooseDataStore['active'] = False
     if self.avatarID == self.id:
         self.att = 0
     Spell.onRoundEnd(self, isSelf)
Пример #19
0
    def __init__(self):
        GameObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        Teleport.__init__(self)
        Dialog.__init__(self)

        # 设置每秒允许的最快速度, 超速会被拉回去
        self.topSpeed = 10.0
Пример #20
0
	def __init__(self):
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = 10.0
Пример #21
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
		
		# entity所在的层,可以设置多个不同的navmesh层来寻路, 这里20002001是warring-demo中在天上的飞龙,
		# 第0层是地面,第1层是忽略建筑物的寻路层
		if self.modelID == 20002001:
			self.layer = 1 
Пример #22
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
		
		# entity所在的层,可以设置多个不同的navmesh层来寻路, 这里20002001是warring-demo中在天上的飞龙,
		# 第0层是地面,第1层是忽略建筑物的寻路层
		if self.modelID == 20002001:
			self.layer = 1 
Пример #23
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
Пример #24
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        GameObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        SkillBox.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        Teleport.__init__(self)
        Dialog.__init__(self)

        # 设置每秒允许的最快速度, 超速会被拉回去
        self.topSpeed = self.moveSpeed + 5.0
Пример #25
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        NPCObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        AI.__init__(self)

        # entity所在的层,可以设置多个不同的navmesh层来寻路, 这里20002001是warring-demo中在天上的飞龙,
        # 第0层是地面,第1层是忽略建筑物的寻路层
        #if self.modelID == 20002001:
        #	self.layer = 1
        ERROR_MSG("monster init, id is :%i, speed: %i" %
                  (self.mid, self.moveSpeed))
Пример #26
0
	def __init__(self):
		shyloo.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
		# self.topSpeedY = 10.0
		
		# 如果为7说明在UE4地图中,那么为了配合demo的移动速度,我们将限制设置得更大一些
		if self.spaceUType == 7:
			self.topSpeed = 0
Пример #27
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
		# self.topSpeedY = 10.0
		
		if self.spaceUType == 1000:
			self.spaceUType = self.getCurrSpace().spaceUType
			self.topSpeed = 0
Пример #28
0
    def onRoundStart(self, isSelf):
        if self.isDestroyed:
            return
        self.attSum = 0
        if isSelf:
            if self.frozen > 0 and isSelf:
                self.frozen -= 1
            if self.isFollowerOrHero:
                self.isAbled = 1
                if self.pos == 'HERO':
                    if self.att <= 0:
                        self.isAbled = 0
                    else:
                        self.isAbled = 1
        else:
            self.isAbled = 0

        if self.avatarID == self.id:
            self.updateBuffPropertyEffect()

        for buff in self.buffList:
            buff.onRoundStart(isSelf)

        Spell.onRoundStart(self, isSelf)
Пример #29
0
 def initSpell(self, cardID):
     try:
         Spell.__init__(self, cardID)
     except IOError:
         pass
Пример #30
0
    def onUse(self, targetID, selfPos):
        self.allClients.onUse(targetID)
        if self.envBuff == 1:
            self.addEnvirBuff()

        Spell.onUse(self, targetID, selfPos)
Пример #31
0
    def onDead(self):
        if self.envBuff == 1:
            self.delSendEnvBuff()

        Spell.onDead(self)
Пример #32
0
	def __init__(self):
		GameObject.__init__(self)
		Combat.__init__(self) 
		Spell.__init__(self)