| | |
| | |
|
| | | # 子技能怒气溢出值也有效,所以子技能不处理
|
| | | curXP = curBatObj.GetXP()
|
| | | if batType == ChConfig.TurnBattleType_Enhance:
|
| | | pass
|
| | | elif SkillCommon.isAngerSkill(useSkill):
|
| | | if SkillCommon.isAngerSkill(useSkill):
|
| | | maxXP = IpyGameDataPY.GetFuncCfg("AngerXP", 2)
|
| | | angerOverflow = max(curXP - maxXP, 0)
|
| | | curBatObj.SetAngerOverflow(angerOverflow)
|
| | | GameWorld.DebugLogEx("怒气溢出值: curXP=%s/%s,angerOverflow=%s", curXP, maxXP, angerOverflow)
|
| | | if batType == ChConfig.TurnBattleType_Enhance:
|
| | | pass
|
| | | else:
|
| | | curBatObj.SetAngerOverflow(0)
|
| | | angerOverflow = curBatObj.GetAngerOverflow()
|
| | |
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not __skillTagFilter(curBatObj, tagBatObj, tagAffect, isNoSelf):
|
| | | continue
|
| | | |
| | | if tagAim == ChConfig.SkillTagAim_Male:
|
| | | if tagBatObj.GetSex() != ChConfig.BatObjSex_Male:
|
| | | continue
|
| | | elif tagAim == ChConfig.SkillTagAim_Female:
|
| | | if tagBatObj.GetSex() != ChConfig.BatObjSex_Female:
|
| | | continue
|
| | | aimObjList.append(tagBatObj)
|
| | |
|
| | |
| | | else:
|
| | | diffType = 1
|
| | | tagXP = tagBatObj.GetXP()
|
| | | diffValue = GetEnhanceXP(tagBatObj, calcValue)
|
| | | diffValue = GetEnhanceXP(tagBatObj, calcValue, useSkill)
|
| | | updValue = tagXP + diffValue
|
| | | tagBatObj.SetXP(updValue, False)
|
| | | GameWorld.DebugLogEx(" 加怒气: tagID=%s,diffValue=%s,tagXP=%s,updXP=%s", tagID, diffValue, tagXP, updValue)
|
| | |
| | | Sync_PropertyRefreshView(turnFight, gameObj, ChConfig.AttrID_XP, updXP, addXP, diffType=1, relatedSkillID=relatedSkillID)
|
| | | return
|
| | |
|
| | | def GetEnhanceXP(gameObj, addXP):
|
| | | def GetEnhanceXP(gameObj, addXP, useSkill=None):
|
| | | ## 获取提升后的xp值
|
| | | addPer = gameObj.GetBatAttrValue(ChConfig.AttrID_XPRecoverPer)
|
| | | # 其他强化、弱化
|
| | | if addPer == 0:
|
| | | return addXP
|
| | | if useSkill and useSkill.GetFuncType() == ChConfig.Def_SkillFuncType_PotentialSkill and useSkill.GetSkillValue() == 50:
|
| | | GameWorld.DebugLogEx("潜能初始50点暂时写死不受限: objID=%s,addXP=%s,skillID=%s", gameObj.GetID(), addXP, useSkill.GetSkillID())
|
| | | return addXP
|
| | | objID = gameObj.GetID()
|
| | | updAddXP = int(addXP * max(10000 + addPer, 0) / 10000.0)
|
| | |
| | | defObj, hurtValue, hurtTypes, immuneHurt = hurtInfo[:4]
|
| | | isEx = hurtInfo[4] if len(hurtInfo) > 4 else 0 # 是否是额外目标
|
| | |
|
| | | lostHP, ignoreShield = DoLostHP(turnFight, atkObj, defObj, hurtValue, curSkill, lostType, hpCanNegative=True, immuneHurt=immuneHurt)
|
| | | lostHP, ignoreShield, hurtValue = DoLostHP(turnFight, atkObj, defObj, hurtValue, curSkill, lostType, hpCanNegative=True, immuneHurt=immuneHurt)
|
| | | if ignoreShield:
|
| | | hurtTypes |= pow(2, ChConfig.HurtAtkType_IgnoreShield)
|
| | |
|
| | |
| | | @param hpCanNegative: 扣除后的生命是否允许负值
|
| | | @param immuneHurt: 免疫的伤害值
|
| | | @param isSkillSelfTag: 是否技能自身的直接目标,如平摊伤害目标、溅射伤害目标这种就不算直接目标
|
| | | @return: lostHP, ignoreShield
|
| | | @return: lostHP, ignoreShield, hurtValue
|
| | | '''
|
| | |
|
| | | ignoreShield = None
|
| | |
| | | defObj.GetID(), buff.GetBuffID(), buffSkillID, buffValue, immuneHurt, updBuffValue, lostType)
|
| | |
|
| | | if hurtValue <= 0:
|
| | | return 0, ignoreShield
|
| | | return 0, ignoreShield, hurtValue
|
| | | |
| | | # 伤血上限保护
|
| | | lostHPProtect = TurnPassive.GetTriggerEffectValue(turnFight, defObj, atkObj, ChConfig.PassiveEff_LostHPProtect, curSkill)
|
| | | if lostHPProtect > 0 and hurtValue > lostHPProtect:
|
| | | GameWorld.DebugLogEx(" 扣血时最大伤血保护: defID=%s,hurtValue=%s,lostHPProtect=%s", defObj.GetID(), hurtValue, lostHPProtect)
|
| | | hurtValue = lostHPProtect
|
| | |
|
| | | atkID = atkObj.GetID()
|
| | | defID = defObj.GetID()
|
| | |
| | | GameWorld.DebugLogEx(" 扣血: atkID=%s,defID=%s,hurtValue=%s,lostType=%s,lostHP=%s,dHP=%s,updHP=%s/%s",
|
| | | atkID, defID, hurtValue, lostType, lostHP, dHP, defObj.GetHP(), defObj.GetMaxHP())
|
| | | TurnAttack.AddTurnObjHurtValue(atkObj, defObj, hurtValue, lostHP, skillID, lostType)
|
| | | return lostHP, ignoreShield
|
| | | return lostHP, ignoreShield, hurtValue
|
| | |
|
| | | def CalcBounceHP(turnFight, atkObj, defObj, hurtObj, curSkill):
|
| | | '''计算反弹反弹伤害
|