feat:优化职业技能关联实现

This commit is contained in:
2026-10-13 17:10:08 +08:00
parent 7dc5f4cde5
commit 927866d366
78 changed files with 5242 additions and 1011 deletions
+67 -10
View File
@@ -1,6 +1,23 @@
# ddc49e9ad1ff72a00b53c6cff5b1e920
from core.basic.skill import PassiveSkill, ActiveSkill, get_data
from core.basic.character import Character
from core.basic.skill_effect_types import (
CharacterAttribute,
CharacterEffect,
LevelTable,
Operation,
Percent,
ProfessionAttribute,
SkillAttribute,
SkillEffect,
)
class KunoichiAttribute(ProfessionAttribute):
"""本职业专用的最终效果属性;字段含义与技能实现保持一致。"""
NINPOU = 'ninpou'
"""忍者:六道轮回记录技能的伤害倍率。"""
prefix = "thief/kunoichi/cn/skillDetail"
@@ -763,7 +780,11 @@ class Skill22(PassiveSkill):
data0 = get_data(f'{prefix}/{uuid}', 0)
# 忍术技能冷却时间减少率 : {value1}%
data1 = get_data(f'{prefix}/{uuid}', 1)
associate = [{'data': data1, 'type': '*cdReduce', 'skills': ['火遁·豪火球之术', '忍法 : 幻影手里剑', '火遁·飓风煞', '火遁·螺旋手里剑', '火遁·炎天道', '火遁·蟾蜍油炎弹', '火遁·炎舞天璇', '火遁·风魔手里剑', '八岐大蛇', '天照']}] # noqa: E501
# 迁移前实现(保留对照):
# associate = [{'data': data1, 'type': '*cdReduce', 'skills': ['火遁·豪火球之术', '忍法 : 幻影手里剑', '火遁·飓风煞', '火遁·螺旋手里剑', '火遁·炎天道', '火遁·蟾蜍油炎弹', '火遁·炎舞天璇', '火遁·风魔手里剑', '八岐大蛇', '天照']}] # noqa: E501
associate = [
SkillEffect(attribute=SkillAttribute.CD_REDUCE, value=1 - Percent(LevelTable(data1)), skills=['火遁·豪火球之术', '忍法 : 幻影手里剑', '火遁·飓风煞', '火遁·螺旋手里剑', '火遁·炎天道', '火遁·蟾蜍油炎弹', '火遁·炎舞天璇', '火遁·风魔手里剑', '八岐大蛇', '天照']),
]
# 火遁·豪火球之术
# thief/kunoichi/dcb31a63ef58954f44ff2070c42a9a98
@@ -1066,7 +1087,11 @@ class Skill30(PassiveSkill):
data1 = get_data(f'{prefix}/{uuid}', 1)
# 基本攻击投掷出苦无的几率 : {value2}%
data2 = get_data(f'{prefix}/{uuid}', 2)
associate = [{'data': data0, 'type': '$*PAtkM'}]
# 迁移前实现(保留对照):
# associate = [{'data': data0, 'type': '$*PAtkM'}]
associate = [
CharacterEffect(attribute=CharacterAttribute.P_ATK_M, value=1 + Percent(LevelTable(data0))),
]
# 烈焰印记
# thief/kunoichi/374f53e8989ef04a8506c8ec99d9ecdc
@@ -1101,7 +1126,11 @@ class Skill31(PassiveSkill):
data2 = get_data(f'{prefix}/{uuid}', 2)
# 灼伤持续时间 : {value3}秒
data3 = get_data(f'{prefix}/{uuid}', 3)
associate = [{'data': data0}]
# 迁移前实现(保留对照):
# associate = [{'data': data0}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data0))),
]
# 火遁·螺旋手里剑
# thief/kunoichi/7e904ea3d2a9faa054604e55120a9268
@@ -1190,7 +1219,11 @@ class Skill33(ActiveSkill):
# 决斗场前置冷却时间 : {value3}秒
data3 = get_data(f'{prefix}/{uuid}', 3)
associate = [{'data': [i - 100 if i > 0 else 0 for i in data0]}]
# 迁移前实现(保留对照):
# associate = [{'data': [i - 100 if i > 0 else 0 for i in data0]}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable([i - 100 if i > 0 else 0 for i in data0]))),
]
# 火遁·炎天道
# thief/kunoichi/5152480fdde81362575a488d4cec4af9
@@ -1390,7 +1423,11 @@ class Skill36(ActiveSkill):
# 范围 : {value4}%
data4 = get_data(f'{prefix}/{uuid}', 4)
associate = [{'data': data1, 'type': '+ninpou'}] # noqa: E501
# 迁移前实现(保留对照):
# associate = [{'data': data1, 'type': '+ninpou'}] # noqa: E501
associate = [
SkillEffect(attribute=KunoichiAttribute.NINPOU, operation=Operation.ADD, value=Percent(LevelTable(data1))),
]
# 火遁·蟾蜍油炎弹
# thief/kunoichi/fc458e449ee00b01dbf88d09aae65462
@@ -1581,7 +1618,11 @@ class Skill39(PassiveSkill):
data0 = get_data(f'{prefix}/{uuid}', 0)
# 追踪标记持续时间 : {value1}秒
data1 = get_data(f'{prefix}/{uuid}', 1)
associate = [{'data': data0}]
# 迁移前实现(保留对照):
# associate = [{'data': data0}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data0))),
]
# 毕方之印
# thief/kunoichi/2c9d9a36c8401bddff6cdb80fab8dc24
@@ -1637,7 +1678,11 @@ class Skill40(ActiveSkill):
data11 = get_data(f'{prefix}/{uuid}', 11)
hit11 = 1
associate = [{'data': data0}]
# 迁移前实现(保留对照):
# associate = [{'data': data0}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data0))),
]
def getSkillCD(self, mode=None):
return 1.0
@@ -1909,7 +1954,11 @@ class Skill44(PassiveSkill):
# [忍法 : 六道轮回]强化残影攻击速度增加率 : {value3}%
data3 = get_data(f'{prefix}/{uuid}', 3)
associate = [{"data": data0}]
# 迁移前实现(保留对照):
# associate = [{"data": data0}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data0))),
]
# 八岐大蛇
# thief/kunoichi/147d005ac868e0de52b1f255eea35d62
@@ -2064,7 +2113,11 @@ class Skill47(ActiveSkill):
# 锁定敌人范围 : {value5}px
data5 = get_data(f'{prefix}/{uuid}', 5)
associate = [{'data': data4, 'skills': ['天照']}]
# 迁移前实现(保留对照):
# associate = [{'data': data4, 'skills': ['天照']}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data4)), skills=['天照']),
]
mode = ['普通', '六道']
@@ -2206,7 +2259,11 @@ class Skill49(PassiveSkill):
data0 = get_data(f'{prefix}/{uuid}', 0)
# 基本攻击力和技能攻击力增加率 : {value1}%
data1 = get_data(f'{prefix}/{uuid}', 1)
associate = [{'data': data1}]
# 迁移前实现(保留对照):
# associate = [{'data': data1}]
associate = [
SkillEffect(attribute=SkillAttribute.DAMAGE, value=1 + Percent(LevelTable(data1))),
]
# 勾玉之火 : 镰鼬
# thief/kunoichi/845e0ce3235e19f60cc82a082d072cba