129 【战斗】战斗系统-服务端(黄月英技能; 增加效果友方某个武将额外行动一次5014;)
| | |
| | | % (curID, tagID, skillID, hurtValue, lostHP, curBatObj.GetHP()))
|
| | | return
|
| | |
|
| | | def OnObjAction(turnFight, curBatObj):
|
| | | def OnObjAction(turnFight, curBatObj, isExtra=False):
|
| | | ## 战斗单位行动
|
| | | if not curBatObj:
|
| | | return
|
| | |
| | | # 是否可行动状态判断
|
| | | canAction = curBatObj.CanAction()
|
| | | if not canAction:
|
| | | GameWorld.DebugLog("★回合%s %s 当前状态不可行动!" % (turnNum, objName))
|
| | | GameWorld.DebugLog("★回合%s %s 当前状态不可行动! isExtra=%s" % (turnNum, objName, isExtra))
|
| | | return
|
| | |
|
| | | atk = curBatObj.GetAtk()
|
| | | curXP = curBatObj.GetXP()
|
| | | GameWorld.DebugLog("★回合%s %s 行动 : atk=%s,curHP=%s/%s,curXP=%s" % (turnNum, objName, atk, curHP, curBatObj.GetMaxHP(), curXP))
|
| | | GameWorld.DebugLog("★回合%s %s %s行动 : atk=%s,curHP=%s/%s,curXP=%s" % (turnNum, objName, "额外" if isExtra else "", atk, curHP, curBatObj.GetMaxHP(), curXP))
|
| | | turnFight.syncObjAction(turnNum, objID)
|
| | |
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curBatObj, ChConfig.TriggerWay_HeroActionStart)
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Skill.PassiveTrigger.PassiveEff_5014
|
| | | #
|
| | | # @todo:友方某个武将额外行动一次
|
| | | # @author hxp
|
| | | # @date 2025-09-23
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 友方某个武将额外行动一次
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2025-09-23 14:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import BattleObj
|
| | | import TurnAttack
|
| | |
|
| | | def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
|
| | | sortRule = curEffect.GetEffectValue(0) # 倒序排序规则(0-按战力;1-按攻击)
|
| | | |
| | | faction = batObj.GetFaction()
|
| | | lineupNum = batObj.GetLineupNum()
|
| | | batFaction = turnFight.getBatFaction(faction)
|
| | | batLineup = batFaction.getBatlineup(lineupNum)
|
| | | |
| | | objList = []
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | for objID in batLineup.posObjIDDict.values():
|
| | | batObj = batObjMgr.getBatObj(objID)
|
| | | if not batObj:
|
| | | continue
|
| | | objList.append(batObj)
|
| | | |
| | | if sortRule == 0:
|
| | | objList.sort(key=lambda o:(o.GetFightPower()), reverse=True)
|
| | | elif sortRule == 1:
|
| | | objList.sort(key=lambda o:(o.GetAtk()), reverse=True)
|
| | | else:
|
| | | pass
|
| | | |
| | | for curBatObj in objList:
|
| | | if TurnAttack.OnObjAction(turnFight, curBatObj, True):
|
| | | return True
|
| | | |
| | | return False
|
| | |
|
| | |
| | | oneActionUseCnt = turnFight.SetOneActionUseSkillCnt(objID, oneActionUseCnt + 1)
|
| | |
|
| | | bySkillID = bySkill.GetSkillID() if bySkill else 0
|
| | | GameWorld.DebugLog("●使用技能: curID=%s,skillID=%s,tagCnt=%s,batType=%s,bySkillID=%s,HP:%s/%s,oneActionUseCnt=%s" |
| | | GameWorld.DebugLog("◆使用技能: curID=%s,skillID=%s,tagCnt=%s,batType=%s,bySkillID=%s,HP:%s/%s,oneActionUseCnt=%s" |
| | | % (objID, skillID, len(tagObjList), batType, bySkillID, curBatObj.GetHP(), curBatObj.GetMaxHP(), oneActionUseCnt))
|
| | | # 以下为技能可以使用的处理,之后的逻辑默认技能使用成功
|
| | |
|
| | |
| | | continue
|
| | |
|
| | | effID = curEffect.GetEffectID()
|
| | | GameWorld.DebugLog("◆执行额外技能效果: %s, triggerWay=%s,effIgnoreObjIDList=%s" % (effID, triggerWay, effIgnoreObjIDList))
|
| | | GameWorld.DebugLog("●执行额外技能效果: %s, triggerWay=%s,effIgnoreObjIDList=%s" % (effID, triggerWay, effIgnoreObjIDList))
|
| | | if effID == 5010:
|
| | | # 额外技能效果
|
| | | __doUseEnhanceSkill(turnFight, curObj, useSkill, curEffect, effIgnoreObjIDList)
|