| | |
| | | def Attack(attacker, defender, useSkill, tick, skillPercent=10000, skillEnhance=0, attackTime=1, isEnhanceSkill=False):
|
| | | global g_skillHurtList
|
| | |
|
| | | if attacker.GetGameObjType() == IPY_GameWorld.gotNPC:
|
| | | #Npc在防一次攻击限制, 防止眩晕时能进行普攻
|
| | | if not OperControlManager.IsObjCanDoAction(attacker,
|
| | | ChConfig.Def_Obj_ActState_ServerSkill,
|
| | | ChConfig.Def_Action_Attack_Bit):
|
| | | return False
|
| | | #if attacker.GetGameObjType() == IPY_GameWorld.gotNPC:
|
| | | # #Npc在防一次攻击限制, 防止眩晕时能进行普攻
|
| | | #玩家也需要判断普攻
|
| | | if not OperControlManager.IsObjCanDoAction(attacker,
|
| | | ChConfig.Def_Obj_ActState_ServerSkill,
|
| | | ChConfig.Def_Action_Attack_Bit):
|
| | | return False
|
| | |
|
| | | #判断攻击对象是否为敌人
|
| | | if not GetCanAttack(attacker, defender, useSkill, tick):
|
| | |
| | | GameWorld.DebugLog("击晕CD中! rate=%s,剩余tick=%s" % (rate, remainTick), attacker.GetID())
|
| | | return
|
| | | attacker.SetDict(ChConfig.Def_PlayerKey_AttrFaintCD, tick)
|
| | | GameWorld.DebugLog("触发击晕! rate=%s,tagID=%s" % (rate, defender.GetID()), attacker.GetID())
|
| | | |
| | | GameWorld.DebugLog("可触发击晕! rate=%s,tagID=%s" % (rate, defender.GetID()), attacker.GetID())
|
| | | SkillCommon.AddBuffBySkillType(defender, ChConfig.Def_SkillID_AtkerFaint, tick)
|
| | | return
|
| | |
|