5539 【后端】【1.4】聚魂副本怪物和守卫成长支持新的成长公式
| | |
| | | {
|
| | | DWORD _NPCID; //NPCID
|
| | | BYTE IsStrengthenByPlayerCount;//是否根据人数成长
|
| | | BYTE LVStrengthenMark;//等级成长属性公式标记
|
| | | BYTE LVStrengthenType;//等级成长类型, 0-不按等级成长;1-按玩家平均等级;2-按玩家最大等级;3-按世界等级;
|
| | | BYTE CmpNPCBaseLV;//是否比较NPC表等级, 是的话取NPC表配置等级与成长等级中较大等级
|
| | | DWORD HitTime;//受击次数
|
| | |
| | | "NPCStrengthen":(
|
| | | ("DWORD", "NPCID", 1),
|
| | | ("BYTE", "IsStrengthenByPlayerCount", 0),
|
| | | ("BYTE", "LVStrengthenMark", 0),
|
| | | ("BYTE", "LVStrengthenType", 0),
|
| | | ("BYTE", "CmpNPCBaseLV", 0),
|
| | | ("DWORD", "HitTime", 0),
|
| | |
| | | def __init__(self): |
| | | self.NPCID = 0
|
| | | self.IsStrengthenByPlayerCount = 0
|
| | | self.LVStrengthenMark = 0
|
| | | self.LVStrengthenType = 0
|
| | | self.CmpNPCBaseLV = 0
|
| | | self.HitTime = 0
|
| | |
| | | |
| | | def GetNPCID(self): return self.NPCID # NPCID
|
| | | def GetIsStrengthenByPlayerCount(self): return self.IsStrengthenByPlayerCount # 是否根据人数成长
|
| | | def GetLVStrengthenMark(self): return self.LVStrengthenMark # 等级成长属性公式标记
|
| | | def GetLVStrengthenType(self): return self.LVStrengthenType # 等级成长类型, 0-不按等级成长;1-按玩家平均等级;2-按玩家最大等级;3-按世界等级;
|
| | | def GetCmpNPCBaseLV(self): return self.CmpNPCBaseLV # 是否比较NPC表等级, 是的话取NPC表配置等级与成长等级中较大等级
|
| | | def GetHitTime(self): return self.HitTime # 受击次数
|
| | |
| | |
|
| | | attrDict = {}
|
| | | paramDict = attrStrengthenInfo[NPCAttr_ParamDict] # 过程参数公式字典
|
| | | attrStrengthenList = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
|
| | | attrStrengthenDict = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
|
| | | playerCntCoefficient = attrStrengthenInfo[NPCAttr_PlayerCntCoefficient] # 人数系数
|
| | | npcIDPlayerCntCoefficient = attrStrengthenInfo[NPCAttr_NPCPlayerCntCoefficient] # 特殊NPC人数系数
|
| | | baseMaxHP = npcData.GetHPEx() * ShareDefine.Def_PerPointValue + npcData.GetHP()
|
| | |
| | | MonterHurt = eval(FormulaControl.GetCompileFormula("NPCParam_MonterHurt", paramDict["MonterHurt"])) # 怪物固定伤害
|
| | | LostHPPerSecond = eval(FormulaControl.GetCompileFormula("NPCParam_LostHPPerSecond", paramDict["LostHPPerSecond"])) # 玩家每秒掉血量
|
| | |
|
| | | attrStrengthenList = attrStrengthenDict.get(strengthenIpyData.GetLVStrengthenMark(), [])
|
| | | for attrKey, strengthenFormat in attrStrengthenList:
|
| | | strengthenValue = int(eval(FormulaControl.GetCompileFormula("NPCStrengthen_%s" % attrKey, strengthenFormat)))
|
| | | #GameWorld.DebugLog(" %s=%s" % (attrKey, strengthenValue))
|
| | |
| | | return
|
| | |
|
| | |
|
| | | def __GetGatherSoulSplitMaterial(gathersoulID, soulidList=[], soulSplinters=0, soulCore=0):
|
| | | def __GetGatherSoulSplitMaterial(gathersoulID):
|
| | | ##拆解多属性聚魂 返回单属性聚魂ID,材料
|
| | | soulidList, soulSplinters, soulCore= [], 0, 0
|
| | | compoundIpyData = IpyGameDataPY.GetIpyGameDataNotLog('GatherSoulCompound', gathersoulID)
|
| | | if compoundIpyData:
|
| | | materialList = compoundIpyData.GetNeedItem()
|