def afterBuff(self, att, vic, bfObj, targetCount): CustomPerform.afterBuff(self, att, vic, bfObj, targetCount) if not bfObj: return bfObj.hp = self.calCure(att, vic, vic, targetCount)
def buff(self, att, vic, targetCount): CustomPerform.buff(self, att, vic, targetCount) warObj = att.war gameObj = warObj.game if not hasattr(gameObj, "getMonsterListByFightIdx"): # 不能直接使用,需要在玩法中使用 return monsterList = gameObj.getMonsterListByFightIdx(self.configInfo["战斗编号"]) if not monsterList: return posList = [] side = att.side for pos in xrange(1, 11): if pos not in warObj.teamList[side]: posList.append(pos) if not posList: return posList.sort() for pos in posList: monsterObj = monsterList[rand(len(monsterList))] monsterObj.pos = pos monsterW = warObj.addMonsterFight(monsterObj, side) warObj.rpcAddWarrior(monsterW, None, True) warObj.rpcWarAllBuff(monsterW)
def afterBuff(self, att, vic, bfObj, targetCount): CustomPerform.afterBuff(self, att, vic, bfObj, targetCount) if not bfObj: return bfObj.hp = self.calCure(att, vic, vic, targetCount) if att.hasApply("PF5622Ratio"): bfObj.ratio = att.hasApply("PF5622Ratio")
def buff(self, att, vic, targetCount): CustomPerform.buff(self, att, vic, targetCount) removeList = [] for pos in (BUFF_TYPEPOS_DEBUFF, BUFF_TYPEPOS_SEAL): for buffObj in vic.buffList[pos]: if buffObj: removeList.append(buffObj.id) for buffId in removeList: buff.remove(vic, buffId)
def afterBuff(self, att, vic, bfObj, targetCount): CustomPerform.afterBuff(self, att, vic, bfObj, targetCount) if not bfObj: return times = self.configInfo["次数"] if att.hasApply("弹跳次数"): times += att.hasApply("弹跳次数") bfObj.config(self, att, targetCount, times)
def afterBuff(self, att, vic, bfObj, targetCount): CustomPerform.afterBuff(self, att, vic, bfObj, targetCount) if not bfObj: return mp = self.transCode("SLV*1.5+30", att, vic) mpBuff = self.transCode("SLV*1.2+30", att, vic) vic.addMP(mp, att) bfObj.mp = mpBuff
def buff(self, att, vic, targetCount): CustomPerform.buff(self, att, vic, targetCount) removeList = [] for pos in (BUFF_TYPEPOS_DEBUFF, BUFF_TYPEPOS_SEAL): for buffObj in vic.buffList[pos]: if buffObj: removeList.append(buffObj.id) for buffId in removeList: buff.remove(vic, buffId) hpLimit = self.transCode(self.configInfo["上限"], att, vic) hp = self.transCode(self.configInfo["生命"], att, vic) hp = min(hp, hpLimit) vic.addHP(hp, att)
def validPerform(self, att, needTips): '''检查施法 ''' if hasattr(self, "hasPerformed"): if needTips: message.tips(att.getPID(), "一场战斗只能使用一次") return False return CustomPerform.validPerform(self, att, needTips)
def validPerform(self, att, needTips): '''检查施法 ''' count = 0 warObj = att.war side = att.side for w in warObj.teamList[side].itervalues(): if not hasattr(w, "performId") or w.performId != self.id: continue if not hasattr(w, "summonIdx") or w.summonIdx == att.idx: continue count += 1 if count >= 2: if needTips: message.tips(att.getPID(), "本方战场最多只能同时存在#C022只#n幽灵") return False return CustomPerform.validPerform(self, att, needTips)
def afterPerform(self, att, vicCast): CustomPerform.afterPerform(self, att, vicCast) self.hasPerformed = True
def buff(self, att, vic, targetCount): CustomPerform.buff(self, att, vic, targetCount) mp = self.transCode(self.configInfo["真气"], att, vic) att.addMP(mp, att)