| | |
| | | ght = useSkill.GetHurtType() % 10
|
| | | if ght == IPY_GameWorld.ghtMag: # 做配置兼容用,优先验证法伤,否则默认物伤
|
| | | return IPY_GameWorld.ghtMag
|
| | | if ght == 3: # 由触发的技能决定
|
| | | bySkill = useSkill.GetBySkill()
|
| | | if bySkill:
|
| | | #GameWorld.DebugLogEx("物法类型取触发的技能: useSkillID=%s,bySkillID=%s", useSkill.GetSkillID(), bySkill.GetSkillID())
|
| | | return GetPMType(batObj, bySkill)
|
| | | return IPY_GameWorld.ghtPhy
|
| | |
|
| | | def IsIgnoreDef(useSkill):
|
| | |
| | | return
|
| | |
|
| | | skillType = useSkill.GetSkillType()
|
| | | byBatObj = kwargs.pop("byBatObj", None)
|
| | | if useSkill.GetFuncType() == ChConfig.Def_SkillFuncType_MinggeSkill:
|
| | | if useSkill.GetSkillType() in ChConfig.Def_HurtSkill_List:
|
| | | if not byBatObj:
|
| | | return
|
| | | GameWorld.DebugLogEx("命格攻击类技能施法方算触发者! mgObjID=%s,byObjID=%s,skillID=%s", curBatObj.GetID(), byBatObj.GetID(), skillID)
|
| | | curBatObj = byBatObj
|
| | | else:
|
| | | # 因为命格攻击类技能修改了施法者,后续如果有子技能触发会变成还是变更后的施法者,导致命格全体buff可能存在多个施法来源,可能导致bug
|
| | | batLineup = curBatObj.GetTFBatLineup()
|
| | | curBatObj = batLineup.getMinggeObj()
|
| | | GameWorld.DebugLogEx("命格非攻击类技能强制施法者为命格自己! mgObjID=%s,skillID=%s", curBatObj.GetID(), skillID)
|
| | | |
| | | byTriggerWay = kwargs["byTriggerWay"] if "byTriggerWay" in kwargs else 0 # 不使用参数名 triggerWay, 防止传递过程中参数混乱
|
| | | if not curBatObj.IsAlive():
|
| | | if skillType == ChConfig.Def_SkillType_Revive:
|
| | |
| | | useSkill.SetBatType(batType)
|
| | | useSkill.SetBySkill(bySkill)
|
| | | useSkill.SetByBuff(byBuff)
|
| | | # 注:理论上原先的 byFriendObj 都可以直接用这个,但是旧的代码先不修改了,后续的累计敌军、友军之类的触发可以统一使用 byBatObj
|
| | | useSkill.SetByBatObj(kwargs.pop("byBatObj", None))
|
| | | useSkill.SetByTriggerWay(byTriggerWay)
|
| | |
|
| | | isTurnNormalSkill = SkillCommon.isTurnNormalSkill(useSkill)
|
| | |
| | | row = inRowNum # 目标玩家所在横排
|
| | |
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | batLineup = tagObj.GetBatLineup()
|
| | | batLineup = tagObj.GetTFBatLineup()
|
| | | aimObjList = []
|
| | | for col in colNumList:
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | |
| | | col = inColNum # 目标玩家所在纵排
|
| | |
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | batLineup = tagObj.GetBatLineup()
|
| | | batLineup = tagObj.GetTFBatLineup()
|
| | | aimObjList = []
|
| | | for row in range(1, 1 + ChConfig.TurnFightRows):
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | |
| | |
|
| | | # 曹仁防护触发,暂写死
|
| | | for tagObj in caorenProtectList:
|
| | | tagBatLineup = tagObj.GetBatLineup()
|
| | | tagBatLineup = tagObj.GetTFBatLineup()
|
| | | caorenObj = tagBatLineup.getHeroObj(ChConfig.HeroID_Caoren) # 获取被防护目标阵容的曹仁
|
| | | if not caorenObj or not caorenObj.IsAlive():
|
| | | continue
|
| | |
| | | triggerOne = False
|
| | | batType = useSkill.GetBatType()
|
| | | isAttackDirect = (isUseSkill and SkillCommon.isAttackDirectSkill(useSkill)) # 是否直接攻击
|
| | | curBatLineup = None
|
| | | curBatLineup = curObj.GetTFBatLineup()
|
| | | curMGObj = curBatLineup.getMinggeObj()
|
| | | for tagObj in tagObjListAll:
|
| | | tagID = tagObj.GetID()
|
| | |
|
| | |
| | | # 追击
|
| | | elif batType == ChConfig.TurnBattleType_Pursue:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curObj, ChConfig.TriggerWay_Pursue, tagObj, connSkill=useSkill)
|
| | | if isAttackDirect:
|
| | | if curMGObj:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curMGObj, ChConfig.TriggerWay_PursueAtk, tagObj, connSkill=useSkill, byBatObj=curObj)
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, tagObj, ChConfig.TriggerWay_BePursue, curObj, connSkill=useSkill)
|
| | | # 反击
|
| | | elif batType == ChConfig.TurnBattleType_AtkBack:
|
| | |
| | |
|
| | | # 敌友方
|
| | | if isAttackDirect or batType in [ChConfig.TurnBattleType_Combo, ChConfig.TurnBattleType_Pursue] or isDotHurt:
|
| | | if not curBatLineup:
|
| | | curBatLineup = curObj.GetBatLineup()
|
| | | for lineupObjID in curBatLineup.posObjIDDict.values():
|
| | | lineupObj = batObjMgr.getBatObj(lineupObjID)
|
| | | if not lineupObj.IsAlive():
|
| | |
| | | '''按公式计算伤害,默认按攻击计算
|
| | | '''
|
| | |
|
| | | #mapID = turnFight.mapID
|
| | | skillID = curSkill.GetSkillID()
|
| | | #mapID = turnFight.mapID
|
| | | pmType = GetPMType(atkObj, curSkill)
|
| | | ignoreDef = IsIgnoreDef(curSkill)
|
| | | batType = curSkill.GetBatType()
|