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/Attack/AttackLogic/AttackCommon.py | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 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 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) -- Gitblit v1.8.0