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)
def __init__(self): GameObject.__init__(self) Flags.__init__(self) State.__init__(self) Combat.__init__(self) Spell.__init__(self) Teleport.__init__(self) Dialog.__init__(self)
def __init__(self): NPCObject.__init__(self) Flags.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self)
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)
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)
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)
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)
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)
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)
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)
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)
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层来寻路
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)
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
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
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
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))
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
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
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)
def initSpell(self, cardID): try: Spell.__init__(self, cardID) except IOError: pass
def onUse(self, targetID, selfPos): self.allClients.onUse(targetID) if self.envBuff == 1: self.addEnvirBuff() Spell.onUse(self, targetID, selfPos)
def onDead(self): if self.envBuff == 1: self.delSendEnvBuff() Spell.onDead(self)
def __init__(self): GameObject.__init__(self) Combat.__init__(self) Spell.__init__(self)