| | |
| | |
|
| | | if not tagObjList:
|
| | | # 可扩展其他目标选择,如复活技能没有死亡单位时则使用另外的效果
|
| | | isOK = None
|
| | | GameWorld.DebugLogEx("找不到技能目标! skillID=%s,mapID=%s,funcLineID=%s", skillID, turnFight.mapID, turnFight.funcLineID, turnFight.getReqPlayerID())
|
| | | if skillType == ChConfig.Def_SkillType_Revive and not isinstance(useSkill, IpyGameDataPY.IPY_Skill):
|
| | | otherEff = useSkill.GetEffectByID(ChConfig.SkillEff_ReviveNoUse)
|
| | | if not isinstance(useSkill, IpyGameDataPY.IPY_Skill):
|
| | | otherEff = useSkill.GetEffectByID(ChConfig.SkillEff_NoTagUse)
|
| | | if otherEff:
|
| | | otherSkillID = otherEff.GetEffectValue(0)
|
| | | GameWorld.DebugLogEx("没有可复活的目标,释放其他技能! otherSkillID=%s", otherSkillID)
|
| | | GameWorld.DebugLogEx("没有目标时释放其他技能! otherSkillID=%s", otherSkillID)
|
| | | otherSkill = curBatObj.GetSkillManager().FindSkillByID(otherSkillID)
|
| | | if not otherSkill:
|
| | | otherSkill = IpyGameDataPY.GetIpyGameData("Skill", otherSkillID)
|
| | | if otherSkill:
|
| | | OnUseSkill(turnFight, curBatObj, otherSkill, None, batType, bySkill, byBuff, comboLimit, atkBackTag, **kwargs)
|
| | | return
|
| | | isOK = OnUseSkill(turnFight, curBatObj, otherSkill, None, batType, bySkill, byBuff, comboLimit, atkBackTag, **kwargs)
|
| | | return isOK
|
| | |
|
| | | oneActionUseCnt = turnFight.GetOneActionUseSkillCnt(objID)
|
| | | if oneActionUseCnt >= 20:
|
| | |
| | | isNoSelf = True
|
| | | #GameWorld.DebugLogEx("特殊不包含自己")
|
| | |
|
| | | #0=敌对方; 1-友好方; 2-友好方(一定包含自己) ;3-友好方(一定不含自己)
|
| | | if tagFriendly == 3:
|
| | | isNoSelf = True
|
| | | |
| | | # 根据敌友关系确定阵营及一些敌友关系的特殊逻辑
|
| | | sneerObjFirst = True # 嘲讽目标是否优先
|
| | | sneerTagObj = None # 嘲讽目标
|
| | |
| | | aimObjList.sort(key=lambda o:(o.IsInControlled()))
|
| | | GameWorld.DebugLogEx("未被控制优先: %s", [[o.GetID(), o.IsInControlled()] for o in aimObjList])
|
| | |
|
| | | # 受控目标优先(硬控>软控>其他)
|
| | | elif tagAffect == ChConfig.SkillTagAffect_IncontrolledPriority:
|
| | | aimObjList.sort(key=lambda o:(o.IsInControlledHard(), o.IsInControlledSoft()), reverse=True)
|
| | | GameWorld.DebugLogEx("受控目标优先: %s", [[o.GetID(), o.IsInControlledHard(), o.IsInControlledSoft()] for o in aimObjList])
|
| | | |
| | | # 灼烧/玄火目标优先
|
| | | elif tagAffect == ChConfig.SkillTagAffect_Burn:
|
| | | atkBackTagFrist = False
|