129 【战斗】战斗系统-服务端(增加属性ID技能增伤65、技能减伤66;曹轶技能;被动触发增加属性支持;)
| | |
| | |
|
| | | def __StrToList(self, strValue):
|
| | | setList = []
|
| | | if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
|
| | | if (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")):
|
| | | setList = eval(strValue)
|
| | | elif strValue in ["0", "-", ""]:
|
| | | pass
|
| | |
| | | for value in strValue.split(ChConfig.Def_Str_Montant):
|
| | | if value.isdigit():
|
| | | value = int(value)
|
| | | elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")):
|
| | | value = eval(value)
|
| | | setList.append(value)
|
| | | if setList:
|
| | | setList = tuple(setList)
|
| | |
| | | effList = []
|
| | |
|
| | | # ä¼å
åå
³èæè½ç
|
| | | if connSkillTypeID and connSkillTypeID not in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_Buff]:
|
| | | if connSkillTypeID and connSkillTypeID not in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_Buff, ChConfig.TriggerSrc_SkillSelf, ChConfig.TriggerSrc_BuffSelf]:
|
| | | # æè½
|
| | | key = (triggerWay, connSkillTypeID)
|
| | | if key in self._AffectSkillDict:
|
| | |
| | | return
|
| | | if triggerWay == ChConfig.TriggerWay_CurSkillEff:
|
| | | return
|
| | | if triggerSrc == ChConfig.TriggerSrc_Buff:
|
| | | if triggerSrc in [ChConfig.TriggerSrc_Buff, ChConfig.TriggerSrc_BuffSelf]:
|
| | | # buffææçä¸å è¿æ¥
|
| | | return
|
| | |
|
| | | skillID = curSkill.GetSkillID()
|
| | | effectID = effect.GetEffectID()
|
| | |
|
| | | if triggerWay == ChConfig.TriggerWay_CalcEffValue:
|
| | | triggerWay = "%s_%s" % (triggerWay, effectID)
|
| | | |
| | | if triggerSrc == ChConfig.TriggerSrc_SkillSelf:
|
| | | triggerSrc = curSkill.GetSkillTypeID()
|
| | | |
| | | key = (triggerWay, triggerSrc)
|
| | | if key not in self._AffectSkillDict:
|
| | | self._AffectSkillDict[key] = {}
|
| | |
| | | return
|
| | | if triggerWay == ChConfig.TriggerWay_CurSkillEff:
|
| | | return
|
| | | if triggerSrc == ChConfig.TriggerSrc_Skill:
|
| | | if triggerSrc in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_SkillSelf]:
|
| | | # æè½ææçä¸å è¿æ¥
|
| | | return
|
| | |
|
| | | buffID = buff.GetBuffID()
|
| | | effectID = effect.GetEffectID()
|
| | |
|
| | | if triggerWay == ChConfig.TriggerWay_CalcEffValue:
|
| | | triggerWay = "%s_%s" % (triggerWay, effectID)
|
| | | |
| | | if triggerSrc == ChConfig.TriggerSrc_BuffSelf:
|
| | | triggerSrc = skillData.GetSkillTypeID()
|
| | | |
| | | key = (triggerWay, triggerSrc)
|
| | | if key not in self._AffectBuffDict:
|
| | | self._AffectBuffDict[key] = {}
|
| | |
| | | # return False
|
| | | return True
|
| | |
|
| | | def IsInState(self, state):
|
| | | def CheckInState(self, checkInState):
|
| | | ## æ¯å¦å¤äºæç§ç¶æä¸
|
| | | if isinstance(checkInState, int):
|
| | | checkInStateList = [checkInState]
|
| | | elif isinstance(checkInState, list) or isinstance(checkInState, tuple):
|
| | | checkInStateList = checkInState
|
| | | else:
|
| | | return False
|
| | | for state in checkInStateList:
|
| | | if self._buffMgr.IsInBuffState(state):
|
| | | return True
|
| | | return False
|
| | | def IsInState(self, state):
|
| | | ## æ¯å¦å¤äºæå®ç¶æä¸
|
| | | return self._buffMgr.IsInBuffState(state)
|
| | |
|
| | | def IsInControlled(self):
|
| | |
| | | AttrID_WuFinalDamPerDef, # 对å´å伤 62
|
| | | AttrID_QunFinalDamPer, # 对群å¢ä¼¤ 63
|
| | | AttrID_QunFinalDamPerDef, # 对群å伤 64
|
| | | ) = range(1, 1 + 64)
|
| | | AttrID_SkillPer, # æè½å¢ä¼¤ 65
|
| | | AttrID_SkillPerDef, # æè½å伤 66
|
| | | ) = range(1, 1 + 66)
|
| | |
|
| | | # éè¦è®¡ç®çæ¦å°ææå±æ§IDå表
|
| | | CalcBattleAttrIDList = [AttrID_Atk, AttrID_Def, AttrID_MaxHP, AttrID_StunRate, AttrID_StunRateDef,
|
| | |
| | | TriggerWay_HeroTurnEnd, # æ¦å°ååå¼å§æ¶ 5
|
| | | TriggerWay_HeroActionStart, # æ¦å°è¡å¨å 6
|
| | | TriggerWay_HeroActionEnd, # æ¦å°è¡å¨å 7
|
| | | TriggerWay_CalcTagInState, # æ»å»è®¡ç®æ¶å¯¹æ¹å¤äºxxç¶ææ¶ï¼åæ°ï¼ç¶æ1|2|...ï¼ä¸è¬ç¨äºæ»å»æ¶å±æ§è®¡ç® 8
|
| | | TriggerWay_AttackOverTagInState, # æ»å»è®¡ç®å对æ¹å¤äºxxç¶ææ¶ï¼åæ°ï¼ç¶æ1|2|...ï¼ä¸è¬ç¨äºæ»å»åè§¦åææ 9
|
| | | TriggerWay_CalcEffValue, # ç»è®¡è®¡ç®ææå¼æ¶ 8
|
| | | TriggerWay_9, # 9
|
| | | TriggerWay_AttackOverDirect, # ç´æ¥æ»å»å ï¼ébuffæ»å»ï¼10
|
| | | TriggerWay_BeAttackedDirect, # åå°ç´æ¥æ»å»æ¶ ï¼ébuffæ»å»ï¼11
|
| | | TriggerWay_ShieldBroken, # æ¿ä¼¤ç¾è¢«å»ç ´æ¶ 12
|
| | |
| | | ) = range(1, 1 + 13)
|
| | |
|
| | | # 被å¨è§¦åæææ¥æº
|
| | | TriggerSrc_Skill = 1
|
| | | TriggerSrc_Buff = 2
|
| | | TriggerSrc_Skill = 1 # èº«ä¸æè½ææ
|
| | | TriggerSrc_Buff = 2 # 身ä¸buffææ
|
| | | TriggerSrc_SkillSelf = 3 # æ¬æè½ææ
|
| | | TriggerSrc_BuffSelf = 4 # æ¬buffææ
|
| | |
|
| | | (
|
| | | TriggerType_BeSuperHit, # 被æ´å»è§¦åæè½ 1
|
| | |
| | |
|
| | | def __StrToList(self, strValue):
|
| | | setList = []
|
| | | if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
|
| | | if (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")):
|
| | | setList = eval(strValue)
|
| | | elif strValue in ["0", "-", ""]:
|
| | | pass
|
| | |
| | | for value in strValue.split(ChConfig.Def_Str_Montant):
|
| | | if value.isdigit():
|
| | | value = int(value)
|
| | | elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")):
|
| | | value = eval(value)
|
| | | setList.append(value)
|
| | | if setList:
|
| | | setList = tuple(setList)
|
| New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Skill.PassiveTrigger.PassiveEff_Attr
|
| | | #
|
| | | # @todo:被å¨è§¦å屿§
|
| | | # @author hxp
|
| | | # @date 2025-09-16
|
| | | # @version 1.0
|
| | | #
|
| | | # è¯¦ç»æè¿°: 被å¨è§¦å屿§
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2025-09-16 14:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | def GetHappenValue(attacker, defender, curEffect, effSkill, **skillkwargs):
|
| | | |
| | | checkInStateList = curEffect.GetEffectValue(2)
|
| | | if checkInStateList:
|
| | | if not defender.CheckInState(checkInStateList):
|
| | | return 0
|
| | | |
| | | attrValue = curEffect.GetEffectValue(0)
|
| | | calcType = curEffect.GetEffectValue(1)
|
| | | if calcType == 2: # åå°ï¼å
¶ä»é»è®¤å¢å
|
| | | attrValue = -attrValue
|
| | | |
| | | return attrValue
|
| | |
| | | continue
|
| | |
|
| | | if curEffect.GetTriggerWay():
|
| | | if curEffect.GetTriggerSrc() != ChConfig.TriggerSrc_Skill:
|
| | | if curEffect.GetTriggerSrc() not in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_SkillSelf]:
|
| | | passiveEffMgr.AddBuffPassiveEffect(addBuff, buffSkill, curEffect)
|
| | |
|
| | | elif effectID in ChConfig.AttrIDList:
|
| | |
| | | continue
|
| | |
|
| | | if curEffect.GetTriggerWay():
|
| | | if curEffect.GetTriggerSrc() != ChConfig.TriggerSrc_Skill:
|
| | | if curEffect.GetTriggerSrc() not in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_SkillSelf]:
|
| | | haveBuffPassiveEff = True
|
| | |
|
| | | elif effectID in ChConfig.AttrIDList:
|
| | |
| | | callFunc(turnFight, batObj, tagObj, effBuff, curEffect, connSkill)
|
| | | return
|
| | |
|
| | | def GetTriggerPassiveValue(batObj, triggerType, tagObj=None, useSkill=None):
|
| | | def GetTriggerEffectValue(turnFight, atkObj, defObj, calcEffID, connSkill=None):
|
| | | ''' è·å触å被å¨çå¼ï¼ä¸è¬ç¨äºæç§æ¡ä»¶ä¸æä¼äº§ççå¼ï¼å¦xxæ
åµä¸å±æ§åå æ xxæ
åµä¸æ¯å¦åçä»ä¹
|
| | | @return: 触åçå¼ï¼0-没æè§¦åææ¬èº«è§¦åçå¼ä¸º0ï¼å¤§äº0-触åçå
·ä½å¼
|
| | | @param calcEffID: éè¦ç»è®¡çææIDï¼å¯ä»¥æ¯å±æ§IDæè
å
¶ä»èªå®ä¹ææID
|
| | | @return: 触åçå¼ï¼0-没æè§¦åææ¬èº«è§¦åçå¼ä¸º0ï¼é0-触åçå
·ä½å¼
|
| | | '''
|
| | | return 0
|
| | | # attacker = FindRealAttacker(attacker)
|
| | | # if not attacker:
|
| | | # return 0
|
| | | # |
| | | # stopPassiveSkill = False # è¢«å¨æè½ä¸è½å触åè¢«å¨æè½ï¼ä½å¯ä»¥è§¦åå¤©èµæè½
|
| | | # if useSkill and SkillCommon.isPassiveSkill(useSkill) and isStopPassiveSkill:
|
| | | # #GameWorld.DebugLog("è¢«å¨æè½ä¸è½å次触åè¢«å¨æè½")
|
| | | # #return 0
|
| | | # if not PassPassiveLimit(useSkill):
|
| | | # stopPassiveSkill = True
|
| | | #
|
| | | #
|
| | | # passiveEff = GetPassiveEffManager().GetPassiveEff(attacker)
|
| | | # if not passiveEff:
|
| | | # return 0
|
| | | # buffDict = passiveEff.GetBuffsByTriggerType(triggerType)
|
| | | # if not buffDict:
|
| | | # return 0
|
| | | # |
| | | # # å½åææå
³ç³» pvp pve
|
| | | # battleRelationType = AttackCommon.GetBattleRelationType(attacker, defender)
|
| | | # if not AttackCommon.CheckBattleRelationType(attacker, defender, useSkill, battleRelationType):
|
| | | # return 0
|
| | | # |
| | | # useSkillID = useSkill.GetSkillID() if useSkill else 0
|
| | | # #tick = GameWorld.GetGameWorld().GetTick()
|
| | | # curValue = 0
|
| | | # |
| | | # for skillID, effectList in buffDict.items():
|
| | | # if skillID == useSkillID:
|
| | | # continue
|
| | | # curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | # if not curSkill:
|
| | | # continue
|
| | | # |
| | | # if not IsValidPassiveSkill(curSkill):
|
| | | # continue
|
| | | # |
| | | # triggerCount = 0 # æåè§¦åæ¬¡æ°
|
| | | # for effectInfo in effectList:
|
| | | # if stopPassiveSkill and curSkill.GetFuncType() != ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # # åªæå¤©èµæå¯ä»¥å次被触å
|
| | | # continue |
| | | # passiveEffect = effectInfo[0]
|
| | | # # 被å¨è§¦åçæè½
|
| | | # pyName = "PassiveBuff_%s"%passiveEffect.GetEffectID()
|
| | | # |
| | | # callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "CheckCanHappen"))
|
| | | # if not callFunc:
|
| | | # continue
|
| | | # |
| | | # # æ¡ä»¶ä¸æ»¡è¶³
|
| | | # if not callFunc(attacker, defender, passiveEffect, skillID, useSkill=useSkill, ownerID=effectInfo[1], ownerType=effectInfo[2]):
|
| | | # continue
|
| | | # |
| | | # callFunc = GameWorld.GetExecFunc(PassiveBuff, "%s.%s" % (pyName, "GetValue"))
|
| | | # if callFunc is None:
|
| | | # continue
|
| | | # |
| | | # # å¦è¢«å¨æè½ï¼åå¹»å¥ççå®ä¼¤å®³ä»2å4å
|
| | | # #curValue += GetPassiveSkillValueByTriggerType(attacker, defender, curSkill, ChConfig.TriggerType_PassiveBuffValue)
|
| | | # value = callFunc(attacker, defender, passiveEffect)
|
| | | # if triggerType in TriggerValueMaxList:
|
| | | # curValue = max(curValue, value) # åæå¤§å¼
|
| | | # elif triggerType in TriggerValueMinList:
|
| | | # if not curValue:
|
| | | # curValue = value
|
| | | # elif value > 0:
|
| | | # curValue = min(curValue, value) # åæå°å¼
|
| | | # else:
|
| | | # curValue += value
|
| | | # |
| | | # triggerCount += 1
|
| | | # |
| | | # if triggerCount:
|
| | | # OnTriggerBuffDel(attacker, curSkill, triggerCount)
|
| | | # |
| | | # return curValue
|
| | | |
| | | triggerWay = ChConfig.TriggerWay_CalcEffValue
|
| | | passiveEffMgr = atkObj.GetPassiveEffManager()
|
| | | connSkillTypeID = connSkill.GetSkillTypeID() if connSkill else 0
|
| | | effInfoList = passiveEffMgr.GetPassiveEffByTrigger("%s_%s" % (triggerWay, calcEffID), connSkillTypeID)
|
| | | if not effInfoList:
|
| | | return 0
|
| | | |
| | | curValue = 0
|
| | | skillMgr = atkObj.GetSkillManager()
|
| | | buffMgr = atkObj.GetBuffManager()
|
| | | # [["skill/buff", skillID/buffID, effIDList], ...]
|
| | | tagID = defObj.GetID() if defObj else 0
|
| | | GameWorld.DebugLog("ç»è®¡è¢«å¨ææå¼: calcEffID=%s,objID=%s,tagID=%s,%s" % (calcEffID, atkObj.GetID(), tagID, effInfoList))
|
| | | for effInfo in effInfoList:
|
| | | sign = effInfo[0]
|
| | | if sign == "skill":
|
| | | skillID, effIDList = effInfo[1:]
|
| | | effSkill = skillMgr.FindSkillByID(skillID)
|
| | | elif sign == "buff":
|
| | | buffID, effIDList = effInfo[1:]
|
| | | effBuff = buffMgr.GetBuff(buffID)
|
| | | if not effBuff:
|
| | | continue
|
| | | effSkill = effBuff.GetSkillData()
|
| | | else:
|
| | | continue
|
| | | |
| | | if not effSkill:
|
| | | continue
|
| | | |
| | | for effID in effIDList:
|
| | | effect = effSkill.GetEffectByID(effID, triggerWay)
|
| | | if not effect:
|
| | | continue
|
| | | effID = effect.GetEffectID()
|
| | | if not effID or effID != calcEffID:
|
| | | continue
|
| | | |
| | | if effID in ChConfig.AttrIDList:
|
| | | pyName = "PassiveEff_Attr"
|
| | | else:
|
| | | pyName = "PassiveEff_%s" % effID
|
| | | |
| | | callFunc = GameWorld.GetExecFunc(PassiveTrigger, "%s.%s" % (pyName, "GetHappenValue"))
|
| | | if not callFunc:
|
| | | continue
|
| | | value = callFunc(atkObj, defObj, effect, effSkill)
|
| | | if value is None:
|
| | | continue
|
| | | |
| | | #if triggerType in TriggerValueMaxList:
|
| | | # curValue = max(curValue, value) # åæå¤§å¼
|
| | | #elif triggerType in TriggerValueMinList:
|
| | | # if not curValue:
|
| | | # curValue = value
|
| | | # elif value > 0:
|
| | | # curValue = min(curValue, value) # åæå°å¼
|
| | | #else:
|
| | | curValue += value
|
| | | #if skillTypeID not in Def_PassiveSkillValueNoCD:
|
| | | # if curSkill.GetCoolDownTime():
|
| | | # SkillCommon.SetSkillRemainTime(curSkill, 0, tick, attacker)
|
| | | |
| | | return curValue
|
| | |
|
| | |
| | | DoBeAttackResult(turnFight, curBatObj, useSkill, True)
|
| | | return
|
| | |
|
| | | def DoCombo(turnFight, curBatObj, useSkill):
|
| | | def DoCombo(turnFight, atkObj, useSkill):
|
| | | '''
|
| | | æ ¼æ¡ãåå»ãè¿å»è§å
|
| | | 1. æææ¦å°ææªç©åå¯è½äº§çæ ¼æ¡ï¼ç¾¤æ»æ¶æ ¼æ¡ä¸å¯¹ä¸å¤æï¼åå¯è½äº§çæ ¼æ¡
|
| | |
| | |
|
| | | tagFriendly = useSkill.GetTagFriendly()
|
| | | if tagFriendly:
|
| | | tagObj = GetRelativeObj(turnFight, curBatObj)
|
| | | tagObj = GetRelativeObj(turnFight, atkObj)
|
| | | else:
|
| | | tagObjList = useSkill.GetTagObjList()
|
| | | if not tagObjList:
|
| | |
| | | if atkBackSkill:
|
| | | # å¯ä»¥åå»ï¼ææè¿å»
|
| | | GameWorld.DebugLog("â %s ãåå»ã" % TurnAttack.GetObjName(tagObj))
|
| | | OnUseSkill(turnFight, tagObj, atkBackSkill, [curBatObj], ChConfig.TurnBattleType_AtkBack)
|
| | | OnUseSkill(turnFight, tagObj, atkBackSkill, [atkObj], ChConfig.TurnBattleType_AtkBack)
|
| | | return
|
| | |
|
| | | if not tagObj:
|
| | | return
|
| | |
|
| | | if CanCombo(curBatObj, tagObj):
|
| | | # è¿å»æ ¹æ®æè½ç®æ é
ç½®é»è¾éæ°éæ©ç®æ
|
| | | GameWorld.DebugLog("â %s ãè¿å»ã" % TurnAttack.GetObjName(curBatObj))
|
| | | DoHeroSpecialty(turnFight, curBatObj, ChConfig.HeroSpecialty_Combo, useSkill.GetSkillID())
|
| | | OnUseSkill(turnFight, curBatObj, useSkill, batType=ChConfig.TurnBattleType_Combo)
|
| | | |
| | | comboNum = atkObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnComboNum)
|
| | | aComboRate = atkObj.GetBatAttrValue(ChConfig.AttrID_ComboRate)
|
| | | aComboRate += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, tagObj, ChConfig.AttrID_ComboRate, useSkill)
|
| | | |
| | | dComboRateDef = tagObj.GetBatAttrValue(ChConfig.AttrID_ComboRateDef)
|
| | | happenRate = eval(IpyGameDataPY.GetFuncCompileCfg("ComboCfg", 1))
|
| | | if not GameWorld.CanHappen(happenRate):
|
| | | GameWorld.DebugLog("æ æ³è¿å»! atkID=%s,happenRate=%s,aComboRate=%s,dComboRateDef=%s,comboNum=%s" |
| | | % (atkObj.GetID(), happenRate, aComboRate, dComboRateDef, comboNum))
|
| | | return
|
| | | GameWorld.DebugLog("â %s ãè¿å»ã happenRate=%s,aComboRate=%s,dComboRateDef=%s,comboNum=%s" |
| | | % (TurnAttack.GetObjName(atkObj), happenRate, aComboRate, dComboRateDef, comboNum))
|
| | | atkObj.SetDict(ChConfig.Def_Obj_Dict_TurnComboNum, comboNum + 1)
|
| | | |
| | | # è¿å»ç¹é¿
|
| | | DoHeroSpecialty(turnFight, atkObj, ChConfig.HeroSpecialty_Combo, useSkill.GetSkillID())
|
| | | |
| | | # è¿å»æ ¹æ®æè½ç®æ é
ç½®é»è¾éæ°éæ©ç®æ
|
| | | OnUseSkill(turnFight, atkObj, useSkill, batType=ChConfig.TurnBattleType_Combo)
|
| | | return
|
| | |
|
| | | def __getCanAtkBackSkill(useSkill, tagObj):
|
| | |
| | | GameWorld.DebugLog("å¯ä»¥åå»! tagID=%s" % tagID)
|
| | | return useSkill
|
| | | return
|
| | |
|
| | | def CanCombo(atkObj, defObj):
|
| | | ## å¯å¦è¿å»
|
| | | comboNum = atkObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnComboNum)
|
| | | aComboRate = atkObj.GetBatAttrValue(ChConfig.AttrID_ComboRate)
|
| | | dComboRateDef = defObj.GetBatAttrValue(ChConfig.AttrID_ComboRateDef)
|
| | | happenRate = eval(IpyGameDataPY.GetFuncCompileCfg("ComboCfg", 1))
|
| | | if GameWorld.CanHappen(happenRate):
|
| | | GameWorld.DebugLog("å¯ä»¥è¿å»! atkID=%s,happenRate=%s,aComboRate=%s,dComboRateDef=%s,comboNum=%s" |
| | | % (atkObj.GetID(), happenRate, aComboRate, dComboRateDef, comboNum))
|
| | | atkObj.SetDict(ChConfig.Def_Obj_Dict_TurnComboNum, comboNum + 1)
|
| | | return True
|
| | | GameWorld.DebugLog("æ æ³è¿å»! atkID=%s,happenRate=%s,aComboRate=%s,dComboRateDef=%s,comboNum=%s" |
| | | % (atkObj.GetID(), happenRate, aComboRate, dComboRateDef, comboNum))
|
| | | return False
|
| | |
|
| | | def DoBeAttackResult(turnFight, curObj, useSkill, isUseSkill=False):
|
| | | '''被æ»å»ç»æ
|
| | |
| | | # return
|
| | | enhanceSkillID = curEffect.GetEffectValue(0)
|
| | | checkInStateList = curEffect.GetEffectValue(1)
|
| | | if checkInStateList:
|
| | | if isinstance(checkInStateList, int):
|
| | | checkInStateList = [checkInStateList]
|
| | | GameWorld.DebugLog("é¢å¤è§¦åçæè½: enhanceSkillID=%s,checkInStateList=%s" % (enhanceSkillID, checkInStateList))
|
| | | tagObjList = useSkill.GetTagObjList()
|
| | |
|
| | |
| | | GameWorld.DebugLog(" éªé¿çä¸è§¦å: tagID=%s" % (tagID))
|
| | | continue
|
| | | if checkInStateList:
|
| | | inState = False
|
| | | for state in checkInStateList:
|
| | | if tagObj.IsInState(state):
|
| | | inState = True
|
| | | break
|
| | | if not inState:
|
| | | if not tagObj.CheckInState(checkInStateList):
|
| | | GameWorld.DebugLog(" ä¸å¨ç¶æä¸ä¸è§¦å: tagID=%s not in state:%s" % (tagID, checkInStateList))
|
| | | continue
|
| | | if enhanceRate and enhanceRate != ChConfig.Def_MaxRateValue and not GameWorld.CanHappen(enhanceRate, ChConfig.Def_MaxRateValue):
|
| | |
| | | if checkInStateList:
|
| | | inState = False
|
| | | for tagObj in tagObjList:
|
| | | for state in checkInStateList:
|
| | | if not state or tagObj.IsInState(state):
|
| | | inState = True
|
| | | break
|
| | | if inState:
|
| | | if tagObj.CheckInState(checkInStateList):
|
| | | inState = True
|
| | | break
|
| | | if not inState:
|
| | | GameWorld.DebugLog(" 没æç®æ å¨ç¶æä¸ä¸è§¦å: tagObj not in state:%s" % str(checkInStateList))
|
| | |
| | | if isAngerSkill:
|
| | | aAngerSkillPer = atkObj.GetBatAttrValue(ChConfig.AttrID_AngerSkillPer) # æ®æå¢ä¼¤
|
| | | dAngerSkillPerDef = defObj.GetBatAttrValue(ChConfig.AttrID_AngerSkillPerDef) # æ®æå伤
|
| | | |
| | | |
| | | aAddSkillPer = 0 # æè½å¢ä¼¤
|
| | | aAddSkillPer += TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.AttrID_SkillPer, curSkill)
|
| | | |
| | | # ç©æ³å¢å伤
|
| | | if pmType == IPY_GameWorld.ghtMag: # æ³ä¼¤
|
| | | aPMDamPer = atkObj.GetBatAttrValue(ChConfig.AttrID_MagDamPer)
|
| | |
| | | dNormalSkillPerDef /= 10000.0
|
| | | aAngerSkillPer /= 10000.0
|
| | | dAngerSkillPerDef /= 10000.0
|
| | | aAddSkillPer /= 10000.0
|
| | | aPMDamPer /= 10000.0
|
| | | dPMDamPerDef /= 10000.0
|
| | | aSuperDamPer /= 10000.0
|
| | |
| | | aFinalDamPer /= 10000.0
|
| | | dFinalDamPerDef /= 10000.0
|
| | |
|
| | | GameWorld.DebugLog("伤è¡è®¡ç®: atkID=%s,defID=%s,skillID=%s,atkSkillPer=%s,aAtk=%s,dDef=%s,dHP=%s,hurtTypes=%s" |
| | | % (atkID, defID, skillID, atkSkillPer, aAtk, dDef, dHP, hurtTypes))
|
| | | GameWorld.DebugLog("伤è¡è®¡ç®: atkID=%s,defID=%s,skillID=%s,atkSkillPer=%s,aAtk=%s,dDef=%s,dHP=%s,hurtTypes=%s,aAddSkillPer=%s" |
| | | % (atkID, defID, skillID, atkSkillPer, aAtk, dDef, dHP, hurtTypes, aAddSkillPer))
|
| | |
|
| | | # æç»æ§ä¼¤å®³
|
| | | if isDot:
|