| | |
| | | return curNPC.GetLV()
|
| | |
|
| | | def GetRealmLV(curNPC): return curNPC.GetMAtkMin() # NPC表中此字段含义改成境界等级
|
| | | def SetRealmLV(curNPC, realmLV): return curNPC.SetMAtkMin(realmLV) # NPC表中此字段含义改成境界等级
|
| | | def GetIsLVSuppress(curNPC): return curNPC.GetWindDef() # 风防代表是否等级压制
|
| | | def GetSuppressFightPower(curNPC): return curNPC.GetThunderDef() # 雷防代表压制战力
|
| | | def SetSuppressFightPower(curNPC, value): return curNPC.SetThunderDef(value)
|
| | |
| | | def GetFaction(curNPC): return curNPC.GetCountry()
|
| | | def GetSkillAtkRate(curNPC): return curNPC.GetPoisionAtk() # 毒攻代表NPC技能伤害加成万分率
|
| | | def GetFinalHurt(curNPC): return curNPC.GetFireAtk() # 火攻代表NPC最终固定伤害加成, 普攻也有效果
|
| | | def SetFinalHurt(curNPC, hurt): return curNPC.SetFireAtk(hurt) # 火攻代表NPC最终固定伤害加成, 普攻也有效果
|
| | | def GetSkillEnhance(curNPC): return curNPC.GetWindAtk() # 风攻代表NPC 《普攻》 的技能附加伤害固定值
|
| | | def GetNPCSeries(curNPC): return curNPC.GetPoisionDef() # 毒防字段代表NPC系,按二进制位区分
|
| | |
|
| | |
| | | tagPlaceSortList.sort() # 升序排序
|
| | | tagPlaceSortList2.sort() # 升序排序
|
| | | if isKillCountDropEquipEx:
|
| | | GameWorld.DebugLog("都不满足目标装备的优先级信息: npcID=%s, 颜色,阶,星,评分,部位,职业=%s" % (npcID, tagPlaceSortList), playerID)
|
| | | GameWorld.DebugLog("部分满足目标装备的优先级信息: npcID=%s, 颜色,阶,星,评分,部位,职业=%s" % (npcID, tagPlaceSortList2), playerID)
|
| | | tagPlaceSortList += tagPlaceSortList2
|
| | | if tagPlaceSortList:
|
| | | tagPlace = tagPlaceSortList[0][-2]
|
| | | tagJob = tagPlaceSortList[0][-1]
|
| | | |
| | | GameWorld.DebugLog("都不满足目标装备的优先级信息: npcID=%s, 数量=%s, 颜色,阶,星,评分,部位,职业=%s" % (npcID, len(tagPlaceSortList), tagPlaceSortList), playerID)
|
| | | GameWorld.DebugLog("部分满足目标装备的优先级信息: npcID=%s, 数量=%s, 颜色,阶,星,评分,部位,职业=%s" % (npcID, len(tagPlaceSortList2), tagPlaceSortList2), playerID)
|
| | | if tagPlaceSortList or tagPlaceSortList2:
|
| | | isOptimalPlace = IpyGameDataPY.GetFuncCfg("DropEquipPlaceMode", 1) # 是否取最优解部位
|
| | | if isOptimalPlace:
|
| | | tagPlaceSortList += tagPlaceSortList2
|
| | | if tagPlaceSortList:
|
| | | tagPlace = tagPlaceSortList[0][-2]
|
| | | tagJob = tagPlaceSortList[0][-1]
|
| | | GameWorld.DebugLog("掉落目标部位取最优解: tagPlace=%s,tagJob=%s" % (tagPlace, tagJob), playerID)
|
| | | else:
|
| | | randPlaceCountLimit = IpyGameDataPY.GetFuncCfg("DropEquipPlaceMode", 2) # 全不满足目标条件部位有几个时才优先随机
|
| | | if len(tagPlaceSortList) < randPlaceCountLimit:
|
| | | tagPlaceSortList += tagPlaceSortList2
|
| | | else:
|
| | | GameWorld.DebugLog("优先随机都不满足目标装备的,randPlaceCountLimit=%s" % randPlaceCountLimit, playerID)
|
| | | randPlaceIndex = random.randint(0, len(tagPlaceSortList) - 1)
|
| | | GameWorld.DebugLog("掉落目标部位随机, randPlaceIndex=%s, 颜色,阶,星,评分,部位,职业=%s" % (randPlaceIndex, tagPlaceSortList), playerID)
|
| | | tagPlace = tagPlaceSortList[randPlaceIndex][-2]
|
| | | tagJob = tagPlaceSortList[randPlaceIndex][-1]
|
| | | GameWorld.DebugLog("掉落目标部位随机不满足条件的: tagPlace=%s,tagJob=%s" % (tagPlace, tagJob), playerID)
|
| | | |
| | | if isKillCountDropEquipEx:
|
| | | GameWorld.DebugLog("附加掉落指定目标装备信息: npcID=%s,玩家最少的击杀次数=%s,目标击杀数=%s,tagClassLV=%s,tagColor=%s,tagStar=%s,tagStarMin=%s,tagPlace=%s,tagJob=%s"
|
| | | % (npcID, dropEquipExKillCount, tagKillCount, tagClassLV, tagColor, tagStar, tagStarMin, tagPlace, tagJob), playerID)
|
| | |
| | | self.__AddAngryValue(npcAngry, curObjID, curObjType, plusAngryValue, canPile)
|
| | |
|
| | | #激活呆滞的NPC
|
| | | if curNPC.GetHP() > 0 and not curNPC.GetIsNeedProcess() :
|
| | | if GameObj.GetHP(curNPC) > 0 and not curNPC.GetIsNeedProcess() :
|
| | | curNPC.SetIsNeedProcess(True)
|
| | |
|
| | |
|