From 0670fd0e12f80b02098f0a9eafbb5a60db014e78 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 27 八月 2018 21:07:43 +0800
Subject: [PATCH] fix:模板16类暴风雪技能,通过召唤兽来实现攻击方式,在计算时完全以主人属性计算伤害,召唤技能效果1013只影响攻击百分比
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 17 +++++++++++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 2 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py | 30 +++++++++++++++++-------------
4 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index 0708705..ca2582a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1562,8 +1562,21 @@
if tick - defObj.GetDictByKey(ChConfig.Def_PlayerKey_SomersaultTime) < 500:
return 0, ChConfig.Def_HurtType_Miss
+ summonAtkPer = 1 # 召唤继承提高基础攻击力,取表
+ if atkObj.GetGameObjType() == IPY_GameWorld.gotNPC and atkObj.GetGameNPCObjType() == IPY_GameWorld.gnotSummon:
+ summonAtkPer = atkObj.GetDictByKey(ChConfig.Def_GameObjKey_InheritOwner)
+ if summonAtkPer > 0:
+ # 暴风雪类召唤兽转化为主人计算伤害
+ atkObj = NPCCommon.GetSummonOwnerDetel(atkObj)
+ if not atkObj:
+ return 0, ChConfig.Def_HurtType_Miss
+
+ summonAtkPer = summonAtkPer*1.0/ChConfig.Def_MaxRateValue
+ #GameWorld.DebugLog("召唤兽取主人---------%s-%s-%s-%s"%(atkObj.GetID(), atkSkillPer, atkSkillValue, summonAtkPer))
+
atkObjType = atkObj.GetGameObjType()
defObjType = defObj.GetGameObjType()
+
atkType = GetBattleType(atkObj, curSkill)
happenState = happenState if happenState else SkillShell.GetHappenState(curSkill)
@@ -1666,8 +1679,8 @@
rand = random.random() #种子数 0~1
#------- 攻击方
- aMinAtk = atkObj.GetMinAtk() # 攻击方最小攻击
- aMaxAtk = atkObj.GetMaxAtk() # 攻击方最大攻击
+ aMinAtk = atkObj.GetMinAtk() * summonAtkPer # 攻击方最小攻击
+ aMaxAtk = atkObj.GetMaxAtk() * summonAtkPer # 攻击方最大攻击
aIceAtk = atkObj.GetIceAtk() # 冰攻, 元素真伤, 玩家及NPC通用
aIceAtk += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AddIceAtk)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index ee20cd5..2c1d982 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -2955,6 +2955,8 @@
Def_PlayerState_MissSneerAtk, # 对嘲讽攻击免疫表现为miss 16
) = range(17)
+#---SetDict 含NPC字典KEY,不存于数据库---
+Def_GameObjKey_InheritOwner = "InheritOwner" # 类暴风雪计算时用主人属性
#---SetDict 玩家字典KEY,不存于数据库---
# key的长度不能超过29个字节
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
index 1d4c505..b486d54 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
@@ -94,19 +94,21 @@
summonNPC.SetBornTime(tick)
summonNPC.SetLastTime(curSkill.GetLastTime())
- atkper = 1
+ atkper = 10000 # 默认百分百继承属性
findEffect = SkillCommon.GetSkillEffectByEffectID(curSkill, ChConfig.Def_Skill_Effect_SummonAttr)
-
if findEffect:
- atkper = float(findEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
+ atkper = findEffect.GetEffectValue(0)
if findEffect.GetEffectValue(1) == 0:
# 跟随人物攻击
summonNPC.SetDict(ChConfig.Def_PlayerKey_AttackFollowMaster, 1)
+ # 召唤兽继承主人所有属性标识,计算时直接取主人属性
+ summonNPC.SetDict(ChConfig.Def_GameObjKey_InheritOwner, atkper)
+
#---设置基础值---
- summonNPC.SetBaseMinAtk(int(curPlayer.GetMinAtk()*atkper))
- summonNPC.SetBaseMaxAtk(int(curPlayer.GetMaxAtk()*atkper))
+ #summonNPC.SetBaseMinAtk(int(curPlayer.GetMinAtk()*atkper))
+ #summonNPC.SetBaseMaxAtk(int(curPlayer.GetMaxAtk()*atkper))
summonNPC.SetBaseHit(curPlayer.GetHit())
#取人的攻击间隔
@@ -118,7 +120,7 @@
summonNPC.SetCanAttack(False)
#SkillDataBoost.SetSummonNPCSkillBoost(curPlayer, summonNPC, curSkill)
-
+
return True
def DoLogic_NPC_UseSkill_SummonNPC(curNPC, curSkill, summonNPCID, tagRoundPosX, tagRoundPosY, tick):
@@ -169,20 +171,22 @@
summonNPC.SetBornTime(tick)
summonNPC.SetLastTime(curSkill.GetLastTime())
- atkper = 1
+ atkper = 10000
findEffect = SkillCommon.GetSkillEffectByEffectID(curSkill, ChConfig.Def_Skill_Effect_SummonAttr)
if findEffect:
- atkper = float(findEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue
+ atkper = findEffect.GetEffectValue(0)
-
+ # 召唤兽继承主人所有属性标识,计算时直接取主人属性
+ summonNPC.SetDict(ChConfig.Def_GameObjKey_InheritOwner, atkper)
+
#---设置基础值---
- summonNPC.SetBaseMinAtk(int(curNPC.GetMinAtk()*atkper))
- summonNPC.SetBaseMaxAtk(int(curNPC.GetMaxAtk()*atkper))
+ #summonNPC.SetBaseMinAtk(int(curNPC.GetMinAtk()*atkper))
+ #summonNPC.SetBaseMaxAtk(int(curNPC.GetMaxAtk()*atkper))
summonNPC.SetBaseHit(curNPC.GetHit())
- NPCCommon.SetRealmLV(summonNPC, NPCCommon.GetRealmLV(curNPC)) # 继承境界
- NPCCommon.SetFinalHurt(summonNPC, NPCCommon.GetFinalHurt(curNPC)) # 最终伤害
+ #NPCCommon.SetRealmLV(summonNPC, NPCCommon.GetRealmLV(curNPC)) # 继承境界
+ #NPCCommon.SetFinalHurt(summonNPC, NPCCommon.GetFinalHurt(curNPC)) # 最终伤害
#summonNPC.SetBaseAtkInterval(500)
summonNPC.SetBaseMissRate(curNPC.GetMiss())
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 9275dd5..5dc1f5b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -2982,7 +2982,7 @@
# if attacker.GetGameObjType() == IPY_GameWorld.gotPlayer and useSkill.GetSkillTypeID() in ChConfig.Def_SkillID_Trig:
# attacker.GetSkillManager().SetTrigBuffSkillTick(tick)
- GameWorld.Log("当前技能 = %s,触发附加技能成功 = %s,触发几率 = %s"%(useSkill.GetSkillName(),exSkill.GetSkillName(),rate))
+ #GameWorld.Log("当前技能 = %s,触发附加技能成功 = %s,触发几率 = %s"%(useSkill.GetSkillName(),exSkill.GetSkillName(),rate))
#----------------------------处理附加技能
return DoLogic_UseSkill(attacker, defender, exSkill, tick, destX, destY, True)
--
Gitblit v1.8.0