From 8991be83970f03f8f4baad83767f27586da0eafd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 20 四月 2019 10:13:44 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(按时间掉血的NPC扣血公式调整)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 6 +++---
PySysDB/PySysDBPY.h | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 14 +++++++++-----
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 4ac2fac..d0e7868 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -403,7 +403,7 @@
DWORD _NPCID; //NPCID
DWORD LostHPPerSecond; //单人每秒掉血量
BYTE MaxPlayerCount; //最大人数
- DWORD ReduceRate; //衰减万分率
+ DWORD LostHPPerSecondEx; //每增加一人附加掉血量
};
//装备套装属性表
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 7411d0c..37e2c0f 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
@@ -1762,7 +1762,7 @@
def UpdateTimeMonsterHP(curNPC, tick):
'''
NPC总血量 = 单人每秒掉血量*理论击杀所需时间
- 掉血值 = 单人每秒掉血量*min(攻击人数, 最大人数)*衰减万分率/10000
+ 掉血值 = 单人每秒掉血量+min(当前人数, 最大人数)*附加掉血量
'''
npcID = curNPC.GetNPCID()
@@ -1779,6 +1779,10 @@
if passTick <= 0:
return
+
+ lostHPPerSecond = ipyData.GetLostHPPerSecond()
+ maxPlayerCount = ipyData.GetMaxPlayerCount()
+ lostHPPerSecondEx = ipyData.GetLostHPPerSecondEx()
effPlayerCount = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCount)
refreshPlayerCountTick = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCountTick)
@@ -1794,14 +1798,14 @@
seeObjType = seeObj.GetGameObjType()
if seeObjType == IPY_GameWorld.gotPlayer:
effPlayerCount += 1
+ if maxPlayerCount and effPlayerCount >= maxPlayerCount:
+ effPlayerCount = maxPlayerCount
+ break
curNPC.SetDict(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCount, effPlayerCount)
#GameWorld.DebugLog("刷新影响人数: effPlayerCount=%s" % effPlayerCount)
- lostHPPerSecond = ipyData.GetLostHPPerSecond()
- maxPlayerCount = ipyData.GetMaxPlayerCount()
- reduceRate = ipyData.GetReduceRate()
if effPlayerCount > 1:
- hurtValuePerSecond = lostHPPerSecond * min(maxPlayerCount, effPlayerCount) * reduceRate / 10000.0
+ hurtValuePerSecond = lostHPPerSecond + (effPlayerCount - 1) * lostHPPerSecondEx
else:
hurtValuePerSecond = lostHPPerSecond
lostHPTotal = int(hurtValuePerSecond * passTick / 1000.0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 8eaff69..c6d30cb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -338,7 +338,7 @@
("DWORD", "NPCID", 1),
("DWORD", "LostHPPerSecond", 0),
("BYTE", "MaxPlayerCount", 0),
- ("DWORD", "ReduceRate", 0),
+ ("DWORD", "LostHPPerSecondEx", 0),
),
"EquipSuitAttr":(
@@ -2087,13 +2087,13 @@
self.NPCID = 0
self.LostHPPerSecond = 0
self.MaxPlayerCount = 0
- self.ReduceRate = 0
+ self.LostHPPerSecondEx = 0
return
def GetNPCID(self): return self.NPCID # NPCID
def GetLostHPPerSecond(self): return self.LostHPPerSecond # 单人每秒掉血量
def GetMaxPlayerCount(self): return self.MaxPlayerCount # 最大人数
- def GetReduceRate(self): return self.ReduceRate # 衰减万分率
+ def GetLostHPPerSecondEx(self): return self.LostHPPerSecondEx # 每增加一人附加掉血量
# 装备套装属性表
class IPY_EquipSuitAttr():
--
Gitblit v1.8.0