From 7228c6e4513da12ef14ef76af89c36431d2bc42e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 24 十一月 2018 00:21:49 +0800
Subject: [PATCH] 4997 【后端】【1.3】冰晶矿脉AI--技能指定NPCID使用

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_807.py |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_807.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_807.py
new file mode 100644
index 0000000..212895f
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_807.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 神兵生命转换为血盾
+#
+# @author: Alee
+# @date 2018-4-23 下午02:04:06
+# @version 1.0
+#
+# @note:  
+#
+#---------------------------------------------------------------------
+
+import GameWorld
+import ChConfig
+import GameObj
+import SkillShell
+
+
+
+def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
+    curEffect = curSkill.GetEffect(0)
+    return [int(float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*GameObj.GetMaxHP(attacker))]
+
+def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
+    if curEffect.GetEffectValue(1) == 0:
+        return
+    boomValue = curBuff.GetValue()
+    # 剩余护盾值用于爆炸
+    if boomValue == 0:
+        return
+    
+    boomValue = int(boomValue*float(curEffect.GetEffectValue(1))/ChConfig.Def_MaxRateValue)
+    #效果值 第三个值为技能ID
+    boomID = curEffect.GetEffectValue(2)
+    skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
+    if not skillData:
+        return
+    
+    # 存储起来用于伤害
+    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, boomValue)
+    
+    SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
+    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
+
+    return
\ No newline at end of file

--
Gitblit v1.8.0