| | |
| | | import DataRecordPack
|
| | | #import ChItem
|
| | | import ShareDefine
|
| | | import PlayerGreatMaster
|
| | | import PlayerHorse
|
| | | import GameObj
|
| | | import random
|
| | |
| | | continue
|
| | | npcObj.StopMove()
|
| | | npcObj.ChangePos(npcPos.PosX, npcPos.PosY)
|
| | | BeatBackMove(curPlayer, npcObj)
|
| | | #BeatBackMove(curPlayer, npcObj)
|
| | | return
|
| | |
|
| | | # 针对NPC被推出远距离一直卡墙角问题,法宝挑战副本特殊处理为超过4米 NPC自动回退一些
|
| | | def BeatBackMove(curPlayer, npcObj):
|
| | | if GameWorld.GetMap().GetMapID() != ChConfig.Def_FBMapID_MagicWeapon:
|
| | | return
|
| | | if npcObj.GetCurAction() == IPY_GameWorld.laNPCSkillWarning:
|
| | | return
|
| | | |
| | | posMap = npcObj.GetRefreshPosAt(npcObj.GetCurRefreshPointIndex())
|
| | | if not posMap:
|
| | | return
|
| | | #范围校验
|
| | | posMapX = posMap.GetPosX()
|
| | | posMapY = posMap.GetPosY()
|
| | | if GameWorld.GetDist(npcObj.GetPosX(), npcObj.GetPosY(), posMapX, posMapY) < 8:
|
| | | # 单次位移不超过5米
|
| | | return
|
| | | npcControl = NPCCommon.NPCControl(npcObj)
|
| | | moveDestX, moveDestY = npcControl.GetMoveNearPosEx(posMapX, posMapY, 5)
|
| | | npcObj.Move(moveDestX, moveDestY)
|
| | | return
|
| | | ## 针对NPC被推出远距离一直卡墙角问题,法宝挑战副本特殊处理为超过4米 NPC自动回退一些
|
| | | #def BeatBackMove(curPlayer, npcObj):
|
| | | # if GameWorld.GetMap().GetMapID() != ChConfig.Def_FBMapID_MagicWeapon:
|
| | | # return
|
| | | # if npcObj.GetCurAction() == IPY_GameWorld.laNPCSkillWarning:
|
| | | # return
|
| | | # |
| | | # posMap = npcObj.GetRefreshPosAt(npcObj.GetCurRefreshPointIndex())
|
| | | # if not posMap:
|
| | | # return
|
| | | # #范围校验
|
| | | # posMapX = posMap.GetPosX()
|
| | | # posMapY = posMap.GetPosY()
|
| | | # if GameWorld.GetDist(npcObj.GetPosX(), npcObj.GetPosY(), posMapX, posMapY) < 8:
|
| | | # # 单次位移不超过5米
|
| | | # return
|
| | | # npcControl = NPCCommon.NPCControl(npcObj)
|
| | | # moveDestX, moveDestY = npcControl.GetMoveNearPosEx(posMapX, posMapY, 5)
|
| | | # npcObj.Move(moveDestX, moveDestY)
|
| | | # return
|
| | |
|
| | | #===============================================================================
|
| | | # //B4 03 吸引NPC仇恨 #tagNPCAttention
|
| | |
| | | if GameObj.GetHP(curPlayer) <= 0:
|
| | | return
|
| | |
|
| | | if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | #GameWorld.DebugLog("自定义场景中,不检查!")
|
| | | return True
|
| | | |
| | | #===========================================================================
|
| | | # if curPlayer.IsMoving():
|
| | | # GameWorld.DebugLog("移动中不可使用技能")
|
| | |
| | | # if not PlayerHorse.CheckLearnHorseSkill(curPlayer, curSkillTypeID):
|
| | | # return False
|
| | | #天赋技学习点数判断
|
| | | if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | if not PlayerGreatMaster.GetGreatMasterFreeSkillPoint(curPlayer):
|
| | | return False
|
| | | #if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # if not PlayerGreatMaster.GetGreatMasterFreeSkillPoint(curPlayer):
|
| | | # return False
|
| | |
|
| | | #经验检测
|
| | | skillLvUpNeedExp = upSkill.GetLVUpCostExp()
|
| | |
| | | #GeRen_jin_474794 <n color="255,255,0" BKCOLOR="0,0,0">您消耗了经验值:</n><n color="0,190,255" BKCOLOR="0,0,0">{%S1%}</n>
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_jin_474794", [skillLvUpNeedExp])
|
| | |
|
| | | if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | PlayerGreatMaster.AddGreatMasterSkillPointByLV(curPlayer, -1)
|
| | | #if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
|
| | | # PlayerGreatMaster.AddGreatMasterSkillPointByLV(curPlayer, -1)
|
| | | return True
|
| | | #---------------------------------------------------------------------
|
| | | ##检测学习技能需求条件
|
| | |
| | |
|
| | | #调用攻击惩罚逻辑
|
| | | BaseAttack.DoLogic_AttackResult(attacker, defender, None, tick)
|
| | | TurnAttack.OnTurnfightAttackResult(attacker, defender, curSkill)
|
| | | #TurnAttack.OnTurnfightAttackResult(attacker, defender, curSkill)
|
| | |
|
| | | return
|
| | | #---------------------------------------------------------------------
|