129 【战斗】战斗系统-服务端(增加属性ID 77贯穿、78抗贯穿、79招架、80抗招架属性支持;)
| | |
| | | float QunFinalDamPerDefRatio;
|
| | | float PVPDamPerRatio;
|
| | | float PVPDamPerDefRatio;
|
| | | float GuanchuanRatio;
|
| | | float GuanchuanDefRatio;
|
| | | float ZhaojiaRatio;
|
| | | float ZhaojiaDefRatio;
|
| | | };
|
| | |
|
| | | //主线章节表
|
| | |
| | | AttrID_ReviveXPPer, # 复活怒气加成 74
|
| | | AttrID_DOTBurnPer, # 灼烧增伤 75
|
| | | AttrID_DOTBurnPerDef, # 灼烧减伤 76
|
| | | ) = range(1, 1 + 76)
|
| | | AttrID_Guanchuan, # 贯穿 77
|
| | | AttrID_GuanchuanDef, # 抗贯穿 78
|
| | | AttrID_Zhaojia, # 招架 79
|
| | | AttrID_ZhaojiaDef, # 抗招架 80
|
| | | ) = range(1, 1 + 80)
|
| | |
|
| | | # 需要计算的武将战斗属性ID列表
|
| | | CalcBattleAttrIDList = [AttrID_Atk, AttrID_Def, AttrID_MaxHP, AttrID_StunRate, AttrID_StunRateDef,
|
| | |
| | | AttrID_BatDamPer, AttrID_BatDamPerDef, AttrID_PursueDamPer, AttrID_PursueDamPerDef,
|
| | | AttrID_ComboDamPer, AttrID_ComboDamPerDef, AttrID_XPRecoverPer, AttrID_PVPDamPer, AttrID_PVPDamPerDef,
|
| | | AttrID_ReviveHPPer, AttrID_ReviveXPPer, AttrID_DOTBurnPer, AttrID_DOTBurnPerDef,
|
| | | AttrID_Guanchuan, AttrID_GuanchuanDef, AttrID_Zhaojia, AttrID_ZhaojiaDef,
|
| | | ]
|
| | |
|
| | | # 基础三维属性ID列表
|
| | |
| | | HurtAtkType_HarmSelf, # 自残 12
|
| | | HurtAtkType_CaorenProtect, # 本次伤害有受曹仁防护标记 13
|
| | | HurtAtkType_IgnoreShield, # 无视承伤盾 14
|
| | | ) = range(15)
|
| | | HurtAtkType_Guanchuan, # 贯穿 15
|
| | | HurtAtkType_Zhaojia, # 招架 16
|
| | | ) = range(17)
|
| | |
|
| | | #伤害类型
|
| | | (
|
| | |
| | | ("float", "QunFinalDamPerDefRatio", 0),
|
| | | ("float", "PVPDamPerRatio", 0),
|
| | | ("float", "PVPDamPerDefRatio", 0),
|
| | | ("float", "GuanchuanRatio", 0),
|
| | | ("float", "GuanchuanDefRatio", 0),
|
| | | ("float", "ZhaojiaRatio", 0),
|
| | | ("float", "ZhaojiaDefRatio", 0),
|
| | | ),
|
| | |
|
| | | "MainChapter":(
|
| | |
| | | def GetQunFinalDamPerDefRatio(self): return self.attrTuple[41] # float
|
| | | def GetPVPDamPerRatio(self): return self.attrTuple[42] # float
|
| | | def GetPVPDamPerDefRatio(self): return self.attrTuple[43] # float |
| | | def GetGuanchuanRatio(self): return self.attrTuple[44] # float
|
| | | def GetGuanchuanDefRatio(self): return self.attrTuple[45] # float
|
| | | def GetZhaojiaRatio(self): return self.attrTuple[46] # float
|
| | | def GetZhaojiaDefRatio(self): return self.attrTuple[47] # float |
| | | |
| | | # 主线章节表 |
| | | class IPY_MainChapter(): |
| | |
| | | aFinalDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.PassiveEff_AddFinalDamPer, curSkill)
|
| | | aFinalDamPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.AttrID_FinalDamPer, curSkill)
|
| | |
|
| | | #招架 - 无视攻击方最终增伤百分比
|
| | | dZhaojia = defObj.GetBatAttrValue(ChConfig.AttrID_Zhaojia)
|
| | | aZhaojiaDef = atkObj.GetBatAttrValue(ChConfig.AttrID_ZhaojiaDef)
|
| | | if dZhaojia > aZhaojiaDef:
|
| | | perMoreValue, perReduce = IpyGameDataPY.GetFuncEvalCfg("ZhaojiaCfg", 1) # 每高与对方抗贯穿x值无视y%最终减伤
|
| | | reducePer = (dZhaojia - aZhaojiaDef) / float(perMoreValue) * perReduce
|
| | | reduceMin, reduceMax = IpyGameDataPY.GetFuncEvalCfg("ZhaojiaCfg", 2) # 最小无视百分比|最大无视百分比
|
| | | if reducePer >= reduceMin and GameWorld.CanHappen(IpyGameDataPY.GetFuncCfg("ZhaojiaCfg", 3)):
|
| | | reducePer = min(reducePer, reduceMax)
|
| | | hurtTypes |= pow(2, ChConfig.HurtAtkType_Zhaojia)
|
| | | aFinalDamPer = int(aFinalDamPer * (100 - reducePer) / 100.0) # 按百分比减少
|
| | | GameWorld.DebugLogEx("dZhaojia=%s,aZhaojiaDef=%s,reducePer=%s,aFinalDamPer=%s", dZhaojia, aZhaojiaDef, reducePer, aFinalDamPer)
|
| | | |
| | | #贯穿 - 无视防守方最终减伤百分比
|
| | | aGuanchuan = atkObj.GetBatAttrValue(ChConfig.AttrID_Guanchuan)
|
| | | dGuanchuanDef = defObj.GetBatAttrValue(ChConfig.AttrID_GuanchuanDef)
|
| | | if aGuanchuan > dGuanchuanDef:
|
| | | perMoreValue, perReduce = IpyGameDataPY.GetFuncEvalCfg("GuanchuanCfg", 1) # 每高与对方抗贯穿x值无视y%最终减伤
|
| | | reducePer = (aGuanchuan - dGuanchuanDef) / float(perMoreValue) * perReduce
|
| | | reduceMin, reduceMax = IpyGameDataPY.GetFuncEvalCfg("GuanchuanCfg", 2) # 最小无视百分比|最大无视百分比
|
| | | if reducePer >= reduceMin and GameWorld.CanHappen(IpyGameDataPY.GetFuncCfg("GuanchuanCfg", 3)):
|
| | | reducePer = min(reducePer, reduceMax)
|
| | | hurtTypes |= pow(2, ChConfig.HurtAtkType_Guanchuan)
|
| | | dFinalDamPerDef = int(dFinalDamPerDef * (100 - reducePer) / 100.0) # 按百分比减少
|
| | | GameWorld.DebugLogEx("aGuanchuan=%s,dGuanchuanDef=%s,reducePer=%s,dFinalDamPerDef=%s", aGuanchuan, dGuanchuanDef, reducePer, dFinalDamPerDef) |
| | | |
| | | aNormalSkillPer, dNormalSkillPerDef = 0, 0
|
| | | if isTurnNormalSkill:
|
| | | aNormalSkillPer = atkObj.GetBatAttrValue(ChConfig.AttrID_NormalSkillPer) # 普技增伤
|