From 63f6f44ec2a38eaec9f39bbe26edb07daed49b49 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 16 九月 2025 17:36:50 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(王元姬技能,弹射待处理;支持被动变更伤害倍值;) --- PySysDB/生成IpyGameDataPY/IpyGameDataPYTemp.py | 5 +++++ ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 5 +++++ ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6003.py | 23 +++++++++++++++++++++++ ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py | 7 ++++++- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1 + 5 files changed, 40 insertions(+), 1 deletions(-) diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" index 9d5abc0..896cd0c 100644 --- "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" +++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" @@ -303,6 +303,11 @@ value = int(value) elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")): value = eval(value) + else: + try: + value = float(value) + except: + pass setList.append(value) if setList: setList = tuple(setList) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py index a5525f8..8fd7258 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py @@ -4289,6 +4289,7 @@ # 被动效果ID,属性类的直接使用属性ID当做效果ID PassiveEff_AddBuffLayerByWeight = 6001 # 根据权重随机添加buff层数 数值1-[[权重,层级], ...] PassiveEff_ChangeHurtType = 6002 # 变更伤害类型: 值1-伤害类型;值2-可附加验证处于xx状态 [状态1, 状态2, ...] +PassiveEff_ChangeHurtMulti = 6003 # 变更伤害倍值(可增可减): 值1-变更倍值;值2-可附加验证处于xx状态 [状态1, 状态2, ...] # 被动效果ID有触发值时就返回的 PassiveEffHappenValueList = [PassiveEff_ChangeHurtType] diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index f345268..d1f1419 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -6927,6 +6927,11 @@ value = int(value) elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")): value = eval(value) + else: + try: + value = float(value) + except: + pass setList.append(value) if setList: setList = tuple(setList) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6003.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6003.py new file mode 100644 index 0000000..f38a750 --- /dev/null +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_6003.py @@ -0,0 +1,23 @@ +#!/usr/bin/python +# -*- coding: GBK -*- +#------------------------------------------------------------------------------- +# +##@package Skill.PassiveTrigger.PassiveEff_6003 +# +# @todo:伤害翻倍 +# @author hxp +# @date 2025-09-16 +# @version 1.0 +# +# 详细描述: 伤害翻倍 +# +#------------------------------------------------------------------------------- +#"""Version = 2025-09-16 17:30""" +#------------------------------------------------------------------------------- + +def GetHappenValue(attacker, defender, curEffect, effSkill, **skillkwargs): + checkInStateList = curEffect.GetEffectValue(1) + if checkInStateList: + if not defender.CheckInState(checkInStateList): + return + return curEffect.GetEffectValue(0) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py index e3dda5b..1aea3dd 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py @@ -1143,7 +1143,12 @@ hurtValue = hurtValue * (1 - parryReduceRatio) GameWorld.DebugLog(" 格挡后伤害=%s,parryReduceRatio=%s" % (hurtValue, parryReduceRatio)) - hurtValue = max(1, int(hurtValue)) # 负值、保底防范 + multiValue = TurnPassive.GetTriggerEffectValue(turnFight, atkObj, defObj, ChConfig.PassiveEff_ChangeHurtMulti, curSkill) + if multiValue and multiValue != 1: + hurtValue = int(hurtValue * multiValue) + GameWorld.DebugLog(" 伤害倍值: hurtValue=%s,multiValue=%s" % (hurtValue, multiValue)) + + hurtValue = max(1, int(hurtValue)) # 负值、保底防范,放最后 return hurtValue, hurtTypes def CanSuperHit(turnFight, atkObj, defObj, curSkill): -- Gitblit v1.8.0