From 1e7d00e39484a4522fadc88b3386010def98c0b6 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 22 五月 2019 14:45:57 +0800
Subject: [PATCH] 6895  还原技能攻击个数限制

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4023.py |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4023.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4023.py
index d426335..ce05ae0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4023.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4023.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: GBK -*-
 #
-# @todo: 被攻击后触发被动技能, 附加条件 血量低于XX百分比
+# @todo: 被攻击后触发被动技能, 附加条件 血量低于XX百分比, 附加被攻击次数判定
 #
 # @author: Alee
 # @date 2018-1-9 下午09:39:37
@@ -23,4 +23,14 @@
         if GameObj.GetHP(attacker)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(attacker) >= effect.GetEffectValue(1):
             return False
         
+    if effect.GetEffectValue(2):
+        # 攻击次数判定
+        attackCnt = curSkill.GetProficiency()
+        curSkill.SetProficiency(attackCnt + 1)
+        
+        if attackCnt + 1 >= effect.GetEffectValue(2):
+            curSkill.SetProficiency(0)
+        else:
+            return False
+        
     return GameWorld.CanHappen(effect.GetEffectValue(0))

--
Gitblit v1.8.0