From 834bb8b03d16728340954e8aef94bcb8356fe6fd Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 12 四月 2024 14:50:31 +0800 Subject: [PATCH] 10019 【砍树】回合战斗(增加技能被动效果5013 5014;优化效果4048;优化释放方式8 43) 1. 增加技能被动效果ID 5013 - 灵宠攻击时触发提升额外伤害百分比 2. 增加技能被动效果ID 5014 - 受到伤害时触发技能 3. 技能被动效果ID 4048 - 闪避时触发技能支持配置触发概率 4. 技能释放方式8,增加治疗方式8 - 按最后一次受伤值回血 5. 技能释放方式43,偷取目标属性,支持多次偷取层级buff逻辑;buff效果ID1015支持计算层级buff属性; --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_43.py | 56 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 30 insertions(+), 26 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_43.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_43.py index c1937b5..4e39b52 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_43.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_43.py @@ -37,34 +37,38 @@ #GameWorld.DebugLog("偷取目标属性: atkID=%s,defID=%s,attrIndexAllowList=%s" % (attacker.GetID(), defender.GetID(), attrIndexAllowList)) addBuffValueList = [] - # 效果ID | 属性项,万分率 - # 最多吸收目标3种属性 存入buffvalue,固定前3个效果 - # A值-属性ID B值-吸取万分率 C值-最高不超过自身属性万分率,配0不限制 - for i in range(3): - effect = curSkill.GetEffect(i) - attrIndex = effect.GetEffectValue(0) - if not attrIndex: - continue - if attrIndexAllowList and attrIndex not in attrIndexAllowList: - continue - - attrRate = effect.GetEffectValue(1) - tagValue = EffGetSet.GetValueByEffIndex(defender, attrIndex) - addValue = int(tagValue * attrRate / float(ChConfig.Def_MaxRateValue)) - - maxRate = effect.GetEffectValue(2) - curValue = EffGetSet.GetValueByEffIndex(attacker, attrIndex) - if maxRate: - maxValue = int(curValue * maxRate / float(ChConfig.Def_MaxRateValue)) - addValue = min(addValue, maxValue) + buff = SkillCommon.FindBuffByID(attacker, curSkill.GetSkillTypeID())[0] + if buff: + addBuffValueList = [buff.GetValue(), buff.GetValue1(), buff.GetValue2()] + #GameWorld.DebugLog("偷取目标属性,已经存在buff,直接取原值! atkID=%s,defID=%s,addBuffValueList=%s,layer=%s" + # % (attacker.GetID(), defender.GetID(), addBuffValueList, buff.GetLayer())) + else: + # 效果ID | 属性项,万分率 + # 最多吸收目标3种属性 存入buffvalue,固定前3个效果 + # A值-属性ID B值-吸取万分率 C值-最高不超过自身属性万分率,配0不限制 + for i in range(3): + effect = curSkill.GetEffect(i) + attrIndex = effect.GetEffectValue(0) + if not attrIndex: + continue + if attrIndexAllowList and attrIndex not in attrIndexAllowList: + continue - addBuffValueList.append(addValue) - GameWorld.DebugLog("偷取目标属性: atkID=%s,defID=%s,attrIndex=%s,attrRate=%s,addValue=%s,tagValue=%s,curValue=%s,maxRate=%s" - % (attacker.GetID(), defender.GetID(), attrIndex, attrRate, addValue, tagValue, curValue, maxRate)) + attrRate = effect.GetEffectValue(1) + tagValue = EffGetSet.GetValueByEffIndex(defender, attrIndex) + addValue = int(tagValue * attrRate / float(ChConfig.Def_MaxRateValue)) + + maxRate = effect.GetEffectValue(2) + curValue = EffGetSet.GetValueByEffIndex(attacker, attrIndex) + if maxRate: + maxValue = int(curValue * maxRate / float(ChConfig.Def_MaxRateValue)) + addValue = min(addValue, maxValue) + + addBuffValueList.append(addValue) + GameWorld.DebugLog("偷取目标属性: atkID=%s,defID=%s,attrIndex=%s,attrRate=%s,addValue=%s,tagValue=%s,curValue=%s,maxRate=%s" + % (attacker.GetID(), defender.GetID(), attrIndex, attrRate, addValue, tagValue, curValue, maxRate)) buffType = SkillCommon.GetBuffType(curSkill) - BuffSkill.DoAddBuff(attacker, buffType, curSkill, tick, addBuffValueList, attacker) - - return True + return BuffSkill.DoAddBuff(attacker, buffType, curSkill, tick, addBuffValueList, attacker) #处理技能触发和攻击成功逻辑 #return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill) -- Gitblit v1.8.0