From ca99169a6b9216c102222ecdd673158a08dd8115 Mon Sep 17 00:00:00 2001 From: qwerdvd <2450899274@qq.com> Date: Mon, 11 Sep 2023 02:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BC=A4=E5=AE=B3=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=9A=84=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StarRailUID/starrailuid_charinfo/cal_value.py | 31 +- .../config/RelicAbility.json | 4015 ----------------- .../starrailuid_charinfo/draw_char_img.py | 122 +- .../effect/Avatar/Avatar.py | 103 +- .../effect/Base/AvatarBase.py | 208 +- .../effect/Base/RelicBase.py | 19 +- .../effect/Base/SkillBase.py | 11 +- .../effect/Base/WeaponBase.py | 60 +- .../starrailuid_charinfo/effect/Base/model.py | 4 +- .../effect/Excel/AvatarExtraAbility.json | 9 - .../effect/Excel/Rank.json | 9 - .../effect/Excel/SkillData.json | 604 +++ .../effect/Excel/seele.json | 1320 ------ .../effect/Relic/Relic.py | 103 +- .../starrailuid_charinfo/effect/Role.py | 78 +- .../effect/Weapon/Weapon.py | 421 +- .../starrailuid_charinfo/mono/Character.py | 60 +- StarRailUID/starrailuid_charinfo/to_card.py | 1 - StarRailUID/starrailuid_charinfo/to_data.py | 92 +- .../starrailuid_rogue/draw_rogue_card.py | 22 +- StarRailUID/utils/excel/model.py | 245 + StarRailUID/utils/mys_api.py | 24 +- 22 files changed, 1411 insertions(+), 6150 deletions(-) delete mode 100644 StarRailUID/starrailuid_charinfo/config/RelicAbility.json delete mode 100644 StarRailUID/starrailuid_charinfo/effect/Excel/AvatarExtraAbility.json delete mode 100644 StarRailUID/starrailuid_charinfo/effect/Excel/Rank.json create mode 100644 StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json delete mode 100644 StarRailUID/starrailuid_charinfo/effect/Excel/seele.json create mode 100644 StarRailUID/utils/excel/model.py diff --git a/StarRailUID/starrailuid_charinfo/cal_value.py b/StarRailUID/starrailuid_charinfo/cal_value.py index 5c8a8b0..65bc506 100644 --- a/StarRailUID/starrailuid_charinfo/cal_value.py +++ b/StarRailUID/starrailuid_charinfo/cal_value.py @@ -1,9 +1,5 @@ -from mpmath import mp - +from ..utils.excel.model import RelicMainAffixConfig, RelicSubAffixConfig from ..utils.map.SR_MAP_PATH import RelicId2MainAffixGroup -from ..utils.excel.read_excel import RelicSubAffix, RelicMainAffix - -mp.dps = 14 async def cal_relic_main_affix( @@ -18,25 +14,22 @@ async def cal_relic_main_affix( group_id = str(rarity) + str(relic_type) else: group_id = str(RelicId2MainAffixGroup[str(relic_id)]) - relic_data = RelicMainAffix[group_id][str(affix_id)] - assert relic_data['GroupID'] == int(group_id) - assert relic_data['AffixID'] == affix_id - base_value = mp.mpf(relic_data['BaseValue']['Value']) - level_add = mp.mpf(relic_data['LevelAdd']['Value']) + relic_data = RelicMainAffixConfig.Relic[group_id][str(affix_id)] + print(relic_data) + base_value = relic_data.BaseValue.Value + level_add = relic_data.LevelAdd.Value value = base_value + level_add * relic_level - affix_property = relic_data['Property'] - return affix_property, str(value) + affix_property = relic_data.Property + return affix_property, value async def cal_relic_sub_affix( relic_id: int, affix_id: int, cnt: int, step: int ): rarity = int(str(relic_id)[0]) - 1 - relic_data = RelicSubAffix[str(rarity)][str(affix_id)] - assert relic_data['GroupID'] == int(rarity) - assert relic_data['AffixID'] == affix_id - base_value = mp.mpf(relic_data['BaseValue']['Value']) - step_value = mp.mpf(relic_data['StepValue']['Value']) + relic_data = RelicSubAffixConfig.Relic[str(rarity)][str(affix_id)] + base_value = relic_data.BaseValue.Value + step_value = relic_data.StepValue.Value value = base_value * cnt + step_value * step - affix_property = relic_data['Property'] - return affix_property, str(value) + affix_property = relic_data.Property + return affix_property, value diff --git a/StarRailUID/starrailuid_charinfo/config/RelicAbility.json b/StarRailUID/starrailuid_charinfo/config/RelicAbility.json deleted file mode 100644 index 7994444..0000000 --- a/StarRailUID/starrailuid_charinfo/config/RelicAbility.json +++ /dev/null @@ -1,4015 +0,0 @@ -{ - "AbilityList": [ - { - "Name": "RelicAbility100", - "TargetInfo": { - "TargetType": "Caster" - } - }, - { - "Modifiers": { - "MRelic_101_Main": { - "EnterBattlePriority": "CharacterBuff", - "OnEnterBattle": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareWaveCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyTeamBoostPoint", - "ModifyFunction": "Add", - "ModifyValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - } - ] - } - ] - } - }, - "Name": "Ability51011", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_101_Main" - } - ] - }, - { - "Modifiers": { - "MRelic_102_Main": { - "OnBeforeHit": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAttackType", - "AttackTypes": [ - "Normal" - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 459179394 - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability51021", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_102_Main" - } - ], - "DynamicValues": { - "Values": { - "459179394": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "102_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_103_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "ShieldAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 885378938 - } - ] - } - } - ] - } - }, - "Name": "Ability51031", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_103_Main" - } - ], - "DynamicValues": { - "Values": { - "885378938": { - "ReadInfo": { - "Type": "None", - "Str": "103_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_104_Main": { - "OnBeforeSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Ultra" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_104_CriticalDamage", - "LifeTime": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1879856137 - } - ] - } - } - ] - } - ] - }, - "MRelic_104_CriticalDamage": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalDamageBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 157515215 - } - ] - } - } - ], - "Stacking": "ReplaceByCaster" - } - }, - "Name": "Ability51041", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_104_Main" - } - ], - "DynamicValues": { - "Values": { - "157515215": { - "ReadInfo": { - "Type": "None", - "Str": "104_4" - } - }, - "-1879856137": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "104_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_105_Main": { - "OnAfterAttack": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_105_Sub", - "MaxLayer": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1513477700 - } - ] - } - } - ], - "OnAfterBeingAttacked": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_105_Sub", - "MaxLayer": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1513477700 - } - ] - } - } - ] - }, - "MRelic_105_Sub": { - "MaxLayer": 6, - "LayerAddWhenStack": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - }, - "OnStack": [ - { - "$type": "RPG.GameCore.SetDynamicValueByModifierValue", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ValueType": "Layer", - "Multiplier": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - }, - "DynamicKey": "_Layer" - }, - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 531501707 - }, - { - "Type": "DynamicNumber", - "DynamicHash": 1912601768 - }, - { - "Type": "Mul" - } - ] - } - } - ], - "Stacking": "ReplaceByCaster", - "DynamicValues": { - "Values": { - "1912601768": {} - } - } - } - }, - "Name": "Ability51051", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_105_Main" - } - ], - "DynamicValues": { - "Values": { - "531501707": { - "ReadInfo": { - "Type": "None", - "Str": "105_4" - } - }, - "1513477700": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "105_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_106_Main2": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AllDamageReduce", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 337117016 - } - ] - } - } - ] - } - }, - "Name": "Ability51060", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_106_Main2" - } - ], - "DynamicValues": { - "Values": { - "337117016": { - "ReadInfo": { - "Type": "None", - "Str": "106_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_106_Main": { - "OnPhase1": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareHPRatio", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "CompareType": "LessEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1366832712 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.HealHP", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "FormulaType": "HealByTargetMaxHP", - "HealPercentage": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1668979317 - } - ] - } - }, - { - "$type": "RPG.GameCore.ModifySPNew", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "AddValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 229419792 - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability51061", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_106_Main" - } - ], - "DynamicValues": { - "Values": { - "-1366832712": { - "ReadInfo": { - "Type": "None", - "Str": "106_4" - } - }, - "-1668979317": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "106_4" - } - }, - "229419792": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "106_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_107_Main": { - "OnBeforeHit": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAttackType", - "AttackTypes": [ - "BPSkill" - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 618880522 - } - ] - } - } - ] - } - ], - "OnAfterSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Ultra" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_107_FireDamageAddRatio" - } - ] - } - ] - }, - "MRelic_107_FireDamageAddRatio": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "FireAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 494825317 - } - ] - } - } - ], - "OnAfterAttack": [ - { - "$type": "RPG.GameCore.RemoveSelfModifier" - } - ] - } - }, - "Name": "Ability51071", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_107_Main" - } - ], - "DynamicValues": { - "Values": { - "618880522": { - "ReadInfo": { - "Type": "None", - "Str": "107_4" - } - }, - "494825317": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "107_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_108_Main": { - "OnBeforeHitAll": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Defender_DefenceAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -364539573 - }, - { - "Type": "Sub" - } - ] - } - }, - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByHasStanceWeak", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "DamageDefenderEntity" - }, - "WeakType": "Quantum" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Defender_DefenceAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1196642128 - }, - { - "Type": "Sub" - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability51081", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_108_Main" - } - ], - "DynamicValues": { - "Values": { - "-364539573": { - "ReadInfo": { - "Type": "None", - "Str": "108_4" - } - }, - "-1196642128": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "108_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_109_Main": { - "OnBeforeSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Skill" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_109_Sub", - "LifeTime": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1310126948 - } - ] - } - } - ] - } - ] - }, - "MRelic_109_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1781482481 - } - ] - } - } - ], - "Stacking": "ReplaceByCaster" - } - }, - "Name": "Ability51091", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_109_Main" - } - ], - "DynamicValues": { - "Values": { - "-1781482481": { - "ReadInfo": { - "Type": "None", - "Str": "109_4" - } - }, - "1310126948": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "109_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_110_Main": { - "OnAfterSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Ultra" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyActionDelay", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "AddNormalizedValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1098494600 - }, - { - "Type": "Sub" - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability51101", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_110_Main" - } - ], - "DynamicValues": { - "Values": { - "1098494600": { - "ReadInfo": { - "Type": "None", - "Str": "110_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_111_Main": { - "OnTriggerBreak": [ - { - "$type": "RPG.GameCore.ModifySPNew", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "AddValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1192876879 - } - ] - } - } - ] - } - }, - "Name": "Ability51111", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_111_Main" - } - ], - "DynamicValues": { - "Values": { - "-1192876879": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "111_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_112_Main": { - "OnBeforeHitAll": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByStatusCount", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "DamageDefenderEntity" - }, - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByContainBehaviorFlag", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "DamageDefenderEntity" - }, - "Flag": "STAT_Confine" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_CriticalChance": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 45095677 - } - ] - } - }, - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_CriticalDamage": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -773885837 - } - ] - } - } - ], - "FailedTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_CriticalChance": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 45095677 - } - ] - } - } - ] - } - ] - } - ] - } - }, - "Name": "Ability51121", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_112_Main" - } - ], - "DynamicValues": { - "Values": { - "45095677": { - "ReadInfo": { - "Type": "None", - "Str": "112_4" - } - }, - "-773885837": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "112_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_301_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "Speed", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 550312197 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_301_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "Speed", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 550312197 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_301_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_301_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_301_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -227304383 - } - ] - } - } - ] - } - }, - "Name": "Ability53011", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_301_Main" - } - ], - "DynamicValues": { - "Values": { - "550312197": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "301_2" - } - }, - "-227304383": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "301_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_302_Main": { - "EnterBattlePriority": "CharacterBuff", - "OnEnterBattle": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareWaveCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "Speed", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1778291848 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllTeamMember" - }, - "ModifierName": "MRelic_302_Sub" - } - ] - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "Speed", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1778291848 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetConcat", - "Targets": [ - { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllLightTeam" - }, - { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllUnselectable" - } - ] - }, - "ModifierName": "MRelic_302_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllTeamMember" - }, - "ModifierName": "MRelic_302_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_302_Sub": { - "BehaviorFlagList": [ - "RemoveWhenCasterDead" - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1554194146 - } - ] - } - } - ], - "Stacking": "Multiple" - } - }, - "Name": "Ability53021", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_302_Main" - } - ], - "DynamicValues": { - "Values": { - "1778291848": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "302_2" - } - }, - "1554194146": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "302_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_303_Main": { - "OnPhase1": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusProbabilityBase", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - } - ] - } - }, - "FailedTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValueByProperty", - "DynamicKey": "MDF_StatusProbability", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Value": "StatusProbabilityBase" - }, - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_303_Sub", - "DynamicValues": { - "MDF_AttackAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - }, - { - "Type": "DynamicNumber", - "DynamicHash": -261763503 - }, - { - "Type": "Mul" - } - ] - } - } - } - ] - } - ], - "OnPhase2": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusProbabilityBase", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - } - ] - } - }, - "FailedTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValueByProperty", - "DynamicKey": "MDF_StatusProbability", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Value": "StatusProbabilityBase" - }, - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_303_Sub", - "DynamicValues": { - "MDF_AttackAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - }, - { - "Type": "DynamicNumber", - "DynamicHash": -261763503 - }, - { - "Type": "Mul" - } - ] - } - } - } - ] - } - ], - "OnListenBeforeSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusProbabilityBase", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - } - ] - } - }, - "FailedTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValueByProperty", - "DynamicKey": "MDF_StatusProbability", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Value": "StatusProbabilityBase" - }, - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_303_Sub", - "DynamicValues": { - "MDF_AttackAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - }, - { - "Type": "DynamicNumber", - "DynamicHash": -261763503 - }, - { - "Type": "Mul" - } - ] - } - } - } - ] - } - ], - "OnListenAfterSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusProbabilityBase", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - } - ] - } - }, - "FailedTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValueByProperty", - "DynamicKey": "MDF_StatusProbability", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Value": "StatusProbabilityBase" - }, - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_303_Sub", - "DynamicValues": { - "MDF_AttackAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - }, - { - "Type": "DynamicNumber", - "DynamicHash": -261763503 - }, - { - "Type": "Mul" - } - ] - } - } - } - ] - } - ], - "EnterBattlePriority": "CharacterBuff", - "OnEnterBattle": [ - { - "$type": "RPG.GameCore.SetDynamicValueByProperty", - "DynamicKey": "MDF_StatusProbability", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Value": "StatusProbabilityBase" - }, - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_303_Sub", - "DynamicValues": { - "MDF_AttackAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -229967663 - }, - { - "Type": "DynamicNumber", - "DynamicHash": -261763503 - }, - { - "Type": "Mul" - } - ] - } - } - } - ], - "DynamicValues": { - "Values": { - "-229967663": {} - } - } - }, - "MRelic_303_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "DynamicKey": "MDF_AttackAddedRatio", - "CompareType": "Greater", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 419529603 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 419529603 - } - ] - } - } - ], - "FailedTaskList": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1826473127 - } - ] - } - } - ] - } - ], - "Stacking": "ReplaceByCaster", - "DynamicValues": { - "Values": { - "-1826473127": {} - } - } - } - }, - "Name": "Ability53031", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_303_Main" - } - ], - "DynamicValues": { - "Values": { - "-261763503": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "303_2" - } - }, - "419529603": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "303_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_304_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusProbability", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -80981650 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_304_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "StatusProbability", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": -1 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -80981650 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_304_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_304_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_304_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "DefenceAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 43780502 - } - ] - } - } - ] - } - }, - "Name": "Ability53041", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_304_Main" - } - ], - "DynamicValues": { - "Values": { - "-80981650": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "304_2" - } - }, - "43780502": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "304_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_305_Main": { - "OnAfterAttack": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_305_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "EnterBattlePriority": "CharacterBuff", - "OnEnterBattle": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareWaveCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalDamage", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1511673230 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_305_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_305_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChanceBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1491686669 - } - ] - } - } - ] - } - }, - "Name": "Ability53051", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_305_Main" - } - ], - "DynamicValues": { - "Values": { - "-1511673230": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "305_2" - } - }, - "1491686669": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "305_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_306_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChance", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1127902366 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_306_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "CriticalChance", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": -1 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1127902366 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_306_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_306_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_306_Sub": { - "OnBeforeHit": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAttackType", - "AttackTypes": [ - "Ultra", - "Insert" - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1200369059 - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability53061", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_306_Main" - } - ], - "DynamicValues": { - "Values": { - "-1127902366": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "306_2" - } - }, - "-1200369059": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "306_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_307_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "Speed", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1677143947 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_307_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "Speed", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": -1 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1677143947 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_307_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_307_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_307_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "BreakDamageAddedRatioBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -2021745413 - } - ] - } - } - ] - } - }, - "Name": "Ability53071", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_307_Main" - } - ], - "DynamicValues": { - "Values": { - "1677143947": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "307_2" - } - }, - "-2021745413": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "307_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_308_Main": { - "EnterBattlePriority": "CharacterBuff", - "OnEnterBattle": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareWaveCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "Speed", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -100454402 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyActionDelay", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "AddNormalizedValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1642612682 - }, - { - "Type": "Sub" - } - ] - } - } - ] - } - ] - } - ] - } - }, - "Name": "Ability53081", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_308_Main" - } - ], - "DynamicValues": { - "Values": { - "-100454402": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "308_2" - } - }, - "-1642612682": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "308_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_309_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChance", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1488776989 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_309_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "CriticalChance", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": -1 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1488776989 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_309_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_309_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_309_Sub": { - "OnBeforeHit": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAttackType", - "AttackTypes": [ - "Normal", - "BPSkill" - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1473807238 - } - ] - } - } - ] - } - ] - } - }, - "Name": "Ability53091", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_309_Main" - } - ], - "DynamicValues": { - "Values": { - "-1488776989": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "309_2" - } - }, - "-1473807238": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "309_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_900_Main": { - "OnListenHPChange": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAnd", - "PredicateList": [ - { - "$type": "RPG.GameCore.ByCompareTarget", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity2" - }, - "CompareType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - } - }, - { - "$type": "RPG.GameCore.ByCompareParamValue", - "CompareType": "Less", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - } - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByTargetTeam", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity" - }, - "Team": "TeamLight" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_900_Sub", - "LifeTime": { - "IsDynamic": false, - "FixedValue": { - "Value": 2 - } - }, - "Count": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "DynamicValues": { - "_MaxLayer": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1180256955 - } - ] - } - } - } - ] - } - ] - } - ], - "OnAfterBeingAttacked": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_900_Sub", - "LifeTime": { - "IsDynamic": false, - "FixedValue": { - "Value": 2 - } - }, - "Count": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - }, - "DynamicValues": { - "_MaxLayer": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1180256955 - } - ] - } - } - } - ] - }, - "MRelic_900_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.SetDynamicValueByModifierValue", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_900_Sub", - "Multiplier": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "DynamicKey": "_Count" - }, - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_Count", - "CompareType": "Greater", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChanceBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1190582898 - } - ] - } - } - ] - } - ], - "OnListenHPChange": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAnd", - "PredicateList": [ - { - "$type": "RPG.GameCore.ByCompareTarget", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity2" - }, - "CompareType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - } - }, - { - "$type": "RPG.GameCore.ByCompareParamValue", - "CompareType": "Less", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - } - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByTargetTeam", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity" - }, - "Team": "TeamLight" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareModifierValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "CompareType": "Less", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1180256955 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChanceBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1190582898 - } - ] - } - }, - { - "$type": "RPG.GameCore.SetModifierValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_900_Sub", - "ModifyFunction": "Add", - "Value": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - } - ] - } - ] - } - ] - } - ], - "OnAfterBeingAttacked": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareModifierValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "CompareType": "Less", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1180256955 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChanceBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1190582898 - } - ] - } - }, - { - "$type": "RPG.GameCore.SetModifierValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_900_Sub", - "ModifyFunction": "Add", - "Value": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - } - } - ] - } - ], - "DynamicValues": { - "Values": { - "916155872": {}, - "-1342592610": {} - } - } - } - }, - "Name": "Ability59001", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_900_Main" - } - ], - "DynamicValues": { - "Values": { - "-1190582898": { - "ReadInfo": { - "Type": "None", - "Str": "900_4" - } - }, - "1180256955": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "900_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_901_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_901_Sub" - } - ] - }, - "MRelic_901_Sub": { - "OnBeforeHitAll": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByContainBehaviorFlag", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity" - }, - "Flag": "STAT_DOT" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -358311156 - } - ] - } - } - ] - } - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "DotDamageAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -175110055 - } - ] - } - } - ] - } - }, - "Name": "Ability59011", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_901_Main" - } - ], - "DynamicValues": { - "Values": { - "-175110055": { - "ReadInfo": { - "Type": "None", - "Str": "901_4" - } - }, - "-358311156": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "901_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_902_Main": { - "OnAfterSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Ultra" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByTargetListIntersects", - "FirstTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "SkillTargetEntityList" - }, - "FirstTargetAliveOnly": false, - "SecondTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllTeammate" - }, - "SecondTargetAliveOnly": false - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllLightTeam" - }, - "ModifierName": "MRelic_902_Sub", - "LifeTime": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 102489793 - } - ] - } - } - ] - } - ] - } - ] - }, - "MRelic_902_Sub": { - "BehaviorFlagList": [ - "STAT_SpeedUp" - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "SpeedAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 410186986 - } - ] - } - } - ] - } - }, - "Name": "Ability59021", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_902_Main" - } - ], - "DynamicValues": { - "Values": { - "410186986": { - "ReadInfo": { - "Type": "None", - "Str": "902_4" - } - }, - "102489793": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "902_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_903_Main": { - "OnPhase1": [ - { - "$type": "RPG.GameCore.SetDynamicValueByStatusCount", - "DynamicKey": "_DebuffCount", - "ReadTargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - } - }, - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_TurnCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_DebuffCount", - "CompareType": "Greater", - "CompareValue": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.DispelStatus", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Numbers": { - "IsDynamic": false, - "FixedValue": { - "Value": 1 - } - }, - "Order": "LastAdded" - } - ], - "FailedTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_903_Sub", - "LifeTime": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -613484126 - } - ] - } - } - ] - } - ] - }, - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_TurnCount", - "CompareType": "Equal", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 314686377 - }, - { - "Type": "FixedNumber", - "FixedValue": { - "Value": 1 - } - }, - { - "Type": "Sub" - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_TurnCount", - "Value": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - } - ], - "FailedTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_TurnCount", - "Value": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1612122267 - }, - { - "Type": "FixedNumber", - "FixedValue": { - "Value": 1 - } - }, - { - "Type": "Add" - } - ] - } - } - ] - } - ], - "DynamicValues": { - "Values": { - "-1601007696": {}, - "-1612122267": {} - } - } - }, - "MRelic_903_Sub": { - "BehaviorFlagList": [ - "STAT_SpeedUp" - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "SpeedAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1965394869 - } - ] - } - } - ] - } - }, - "Name": "Ability59031", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_903_Main" - } - ], - "DynamicValues": { - "Values": { - "-1965394869": { - "ReadInfo": { - "Type": "None", - "Str": "903_4" - } - }, - "-613484126": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "903_4" - } - }, - "314686377": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "903_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_904_Main": { - "OnBeforeHitAll": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByAttackType", - "AttackTypes": [ - "BPSkill" - ] - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1001622286 - } - ] - } - }, - { - "$type": "RPG.GameCore.ModifyDamageData", - "Attacker_AllDamageTypeAddedRatio": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1123642700 - }, - { - "Type": "DynamicNumber", - "DynamicHash": 713850951 - }, - { - "Type": "Mul" - } - ] - } - } - ] - } - ], - "OnBeforeSkillUse": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCurrentSkillType", - "SkillType": "Skill" - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.SetDynamicValueByVariateType", - "DynamicKey": "_BPNeed", - "VariateType": "SkillBpCost" - } - ] - } - ], - "OnAfterSkillUse": [ - { - "$type": "RPG.GameCore.SetDynamicValue", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "DynamicKey": "_BPNeed", - "Value": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - } - } - ], - "DynamicValues": { - "Values": { - "713850951": {} - } - } - } - }, - "Name": "Ability59041", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_904_Main" - } - ], - "DynamicValues": { - "Values": { - "-1001622286": { - "ReadInfo": { - "Type": "None", - "Str": "904_4" - } - }, - "-1123642700": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "904_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_905_Main": { - "OnAfterBeingAttacked": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ParamEntity" - }, - "ModifierName": "MRelic_905_Sub", - "Chance": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -535061016 - } - ] - }, - "LifeTime": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 790336635 - } - ] - } - } - ] - }, - "MRelic_905_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "FatigueRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -137415487 - } - ] - } - } - ] - } - }, - "Name": "Ability59051", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_905_Main" - } - ], - "DynamicValues": { - "Values": { - "-535061016": { - "ReadInfo": { - "Type": "None", - "Str": "905_4" - } - }, - "-137415487": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "905_4" - } - }, - "790336635": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "905_4" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_950_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AllDamageReduce", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1799754355 - } - ] - } - }, - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "BreakDamageAddedRatio", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1455710669 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_950_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "BreakDamageAddedRatio", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1455710669 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_950_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_950_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_950_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AllDamageReduce", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1247180329 - } - ] - } - } - ] - } - }, - "Name": "Ability59501", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_950_Main" - } - ], - "DynamicValues": { - "Values": { - "1799754355": { - "ReadInfo": { - "Type": "None", - "Str": "950_2" - } - }, - "-1455710669": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "950_2" - } - }, - "1247180329": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "950_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_951_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "StatusResistance", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -2024796506 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllLightTeam" - }, - "ModifierName": "MRelic_951_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "StatusResistance", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -2024796506 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetConcat", - "Targets": [ - { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllLightTeam" - }, - { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllUnselectable" - } - ] - }, - "ModifierName": "MRelic_951_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "AllLightTeam" - }, - "ModifierName": "MRelic_951_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_951_Sub": { - "BehaviorFlagList": [ - "RemoveWhenCasterDead" - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "AttackAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 1769551996 - } - ] - } - } - ], - "Stacking": "Multiple" - } - }, - "Name": "Ability59511", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_951_Main" - } - ], - "DynamicValues": { - "Values": { - "-2024796506": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "951_2" - } - }, - "1769551996": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "951_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_952_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalDamage", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1474745832 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_952_Sub" - } - ] - } - ], - "OnAbilityPropertyChange": [ - { - "Property": "CriticalDamage", - "Ranges": [ - { - "Min": { - "IsDynamic": false, - "FixedValue": { - "Value": 0 - } - }, - "Max": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1474745832 - } - ] - }, - "OnEnterRange": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_952_Sub", - "OnlyRemoveCasterAdded": true - } - ], - "OnExitRange": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_952_Sub" - } - ] - } - ] - } - ] - }, - "MRelic_952_Sub": { - "BehaviorFlagList": [ - "STAT_SpeedUp" - ], - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "SpeedAddedRatio", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -943821905 - } - ] - } - } - ] - } - }, - "Name": "Ability59521", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_952_Main" - } - ], - "DynamicValues": { - "Values": { - "-1474745832": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "952_2" - } - }, - "-943821905": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "952_2" - } - } - } - } - }, - { - "Modifiers": { - "MRelic_953_Main": { - "OnStack": [ - { - "$type": "RPG.GameCore.PredicateTaskList", - "Predicate": { - "$type": "RPG.GameCore.ByCompareAbilityProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalDamage", - "CompareType": "GreaterEqual", - "CompareValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": -1296370729 - } - ] - } - }, - "SuccessTaskList": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_953_Sub" - } - ] - } - ], - "OnAfterAttack": [ - { - "$type": "RPG.GameCore.RemoveModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "ModifierName": "MRelic_953_Sub", - "OnlyRemoveCasterAdded": true - } - ] - }, - "MRelic_953_Sub": { - "OnStack": [ - { - "$type": "RPG.GameCore.StackProperty", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "ModifierOwnerEntity" - }, - "Property": "CriticalChanceBase", - "PropertyValue": { - "IsDynamic": true, - "Expressions": [ - { - "Type": "DynamicNumber", - "DynamicHash": 8729018 - } - ] - } - } - ] - } - }, - "Name": "Ability59531", - "TargetInfo": { - "TargetType": "Caster" - }, - "OnStart": [ - { - "$type": "RPG.GameCore.AddModifier", - "TargetType": { - "$type": "RPG.GameCore.TargetAlias", - "Alias": "Caster" - }, - "ModifierName": "MRelic_953_Main" - } - ], - "DynamicValues": { - "Values": { - "-1296370729": { - "ReadInfo": { - "Type": "SkillTreeParam", - "Str": "953_2" - } - }, - "8729018": { - "ReadInfo": { - "Type": "SkillRank", - "Str": "953_2" - } - } - } - } - } - ] -} diff --git a/StarRailUID/starrailuid_charinfo/draw_char_img.py b/StarRailUID/starrailuid_charinfo/draw_char_img.py index a02a948..93bcba1 100644 --- a/StarRailUID/starrailuid_charinfo/draw_char_img.py +++ b/StarRailUID/starrailuid_charinfo/draw_char_img.py @@ -1,35 +1,18 @@ -import re import json import math +import re from pathlib import Path from typing import Dict, Union -from mpmath import mp, nstr from PIL import Image, ImageDraw + from gsuid_core.logger import logger from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.image_tools import draw_text_by_line -from .to_data import api_to_dict -from .effect.Role import RoleInstance -from .mono.Character import Character from ..utils.error_reply import CHAR_HINT -from ..utils.fonts.first_world import fw_font_28 from ..utils.excel.read_excel import light_cone_ranks -from ..utils.map.name_covert import name_to_avatar_id, alias_to_char_name -from ..utils.map.SR_MAP_PATH import ( - RelicId2Rarity, - AvatarRelicScore, - avatarId2Name, - avatarId2DamageType, -) -from ..utils.resource.RESOURCE_PATH import ( - RELIC_PATH, - SKILL_PATH, - PLAYER_PATH, - WEAPON_PATH, - CHAR_PORTRAIT_PATH, -) +from ..utils.fonts.first_world import fw_font_28 from ..utils.fonts.starrail_fonts import ( sr_font_20, sr_font_23, @@ -39,13 +22,28 @@ from ..utils.fonts.starrail_fonts import ( sr_font_34, sr_font_38, ) +from ..utils.map.name_covert import alias_to_char_name, name_to_avatar_id +from ..utils.map.SR_MAP_PATH import ( + AvatarRelicScore, + RelicId2Rarity, + avatarId2DamageType, + avatarId2Name, +) +from ..utils.resource.RESOURCE_PATH import ( + CHAR_PORTRAIT_PATH, + PLAYER_PATH, + RELIC_PATH, + SKILL_PATH, + WEAPON_PATH, +) +from .effect.Role import RoleInstance +from .mono.Character import Character +from .to_data import api_to_dict Excel_path = Path(__file__).parent / 'effect' -with Path.open(Excel_path / 'Excel' / 'seele.json', encoding='utf-8') as f: +with Path.open(Excel_path / 'Excel' / 'SkillData.json', encoding='utf-8') as f: skill_dict = json.load(f) -mp.dps = 14 - TEXT_PATH = Path(__file__).parent / 'texture2D' bg_img = Image.open(TEXT_PATH / "bg.png") @@ -105,9 +103,8 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): 1201, 1212, ]: - skill_list = skill_dict[str(char.char_id)]['skilllist'] + skill_list = skill_dict[str(char.char_id)]['skillList'] damage_len = len(skill_list) - # print(damage_len) bg_height = 0 if damage_len > 0: bg_height = 48 * (1 + damage_len) + 48 @@ -172,12 +169,11 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): attr_bg = Image.open(TEXT_PATH / 'attr_bg.png') attr_bg_draw = ImageDraw.Draw(attr_bg) # 生命值 - hp = mp.mpf(char.base_attributes.get('hp')) - add_hp = mp.mpf(char.add_attr.get('HPDelta', 0)) + hp * mp.mpf( - char.add_attr.get('HPAddedRatio', 0) - ) - hp = int(mp.floor(hp)) - add_hp = int(mp.floor(add_hp)) + hp = int(char.base_attributes.get('hp')) + add_hp = int(char.add_attr.get('HPDelta', 0) + + hp + * char.add_attr.get('HPAddedRatio', 0) + ) attr_bg_draw.text( (413, 31), f'{hp + add_hp}', white_color, sr_font_26, 'rm' ) @@ -189,15 +185,14 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): anchor='lm', ) # 攻击力 - attack = mp.mpf(char.base_attributes['attack']) - add_attack = mp.mpf(char.add_attr.get('AttackDelta', 0)) + attack * mp.mpf( - char.add_attr.get('AttackAddedRatio', 0) - ) - atk = int(mp.floor(attack)) - add_attack = int(mp.floor(add_attack)) + attack = int(char.base_attributes['attack']) + add_attack = int(char.add_attr.get('AttackDelta', 0) + + attack + * char.add_attr.get('AttackAddedRatio', 0) + ) attr_bg_draw.text( (413, 31 + 48), - f'{atk + add_attack}', + f'{attack + add_attack}', white_color, sr_font_26, 'rm', @@ -210,12 +205,11 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): anchor='lm', ) # 防御力 - defence = mp.mpf(char.base_attributes['defence']) - add_defence = mp.mpf( - char.add_attr.get('DefenceDelta', 0) - ) + defence * mp.mpf(char.add_attr.get('DefenceAddedRatio', 0)) - defence = int(mp.floor(defence)) - add_defence = int(mp.floor(add_defence)) + defence = int(char.base_attributes['defence']) + add_defence = int(char.add_attr.get('DefenceDelta', 0) + + defence + * char.add_attr.get('DefenceAddedRatio', 0) + ) attr_bg_draw.text( (413, 31 + 48 * 2), f'{defence + add_defence}', @@ -231,10 +225,8 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): anchor='lm', ) # 速度 - speed = mp.mpf(char.base_attributes['speed']) - add_speed = mp.mpf(char.add_attr.get('SpeedDelta', 0)) - speed = int(mp.floor(speed)) - add_speed = int(mp.floor(add_speed)) + speed = int(char.base_attributes['speed']) + add_speed = int(char.add_attr.get('SpeedDelta', 0)) attr_bg_draw.text( (413, 31 + 48 * 3), f'{speed + add_speed}', @@ -250,49 +242,45 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): anchor='lm', ) # 暴击率 - critical_chance = mp.mpf(char.base_attributes['CriticalChanceBase']) - critical_chance_base = mp.mpf(char.add_attr.get('CriticalChanceBase', 0)) + critical_chance = char.base_attributes['CriticalChanceBase'] + critical_chance_base = char.add_attr.get('CriticalChanceBase', 0) critical_chance = (critical_chance + critical_chance_base) * 100 - critical_chance = nstr(critical_chance, 3) attr_bg_draw.text( (500, 31 + 48 * 4), - f'{critical_chance}%', + "{:.1f}%".format(critical_chance), white_color, sr_font_26, 'rm', ) # 暴击伤害 - critical_damage = mp.mpf(char.base_attributes['CriticalDamageBase']) - critical_damage_base = mp.mpf(char.add_attr.get('CriticalDamageBase', 0)) + critical_damage = char.base_attributes['CriticalDamageBase'] + critical_damage_base = char.add_attr.get('CriticalDamageBase', 0) critical_damage = (critical_damage + critical_damage_base) * 100 - critical_damage = nstr(critical_damage, 4) attr_bg_draw.text( (500, 31 + 48 * 5), - f'{critical_damage}%', + "{:.1f}%".format(critical_damage), white_color, sr_font_26, 'rm', ) # 效果命中 status_probability_base = ( - mp.mpf(char.add_attr.get('StatusProbabilityBase', 0)) * 100 + char.add_attr.get('StatusProbabilityBase', 0) * 100 ) - status_probability = nstr(status_probability_base, 3) attr_bg_draw.text( (500, 31 + 48 * 6), - f'{status_probability}%', + "{:.1f}%".format(status_probability_base), white_color, sr_font_26, 'rm', ) # 效果抵抗 status_resistance_base = ( - mp.mpf(char.add_attr.get('StatusResistanceBase', 0)) * 100 + char.add_attr.get('StatusResistanceBase', 0) * 100 ) - status_resistance = nstr(status_resistance_base, 3) attr_bg_draw.text( (500, 31 + 48 * 7), - f'{status_resistance}%', + "{:.1f}%".format(status_resistance_base), white_color, sr_font_26, 'rm', @@ -475,13 +463,13 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): ) # 主属性 - main_value = mp.mpf(relic['MainAffix']['Value']) + main_value = relic['MainAffix']['Value'] main_name: str = relic['MainAffix']['Name'] main_property: str = relic['MainAffix']['Property'] main_level: int = relic['Level'] if main_name in ['攻击力', '生命值', '防御力', '速度']: - mainValueStr = nstr(main_value, 3) + mainValueStr = "{:.1f}".format(main_value) else: mainValueStr = str(math.floor(main_value * 1000) / 10) + '%' @@ -534,7 +522,7 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): single_relic_score += main_value_score for index, i in enumerate(relic['SubAffixList']): subName: str = i['Name'] - subValue = mp.mpf(i['Value']) + subValue = i['Value'] subProperty = i['Property'] tmp_score = await get_relic_score( @@ -543,9 +531,9 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str): single_relic_score += tmp_score if subName in ['攻击力', '生命值', '防御力', '速度']: - subValueStr = nstr(subValue, 3) + subValueStr = "{:.1f}".format(subValue) else: - subValueStr = nstr(subValue * 100, 3) + '%' # type: ignore + subValueStr = "{:.1f}".format(subValue * 100) + '%' # type: ignore subNameStr = subName.replace('百分比', '').replace('元素', '') # 副词条文字颜色 relic_color = (255, 255, 255) diff --git a/StarRailUID/starrailuid_charinfo/effect/Avatar/Avatar.py b/StarRailUID/starrailuid_charinfo/effect/Avatar/Avatar.py index 2bc03a9..60465cc 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Avatar/Avatar.py +++ b/StarRailUID/starrailuid_charinfo/effect/Avatar/Avatar.py @@ -1,12 +1,9 @@ from typing import List -from mpmath import mp from gsuid_core.logger import logger from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff -from ..Base.model import DamageInstanceSkill, DamageInstanceAvatar - -mp.dps = 14 +from ..Base.model import DamageInstanceAvatar, DamageInstanceSkill class Seele(BaseAvatar): @@ -26,17 +23,15 @@ class Seele(BaseAvatar): def eidolons(self): if self.avatar_rank < 2: - self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.25) + self.eidolon_attribute['SpeedAddedRatio'] = 0.25 if self.avatar_rank >= 1: - self.eidolon_attribute['CriticalChanceBase'] = mp.mpf(0.15) + self.eidolon_attribute['CriticalChanceBase'] = 0.15 if self.avatar_rank >= 2: - self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.5) + self.eidolon_attribute['SpeedAddedRatio'] = 0.5 def extra_ability(self): # 额外能力 割裂 抗性穿透提高20 - self.extra_ability_attribute['QuantumResistancePenetration'] = mp.mpf( - 0.2 - ) + self.extra_ability_attribute['QuantumResistancePenetration'] = 0.2 class JingYuan(BaseAvatar): @@ -56,18 +51,18 @@ class JingYuan(BaseAvatar): def eidolons(self): if self.avatar_rank >= 2: - self.eidolon_attribute['NormalDmgAdd'] = mp.mpf(0.2) - self.eidolon_attribute['BPSkillDmgAdd'] = mp.mpf(0.2) - self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.2) + self.eidolon_attribute['NormalDmgAdd'] = 0.2 + self.eidolon_attribute['BPSkillDmgAdd'] = 0.2 + self.eidolon_attribute['UltraDmgAdd'] = 0.2 if self.avatar_rank >= 6: - self.eidolon_attribute['Talent_DmgRatio'] = mp.mpf(0.288) + self.eidolon_attribute['Talent_DmgRatio'] = 0.288 def extra_ability(self): logger.info('额外能力') logger.info('【神君】下回合的攻击段数大于等于6段,则其下回合的暴击伤害提高25%。') - self.extra_ability_attribute['CriticalDamageBase'] = mp.mpf(0.25) + self.extra_ability_attribute['CriticalDamageBase'] = 0.25 logger.info('施放战技后,暴击率提升10%') - self.extra_ability_attribute['CriticalChanceBase'] = mp.mpf(0.1) + self.extra_ability_attribute['CriticalChanceBase'] = 0.1 class Clara(BaseAvatar): @@ -87,13 +82,13 @@ class Clara(BaseAvatar): def eidolons(self): if self.avatar_rank >= 2: - self.eidolon_attribute['AttackAddedRatio'] = mp.mpf(0.2) + self.eidolon_attribute['AttackAddedRatio'] = 0.2 def extra_ability(self): logger.info('额外能力') logger.info('史瓦罗的反击造成的伤害提高30%') - self.extra_ability_attribute['TalentDmgAdd'] = mp.mpf(0.3) - self.extra_ability_attribute['UltraDmgAdd'] = mp.mpf(0.3) + self.extra_ability_attribute['TalentDmgAdd'] = 0.3 + self.extra_ability_attribute['UltraDmgAdd'] = 0.3 class Danhengil(BaseAvatar): @@ -113,18 +108,18 @@ class Danhengil(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.eidolon_attribute['Atk_buff'] = mp.mpf(1) + self.eidolon_attribute['Atk_buff'] = 1 if self.avatar_rank >= 4: - self.eidolon_attribute['Normal_buff'] = mp.mpf(4) + self.eidolon_attribute['Normal_buff'] = 4 if self.avatar_rank >= 6: self.extra_ability_attribute[ 'Normal_ImaginaryResistancePenetration' - ] = mp.mpf(0.6) + ] = 0.6 def extra_ability(self): logger.info('额外能力') logger.info('对拥有虚数属性弱点的敌方目标造成伤害时,暴击伤害提高24%。') - self.extra_ability_attribute['CriticalDamageBase'] = mp.mpf(0.24) + self.extra_ability_attribute['CriticalDamageBase'] = 0.24 class Silverwolf(BaseAvatar): @@ -144,22 +139,20 @@ class Silverwolf(BaseAvatar): def eidolons(self): if self.avatar_rank >= 6: - self.extra_ability_attribute['AllDamageAddedRatio'] = mp.mpf(1) + self.extra_ability_attribute['AllDamageAddedRatio'] = 1 def extra_ability(self): logger.info('额外能力') logger.info('战技降抗') logger.info('战技使目标全属性抗性降低的效果额外降低3%') enemy_status_resistance = self.BPSkill_num('BPSkill_D') + 0.03 - self.extra_ability_attribute['QuantumResistancePenetration'] = mp.mpf( - enemy_status_resistance - ) + self.extra_ability_attribute['QuantumResistancePenetration'] = enemy_status_resistance logger.info('终结技降防') ultra_defence = self.Ultra_num('Ultra_D') logger.info('天赋降防') talent_defence = self.Talent() ignore_defence = ultra_defence + talent_defence - self.extra_ability_attribute['ignore_defence'] = mp.mpf(ignore_defence) + self.extra_ability_attribute['ignore_defence'] = ignore_defence class Kafka(BaseAvatar): @@ -179,9 +172,9 @@ class Kafka(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.extra_ability_attribute['DOTDmgAdd'] = mp.mpf(0.3) + self.extra_ability_attribute['DOTDmgAdd'] = 0.3 if self.avatar_rank >= 2: - self.extra_ability_attribute['DOTDmgAdd'] = mp.mpf(0.55) + self.extra_ability_attribute['DOTDmgAdd'] = 0.55 def extra_ability(self): pass @@ -204,15 +197,15 @@ class Blade(BaseAvatar): def eidolons(self): if self.avatar_rank >= 2: - self.eidolon_attribute['CriticalChanceBase'] = mp.mpf(0.15) + self.eidolon_attribute['CriticalChanceBase'] = 0.15 if self.avatar_rank >= 4: - self.eidolon_attribute['HPAddedRatio'] = mp.mpf(0.4) + self.eidolon_attribute['HPAddedRatio'] = 0.4 def extra_ability(self): logger.info('额外能力') logger.info('天赋施放的追加攻击伤害提高20%') - self.extra_ability_attribute['TalentDmgAdd'] = mp.mpf(0.2) + self.extra_ability_attribute['TalentDmgAdd'] = 0.2 class Fuxuan(BaseAvatar): @@ -232,7 +225,7 @@ class Fuxuan(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.eidolon_attribute['CriticalDamageBase'] = mp.mpf(0.3) + self.eidolon_attribute['CriticalDamageBase'] = 0.3 def extra_ability(self): pass @@ -277,12 +270,12 @@ class Yanqing(BaseAvatar): def eidolons(self): if self.avatar_rank >= 4: - self.eidolon_attribute['IceResistancePenetration'] = mp.mpf(0.15) + self.eidolon_attribute['IceResistancePenetration'] = 0.15 def extra_ability(self): logger.info('额外能力') logger.info('触发暴击时,速度提高10%') - self.extra_ability_attribute['SpeedAddedRatio'] = mp.mpf(0.1) + self.extra_ability_attribute['SpeedAddedRatio'] = 0.1 logger.info('【智剑连心】增益') critical_damage_base_t = self.Talent_num('Talent_CD') critical_damage_base_u = self.Ultra_num('Ultra_CD') @@ -292,7 +285,7 @@ class Yanqing(BaseAvatar): critical_chance_base = self.Talent_num('Talent_CC') self.extra_ability_attribute[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf(0.6) + ] = critical_chance_base + 0.6 class Welt(BaseAvatar): @@ -317,7 +310,7 @@ class Welt(BaseAvatar): logger.info('额外能力') logger.info('施放终结技时,有100%基础概率使目标受到的伤害提高12%,持续2回合。') logger.info('对被弱点击破的敌方目标造成的伤害提高20') - self.extra_ability_attribute['AllDamageAddedRatio'] = mp.mpf(0.32) + self.extra_ability_attribute['AllDamageAddedRatio'] = 0.32 class Himeko(BaseAvatar): @@ -337,16 +330,16 @@ class Himeko(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.1) + self.eidolon_attribute['SpeedAddedRatio'] = 0.1 if self.avatar_rank >= 2: - self.eidolon_attribute['AllDamageAddedRatio'] = mp.mpf(0.15) + self.eidolon_attribute['AllDamageAddedRatio'] = 0.15 def extra_ability(self): logger.info('额外能力') logger.info('战技对灼烧状态下的敌方目标造成的伤害提高20%。') - self.extra_ability_attribute['BPSkillDmgAdd'] = mp.mpf(0.2) + self.extra_ability_attribute['BPSkillDmgAdd'] = 0.2 logger.info('若当前生命值百分比大于等于80%,则暴击率提高15%。') - self.extra_ability_attribute['CriticalChanceBase'] = mp.mpf(0.15) + self.extra_ability_attribute['CriticalChanceBase'] = 0.15 class Qingque(BaseAvatar): @@ -366,14 +359,14 @@ class Qingque(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.1) + self.eidolon_attribute['UltraDmgAdd'] = 0.1 def extra_ability(self): logger.info('额外能力') logger.info('施放强化普攻后,青雀的速度提高10%,持续1回合。') - self.extra_ability_attribute['SpeedAddedRatio'] = mp.mpf(0.1) + self.extra_ability_attribute['SpeedAddedRatio'] = 0.1 logger.info('默认4层战技加伤害') - all_damage_added_ratio = self.BPSkill() + mp.mpf(0.1) + all_damage_added_ratio = self.BPSkill() + 0.1 self.extra_ability_attribute['AllDamageAddedRatio'] = ( all_damage_added_ratio * 4 ) @@ -398,24 +391,22 @@ class Jingliu(BaseAvatar): def eidolons(self): if self.avatar_rank >= 1: - self.eidolon_attribute['Ultra_CriticalChanceBase'] = mp.mpf(0.12) - self.eidolon_attribute['BPSkill1_CriticalChanceBase'] = mp.mpf( - 0.12 - ) + self.eidolon_attribute['Ultra_CriticalChanceBase'] = 0.12 + self.eidolon_attribute['BPSkill1_CriticalChanceBase'] = 0.12 if self.avatar_rank >= 2: - self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.3) + self.eidolon_attribute['UltraDmgAdd'] = 0.3 if self.avatar_rank >= 4: - self.eidolon_attribute['BPSkill1AttackAddedRatio'] = mp.mpf(0.4) - self.eidolon_attribute['UltraAttackAddedRatio'] = mp.mpf(0.4) + self.eidolon_attribute['BPSkill1AttackAddedRatio'] = 0.4 + self.eidolon_attribute['UltraAttackAddedRatio'] = 0.4 if self.avatar_rank >= 6: - self.eidolon_attribute['Ultra_CriticalDamageBase'] = mp.mpf(0.5) - self.eidolon_attribute['BPSkill1_CriticalDamageBase'] = mp.mpf(0.5) + self.eidolon_attribute['Ultra_CriticalDamageBase'] = 0.5 + self.eidolon_attribute['BPSkill1_CriticalDamageBase'] = 0.5 def extra_ability(self): logger.info('额外能力') logger.info('【转魄】状态下,造成的伤害提高10%。') - self.extra_ability_attribute['BPSkill1DmgAdd'] = mp.mpf(0.1) - self.extra_ability_attribute['UltraDmgAdd'] = mp.mpf(0.1) + self.extra_ability_attribute['BPSkill1DmgAdd'] = 0.1 + self.extra_ability_attribute['UltraDmgAdd'] = 0.1 class Avatar: diff --git a/StarRailUID/starrailuid_charinfo/effect/Base/AvatarBase.py b/StarRailUID/starrailuid_charinfo/effect/Base/AvatarBase.py index 3db6548..3dd0297 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Base/AvatarBase.py +++ b/StarRailUID/starrailuid_charinfo/effect/Base/AvatarBase.py @@ -1,19 +1,38 @@ import json -from typing import List -from pathlib import Path from abc import abstractmethod +from pathlib import Path +from typing import List -from mpmath import mp +from msgspec import Struct +from ....utils.excel.model import AvatarPromotionConfig +from .model import DamageInstanceAvatar, DamageInstanceSkill from .SkillBase import BaseSkills -from ....utils.excel.read_excel import AvatarPromotion -from .model import DamageInstanceSkill, DamageInstanceAvatar path = Path(__file__).parent.parent -with Path.open(path / 'Excel' / 'seele.json', encoding='utf-8') as f: +with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f: skill_dict = json.load(f) -mp.dps = 14 + +class BaseAvatarAttribute(Struct): + attack: float + defence: float + hp: float + speed: float + CriticalChanceBase: float + CriticalDamageBase: float + BaseAggro: float + + def items(self): + return [ + ('attack', self.attack), + ('defence', self.defence), + ('hp', self.hp), + ('speed', self.speed), + ('CriticalChanceBase', self.CriticalChanceBase), + ('CriticalDamageBase', self.CriticalDamageBase), + ('BaseAggro', self.BaseAggro), + ] class BaseAvatarBuff: @@ -53,123 +72,100 @@ class BaseAvatar: self.avatar_promotion = char.promotion self.avatar_attribute_bonus = char.attribute_bonus self.avatar_extra_ability = char.extra_ability - self.avatar_attribute = {} - self.get_attribute() + self.avatar_attribute = self.get_attribute() def get_attribute(self): - promotion = AvatarPromotion[str(self.avatar_id)][ - str(self.avatar_promotion) - ] + promotion = AvatarPromotionConfig.Avatar[ + str(self.avatar_id) + ][str(self.avatar_promotion)] - # 攻击力 - self.avatar_attribute['attack'] = mp.mpf( - promotion["AttackBase"]['Value'] - ) + mp.mpf(promotion["AttackAdd"]['Value']) * (self.avatar_level - 1) - # 防御力 - self.avatar_attribute['defence'] = mp.mpf( - promotion["DefenceBase"]['Value'] - ) + mp.mpf(promotion["DefenceAdd"]['Value']) * (self.avatar_level - 1) - # 血量 - self.avatar_attribute['hp'] = mp.mpf( - promotion["HPBase"]['Value'] - ) + mp.mpf(promotion["HPAdd"]['Value']) * (self.avatar_level - 1) - # 速度 - self.avatar_attribute['speed'] = mp.mpf( - promotion["SpeedBase"]['Value'] - ) - # 暴击率 - self.avatar_attribute['CriticalChanceBase'] = mp.mpf( - promotion["CriticalChance"]['Value'] - ) - # 暴击伤害 - self.avatar_attribute['CriticalDamageBase'] = mp.mpf( - promotion["CriticalDamage"]['Value'] - ) - # 嘲讽 - self.avatar_attribute['BaseAggro'] = mp.mpf( - promotion["BaseAggro"]['Value'] + return BaseAvatarAttribute( + # 攻击力 + attack = ( + promotion.AttackBase.Value + + promotion.AttackAdd.Value + * (self.avatar_level - 1) + ), + # 防御力 + defence = ( + promotion.DefenceBase.Value + + promotion.DefenceAdd.Value + * (self.avatar_level - 1) + ), + # 血量 + hp = ( + promotion.HPBase.Value + + promotion.HPAdd.Value + * (self.avatar_level - 1) + ), + # 速度 + speed = promotion.SpeedBase.Value, + # 暴击率 + CriticalChanceBase = promotion.CriticalChance.Value, + # 暴击伤害 + CriticalDamageBase = promotion.CriticalDamage.Value, + # 嘲讽 + BaseAggro = promotion.BaseAggro.Value ) - def Skill_Info(self, skill_type): - skill_info = skill_dict[str(self.avatar_id)]['skilllist'][skill_type] + def Skill_Info(self, skill_type: str): + skill_info = skill_dict[str(self.avatar_id)]['skillList'][skill_type] return skill_info - def Normalnum(self, skill_type): - return mp.mpf( - skill_dict[str(self.avatar_id)][skill_type][ - self.Skill.Normal_.level - 1 - ] - ) + def Normalnum(self, skill_type: str) -> float: + return skill_dict[str(self.avatar_id)][skill_type][ + self.Skill.Normal_.level - 1 + ] - def Normal(self): - return mp.mpf( - skill_dict[str(self.avatar_id)]['Normal'][ - self.Skill.Normal_.level - 1 - ] - ) + def Normal(self) -> float: + return skill_dict[str(self.avatar_id)]['Normal'][ + self.Skill.Normal_.level - 1 + ] - def BPSkill(self): - return mp.mpf( - skill_dict[str(self.avatar_id)]['BPSkill'][ - self.Skill.BPSkill_.level - 1 - ] - ) + def BPSkill(self) -> float: + return skill_dict[str(self.avatar_id)]['BPSkill'][ + self.Skill.BPSkill_.level - 1 + ] - def Ultra(self): - return mp.mpf( - skill_dict[str(self.avatar_id)]['Ultra'][ - self.Skill.Ultra_.level - 1 - ] - ) + def Ultra(self) -> float: + return skill_dict[str(self.avatar_id)]['Ultra'][ + self.Skill.Ultra_.level - 1 + ] - def Maze(self): - return mp.mpf( - skill_dict[str(self.avatar_id)]['Maze'][self.Skill.Maze_.level - 1] - ) + def Maze(self) -> float: + return skill_dict[str(self.avatar_id)]['Maze'][self.Skill.Maze_.level - 1] - def Talent(self): - return mp.mpf( - skill_dict[str(self.avatar_id)]['Talent'][ - self.Skill.Talent_.level - 1 - ] - ) + def Talent(self) -> float: + return skill_dict[str(self.avatar_id)]['Talent'][ + self.Skill.Talent_.level - 1 + ] - def BPSkill_num(self, skill_type): - return mp.mpf( - skill_dict[str(self.avatar_id)][skill_type][ - self.Skill.BPSkill_.level - 1 - ] - ) + def BPSkill_num(self, skill_type) -> float: + return skill_dict[str(self.avatar_id)][skill_type][ + self.Skill.BPSkill_.level - 1 + ] - def Ultra_num(self, skill_type): - return mp.mpf( - skill_dict[str(self.avatar_id)][skill_type][ - self.Skill.Ultra_.level - 1 - ] - ) + def Ultra_num(self, skill_type) -> float: + return skill_dict[str(self.avatar_id)][skill_type][ + self.Skill.Ultra_.level - 1 + ] - def Talent_num(self, skill_type): - return mp.mpf( - skill_dict[str(self.avatar_id)][skill_type][ - self.Skill.Talent_.level - 1 - ] - ) + def Talent_num(self, skill_type) -> float: + return skill_dict[str(self.avatar_id)][skill_type][ + self.Skill.Talent_.level - 1 + ] - def Talent_add(self): + def Talent_add(self) -> float: if self.avatar_id in [1102]: - return mp.mpf( - skill_dict[str(self.avatar_id)]['Talent'][ - self.Skill.Talent_.level - 1 - ] - ) + return float(skill_dict[str(self.avatar_id)]['Talent'][ + self.Skill.Talent_.level - 1 + ]) elif self.avatar_id in [1205]: - return mp.mpf( - skill_dict[str(self.avatar_id)]['BPSkill'][ - self.Skill.BPSkill_.level - 1 - ] - ) + return float(skill_dict[str(self.avatar_id)]['BPSkill'][ + self.Skill.BPSkill_.level - 1 + ]) else: - return mp.mpf(0) + return float(0) - def Ultra_Use(self): + def Ultra_Use(self) -> float: return skill_dict[str(self.avatar_id)]['Ultra_Use'][0] diff --git a/StarRailUID/starrailuid_charinfo/effect/Base/RelicBase.py b/StarRailUID/starrailuid_charinfo/effect/Base/RelicBase.py index eae565a..772f10a 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Base/RelicBase.py +++ b/StarRailUID/starrailuid_charinfo/effect/Base/RelicBase.py @@ -1,13 +1,10 @@ -from typing import Dict from abc import abstractmethod +from typing import Dict -from mpmath import mp from gsuid_core.logger import logger -from .model import DamageInstanceRelic from ....utils.map.SR_MAP_PATH import RelicSetSkill - -mp.dps = 14 +from .model import DamageInstanceRelic class SingleRelic: @@ -24,17 +21,17 @@ class SingleRelic: if self.raw_relic.MainAffix.Property in self.relic_attribute_bonus: self.relic_attribute_bonus[ self.raw_relic.MainAffix.Property - ] += mp.mpf(self.raw_relic.MainAffix.Value) + ] += self.raw_relic.MainAffix.Value else: self.relic_attribute_bonus[ self.raw_relic.MainAffix.Property - ] = mp.mpf(self.raw_relic.MainAffix.Value) + ] = self.raw_relic.MainAffix.Value # SubAffix if self.raw_relic.SubAffixList: for sub_affix in self.raw_relic.SubAffixList: sub_affix_property = sub_affix.Property - value = mp.mpf(sub_affix.Value) + value = sub_affix.Value if sub_affix_property in self.relic_attribute_bonus: self.relic_attribute_bonus[sub_affix_property] += value else: @@ -70,13 +67,13 @@ class BaseRelicSetSkill: def set_skill_property_ability(self): set_property = '' - set_value = mp.mpf(0) + set_value = 0 if self.pieces2 and RelicSetSkill[str(self.setId)]['2'] != {}: set_property = RelicSetSkill[str(self.setId)]['2']['Property'] - set_value = mp.mpf(RelicSetSkill[str(self.setId)]['2']['Value']) + set_value = RelicSetSkill[str(self.setId)]['2']['Value'] if self.pieces4 and RelicSetSkill[str(self.setId)]['4'] != {}: set_property = RelicSetSkill[str(self.setId)]['4']['Property'] - set_value = mp.mpf(RelicSetSkill[str(self.setId)]['4']['Value']) + set_value = RelicSetSkill[str(self.setId)]['4']['Value'] if set_property != '': if set_property in self.relicSetAttribute: self.relicSetAttribute[set_property] = ( diff --git a/StarRailUID/starrailuid_charinfo/effect/Base/SkillBase.py b/StarRailUID/starrailuid_charinfo/effect/Base/SkillBase.py index d863719..98b10ea 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Base/SkillBase.py +++ b/StarRailUID/starrailuid_charinfo/effect/Base/SkillBase.py @@ -1,16 +1,11 @@ import json -from typing import List from pathlib import Path +from typing import List -from mpmath import mp - -from .model import DamageInstanceSkill, DamageInstanceAvatar - -mp.dps = 14 - +from .model import DamageInstanceAvatar, DamageInstanceSkill path = Path(__file__).parent.parent -with Path.open(path / 'Excel' / 'seele.json', encoding='utf-8') as f: +with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f: skill_dict = json.load(f) diff --git a/StarRailUID/starrailuid_charinfo/effect/Base/WeaponBase.py b/StarRailUID/starrailuid_charinfo/effect/Base/WeaponBase.py index 0b6f0d7..06d732f 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Base/WeaponBase.py +++ b/StarRailUID/starrailuid_charinfo/effect/Base/WeaponBase.py @@ -1,13 +1,24 @@ -from typing import Dict from abc import abstractmethod +from typing import Dict -from mpmath import mp +from msgspec import Struct -from .model import DamageInstanceWeapon -from ....utils.excel.read_excel import EquipmentPromotion +from ....utils.excel.model import EquipmentPromotionConfig from ....utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty +from .model import DamageInstanceWeapon -mp.dps = 14 + +class BaseWeaponAttribute(Struct): + hp: float + attack: float + defence: float + + def items(self): + return [ + ('hp', self.hp), + ('attack', self.attack), + ('defence', self.defence) + ] class BaseWeapon: @@ -16,7 +27,7 @@ class BaseWeapon: self.weapon_level = weapon.level self.weapon_rank = weapon.rank self.weapon_promotion = weapon.promotion - self.weapon_base_attribute = {} + self.weapon_base_attribute = self.get_attribute() self.weapon_attribute = {} self.get_attribute() self.weapon_property_ability() @@ -47,22 +58,25 @@ class BaseWeapon: ... def get_attribute(self): - promotion = EquipmentPromotion[str(self.weapon_id)][ - str(self.weapon_promotion) - ] + promotion = EquipmentPromotionConfig.Equipment[ + str(self.weapon_id) + ][str(self.weapon_promotion)] + print(promotion) - self.weapon_base_attribute['hp'] = mp.mpf( - promotion["BaseHP"]['Value'] - ) + mp.mpf(promotion["BaseHPAdd"]['Value']) * (self.weapon_level - 1) - - self.weapon_base_attribute['attack'] = mp.mpf( - promotion["BaseAttack"]['Value'] - ) + mp.mpf(promotion["BaseAttackAdd"]['Value']) * ( - self.weapon_level - 1 - ) - - self.weapon_base_attribute['defence'] = mp.mpf( - promotion["BaseDefence"]['Value'] - ) + mp.mpf(promotion["BaseDefenceAdd"]['Value']) * ( - self.weapon_level - 1 + return BaseWeaponAttribute( + hp = ( + promotion.BaseHP.Value + + promotion.BaseHPAdd.Value + * (self.weapon_level - 1) + ), + attack = ( + promotion.BaseAttack.Value + + promotion.BaseAttackAdd.Value + * (self.weapon_level - 1) + ), + defence = ( + promotion.BaseDefence.Value + + promotion.BaseDefenceAdd.Value + * (self.weapon_level - 1) + ) ) diff --git a/StarRailUID/starrailuid_charinfo/effect/Base/model.py b/StarRailUID/starrailuid_charinfo/effect/Base/model.py index bb82160..3e033a4 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Base/model.py +++ b/StarRailUID/starrailuid_charinfo/effect/Base/model.py @@ -18,14 +18,14 @@ class DamageInstanceRelicSubAffix(Struct): Name: str Cnt: int Step: int - Value: str + Value: float class DamageInstanceRelicMainAffix(Struct): AffixID: int Property: str Name: str - Value: str + Value: float class DamageInstanceRelic(Struct): diff --git a/StarRailUID/starrailuid_charinfo/effect/Excel/AvatarExtraAbility.json b/StarRailUID/starrailuid_charinfo/effect/Excel/AvatarExtraAbility.json deleted file mode 100644 index a387678..0000000 --- a/StarRailUID/starrailuid_charinfo/effect/Excel/AvatarExtraAbility.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "1102": [ - { - "id": 1102102, - "property": "QuantumResistancePenetration", - "value": 0.2 - } - ] -} diff --git a/StarRailUID/starrailuid_charinfo/effect/Excel/Rank.json b/StarRailUID/starrailuid_charinfo/effect/Excel/Rank.json deleted file mode 100644 index c55e6e2..0000000 --- a/StarRailUID/starrailuid_charinfo/effect/Excel/Rank.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "1102": [ - { - "rank": 1, - "property" :"CriticalDamageBase", - "value": 0.2 - } - ] -} diff --git a/StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json b/StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json new file mode 100644 index 0000000..47a0891 --- /dev/null +++ b/StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json @@ -0,0 +1,604 @@ +{ + "1102": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 1.1000000000931323, 1.2100000001955777, 1.3200000002980232, + 1.4300000004004687, 1.5400000005029142, 1.6500000006053597, + 1.7875000005587935, 1.9250000005122274, 2.0625000002328306, + 2.2000000001862645, 2.31000000028871, 2.4200000003911555, + 2.530000000493601, 2.6400000005960464, 2.750000000698492 + ], + "Ultra": [ + 2.5500000005122274, 2.7200000006705523, 2.890000000828877, + 3.0600000000558794, 3.230000000214204, 3.400000000372529, + 3.612500000745058, 3.825000000419095, 4.037499999860302, + 4.250000000232831, 4.4200000003911555, 4.59000000054948, + 4.760000000707805, 4.93000000086613, 5.100000000093132 + ], + "Talent": [ + 0.40000000037252903, 0.44000000040978193, 0.48000000044703484, + 0.5200000004842877, 0.5600000005215406, 0.6000000005587935, + 0.6500000006053597, 0.7000000006519258, 0.7500000006984919, + 0.8000000007450581, 0.840000000782311, 0.8800000008195639, + 0.9200000008568168, 0.9600000008940697, 1 + ], + "Maze": [20], + "Ultra_Use": [120], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + }, + "1204": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 0.5000000004656613, 0.5500000004656613, 0.6000000005587935, + 0.6500000005587935, 0.7000000006519258, 0.7500000006519258, + 0.8000000007450581, 0.8500000007450581, 0.9000000008381903, + 0.9500000008381903, 1.0000000000931323, 1.0500000000931323, + 1.1000000001862645, 1.1500000001862645, 1.2000000002793968, + 1.2500000002793968 + ], + "Ultra": [ + 1.2000000002793968, 1.2800000002793968, 1.3600000002793968, + 1.4400000002793968, 1.5200000002793968, 1.6000000002793968, + 1.6800000002793968, 1.7600000002793968, 1.8400000002793968, + 1.9200000002793968, 2.0000000002793968, 2.0800000002793968, + 2.1600000002793968, 2.2400000002793968, 2.3200000002793968, + 2.4000000002793968 + ], + "Talent": [ + 3.300000000372529, 3.63000000372529, 3.960000000372529, + 4.290000000372529, 4.620000000372529, 4.495000000372529, + 5.363000000372529, 5.775000000372529, 6.188000000372529, + 6.600000000372529, 6.930000000372529, 7.260000000372529, + 7.590000000372529, 7.920000000372529, 8.250000000372529 + ], + "Maze": [20], + "Ultra_Use": [130], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"], + "Talent": ["attack", "10层神君", 1, "Talent"] + } + }, + "1107": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 0.6000000004656613, 0.6600000004656613, 0.7200000005587935, + 0.7800000005587935, 0.8400000006519258, 0.9000000006519258, + 0.9600000007450581, 1.0200000007450581, 1.0800000008381903, + 1.1400000008381903, 1.2000000000931323, 1.2600000000931323, + 1.3200000001862645, 1.3800000001862645, 1.4400000002793968, + 1.5000000002793968 + ], + "Ultra": [ + 0.9600000002793968, 1.0240000002793968, 1.0880000002793968, + 1.1520000002793968, 1.2160000002793968, 1.2800000002793968, + 1.3600000002793968, 1.4400000002793968, 1.5200000002793968, + 1.6000000002793968, 1.6640000002793968, 1.7280000002793968, + 1.7920000002793968, 1.1850000002793968, 1.9200000002793968 + ], + "Talent": [ + 0.800000000372529, 0.880000000372529, 0.960000000372529, + 1.040000000372529, 1.120000000372529, 1.200000000372529, + 1.300000000372529, 1.400000000372529, 1.500000000372529, + 1.600000000372529, 1.680000000372529, 1.760000000372529, + 1.840000000372529, 1.920000000372529, 2.000000000372529 + ], + "Maze": [20], + "Ultra_Use": [130], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "强化反击", 1, "Ultra"], + "Talent": ["attack", "反击", 1, "Talent"] + } + }, + "1213": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968, 1.3000000002793968 + ], + "Normal1": [ + 1.3000000004656613, 1.5600000005587935, 1.8200000006519258, + 2.0800000007450581, 2.3400000008381903, 2.6000000000931323, + 2.8600000001862645, 3.1200000002793968, 3.3800000002793968 + ], + "Normal2": [ + 1.9000000004656613, 2.2800000005587935, 2.6600000006519258, + 3.0400000007450581, 3.4200000008381903, 3.8000000000931323, + 4.1800000001862645, 4.5600000002793968, 4.9400000002793968 + ], + "Normal3": [ + 2.5000000004656613, 3.0000000005587935, 3.5000000006519258, + 4.0000000007450581, 4.5000000008381903, 5.0000000000931323, + 5.5000000001862645, 6.0000000002793968, 6.5000000002793968 + ], + "BPSkill": [ + 0.0600000004656613, 0.0660000004656613, 0.0720000005587935, + 0.0780000005587935, 0.0840000006519258, 0.0900000006519258, + 0.0975000007450581, 0.1050000007450581, 0.1125000008381903, + 0.1200000008381903, 0.1260000000931323, 0.1320000000931323, + 0.1380000001862645, 0.1440000001862645, 0.1500000002793968, + 0.1560000002793968 + ], + "Ultra": [ + 1.8000000002793968, 1.9200000002793968, 2.0400000002793968, + 2.1600000002793968, 2.2800000002793968, 2.4000000002793968, + 2.5500000002793968, 2.7000000002793968, 2.8500000002793968, + 3.0000000002793968, 3.1200000002793968, 3.2400000002793968, + 3.3600000002793968, 3.4800000002793968, 3.6000000002793968 + ], + "Talent": [ + 0.050000000372529, 0.055000000372529, 0.060000000372529, + 0.065000000372529, 0.070000000372529, 0.075000000372529, + 0.081300000372529, 0.087500000372529, 0.093800000372529, + 0.100000000372529, 0.105000000372529, 0.110000000372529, + 0.115000000372529, 0.120000000372529, 0.125000000372529 + ], + "Maze": [20], + "Ultra_Use": [140], + "skillList": { + "Normal": ["attack", "普攻", 2, "Normal"], + "Normal1": ["attack", "瞬华", 3, "Normal1"], + "Normal2": ["attack", "天矢阴", 5, "Normal2"], + "Normal3": ["attack", "盘拏耀跃", 7, "Normal3"], + "Ultra": ["attack", "终结技", 3, "Ultra"] + } + }, + "1006": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 0.9800000004656613, 1.0790000004656613, 1.1760000005587935, + 1.2740000005587935, 1.3720000006519258, 1.4700000006519258, + 1.5925000007450581, 1.7150000007450581, 1.8375000008381903, + 1.9600000008381903, 2.0580000000931323, 2.1560000000931323, + 2.2540000001862645, 2.3520000001862645, 2.4500000002793968 + ], + "BPSkill_D": [ + 0.075000000372529, 0.077500000372529, 0.080000000372529, + 0.082500000372529, 0.085000000372529, 0.087500000372529, + 0.090600000372529, 0.093800000372529, 0.096900000372529, + 0.100000000372529, 0.102500000372529, 0.105000000372529, + 0.107500000372529, 0.110000000372529, 0.112500000372529 + ], + "Ultra": [ + 2.280000000372529, 2.432000000372529, 2.584000000372529, + 2.736000000372529, 2.888000000372529, 3.040000000372529, + 3.230000000372529, 3.420000000372529, 3.610000000372529, + 3.800000000372529, 3.952000000372529, 4.104000000372529, + 4.256000000372529, 4.408000000372529, 4.560000000372529 + ], + "Ultra_D": [ + 0.360000000372529, 0.369000000372529, 0.378000000372529, + 0.387000000372529, 0.396000000372529, 0.405000000372529, + 0.416300000372529, 0.427500000372529, 0.438800000372529, + 0.450000000372529, 0.459000000372529, 0.468000000372529, + 0.477000000372529, 0.486000000372529, 0.495000000372529 + ], + "Talent": [ + 0.040000000372529, 0.044000000372529, 0.048000000372529, + 0.052000000372529, 0.056000000372529, 0.040000000372529, + 0.060000000372529, 0.065000000372529, 0.070000000372529, + 0.075000000372529, 0.080000000372529, 0.084000000372529, + 0.088000000372529, 0.096000000372529, 0.100000000372529 + ], + "Maze": [20], + "Ultra_Use": [110], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + }, + "1005": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 0.8000000004656613, 0.8800000004656613, 0.9600000005587935, + 1.0400000005587935, 1.1200000006519258, 1.2000000006519258, + 1.3000000007450581, 1.4000000007450581, 1.5000000008381903, + 1.6000000008381903, 1.6800000000931323, 1.7600000000931323, + 1.8400000001862645, 1.9200000001862645, 2.0000000002793968 + ], + "Ultra": [ + 0.480000000372529, 0.512000000372529, 0.544000000372529, + 0.576000000372529, 0.608000000372529, 0.640000000372529, + 0.680000000372529, 0.720000000372529, 0.760000000372529, + 0.800000000372529, 0.832000000372529, 0.864000000372529, + 0.896000000372529, 0.928000000372529, 0.960000000372529 + ], + "DOT": [ + 1.1600000004656613, 1.2688000004656613, 1.3775000005587935, + 1.4863000005587935, 1.5950000006519258, 1.7581000006519258, + 1.9756000007450581, 2.2475000007450581, 2.5738000008381903, + 2.9000000008381903, 3.0414000000931323, 3.1828000000931323, + 3.3241000001862645, 3.4655000001862645, 3.6069000002793968 + ], + "Talent": [ + 0.420000000372529, 0.518000000372529, 0.616000000372529, + 0.714000000372529, 0.812000000372529, 0.910000000372529, + 1.032500000372529, 1.155000000372529, 1.277500000372529, + 1.400000000372529, 1.498000000372529, 1.596000000372529, + 1.694000000372529, 1.792000000372529, 1.890000000372529 + ], + "Maze": [20], + "Ultra_Use": [110], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"], + "DOT": ["attack", "单次持续伤害", 1, "DOT"], + "Talent": ["attack", "追加攻击", 1, "Talent"] + } + }, + "1205": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968, 1.3000000002793968 + ], + "Normal1": [ + 0.2000000004656613, 0.2400000005587935, 0.2800000006519258, + 0.3200000007450581, 0.3600000008381903, 0.4000000000931323, + 0.4400000001862645, 0.4800000002793968, 0.5200000002793968 + ], + "Normal1_HP": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968, 1.3000000002793968 + ], + "BPSkill": [ + 0.1200000004656613, 0.1480000004656613, 0.1760000005587935, + 0.204000000372529, 0.232000000372529, 0.260000000372529, + 0.295000000372529, 0.330000000372529, 0.365000000372529, + 0.400000000372529, 0.428000000372529, 0.456000000372529, + 0.484000000372529, 0.512000000372529, 0.540000000372529 + ], + "Ultra": [ + 0.240000000372529, 0.256000000372529, 0.272000000372529, + 0.288000000372529, 0.304000000372529, 0.320000000372529, + 0.340000000372529, 0.360000000372529, 0.380000000372529, + 0.400000000372529, 0.416000000372529, 0.432000000372529, + 0.448000000372529, 0.464000000372529, 0.480000000372529 + ], + "Ultra_HP": [ + 1.500000000372529, 1.540000000372529, 1.580000000372529, + 1.620000000372529, 1.660000000372529, 1.700000000372529, + 1.750000000372529, 1.800000000372529, 1.850000000372529, + 1.900000000372529, 1.940000000372529, 1.980000000372529, + 2.020000000372529, 2.060000000372529, 2.100000000372529 + ], + "Talent": [ + 0.220000000372529, 0.242000000372529, 0.264000000372529, + 0.286000000372529, 0.308000000372529, 0.330000000372529, + 0.357500000372529, 0.385000000372529, 0.412500000372529, + 0.440000000372529, 0.462000000372529, 0.484000000372529, + 0.506000000372529, 0.528000000372529, 0.550000000372529 + ], + "Talent_HP": [ + 0.550000000372529, 0.605000000372529, 0.660000000372529, + 0.715000000372529, 0.770000000372529, 0.825000000372529, + 0.893800000372529, 0.962500000372529, 1.031300000372529, + 1.100000000372529, 1.155000000372529, 1.210000000372529, + 1.265000000372529, 1.320000000372529, 1.375000000372529 + ], + "Maze": [20], + "Ultra_Use": [110], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "Normal1": ["attack", "无间剑树", 1, "Normal1"], + "Ultra": ["attack", "终结技", 1, "Ultra"], + "Talent": ["attack", "追加攻击", 1, "Talent"] + } + }, + "1208": { + "Normal": [0, 0, 0, 0, 0, 0, 0, 0, 0], + "Normal_HP": [ + 0.2500000004656613, 0.3000000005587935, 0.3500000006519258, + 0.4000000007450581, 0.4500000008381903, 0.5000000000931323, + 0.5500000001862645, 0.6000000002793968, 0.6500000002793968 + ], + "BPSkill_HP": [ + 0.0300000004656613, 0.0330000004656613, 0.0360000005587935, + 0.039000000372529, 0.042000000372529, 0.045000000372529, + 0.048800000372529, 0.052500000372529, 0.056300000372529, + 0.060000000372529, 0.063000000372529, 0.066000000372529, + 0.069000000372529, 0.072000000372529, 0.075000000372529 + ], + "BPSkill_CC": [ + 0.0600000004656613, 0.0660000004656613, 0.0720000005587935, + 0.078000000372529, 0.084000000372529, 0.090000000372529, + 0.097500000372529, 0.105000000372529, 0.112500000372529, + 0.120000000372529, 0.126000000372529, 0.132000000372529, + 0.138000000372529, 0.144000000372529, 0.150000000372529 + ], + "Ultra": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "Ultra_HP": [ + 0.600000000372529, 0.640000000372529, 0.680000000372529, + 0.720000000372529, 0.760000000372529, 0.800000000372529, + 0.850000000372529, 0.900000000372529, 0.950000000372529, + 1.000000000372529, 1.040000000372529, 1.080000000372529, + 1.120000000372529, 1.160000000372529, 1.200000000372529 + ], + "Talent": [ + 0.220000000372529, 0.242000000372529, 0.264000000372529, + 0.286000000372529, 0.308000000372529, 0.330000000372529, + 0.357500000372529, 0.385000000372529, 0.412500000372529, + 0.440000000372529, 0.462000000372529, 0.484000000372529, + 0.506000000372529, 0.528000000372529, 0.550000000372529 + ], + "Maze": [20], + "Ultra_Use": [135], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + }, + "1104": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968, 1.3000000002793968 + ], + "BPSkill": [ + 1.0000000004656613, 1.1000000004656613, 1.2000000005587935, + 1.300000000372529, 1.400000000372529, 1.500000000372529, + 1.625000000372529, 1.750000000372529, 1.875000000372529, + 2.000000000372529, 2.100000000372529, 2.200000000372529, + 2.300000000372529, 2.400000000372529, 2.500000000372529 + ], + "Ultra": [ + 0.300000000372529, 0.318800000372529, 0.337500000372529, + 0.356300000372529, 0.375000000372529, 0.390000000372529, + 0.405000000372529, 0.420000000372529, 0.435000000372529, + 0.450000000372529, 0.465000000372529, 0.480000000372529, + 0.495000000372529, 0.510000000372529, 0.525000000372529 + ], + "Ultra_G": [ + 150, 240, 308, 375, 420, 465, 499, 533, 566, 600, 634, 668, 701, + 735, 769 + ], + "Maze": [20], + "Ultra_Use": [110], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["defence", "终结技(护盾)", 1, "Ultra"] + } + }, + "1209": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 1.1000000000931323, 1.2100000001955777, 1.3200000002980232, + 1.4300000004004687, 1.5400000005029142, 1.6500000006053597, + 1.7875000005587935, 1.9250000005122274, 2.0625000002328306, + 2.2000000001862645, 2.31000000028871, 2.4200000003911555, + 2.530000000493601, 2.6400000005960464, 2.750000000698492 + ], + "Ultra": [ + 2.1000000005122274, 2.2400000006705523, 2.380000000828877, + 2.5200000000558794, 2.660000000214204, 2.800000000372529, + 2.975000000745058, 3.150000000419095, 3.332499999860302, + 3.500000000232831, 3.6400000003911555, 3.78000000054948, + 3.920000000707805, 4.06000000086613, 4.200000000093132 + ], + "Ultra_CD": [ + 0.3000000005122274, 0.3200000006705523, 0.340000000828877, + 0.3600000000558794, 0.380000000214204, 0.400000000372529, + 0.425000000745058, 0.450000000419095, 0.474999999860302, + 0.500000000232831, 0.5200000003911555, 0.54000000054948, + 0.560000000707805, 0.58000000086613, 0.600000000093132 + ], + "Talent": [ + 0.25000000037252903, 0.27500000040978193, 0.30000000044703484, + 0.3250000004842877, 0.3500000005215406, 0.3750000005587935, + 0.4063000006053597, 0.4375000006519258, 0.4688000006984919, + 0.5000000007450581, 0.525000000782311, 0.5500000008195639, + 0.5750000008568168, 0.6000000008940697, 0.6250000008940697 + ], + "Talent_CC": [ + 0.15000000037252903, 0.15500000040978193, 0.16000000044703484, + 0.1650000004842877, 0.1700000005215406, 0.1750000005587935, + 0.1813000006053597, 0.1875000006519258, 0.1938000006984919, + 0.2000000007450581, 0.205000000782311, 0.2100000008195639, + 0.2150000008568168, 0.2200000008940697, 0.2250000008940697 + ], + "Talent_CD": [ + 0.15000000037252903, 0.16500000040978193, 0.18000000044703484, + 0.1950000004842877, 0.2100000005215406, 0.2250000005587935, + 0.2438000006053597, 0.2625000006519258, 0.2813000006984919, + 0.3000000007450581, 0.315000000782311, 0.3300000008195639, + 0.3450000008568168, 0.3600000008940697, 0.3750000008940697 + ], + "Maze": [20], + "Ultra_Use": [120], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"], + "Talent": ["attack", "附加伤害", 1, "Talent"] + } + }, + "1004": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 1.0800000000931323, 1.1880000001955777, 1.2960000002980232, + 1.4040000004004687, 1.5120000005029142, 1.6200000006053597, + 1.7550000005587935, 1.8900000005122274, 2.0550000002328306, + 2.1600000001862645, 2.26800000028871, 2.3760000003911555, + 2.484000000493601, 2.5920000005960464, 2.700000000698492 + ], + "Ultra": [ + 0.9000000005122274, 0.9600000006705523, 1.020000000828877, + 1.0800000000558794, 1.140000000214204, 1.200000000372529, + 1.275000000745058, 1.350000000419095, 1.424999999860302, + 1.500000000232831, 1.5600000003911555, 1.62000000054948, + 1.680000000707805, 1.74000000086613, 1.800000000093132 + ], + "Talent": [ + 0.30000000037252903, 0.33000000040978193, 0.36000000044703484, + 0.3900000004842877, 0.4200000005215406, 0.4500000005587935, + 0.4875000006053597, 0.525000006519258, 0.5625000006984919, + 0.6000000007450581, 0.63000000782311, 0.6600000008195639, + 0.6900000008568168, 0.7200000008940697, 0.7500000008940697 + ], + "Maze": [20], + "Ultra_Use": [120], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 3, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + }, + "1003": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "BPSkill": [ + 1.0000000000931323, 1.1000000001955777, 1.2000000002980232, + 1.3000000004004687, 1.4000000005029142, 1.5000000006053597, + 1.6250000005587935, 1.7500000005122274, 1.8750000002328306, + 2.0000000001862645, 2.10000000028871, 2.2000000003911555, + 2.300000000493601, 2.4000000005960464, 2.500000000698492 + ], + "Ultra": [ + 1.3800000005122274, 1.4720000006705523, 1.564000000828877, + 1.6560000000558794, 1.748000000214204, 1.840000000372529, + 1.955000000745058, 2.070000000419095, 2.185000000860302, + 2.300000000232831, 2.3920000003911555, 2.48400000054948, + 2.596000000707805, 2.66800000086613, 2.76000000093132 + ], + "Talent": [ + 0.70000000037252903, 0.77000000040978193, 0.84000000044703484, + 0.9100000004842877, 0.9800000005215406, 1.0500000005587935, + 1.1375000006053597, 1.225000006519258, 1.312500006984919, + 1.4000000007450581, 1.47000000782311, 1.5400000008195639, + 1.6100000008568168, 1.6800000008940697, 1.7500000008940697 + ], + "Maze": [20], + "Ultra_Use": [120], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "Ultra": ["attack", "终结技", 1, "Ultra"], + "Talent": ["attack", "追加攻击", 1, "Talent"] + } + }, + "1201": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968 + ], + "Normal1": [ + 1.2000000000931323, 1.4400000001955777, 1.6800000002980232, + 1.9200000004004687, 2.1600000005029142, 2.4000000006053597, + 2.6450000005587935, 2.8800000005122274, 3.1200000002328306 + ], + "BPSkill": [ + 0.14000000037252903, 0.15400000040978193, 0.16800000044703484, + 0.1820000004842877, 0.1960000005215406, 0.2100000005587935, + 0.2275000006053597, 0.2450000006519258, 0.2625000006984919, + 0.2800000007450581, 0.294000000782311, 0.3080000008195639, + 0.3220000008568168, 0.3360000008940697, 0.3500000008940697 + ], + "Ultra": [ + 1.2000000005122274, 1.2800000006705523, 1.360000000828877, + 1.440000000558794, 1.520000000214204, 1.600000000372529, + 1.700000000745058, 1.800000000419095, 1.900000000860302, + 2.000000000232831, 2.0800000003911555, 2.16000000054948, + 2.240000000707805, 2.32000000086613, 2.40000000093132 + ], + "Talent": [ + 0.36000000037252903, 0.39600000040978193, 0.43200000044703484, + 0.4680000004842877, 0.5040000005215406, 0.5400000005587935, + 0.5850000006053597, 0.6300000006519258, 0.6750000006984919, + 0.7200000007450581, 0.756000000782311, 0.7920000008195639, + 0.8280000008568168, 0.8640000008940697, 0.9000000008940697 + ], + "Maze": [20], + "Ultra_Use": [140], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "Normal1": ["attack", "杠上开花!", 1, "Normal1"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + }, + "1212": { + "Normal": [ + 0.5000000004656613, 0.6000000005587935, 0.7000000006519258, + 0.8000000007450581, 0.9000000008381903, 1.0000000000931323, + 1.1000000001862645, 1.2000000002793968, 1.3000000002793968 + ], + "BPSkill": [ + 1.0000000005122274, 1.1000000006705523, 1.200000000828877, + 1.300000000558794, 1.400000000214204, 1.500000000372529, + 1.630000000745058, 1.750000000419095, 1.880000000860302, + 2.000000000232831, 2.1000000003911555, 2.20000000054948, + 2.300000000707805, 2.40000000086613, 2.50000000093132 + ], + "BPSkill1": [ + 1.2000000005122274, 1.3200000006705523, 1.440000000828877, + 1.560000000558794, 1.680000000214204, 1.800000000372529, + 1.950000000745058, 2.100000000419095, 2.250000000860302, + 2.400000000232831, 2.5200000003911555, 2.64000000054948, + 2.760000000707805, 2.88000000086613, 3.00000000093132 + ], + "Ultra": [ + 1.8000000005122274, 1.9200000006705523, 2.040000000828877, + 2.160000000558794, 2.280000000214204, 2.400000000372529, + 2.550000000745058, 2.700000000419095, 2.850000000860302, + 3.000000000232831, 3.1200000003911555, 3.24000000054948, + 3.360000000707805, 3.48000000086613, 3.60000000093132 + ], + "Talent": [ + 0.60000000037252903, 0.66000000040978193, 0.72000000044703484, + 0.7800000004842877, 0.8400000005215406, 0.9000000005587935, + 0.9800000006053597, 1.0500000006519258, 1.1200000006984919, + 1.2000000007450581, 1.260000000782311, 1.3200000008195639, + 1.3800000008568168, 1.4400000008940697, 1.5000000008940697 + ], + "Maze": [20], + "Ultra_Use": [140], + "skillList": { + "Normal": ["attack", "普攻", 1, "Normal"], + "BPSkill": ["attack", "战技", 1, "BPSkill"], + "BPSkill1": ["attack", "寒川映月", 1, "BPSkill1"], + "Ultra": ["attack", "终结技", 1, "Ultra"] + } + } +} diff --git a/StarRailUID/starrailuid_charinfo/effect/Excel/seele.json b/StarRailUID/starrailuid_charinfo/effect/Excel/seele.json deleted file mode 100644 index 03530ac..0000000 --- a/StarRailUID/starrailuid_charinfo/effect/Excel/seele.json +++ /dev/null @@ -1,1320 +0,0 @@ -{ - "1102": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 1.1000000000931323, - 1.2100000001955777, - 1.3200000002980232, - 1.4300000004004687, - 1.5400000005029142, - 1.6500000006053597, - 1.7875000005587935, - 1.9250000005122274, - 2.0625000002328306, - 2.2000000001862645, - 2.31000000028871, - 2.4200000003911555, - 2.530000000493601, - 2.6400000005960464, - 2.750000000698492 - ], - "Ultra": [ - 2.5500000005122274, - 2.7200000006705523, - 2.890000000828877, - 3.0600000000558794, - 3.230000000214204, - 3.400000000372529, - 3.612500000745058, - 3.825000000419095, - 4.037499999860302, - 4.250000000232831, - 4.4200000003911555, - 4.59000000054948, - 4.760000000707805, - 4.93000000086613, - 5.100000000093132 - ], - "Talent": [ - 0.40000000037252903, - 0.44000000040978193, - 0.48000000044703484, - 0.5200000004842877, - 0.5600000005215406, - 0.6000000005587935, - 0.6500000006053597, - 0.7000000006519258, - 0.7500000006984919, - 0.8000000007450581, - 0.840000000782311, - 0.8800000008195639, - 0.9200000008568168, - 0.9600000008940697, - 1 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 120 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - }, - "1204": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 0.5000000004656613, - 0.5500000004656613, - 0.6000000005587935, - 0.6500000005587935, - 0.7000000006519258, - 0.7500000006519258, - 0.8000000007450581, - 0.8500000007450581, - 0.9000000008381903, - 0.9500000008381903, - 1.0000000000931323, - 1.0500000000931323, - 1.1000000001862645, - 1.1500000001862645, - 1.2000000002793968, - 1.2500000002793968 - ], - "Ultra": [ - 1.2000000002793968, - 1.2800000002793968, - 1.3600000002793968, - 1.4400000002793968, - 1.5200000002793968, - 1.6000000002793968, - 1.6800000002793968, - 1.7600000002793968, - 1.8400000002793968, - 1.9200000002793968, - 2.0000000002793968, - 2.0800000002793968, - 2.1600000002793968, - 2.2400000002793968, - 2.3200000002793968, - 2.4000000002793968 - ], - "Talent": [ - 3.3000000003725290, - 3.6300000037252900, - 3.9600000003725290, - 4.2900000003725290, - 4.6200000003725290, - 4.4950000003725290, - 5.3630000003725290, - 5.7750000003725290, - 6.1880000003725290, - 6.6000000003725290, - 6.9300000003725290, - 7.2600000003725290, - 7.5900000003725290, - 7.9200000003725290, - 8.2500000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 130 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"], - "Talent": ["attack","10层神君", 1, "Talent"] - } - }, - "1107": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 0.6000000004656613, - 0.6600000004656613, - 0.7200000005587935, - 0.7800000005587935, - 0.8400000006519258, - 0.9000000006519258, - 0.9600000007450581, - 1.0200000007450581, - 1.0800000008381903, - 1.1400000008381903, - 1.2000000000931323, - 1.2600000000931323, - 1.3200000001862645, - 1.3800000001862645, - 1.4400000002793968, - 1.5000000002793968 - ], - "Ultra": [ - 0.9600000002793968, - 1.0240000002793968, - 1.0880000002793968, - 1.1520000002793968, - 1.2160000002793968, - 1.2800000002793968, - 1.3600000002793968, - 1.4400000002793968, - 1.5200000002793968, - 1.6000000002793968, - 1.6640000002793968, - 1.7280000002793968, - 1.7920000002793968, - 1.1850000002793968, - 1.9200000002793968 - ], - "Talent": [ - 0.8000000003725290, - 0.8800000003725290, - 0.9600000003725290, - 1.0400000003725290, - 1.1200000003725290, - 1.2000000003725290, - 1.3000000003725290, - 1.4000000003725290, - 1.5000000003725290, - 1.6000000003725290, - 1.6800000003725290, - 1.7600000003725290, - 1.8400000003725290, - 1.9200000003725290, - 2.0000000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 130 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","强化反击", 1, "Ultra"], - "Talent": ["attack","反击", 1, "Talent"] - } - }, - "1213": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968, - 1.3000000002793968 - ], - "Normal1": [ - 1.3000000004656613, - 1.5600000005587935, - 1.8200000006519258, - 2.0800000007450581, - 2.3400000008381903, - 2.6000000000931323, - 2.8600000001862645, - 3.1200000002793968, - 3.3800000002793968 - ], - "Normal2": [ - 1.9000000004656613, - 2.2800000005587935, - 2.6600000006519258, - 3.0400000007450581, - 3.4200000008381903, - 3.8000000000931323, - 4.1800000001862645, - 4.5600000002793968, - 4.9400000002793968 - ], - "Normal3": [ - 2.5000000004656613, - 3.0000000005587935, - 3.5000000006519258, - 4.0000000007450581, - 4.5000000008381903, - 5.0000000000931323, - 5.5000000001862645, - 6.0000000002793968, - 6.5000000002793968 - ], - "BPSkill": [ - 0.0600000004656613, - 0.0660000004656613, - 0.0720000005587935, - 0.0780000005587935, - 0.0840000006519258, - 0.0900000006519258, - 0.0975000007450581, - 0.1050000007450581, - 0.1125000008381903, - 0.1200000008381903, - 0.1260000000931323, - 0.1320000000931323, - 0.1380000001862645, - 0.1440000001862645, - 0.1500000002793968, - 0.1560000002793968 - ], - "Ultra": [ - 1.8000000002793968, - 1.9200000002793968, - 2.0400000002793968, - 2.1600000002793968, - 2.2800000002793968, - 2.4000000002793968, - 2.5500000002793968, - 2.7000000002793968, - 2.8500000002793968, - 3.0000000002793968, - 3.1200000002793968, - 3.2400000002793968, - 3.3600000002793968, - 3.4800000002793968, - 3.6000000002793968 - ], - "Talent": [ - 0.0500000003725290, - 0.0550000003725290, - 0.0600000003725290, - 0.0650000003725290, - 0.0700000003725290, - 0.0750000003725290, - 0.0813000003725290, - 0.0875000003725290, - 0.0938000003725290, - 0.1000000003725290, - 0.1050000003725290, - 0.1100000003725290, - 0.1150000003725290, - 0.1200000003725290, - 0.1250000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 140 - ], - "skilllist": { - "Normal": ["attack","普攻", 2, "Normal"], - "Normal1": ["attack","瞬华", 3, "Normal1"], - "Normal2": ["attack","天矢阴", 5, "Normal2"], - "Normal3": ["attack","盘拏耀跃", 7, "Normal3"], - "Ultra": ["attack","终结技", 3, "Ultra"] - } - }, - "1006": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 0.9800000004656613, - 1.0790000004656613, - 1.1760000005587935, - 1.2740000005587935, - 1.3720000006519258, - 1.4700000006519258, - 1.5925000007450581, - 1.7150000007450581, - 1.8375000008381903, - 1.9600000008381903, - 2.0580000000931323, - 2.1560000000931323, - 2.2540000001862645, - 2.3520000001862645, - 2.4500000002793968 - ], - "BPSkill_D": [ - 0.0750000003725290, - 0.0775000003725290, - 0.0800000003725290, - 0.0825000003725290, - 0.0850000003725290, - 0.0875000003725290, - 0.0906000003725290, - 0.0938000003725290, - 0.0969000003725290, - 0.1000000003725290, - 0.1025000003725290, - 0.1050000003725290, - 0.1075000003725290, - 0.1100000003725290, - 0.1125000003725290 - ], - "Ultra": [ - 2.2800000003725290, - 2.4320000003725290, - 2.5840000003725290, - 2.7360000003725290, - 2.8880000003725290, - 3.0400000003725290, - 3.2300000003725290, - 3.4200000003725290, - 3.6100000003725290, - 3.8000000003725290, - 3.9520000003725290, - 4.1040000003725290, - 4.2560000003725290, - 4.4080000003725290, - 4.5600000003725290 - ], - "Ultra_D": [ - 0.3600000003725290, - 0.3690000003725290, - 0.3780000003725290, - 0.3870000003725290, - 0.3960000003725290, - 0.4050000003725290, - 0.4163000003725290, - 0.4275000003725290, - 0.4388000003725290, - 0.4500000003725290, - 0.4590000003725290, - 0.4680000003725290, - 0.4770000003725290, - 0.4860000003725290, - 0.4950000003725290 - ], - "Talent": [ - 0.0400000003725290, - 0.0440000003725290, - 0.0480000003725290, - 0.0520000003725290, - 0.0560000003725290, - 0.0400000003725290, - 0.0600000003725290, - 0.0650000003725290, - 0.0700000003725290, - 0.0750000003725290, - 0.0800000003725290, - 0.0840000003725290, - 0.0880000003725290, - 0.0960000003725290, - 0.1000000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 110 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - }, - "1005": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 0.8000000004656613, - 0.8800000004656613, - 0.9600000005587935, - 1.0400000005587935, - 1.1200000006519258, - 1.2000000006519258, - 1.3000000007450581, - 1.4000000007450581, - 1.5000000008381903, - 1.6000000008381903, - 1.6800000000931323, - 1.7600000000931323, - 1.8400000001862645, - 1.9200000001862645, - 2.0000000002793968 - ], - "Ultra": [ - 0.4800000003725290, - 0.5120000003725290, - 0.5440000003725290, - 0.5760000003725290, - 0.6080000003725290, - 0.6400000003725290, - 0.6800000003725290, - 0.7200000003725290, - 0.7600000003725290, - 0.8000000003725290, - 0.8320000003725290, - 0.8640000003725290, - 0.8960000003725290, - 0.9280000003725290, - 0.9600000003725290 - ], - "DOT": [ - 1.1600000004656613, - 1.2688000004656613, - 1.3775000005587935, - 1.4863000005587935, - 1.5950000006519258, - 1.7581000006519258, - 1.9756000007450581, - 2.2475000007450581, - 2.5738000008381903, - 2.9000000008381903, - 3.0414000000931323, - 3.1828000000931323, - 3.3241000001862645, - 3.4655000001862645, - 3.6069000002793968 - ], - "Talent": [ - 0.4200000003725290, - 0.5180000003725290, - 0.6160000003725290, - 0.7140000003725290, - 0.8120000003725290, - 0.9100000003725290, - 1.0325000003725290, - 1.1550000003725290, - 1.2775000003725290, - 1.4000000003725290, - 1.4980000003725290, - 1.5960000003725290, - 1.6940000003725290, - 1.7920000003725290, - 1.8900000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 110 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"], - "DOT": ["attack","单次持续伤害", 1, "DOT"], - "Talent": ["attack","追加攻击", 1, "Talent"] - } - }, - "1205": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968, - 1.3000000002793968 - ], - "Normal1": [ - 0.2000000004656613, - 0.2400000005587935, - 0.2800000006519258, - 0.3200000007450581, - 0.3600000008381903, - 0.4000000000931323, - 0.4400000001862645, - 0.4800000002793968, - 0.5200000002793968 - ], - "Normal1_HP": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968, - 1.3000000002793968 - ], - "BPSkill": [ - 0.1200000004656613, - 0.1480000004656613, - 0.1760000005587935, - 0.2040000003725290, - 0.2320000003725290, - 0.2600000003725290, - 0.2950000003725290, - 0.3300000003725290, - 0.3650000003725290, - 0.4000000003725290, - 0.4280000003725290, - 0.4560000003725290, - 0.4840000003725290, - 0.5120000003725290, - 0.5400000003725290 - ], - "Ultra": [ - 0.2400000003725290, - 0.2560000003725290, - 0.2720000003725290, - 0.2880000003725290, - 0.3040000003725290, - 0.3200000003725290, - 0.3400000003725290, - 0.3600000003725290, - 0.3800000003725290, - 0.4000000003725290, - 0.4160000003725290, - 0.4320000003725290, - 0.4480000003725290, - 0.4640000003725290, - 0.4800000003725290 - ], - "Ultra_HP": [ - 1.5000000003725290, - 1.5400000003725290, - 1.5800000003725290, - 1.6200000003725290, - 1.6600000003725290, - 1.7000000003725290, - 1.7500000003725290, - 1.8000000003725290, - 1.8500000003725290, - 1.9000000003725290, - 1.9400000003725290, - 1.9800000003725290, - 2.0200000003725290, - 2.0600000003725290, - 2.1000000003725290 - ], - "Talent": [ - 0.2200000003725290, - 0.2420000003725290, - 0.2640000003725290, - 0.2860000003725290, - 0.3080000003725290, - 0.3300000003725290, - 0.3575000003725290, - 0.3850000003725290, - 0.4125000003725290, - 0.4400000003725290, - 0.4620000003725290, - 0.4840000003725290, - 0.5060000003725290, - 0.5280000003725290, - 0.5500000003725290 - ], - "Talent_HP": [ - 0.5500000003725290, - 0.6050000003725290, - 0.6600000003725290, - 0.7150000003725290, - 0.7700000003725290, - 0.8250000003725290, - 0.8938000003725290, - 0.9625000003725290, - 1.0313000003725290, - 1.1000000003725290, - 1.1550000003725290, - 1.2100000003725290, - 1.2650000003725290, - 1.3200000003725290, - 1.3750000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 110 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "Normal1": ["attack","无间剑树", 1, "Normal1"], - "Ultra": ["attack","终结技", 1, "Ultra"], - "Talent": ["attack","追加攻击", 1, "Talent"] - } - }, - "1208": { - "Normal": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "Normal_HP": [ - 0.2500000004656613, - 0.3000000005587935, - 0.3500000006519258, - 0.4000000007450581, - 0.4500000008381903, - 0.5000000000931323, - 0.5500000001862645, - 0.6000000002793968, - 0.6500000002793968 - ], - "BPSkill_HP": [ - 0.0300000004656613, - 0.0330000004656613, - 0.0360000005587935, - 0.0390000003725290, - 0.0420000003725290, - 0.0450000003725290, - 0.0488000003725290, - 0.0525000003725290, - 0.0563000003725290, - 0.0600000003725290, - 0.0630000003725290, - 0.0660000003725290, - 0.0690000003725290, - 0.0720000003725290, - 0.0750000003725290 - ], - "BPSkill_CC": [ - 0.0600000004656613, - 0.0660000004656613, - 0.0720000005587935, - 0.0780000003725290, - 0.0840000003725290, - 0.0900000003725290, - 0.0975000003725290, - 0.1050000003725290, - 0.1125000003725290, - 0.1200000003725290, - 0.1260000003725290, - 0.1320000003725290, - 0.1380000003725290, - 0.1440000003725290, - 0.1500000003725290 - ], - "Ultra": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "Ultra_HP": [ - 0.6000000003725290, - 0.6400000003725290, - 0.6800000003725290, - 0.7200000003725290, - 0.7600000003725290, - 0.8000000003725290, - 0.8500000003725290, - 0.9000000003725290, - 0.9500000003725290, - 1.0000000003725290, - 1.0400000003725290, - 1.0800000003725290, - 1.1200000003725290, - 1.1600000003725290, - 1.2000000003725290 - ], - "Talent": [ - 0.2200000003725290, - 0.2420000003725290, - 0.2640000003725290, - 0.2860000003725290, - 0.3080000003725290, - 0.3300000003725290, - 0.3575000003725290, - 0.3850000003725290, - 0.4125000003725290, - 0.4400000003725290, - 0.4620000003725290, - 0.4840000003725290, - 0.5060000003725290, - 0.5280000003725290, - 0.5500000003725290 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 135 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - }, - "1104": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968, - 1.3000000002793968 - ], - "BPSkill": [ - 1.0000000004656613, - 1.1000000004656613, - 1.2000000005587935, - 1.3000000003725290, - 1.4000000003725290, - 1.5000000003725290, - 1.6250000003725290, - 1.7500000003725290, - 1.8750000003725290, - 2.0000000003725290, - 2.1000000003725290, - 2.2000000003725290, - 2.3000000003725290, - 2.4000000003725290, - 2.5000000003725290 - ], - "Ultra": [ - 0.3000000003725290, - 0.3188000003725290, - 0.3375000003725290, - 0.3563000003725290, - 0.3750000003725290, - 0.3900000003725290, - 0.4050000003725290, - 0.4200000003725290, - 0.4350000003725290, - 0.4500000003725290, - 0.4650000003725290, - 0.4800000003725290, - 0.4950000003725290, - 0.5100000003725290, - 0.5250000003725290 - ], - "Ultra_G": [ - 150, - 240, - 308, - 375, - 420, - 465, - 499, - 533, - 566, - 600, - 634, - 668, - 701, - 735, - 769 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 110 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["defence","终结技(护盾)", 1, "Ultra"] - } - }, - "1209": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 1.1000000000931323, - 1.2100000001955777, - 1.3200000002980232, - 1.4300000004004687, - 1.5400000005029142, - 1.6500000006053597, - 1.7875000005587935, - 1.9250000005122274, - 2.0625000002328306, - 2.2000000001862645, - 2.31000000028871, - 2.4200000003911555, - 2.530000000493601, - 2.6400000005960464, - 2.750000000698492 - ], - "Ultra": [ - 2.1000000005122274, - 2.2400000006705523, - 2.380000000828877, - 2.5200000000558794, - 2.660000000214204, - 2.800000000372529, - 2.975000000745058, - 3.150000000419095, - 3.332499999860302, - 3.500000000232831, - 3.6400000003911555, - 3.78000000054948, - 3.920000000707805, - 4.06000000086613, - 4.200000000093132 - ], - "Ultra_CD": [ - 0.3000000005122274, - 0.3200000006705523, - 0.340000000828877, - 0.3600000000558794, - 0.380000000214204, - 0.400000000372529, - 0.425000000745058, - 0.450000000419095, - 0.474999999860302, - 0.500000000232831, - 0.5200000003911555, - 0.54000000054948, - 0.560000000707805, - 0.58000000086613, - 0.600000000093132 - ], - "Talent": [ - 0.25000000037252903, - 0.27500000040978193, - 0.30000000044703484, - 0.3250000004842877, - 0.3500000005215406, - 0.3750000005587935, - 0.4063000006053597, - 0.4375000006519258, - 0.4688000006984919, - 0.5000000007450581, - 0.525000000782311, - 0.5500000008195639, - 0.5750000008568168, - 0.6000000008940697, - 0.6250000008940697 - ], - "Talent_CC": [ - 0.15000000037252903, - 0.15500000040978193, - 0.16000000044703484, - 0.1650000004842877, - 0.1700000005215406, - 0.1750000005587935, - 0.1813000006053597, - 0.1875000006519258, - 0.1938000006984919, - 0.2000000007450581, - 0.205000000782311, - 0.2100000008195639, - 0.2150000008568168, - 0.2200000008940697, - 0.2250000008940697 - ], - "Talent_CD": [ - 0.15000000037252903, - 0.16500000040978193, - 0.18000000044703484, - 0.1950000004842877, - 0.2100000005215406, - 0.2250000005587935, - 0.2438000006053597, - 0.2625000006519258, - 0.2813000006984919, - 0.3000000007450581, - 0.315000000782311, - 0.3300000008195639, - 0.3450000008568168, - 0.3600000008940697, - 0.3750000008940697 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 120 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"], - "Talent": ["attack","附加伤害", 1, "Talent"] - } - }, - "1004": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 1.0800000000931323, - 1.1880000001955777, - 1.2960000002980232, - 1.4040000004004687, - 1.5120000005029142, - 1.6200000006053597, - 1.7550000005587935, - 1.8900000005122274, - 2.0550000002328306, - 2.1600000001862645, - 2.26800000028871, - 2.3760000003911555, - 2.484000000493601, - 2.5920000005960464, - 2.700000000698492 - ], - "Ultra": [ - 0.9000000005122274, - 0.9600000006705523, - 1.020000000828877, - 1.0800000000558794, - 1.140000000214204, - 1.200000000372529, - 1.275000000745058, - 1.350000000419095, - 1.424999999860302, - 1.500000000232831, - 1.5600000003911555, - 1.62000000054948, - 1.680000000707805, - 1.74000000086613, - 1.800000000093132 - ], - "Talent": [ - 0.30000000037252903, - 0.33000000040978193, - 0.36000000044703484, - 0.3900000004842877, - 0.4200000005215406, - 0.4500000005587935, - 0.4875000006053597, - 0.525000006519258, - 0.5625000006984919, - 0.6000000007450581, - 0.63000000782311, - 0.6600000008195639, - 0.6900000008568168, - 0.7200000008940697, - 0.7500000008940697 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 120 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 3, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - }, - "1003": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "BPSkill": [ - 1.0000000000931323, - 1.1000000001955777, - 1.2000000002980232, - 1.3000000004004687, - 1.4000000005029142, - 1.5000000006053597, - 1.6250000005587935, - 1.7500000005122274, - 1.8750000002328306, - 2.0000000001862645, - 2.10000000028871, - 2.2000000003911555, - 2.300000000493601, - 2.4000000005960464, - 2.500000000698492 - ], - "Ultra": [ - 1.3800000005122274, - 1.4720000006705523, - 1.564000000828877, - 1.6560000000558794, - 1.748000000214204, - 1.840000000372529, - 1.955000000745058, - 2.070000000419095, - 2.185000000860302, - 2.300000000232831, - 2.3920000003911555, - 2.48400000054948, - 2.596000000707805, - 2.66800000086613, - 2.76000000093132 - ], - "Talent": [ - 0.70000000037252903, - 0.77000000040978193, - 0.84000000044703484, - 0.9100000004842877, - 0.9800000005215406, - 1.0500000005587935, - 1.1375000006053597, - 1.225000006519258, - 1.312500006984919, - 1.4000000007450581, - 1.47000000782311, - 1.5400000008195639, - 1.6100000008568168, - 1.6800000008940697, - 1.7500000008940697 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 120 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "Ultra": ["attack","终结技", 1, "Ultra"], - "Talent": ["attack","追加攻击", 1, "Talent"] - } - }, - "1201": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968 - ], - "Normal1": [ - 1.2000000000931323, - 1.4400000001955777, - 1.6800000002980232, - 1.9200000004004687, - 2.1600000005029142, - 2.4000000006053597, - 2.6450000005587935, - 2.8800000005122274, - 3.1200000002328306 - ], - "BPSkill": [ - 0.14000000037252903, - 0.15400000040978193, - 0.16800000044703484, - 0.1820000004842877, - 0.1960000005215406, - 0.2100000005587935, - 0.2275000006053597, - 0.2450000006519258, - 0.2625000006984919, - 0.2800000007450581, - 0.294000000782311, - 0.3080000008195639, - 0.3220000008568168, - 0.3360000008940697, - 0.3500000008940697 - ], - "Ultra": [ - 1.2000000005122274, - 1.2800000006705523, - 1.360000000828877, - 1.440000000558794, - 1.520000000214204, - 1.600000000372529, - 1.700000000745058, - 1.800000000419095, - 1.900000000860302, - 2.000000000232831, - 2.0800000003911555, - 2.16000000054948, - 2.240000000707805, - 2.32000000086613, - 2.40000000093132 - ], - "Talent": [ - 0.36000000037252903, - 0.39600000040978193, - 0.43200000044703484, - 0.4680000004842877, - 0.5040000005215406, - 0.5400000005587935, - 0.5850000006053597, - 0.6300000006519258, - 0.6750000006984919, - 0.7200000007450581, - 0.756000000782311, - 0.7920000008195639, - 0.8280000008568168, - 0.8640000008940697, - 0.9000000008940697 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 140 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "Normal1": ["attack","杠上开花!", 1, "Normal1"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - }, - "1212": { - "Normal": [ - 0.5000000004656613, - 0.6000000005587935, - 0.7000000006519258, - 0.8000000007450581, - 0.9000000008381903, - 1.0000000000931323, - 1.1000000001862645, - 1.2000000002793968, - 1.3000000002793968 - ], - "BPSkill": [ - 1.0000000005122274, - 1.1000000006705523, - 1.200000000828877, - 1.300000000558794, - 1.400000000214204, - 1.500000000372529, - 1.630000000745058, - 1.750000000419095, - 1.880000000860302, - 2.000000000232831, - 2.1000000003911555, - 2.20000000054948, - 2.300000000707805, - 2.40000000086613, - 2.50000000093132 - ], - "BPSkill1": [ - 1.2000000005122274, - 1.3200000006705523, - 1.440000000828877, - 1.560000000558794, - 1.680000000214204, - 1.800000000372529, - 1.950000000745058, - 2.100000000419095, - 2.250000000860302, - 2.400000000232831, - 2.5200000003911555, - 2.64000000054948, - 2.760000000707805, - 2.88000000086613, - 3.00000000093132 - ], - "Ultra": [ - 1.8000000005122274, - 1.9200000006705523, - 2.040000000828877, - 2.160000000558794, - 2.280000000214204, - 2.400000000372529, - 2.550000000745058, - 2.700000000419095, - 2.850000000860302, - 3.000000000232831, - 3.1200000003911555, - 3.24000000054948, - 3.360000000707805, - 3.48000000086613, - 3.60000000093132 - ], - "Talent": [ - 0.60000000037252903, - 0.66000000040978193, - 0.72000000044703484, - 0.7800000004842877, - 0.8400000005215406, - 0.9000000005587935, - 0.9800000006053597, - 1.0500000006519258, - 1.1200000006984919, - 1.2000000007450581, - 1.260000000782311, - 1.3200000008195639, - 1.3800000008568168, - 1.4400000008940697, - 1.5000000008940697 - ], - "Maze": [ - 20 - ], - "Ultra_Use": [ - 140 - ], - "skilllist": { - "Normal": ["attack","普攻", 1, "Normal"], - "BPSkill": ["attack","战技", 1, "BPSkill"], - "BPSkill1": ["attack","寒川映月", 1, "BPSkill1"], - "Ultra": ["attack","终结技", 1, "Ultra"] - } - } -} diff --git a/StarRailUID/starrailuid_charinfo/effect/Relic/Relic.py b/StarRailUID/starrailuid_charinfo/effect/Relic/Relic.py index a753f38..95ab70b 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Relic/Relic.py +++ b/StarRailUID/starrailuid_charinfo/effect/Relic/Relic.py @@ -1,12 +1,11 @@ -from typing import Dict, List from collections import Counter +from typing import Dict, List -from mpmath import mp from gsuid_core.logger import logger -from ..utils import merge_attribute from ..Base.model import DamageInstanceRelic -from ..Base.RelicBase import SingleRelic, BaseRelicSetSkill +from ..Base.RelicBase import BaseRelicSetSkill, SingleRelic +from ..utils import merge_attribute class Relic101(BaseRelicSetSkill): @@ -40,9 +39,7 @@ class Relic102(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces4 and await self.check(base_attr, attribute_bonus): a_dmg = attribute_bonus.get('NormalDmgAdd', 0) - attribute_bonus['NormalDmgAdd'] = a_dmg + mp.mpf( - 0.10000000018626451 - ) + attribute_bonus['NormalDmgAdd'] = a_dmg + 0.10000000018626451 return attribute_bonus @@ -62,7 +59,7 @@ class Relic103(BaseRelicSetSkill): shield_added_ratio = attribute_bonus.get('shield_added_ratio', 0) attribute_bonus[ 'shield_added_ratio' - ] = shield_added_ratio + mp.mpf(0.20000000018626451) + ] = shield_added_ratio + 0.20000000018626451 return attribute_bonus @@ -82,7 +79,7 @@ class Relic104(BaseRelicSetSkill): critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0) attribute_bonus[ 'CriticalDamageBase' - ] = critical_damage_base + mp.mpf(0.25000000023283064) + ] = critical_damage_base + 0.25000000023283064 return attribute_bonus @@ -100,9 +97,7 @@ class Relic105(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces4 and await self.check(base_attr, attribute_bonus): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = ( - attack_added_ratio + mp.mpf(0.05000000004656613) * 5 - ) + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.05000000004656613 * 5 return attribute_bonus @@ -138,17 +133,11 @@ class Relic107(BaseRelicSetSkill): if self.pieces4: e_dmg = attribute_bonus.get('BPSkillDmgAdd', {}) q_dmg = attribute_bonus.get('UltraSkillDmgAdd', {}) - attribute_bonus['BPSkillDmgAdd'] = e_dmg + mp.mpf( - 0.12000000011175871 - ) - attribute_bonus['UltraSkillDmgAdd'] = q_dmg + mp.mpf( - 0.12000000011175871 - ) + attribute_bonus['BPSkillDmgAdd'] = e_dmg + 0.12000000011175871 + attribute_bonus['UltraSkillDmgAdd'] = q_dmg + 0.12000000011175871 if self.pieces4 and await self.check(base_attr, attribute_bonus): fire_added_ratio = attribute_bonus.get('FireAddedRatio', {}) - attribute_bonus['FireAddedRatio'] = fire_added_ratio + mp.mpf( - 0.12000000011175871 - ) + attribute_bonus['FireAddedRatio'] = fire_added_ratio + 0.12000000011175871 return attribute_bonus @@ -168,9 +157,7 @@ class Relic108(BaseRelicSetSkill): if self.pieces4 and await self.check(base_attr, attribute_bonus): logger.info(attribute_bonus) ignore_defence = attribute_bonus.get('ignore_defence', 0) - attribute_bonus['ignore_defence'] = ( - ignore_defence + mp.mpf(0.10000000009313226) * 2 - ) + attribute_bonus['ignore_defence'] = ignore_defence + 0.10000000009313226 * 2 return attribute_bonus @@ -189,9 +176,7 @@ class Relic109(BaseRelicSetSkill): if self.pieces4 and await self.check(base_attr, attribute_bonus): logger.info(attribute_bonus) attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - 0.20000000018626451 - ) + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.20000000018626451 return attribute_bonus @@ -251,13 +236,13 @@ class Relic112(BaseRelicSetSkill): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf(0.10000000009313226) + ] = critical_chance_base + 0.10000000009313226 if self.pieces4 and await self.check(base_attr, attribute_bonus): logger.info('对陷入禁锢状态的敌方目标造成伤害') critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0) attribute_bonus[ 'CriticalDamageBase' - ] = critical_damage_base + mp.mpf(0.20000000018626451) + ] = critical_damage_base + 0.20000000018626451 return attribute_bonus @@ -277,9 +262,7 @@ class Relic113(BaseRelicSetSkill): if self.pieces4 and await self.check(base_attr, attribute_bonus): logger.info('当装备者受到攻击或被我方目标消耗生命值后') critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) - attribute_bonus['CriticalChanceBase'] = ( - critical_chance_base + mp.mpf(0.08000000009313226) * 2 - ) + attribute_bonus['CriticalChanceBase'] = critical_chance_base + 0.08000000009313226 * 2 return attribute_bonus @@ -298,9 +281,7 @@ class Relic114(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces4 and await self.check(base_attr, attribute_bonus): speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0) - attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + mp.mpf( - 0.12000000011175871 - ) + attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + 0.12000000011175871 return attribute_bonus @@ -313,7 +294,7 @@ class Relic301(BaseRelicSetSkill): 装备者的速度大于等于120 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['speed'] >= mp.mpf(120): + if merged_attr['speed'] >= 120: logger.info('Relic306 check success') return True return None @@ -321,9 +302,7 @@ class Relic301(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces2 and await self.check(base_attr, attribute_bonus): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - 0.12000000011175871 - ) + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.12000000011175871 return attribute_bonus @@ -336,7 +315,7 @@ class Relic302(BaseRelicSetSkill): 装备者的速度大于等于120 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['speed'] >= mp.mpf(120): + if merged_attr['speed'] >= 120: logger.info('Relic306 check success') return True return None @@ -344,9 +323,7 @@ class Relic302(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces2 and await self.check(base_attr, attribute_bonus): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - 0.0800000000745058 - ) + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.0800000000745058 return attribute_bonus @@ -365,8 +342,8 @@ class Relic303(BaseRelicSetSkill): status_probability = merged_attr.get('StatusProbabilityBase', 0) # 提高装备者等同于当前效果命中25%的攻击力,最多提高25% attribute_bonus['AttackAddedRatio'] = attack_added_ratio + min( - mp.mpf(0.25000000023283064), status_probability / mp.mpf(0.25) - ) + 0.25000000023283064, status_probability / 0.25 + ) return attribute_bonus @@ -379,7 +356,7 @@ class Relic304(BaseRelicSetSkill): 备者的效果命中大于等于50% ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['StatusResistanceBase'] >= mp.mpf(0.5000000004656613): + if merged_attr['StatusResistanceBase'] >= 0.5000000004656613: logger.info('Relic306 check success') return True return None @@ -389,7 +366,7 @@ class Relic304(BaseRelicSetSkill): defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0) attribute_bonus[ 'DefenceAddedRatio' - ] = defence_added_ratio + mp.mpf(0.1500000001396984) + ] = defence_added_ratio + 0.1500000001396984 return attribute_bonus @@ -402,7 +379,7 @@ class Relic305(BaseRelicSetSkill): 装备者的暴击伤害大于等于120% ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['CriticalDamageBase'] >= mp.mpf(1.2000000001862645): + if merged_attr['CriticalDamageBase'] >= 1.2000000001862645: logger.info('Relic306 check success') return True return None @@ -412,7 +389,7 @@ class Relic305(BaseRelicSetSkill): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf(0.6000000005587935) + ] = critical_chance_base + 0.6000000005587935 return attribute_bonus @@ -425,7 +402,7 @@ class Relic306(BaseRelicSetSkill): 装备者当前暴击率大于等于50% ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['CriticalChanceBase'] >= mp.mpf(0.5): + if merged_attr['CriticalChanceBase'] >= 0.5: logger.info('Relic306 check success') return True return None @@ -433,11 +410,9 @@ class Relic306(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces2 and await self.check(base_attr, attribute_bonus): q_dmg = attribute_bonus.get('UltraDmgAdd', 0) - attribute_bonus['UltraDmgAdd'] = q_dmg + mp.mpf(0.1500000001396984) + attribute_bonus['UltraDmgAdd'] = q_dmg + 0.1500000001396984 a3_dmg = attribute_bonus.get('TalentDmgAdd', 0) - attribute_bonus['TalentDmgAdd'] = a3_dmg + mp.mpf( - 0.1500000001396984 - ) + attribute_bonus['TalentDmgAdd'] = a3_dmg + 0.1500000001396984 return attribute_bonus @@ -450,7 +425,7 @@ class Relic307(BaseRelicSetSkill): 装备者的速度大于等于145 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['speed'] >= mp.mpf(145): + if merged_attr['speed'] >= 145: logger.info('Relic306 check success') return True return None @@ -462,7 +437,7 @@ class Relic307(BaseRelicSetSkill): ) attribute_bonus[ 'BreakDamageAddedRatioBase' - ] = break_damage_added_ratio_base + mp.mpf(0.20000000018626451) + ] = break_damage_added_ratio_base + 0.20000000018626451 return attribute_bonus @@ -475,7 +450,7 @@ class Relic308(BaseRelicSetSkill): 装备者的速度大于等于120 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['speed'] >= mp.mpf(120): + if merged_attr['speed'] >= 120: logger.info('Relic306 check success') return True return None @@ -495,7 +470,7 @@ class Relic309(BaseRelicSetSkill): 当装备者的当前暴击率大于等于70%时,普攻和战技造成的伤害提高20%。 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['CriticalChanceBase'] >= mp.mpf(0.7): + if merged_attr['CriticalChanceBase'] >= 0.7: logger.info('Relic309 check success') return True return None @@ -503,13 +478,9 @@ class Relic309(BaseRelicSetSkill): async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict): if self.pieces2 and await self.check(base_attr, attribute_bonus): a_dmg = attribute_bonus.get('NormalDmgAdd', 0) - attribute_bonus['NormalDmgAdd'] = a_dmg + mp.mpf( - 0.20000000018626451 - ) + attribute_bonus['NormalDmgAdd'] = a_dmg + 0.20000000018626451 a2_dmg = attribute_bonus.get('BPSkillDmgAdd', 0) - attribute_bonus['BPSkillDmgAdd'] = a2_dmg + mp.mpf( - 0.20000000018626451 - ) + attribute_bonus['BPSkillDmgAdd'] = a2_dmg + 0.20000000018626451 return attribute_bonus @@ -522,7 +493,7 @@ class Relic310(BaseRelicSetSkill): 当装备者的效果抵抗大于等于30%时,我方全体暴击伤害提高10%。 ''' merged_attr = await merge_attribute(base_attr, attribute_bonus) - if merged_attr['StatusResistanceBase'] >= mp.mpf(0.3): + if merged_attr['StatusResistanceBase'] >= 0.3: logger.info('Relic310 check success') return True return None @@ -532,7 +503,7 @@ class Relic310(BaseRelicSetSkill): critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0) attribute_bonus[ 'CriticalDamageBase' - ] = critical_damage_base + mp.mpf(0.10000000018626451) + ] = critical_damage_base + 0.10000000018626451 return attribute_bonus diff --git a/StarRailUID/starrailuid_charinfo/effect/Role.py b/StarRailUID/starrailuid_charinfo/effect/Role.py index 36df7c7..fe62014 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Role.py +++ b/StarRailUID/starrailuid_charinfo/effect/Role.py @@ -1,14 +1,11 @@ -from mpmath import mp from gsuid_core.logger import logger -from .Avatar.Avatar import Avatar -from .Weapon.Weapon import Weapon -from .utils import merge_attribute from ..mono.Character import Character +from .Avatar.Avatar import Avatar from .Base.model import DamageInstance from .Relic.Relic import RelicSet, SingleRelic - -mp.dps = 14 +from .utils import merge_attribute +from .Weapon.Weapon import Weapon class RoleInstance: @@ -19,10 +16,9 @@ class RoleInstance: self.weapon = Weapon.create(self.raw_data.weapon) self.relic_set = RelicSet.create(self.raw_data.relic) - self.base_attr = {} + self.base_attr = self.cal_role_base_attr() self.attribute_bonus = {} - self.cal_role_base_attr() self.cal_relic_attr_add() self.cal_avatar_attr_add() self.cal_avatar_eidolon_add() @@ -30,24 +26,23 @@ class RoleInstance: def cal_role_base_attr(self): logger.info('cal_role_base_attr') - avatar_attribute = self.avatar.__dict__['avatar_attribute'] - logger.info(avatar_attribute) - for attribute in avatar_attribute: - if attribute in self.base_attr: - self.base_attr[attribute] += avatar_attribute[attribute] + base_attr = {} + avatar_attribute = self.avatar.avatar_attribute + for attr_name, attr_value in avatar_attribute.items(): + if attr_name in base_attr: + base_attr[attr_name] += attr_value else: - self.base_attr[attribute] = avatar_attribute[attribute] + base_attr[attr_name] = attr_value - weapon_attribute = self.weapon.__dict__['weapon_base_attribute'] - for attribute in weapon_attribute: - if attribute in self.base_attr: - self.base_attr[attribute] += weapon_attribute[attribute] + weapon_attribute = self.weapon.weapon_base_attribute + for attr_name, attr_value in weapon_attribute.items(): + if attr_name in base_attr: + base_attr[attr_name] += attr_value else: - self.base_attr[attribute] = weapon_attribute[attribute] + base_attr[attr_name] = attr_value + return base_attr def cal_relic_attr_add(self): - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') # 单件属性 for relic_type in self.relic_set.__dict__: if type(self.relic_set.__dict__[relic_type]) == SingleRelic: @@ -80,17 +75,13 @@ class RoleInstance: for bonus in attribute_bonus: status_add = bonus.statusAdd bonus_property = status_add.property - value = mp.mpf(status_add.value) - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') + value = status_add.value if bonus_property in self.attribute_bonus: self.attribute_bonus[bonus_property] += value else: self.attribute_bonus[bonus_property] = value def cal_avatar_eidolon_add(self): - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') for attribute in self.avatar.eidolon_attribute: if attribute in self.attribute_bonus: self.attribute_bonus[ @@ -111,19 +102,17 @@ class RoleInstance: ] = self.avatar.extra_ability_attribute[attribute] def cal_weapon_attr_add(self): - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') - for attribute in self.weapon.__dict__['weapon_attribute']: + for attribute in self.weapon.weapon_attribute: if attribute in self.attribute_bonus: - self.attribute_bonus[attribute] += self.weapon.__dict__[ - 'weapon_attribute' - ][attribute] + self.attribute_bonus[attribute] += self.weapon.weapon_attribute[ + attribute + ] else: - self.attribute_bonus[attribute] = self.weapon.__dict__[ - 'weapon_attribute' - ][attribute] + self.attribute_bonus[attribute] = self.weapon.weapon_attribute[ + attribute + ] - async def cal_damage(self, skill_type): + async def cal_damage(self, skill_type: str): logger.info('base_attr') logger.info(self.base_attr) logger.info('attribute_bonus') @@ -189,20 +178,16 @@ class RoleInstance: ) self.attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf(fx_cc_up) + ] = critical_chance_base + fx_cc_up hp_added_ratio = self.attribute_bonus.get('HPAddedRatio', 0) - self.attribute_bonus['HPAddedRatio'] = hp_added_ratio + mp.mpf( - fx_hp_up - ) + self.attribute_bonus['HPAddedRatio'] = hp_added_ratio + fx_hp_up # 检查武器战斗生效的buff logger.info('检查武器战斗生效的buff') Ultra_Use = self.avatar.Ultra_Use() logger.info('Ultra_Use') logger.info(Ultra_Use) - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') self.attribute_bonus = await self.weapon.weapon_ability( Ultra_Use, self.base_attr, self.attribute_bonus ) @@ -210,19 +195,17 @@ class RoleInstance: # 检查是否有对某一个技能的属性加成 logger.info('检查是否有对某一个技能的属性加成') - if self.attribute_bonus is None: - raise Exception('attribute_bonus is None') for attr in self.attribute_bonus: # 攻击加成 if attr.__contains__('AttackAddedRatio'): - attr_name = attr.split('AttackAddedRatio')[0] + attr_name: str = attr.split('AttackAddedRatio')[0] if attr_name == skill_type or attr_name == skill_info[3]: attack_added_ratio = self.attribute_bonus.get( 'AttackAddedRatio', 0 ) self.attribute_bonus[ 'AttackAddedRatio' - ] = attack_added_ratio + mp.mpf(self.attribute_bonus[attr]) + ] = attack_added_ratio + self.attribute_bonus[attr] # 效果命中加成 if attr.__contains__('StatusProbabilityBase'): attr_name = attr.split('StatusProbabilityBase')[0] @@ -232,7 +215,7 @@ class RoleInstance: ) self.attribute_bonus[ 'StatusProbabilityBase' - ] = status_probability + mp.mpf(self.attribute_bonus[attr]) + ] = status_probability + self.attribute_bonus[attr] logger.info(self.attribute_bonus) logger.info('检查遗器套装战斗生效的buff') for set_skill in self.relic_set.SetSkill: @@ -565,6 +548,7 @@ class RoleInstance: if skill_info[0] == 'defence': defence = merged_attr['defence'] logger.info(f'防御力: {defence}') + defence_multiplier = 0 # 获取技能提供的固定护盾值 if skill_type == 'Normal': diff --git a/StarRailUID/starrailuid_charinfo/effect/Weapon/Weapon.py b/StarRailUID/starrailuid_charinfo/effect/Weapon/Weapon.py index c12254f..0f9f3f1 100644 --- a/StarRailUID/starrailuid_charinfo/effect/Weapon/Weapon.py +++ b/StarRailUID/starrailuid_charinfo/effect/Weapon/Weapon.py @@ -1,20 +1,15 @@ import json -from typing import Dict from pathlib import Path +from typing import Dict -from mpmath import mp - -from ..Base.WeaponBase import BaseWeapon from ..Base.model import DamageInstanceWeapon +from ..Base.WeaponBase import BaseWeapon path = Path(__file__).parent.parent with Path.open(path / 'Excel' / 'weapon_effect.json', encoding='utf-8') as f: weapon_effect = json.load(f) -mp.dps = 14 - - class Arrows(BaseWeapon): weapon_base_attributes: Dict @@ -26,14 +21,13 @@ class Arrows(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): critical_chance_base = attribute_bonus.get('CriticalChance', 0) - attribute_bonus['CriticalChance'] = critical_chance_base + mp.mpf( - weapon_effect['20000']['Param']['CriticalChance'][ - self.weapon_rank - 1 - ] + attribute_bonus['CriticalChance'] = ( + critical_chance_base + + weapon_effect['20000']['Param']['CriticalChance'][self.weapon_rank - 1] ) return attribute_bonus @@ -49,7 +43,7 @@ class ReturntoDarkness(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): pass @@ -67,7 +61,7 @@ class Swordplay(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -75,13 +69,10 @@ class Swordplay(BaseWeapon): ) attribute_bonus['AllDamageAddedRatio'] = ( all_damage_added_ratio - + mp.mpf( - weapon_effect['21010']['Param']['AllDamageAddedRatio'][ + + weapon_effect['21010']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) - * 5 - ) + ) * 5 return attribute_bonus @@ -96,15 +87,13 @@ class DartingArrow(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - weapon_effect['20007']['Param']['AttackAddedRatio'][ + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['20007']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -119,17 +108,15 @@ class Adversarial(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0) - attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + mp.mpf( - weapon_effect['20014']['Param']['SpeedAddedRatio'][ + attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + weapon_effect['20014']['Param']['SpeedAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus - return None + return attribute_bonus class SubscribeforMore(BaseWeapon): @@ -143,29 +130,23 @@ class SubscribeforMore(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0) attribute_bonus['NormalDmgAdd'] = normal_dmg_add + ( - mp.mpf( weapon_effect['21017']['Param']['a_dmg'][ self.weapon_rank - 1 ] - ) - * 2 - ) + ) * 2 bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0) attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + ( - mp.mpf( weapon_effect['21017']['Param']['e_dmg'][ self.weapon_rank - 1 ] - ) - * 2 - ) + ) * 2 return attribute_bonus - return None + return attribute_bonus class RiverFlowsinSpring(BaseWeapon): @@ -180,27 +161,23 @@ class RiverFlowsinSpring(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0) - attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + mp.mpf( - weapon_effect['21024']['Param']['SpeedAddedRatio'][ + attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + weapon_effect['21024']['Param']['SpeedAddedRatio'][ self.weapon_rank - 1 ] - ) all_damage_added_ratio = attribute_bonus.get( 'AllDamageAddedRatio', 0 ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['21024']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['21024']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus - return None + return attribute_bonus class SleepLiketheDead(BaseWeapon): @@ -215,11 +192,11 @@ class SleepLiketheDead(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): return attribute_bonus - return None + return attribute_bonus class OnlySilenceRemains(BaseWeapon): @@ -233,19 +210,17 @@ class OnlySilenceRemains(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf( - weapon_effect['21003']['Param']['CriticalChance'][ + ] = critical_chance_base + weapon_effect['21003']['Param']['CriticalChance'][ self.weapon_rank - 1 ] - ) return attribute_bonus - return None + return attribute_bonus # 拂晓之前 @@ -259,26 +234,20 @@ class BeforeDawn(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0) attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + ( - mp.mpf( - weapon_effect['23010']['Param']['e_dmg'][self.weapon_rank - 1] + weapon_effect['23010']['Param']['e_dmg'][self.weapon_rank - 1] ) - ) ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0) attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + ( - mp.mpf( - weapon_effect['23010']['Param']['r_dmg'][self.weapon_rank - 1] + weapon_effect['23010']['Param']['r_dmg'][self.weapon_rank - 1] ) - ) talent_dmg_add = attribute_bonus.get('TalentDmgAdd', 0) attribute_bonus['TalentDmgAdd'] = talent_dmg_add + ( - mp.mpf( - weapon_effect['23010']['Param']['t_dmg'][self.weapon_rank - 1] + weapon_effect['23010']['Param']['t_dmg'][self.weapon_rank - 1] ) - ) return attribute_bonus @@ -292,41 +261,31 @@ class IntheNight(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): char_speed = ( - mp.mpf(base_attr.get('speed', 0)) - + mp.mpf(attribute_bonus.get('SpeedDelta', 0)) - ) * (mp.mpf(attribute_bonus.get('SpeedAddedRatio', 0)) + 1) - print(char_speed) - count_ = min(6, int(mp.floor((char_speed - 100) / 10))) + base_attr.get('speed', 0) + + attribute_bonus.get('SpeedDelta', 0) + ) * (attribute_bonus.get('SpeedAddedRatio', 0) + 1) + count_ = min(6, int((char_speed - 100) / 10)) normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0) attribute_bonus['NormalDmgAdd'] = normal_dmg_add + ( - mp.mpf( - weapon_effect['23001']['Param']['a_dmg'][self.weapon_rank - 1] - ) - * count_ - ) + weapon_effect['23001']['Param']['a_dmg'][self.weapon_rank - 1] + ) * count_ bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0) attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + ( - mp.mpf( - weapon_effect['23001']['Param']['e_dmg'][self.weapon_rank - 1] - ) - * count_ - ) + weapon_effect['23001']['Param']['e_dmg'][self.weapon_rank - 1] + ) * count_ ultra_critical_chance_base = attribute_bonus.get( 'Ultra_CriticalDamageBase', 0 ) attribute_bonus[ 'Ultra_CriticalDamageBase' ] = ultra_critical_chance_base + ( - mp.mpf( - weapon_effect['23001']['Param']['q_crit_dmg'][ + weapon_effect['23001']['Param']['q_crit_dmg'][ self.weapon_rank - 1 ] - ) - * count_ - ) + ) * count_ return attribute_bonus @@ -342,24 +301,20 @@ class CruisingintheStellarSea(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf( - weapon_effect['24001']['Param']['CriticalChance'][ + ] = critical_chance_base + weapon_effect['24001']['Param']['CriticalChance'][ self.weapon_rank - 1 ] - ) if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - weapon_effect['24001']['Param']['AttackAddedRatio'][ + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['24001']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -375,27 +330,22 @@ class SeriousnessofBreakfast(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): all_damage_added_ratio = attribute_bonus.get('AllDamageAddedRatio', 0) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['21027']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['21027']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) attribute_bonus['AttackAddedRatio'] = ( attack_added_ratio - + mp.mpf( - weapon_effect['21027']['Param']['AttackAddedRatio'][ + + weapon_effect['21027']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) - * 3 - ) + ) * 3 return attribute_bonus @@ -412,27 +362,23 @@ class NightontheMilkyWay(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - weapon_effect['23000']['Param']['AttackAddedRatio'][ + attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['23000']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) all_damage_added_ratio = attribute_bonus.get( 'AllDamageAddedRatio', 0 ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['23000']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['23000']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus - return None + return attribute_bonus # 今日亦是和平的一日 @@ -447,18 +393,15 @@ class TodayIsAnotherPeacefulDay(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): all_damage_added_ratio = attribute_bonus.get('AllDamageAddedRatio', 0) attribute_bonus['AllDamageAddedRatio'] = ( all_damage_added_ratio - + mp.mpf( - weapon_effect['21034']['Param']['AllDamageAddedRatio'][ + + weapon_effect['21034']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) - * Ultra_Use - ) + ) * Ultra_Use return attribute_bonus @@ -475,17 +418,15 @@ class GeniusesRepose(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): critical_chance_base = attribute_bonus.get('CriticalDamageBase', 0) attribute_bonus['CriticalDamageBase'] = critical_chance_base + ( - mp.mpf( weapon_effect['21020']['Param']['CriticalDamageBase'][ self.weapon_rank - 1 ] ) - ) return attribute_bonus @@ -501,14 +442,12 @@ class MaketheWorldClamor(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0) attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + ( - mp.mpf( - weapon_effect['21013']['Param']['r_dmg'][self.weapon_rank - 1] + weapon_effect['21013']['Param']['r_dmg'][self.weapon_rank - 1] ) - ) return attribute_bonus @@ -525,19 +464,17 @@ class TheBirthoftheSelf(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): talent_dmg_add = attribute_bonus.get('TalentDmgAdd', 0) attribute_bonus['TalentDmgAdd'] = talent_dmg_add + ( - mp.mpf( weapon_effect['21006']['Param']['t_dmg'][ self.weapon_rank - 1 ] ) - ) return attribute_bonus - return None + return attribute_bonus # 秘密誓心 @@ -553,7 +490,7 @@ class ASecretVow(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -561,13 +498,11 @@ class ASecretVow(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['21012']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['21012']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus - return None + return attribute_bonus # 比阳光更明亮的 @@ -583,19 +518,16 @@ class BrighterThantheSun(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) attribute_bonus['AttackAddedRatio'] = ( attack_added_ratio - + mp.mpf( - weapon_effect['23015']['Param']['AttackAddedRatio'][ + + weapon_effect['23015']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) - * 2 - ) + ) * 2 return attribute_bonus @@ -612,7 +544,7 @@ class TheUnreachableSide(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -620,11 +552,9 @@ class TheUnreachableSide(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['23009']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['23009']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -641,25 +571,17 @@ class SomethingIrreplaceable(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): - # attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) - # attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( - # weapon_effect['23002']['Param']['AttackAddedRatio'][ - # self.weapon_rank - 1 - # ] - # ) if await self.check(): all_damage_added_ratio = attribute_bonus.get( 'AllDamageAddedRatio', 0 ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['23002']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['23002']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -676,29 +598,24 @@ class OntheFallofanAeon(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) attribute_bonus['AttackAddedRatio'] = ( attack_added_ratio - + mp.mpf( - weapon_effect['24000']['Param']['AttackAddedRatio'][ + + weapon_effect['24000']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) - * 4 - ) + ) * 4 all_damage_added_ratio = attribute_bonus.get( 'AllDamageAddedRatio', 0 ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['24000']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['24000']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -714,7 +631,7 @@ class NowheretoRun(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): # attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) # attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( @@ -738,7 +655,7 @@ class WoofWalkTime(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): # attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) # attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( @@ -752,11 +669,9 @@ class WoofWalkTime(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['21026']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['21026']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -773,7 +688,7 @@ class UndertheBlueSky(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): # attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) # attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf( @@ -785,11 +700,9 @@ class UndertheBlueSky(BaseWeapon): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf( - weapon_effect['21019']['Param']['CriticalChance'][ + ] = critical_chance_base + weapon_effect['21019']['Param']['CriticalChance'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -805,19 +718,16 @@ class TheMolesWelcomeYou(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0) attribute_bonus['AttackAddedRatio'] = ( attack_added_ratio - + mp.mpf( - weapon_effect['21005']['Param']['AttackAddedRatio'][ + + weapon_effect['21005']['Param']['AttackAddedRatio'][ self.weapon_rank - 1 ] - ) - * 3 - ) + ) * 3 return attribute_bonus @@ -834,23 +744,19 @@ class IncessantRain(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): damage_ratio = attribute_bonus.get('DmgRatio', 0) - attribute_bonus['DmgRatio'] = damage_ratio + mp.mpf( - weapon_effect['23007']['Param']['DmgRatio'][ + attribute_bonus['DmgRatio'] = damage_ratio + weapon_effect['23007']['Param']['DmgRatio'][ self.weapon_rank - 1 ] - ) critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf( - weapon_effect['23007']['Param']['CriticalChance'][ + ] = critical_chance_base + weapon_effect['23007']['Param']['CriticalChance'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -867,7 +773,7 @@ class PatienceIsAllYouNeed(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -875,22 +781,17 @@ class PatienceIsAllYouNeed(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['23006']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['23006']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0) attribute_bonus['SpeedAddedRatio'] = ( speed_added_ratio - + mp.mpf( - weapon_effect['23006']['Param']['SpeedAddedRatio'][ + + weapon_effect['23006']['Param']['SpeedAddedRatio'][ self.weapon_rank - 1 ] - ) - * 3 - ) + ) * 3 return attribute_bonus @@ -908,7 +809,7 @@ class IntheNameoftheWorld(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -916,33 +817,27 @@ class IntheNameoftheWorld(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['23004']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['23004']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) a2_status_probability = attribute_bonus.get( 'BPSkillStatusProbabilityBase', 0 ) attribute_bonus[ 'BPSkillStatusProbabilityBase' - ] = a2_status_probability + mp.mpf( - weapon_effect['23004']['Param']['A2_StatusProbability'][ + ] = a2_status_probability + weapon_effect['23004']['Param']['A2_StatusProbability'][ self.weapon_rank - 1 ] - ) a2_attack_added_ratio = attribute_bonus.get( 'BPSkillAttackAddedRatio', 0 ) attribute_bonus[ 'BPSkillAttackAddedRatio' - ] = a2_attack_added_ratio + mp.mpf( - weapon_effect['23004']['Param']['A2_AttackAddedRatio'][ + ] = a2_attack_added_ratio + weapon_effect['23004']['Param']['A2_AttackAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -959,7 +854,7 @@ class SolitaryHealing(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -976,7 +871,7 @@ class BeforetheTutorialMissionStarts(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -993,7 +888,7 @@ class WeWillMeetAgain(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1010,7 +905,7 @@ class Fermata(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -1018,11 +913,9 @@ class Fermata(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['21022']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['21022']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1038,15 +931,13 @@ class ResolutionShinesAsPearlsofSweat(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): ignore_defence = attribute_bonus.get('ignore_defence', 0) - attribute_bonus['ignore_defence'] = ignore_defence + mp.mpf( - weapon_effect['21015']['Param']['ignore_defence'][ + attribute_bonus['ignore_defence'] = ignore_defence + weapon_effect['21015']['Param']['ignore_defence'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1062,7 +953,7 @@ class EyesofthePrey(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1079,7 +970,7 @@ class GoodNightandSleepWell(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -1087,13 +978,10 @@ class GoodNightandSleepWell(BaseWeapon): ) attribute_bonus['AllDamageAddedRatio'] = ( all_damage_added_ratio - + mp.mpf( - weapon_effect['21001']['Param']['AllDamageAddedRatio'][ + + weapon_effect['21001']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) - * 3 - ) + ) * 3 return attribute_bonus @@ -1109,7 +997,7 @@ class SheAlreadyShutHerEyes(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -1117,13 +1005,10 @@ class SheAlreadyShutHerEyes(BaseWeapon): ) attribute_bonus['AllDamageAddedRatio'] = ( all_damage_added_ratio - + mp.mpf( - weapon_effect['23011']['Param']['AllDamageAddedRatio'][ + + weapon_effect['23011']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) - * 3 - ) + ) * 3 return attribute_bonus @@ -1139,17 +1024,15 @@ class MomentofVictory(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0) attribute_bonus[ 'DefenceAddedRatio' - ] = defence_added_ratio + mp.mpf( - weapon_effect['23005']['Param']['DefenceAddedRatio'][ + ] = defence_added_ratio + weapon_effect['23005']['Param']['DefenceAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1165,7 +1048,7 @@ class TextureofMemories(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1182,7 +1065,7 @@ class ThisIsMe(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1199,7 +1082,7 @@ class WeAreWildfire(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1216,7 +1099,7 @@ class TrendoftheUniversalMarket(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1233,7 +1116,7 @@ class LandausChoice(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1250,7 +1133,7 @@ class DayOneofMyNewLife(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1267,7 +1150,7 @@ class Pioneering(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1284,7 +1167,7 @@ class Defense(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1301,17 +1184,15 @@ class Amber(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0) attribute_bonus[ 'DefenceAddedRatio' - ] = defence_added_ratio + mp.mpf( - weapon_effect['20003']['Param']['DefenceAddedRatio'][ + ] = defence_added_ratio + weapon_effect['20003']['Param']['DefenceAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1327,17 +1208,15 @@ class MutualDemise(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0) attribute_bonus[ 'CriticalChanceBase' - ] = critical_chance_base + mp.mpf( - weapon_effect['20016']['Param']['CriticalChance'][ + ] = critical_chance_base + weapon_effect['20016']['Param']['CriticalChance'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1353,7 +1232,7 @@ class ShatteredHome(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -1361,11 +1240,9 @@ class ShatteredHome(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['20009']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['20009']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1381,20 +1258,16 @@ class CollapsingSky(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0) attribute_bonus['NormalDmgAdd'] = normal_dmg_add + ( - mp.mpf( - weapon_effect['20002']['Param']['a_dmg'][self.weapon_rank - 1] + weapon_effect['20002']['Param']['a_dmg'][self.weapon_rank - 1] ) - ) bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0) attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + ( - mp.mpf( - weapon_effect['20002']['Param']['e_dmg'][self.weapon_rank - 1] + weapon_effect['20002']['Param']['e_dmg'][self.weapon_rank - 1] ) - ) return attribute_bonus @@ -1410,7 +1283,7 @@ class HiddenShadow(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1427,7 +1300,7 @@ class Loop(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): all_damage_added_ratio = attribute_bonus.get( @@ -1435,11 +1308,9 @@ class Loop(BaseWeapon): ) attribute_bonus[ 'AllDamageAddedRatio' - ] = all_damage_added_ratio + mp.mpf( - weapon_effect['20009']['Param']['AllDamageAddedRatio'][ + ] = all_damage_added_ratio + weapon_effect['20009']['Param']['AllDamageAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1455,7 +1326,7 @@ class Void(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): status_probability = attribute_bonus.get( @@ -1463,11 +1334,9 @@ class Void(BaseWeapon): ) attribute_bonus[ 'StatusProbabilityBase' - ] = status_probability + mp.mpf( - weapon_effect['20004']['Param']['StatusProbability'][ + ] = status_probability + weapon_effect['20004']['Param']['StatusProbability'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1483,7 +1352,7 @@ class Sagacity(BaseWeapon): return True async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): if await self.check(): a3_attack_added_ratio = attribute_bonus.get( @@ -1491,11 +1360,9 @@ class Sagacity(BaseWeapon): ) attribute_bonus[ 'UltraAttackAddedRatio' - ] = a3_attack_added_ratio + mp.mpf( - weapon_effect['20020']['Param']['A3_AttackAddedRatio'][ + ] = a3_attack_added_ratio + weapon_effect['20020']['Param']['A3_AttackAddedRatio'][ self.weapon_rank - 1 ] - ) return attribute_bonus @@ -1511,7 +1378,7 @@ class Passkey(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): return attribute_bonus @@ -1528,14 +1395,12 @@ class DataBank(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0) attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + ( - mp.mpf( - weapon_effect['20006']['Param']['r_dmg'][self.weapon_rank - 1] + weapon_effect['20006']['Param']['r_dmg'][self.weapon_rank - 1] ) - ) return attribute_bonus @@ -1551,23 +1416,19 @@ class Thisbodyisasword(BaseWeapon): pass async def weapon_ability( - self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict + self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict ): ultra_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0) attribute_bonus['BPSkillDmgAdd'] = ultra_dmg_add + ( - mp.mpf( - weapon_effect['23014']['Param']['e_dmg'][self.weapon_rank - 1] + weapon_effect['23014']['Param']['e_dmg'][self.weapon_rank - 1] ) - ) critical_chance_base = attribute_bonus.get('CriticalDamageBase', 0) attribute_bonus['CriticalDamageBase'] = critical_chance_base + ( - mp.mpf( - weapon_effect['23014']['Param']['CriticalDamageBase'][ + weapon_effect['23014']['Param']['CriticalDamageBase'][ self.weapon_rank - 1 ] ) - ) return attribute_bonus diff --git a/StarRailUID/starrailuid_charinfo/mono/Character.py b/StarRailUID/starrailuid_charinfo/mono/Character.py index 3f27fd2..fede700 100644 --- a/StarRailUID/starrailuid_charinfo/mono/Character.py +++ b/StarRailUID/starrailuid_charinfo/mono/Character.py @@ -1,13 +1,10 @@ import json -from typing import Dict from collections import Counter +from typing import Dict -from mpmath import mp from loguru import logger -from ...utils.map.SR_MAP_PATH import RelicSetSkill, EquipmentID2AbilityProperty - -mp.dps = 14 +from ...utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty, RelicSetSkill class Character: @@ -34,20 +31,6 @@ class Character: card_prop['rankList'] if card_prop.get('rankList') else [] ) - # 伤害计算 - self.def_ignore = 0 - self.q_dmg = 0 - self.q_crit_dmg = 0 - self.e_dmg = 0 - self.a_dmg = 0 - self.a3_dmg = 0 - - # 角色的圣遗物总分 - self.artifacts_all_score: float = 0 - self.percent: str = '0.0' - self.dmg_data: Dict = {} - self.seq_str: str = '无匹配' - async def get_equipment_info(self): if self.equipment == {}: return @@ -61,16 +44,9 @@ class Character: equip_ability_property = ability_property[str(equip_rank)] equip_add_base_attr = equip['baseAttributes'] - hp = mp.mpf(base_attr['hp']) + mp.mpf(equip_add_base_attr['hp']) - attack = mp.mpf(base_attr['attack']) + mp.mpf( - equip_add_base_attr['attack'] - ) - defence = mp.mpf(base_attr['defence']) + mp.mpf( - equip_add_base_attr['defence'] - ) - base_attr['hp'] = str(hp) - base_attr['attack'] = str(attack) - base_attr['defence'] = str(defence) + base_attr['hp'] = base_attr['hp'] + equip_add_base_attr['hp'] + base_attr['attack'] = base_attr['attack'] + equip_add_base_attr['attack'] + base_attr['defence'] = base_attr['defence'] + equip_add_base_attr['defence'] self.base_attributes = base_attr for equip_ability in equip_ability_property: @@ -99,23 +75,23 @@ class Character: set_id_list.append(relic['SetId']) # 处理主属性 relic_property = relic['MainAffix']['Property'] - property_value = mp.mpf(relic['MainAffix']['Value']) + property_value = relic['MainAffix']['Value'] if relic_property in self.add_attr: - self.add_attr[relic_property] = str( - mp.mpf(self.add_attr[relic_property]) + property_value + self.add_attr[relic_property] = ( + self.add_attr[relic_property] + property_value ) else: - self.add_attr[relic_property] = str(property_value) + self.add_attr[relic_property] = property_value # 处理副词条 for sub in relic['SubAffixList']: sub_property = sub['Property'] - sub_value = mp.mpf(sub['Value']) + sub_value = sub['Value'] if sub_property in self.add_attr: - self.add_attr[sub_property] = str( - mp.mpf(self.add_attr[sub_property]) + sub_value + self.add_attr[sub_property] = ( + self.add_attr[sub_property] + sub_value ) else: - self.add_attr[sub_property] = str(sub_value) + self.add_attr[sub_property] = sub_value # 处理套装属性 set_id_dict = Counter(set_id_list) for item in set_id_dict.most_common(): @@ -125,17 +101,17 @@ class Character: set_value = 0 if count >= 2 and RelicSetSkill[str(set_id)]['2'] != {}: set_property = RelicSetSkill[str(set_id)]['2']['Property'] - set_value = mp.mpf(RelicSetSkill[str(set_id)]['2']['Value']) + set_value = RelicSetSkill[str(set_id)]['2']['Value'] if count == 4 and RelicSetSkill[str(set_id)]['4'] != {}: set_property = RelicSetSkill[str(set_id)]['4']['Property'] - set_value = mp.mpf(RelicSetSkill[str(set_id)]['4']['Value']) + set_value = RelicSetSkill[str(set_id)]['4']['Value'] if set_property != '': if set_property in self.add_attr: - self.add_attr[set_property] = str( - mp.mpf(self.add_attr[set_property]) + set_value + self.add_attr[set_property] = ( + self.add_attr[set_property] + set_value ) else: - self.add_attr[set_property] = str(set_value) + self.add_attr[set_property] = set_value logger.info(json.dumps(self.base_attributes)) logger.info(json.dumps(self.add_attr)) diff --git a/StarRailUID/starrailuid_charinfo/to_card.py b/StarRailUID/starrailuid_charinfo/to_card.py index d5baa87..f315c46 100644 --- a/StarRailUID/starrailuid_charinfo/to_card.py +++ b/StarRailUID/starrailuid_charinfo/to_card.py @@ -55,7 +55,6 @@ async def draw_enka_card(uid: str, char_list: List, showfrom: int = 0): return await convert_img(Image.new('RGBA', (0, 1), (255, 255, 255))) else: line1 = f'UID {uid} 刷新成功' - # print(char_list) line2 = f'可以使用 sr查询{char_data_list[0]["avatarName"]} 查询详情角色面板' char_num = len(char_data_list) if char_num <= 4: diff --git a/StarRailUID/starrailuid_charinfo/to_data.py b/StarRailUID/starrailuid_charinfo/to_data.py index b7f0d93..2ac943f 100644 --- a/StarRailUID/starrailuid_charinfo/to_data.py +++ b/StarRailUID/starrailuid_charinfo/to_data.py @@ -1,39 +1,34 @@ import json from pathlib import Path -from typing import List, Union, Optional +from typing import List, Optional, Union -from mpmath import mp from httpx import ReadTimeout -from ..utils.error_reply import UID_HINT from ..sruid_utils.api.mihomo import MihomoData from ..sruid_utils.api.mihomo.models import Avatar -from ..utils.resource.RESOURCE_PATH import PLAYER_PATH from ..sruid_utils.api.mihomo.requests import get_char_card_info - -# from gsuid_core.utils.api.minigg.request import get_weapon_info -from .cal_value import cal_relic_sub_affix, cal_relic_main_affix -from ..utils.excel.read_excel import AvatarPromotion, EquipmentPromotion +from ..utils.error_reply import UID_HINT +from ..utils.excel.model import AvatarPromotionConfig, EquipmentPromotionConfig from ..utils.map.SR_MAP_PATH import ( - SetId2Name, + AvatarRankSkillUp, + EquipmentID2Name, + EquipmentID2Rarity, ItemId2Name, Property2Name, RelicId2SetId, - EquipmentID2Name, - AvatarRankSkillUp, - EquipmentID2Rarity, - rankId2Name, - skillId2Name, - avatarId2Name, - skillId2Effect, + SetId2Name, + avatarId2DamageType, avatarId2EnName, + avatarId2Name, avatarId2Rarity, characterSkillTree, + rankId2Name, skillId2AttackType, - avatarId2DamageType, + skillId2Effect, + skillId2Name, ) - -mp.dps = 14 +from ..utils.resource.RESOURCE_PATH import PLAYER_PATH +from .cal_value import cal_relic_main_affix, cal_relic_sub_affix async def api_to_dict( @@ -55,6 +50,8 @@ async def api_to_dict( sr_data = await get_char_card_info(sr_uid) except ReadTimeout: return '网络不太稳定...' + except json.decoder.JSONDecodeError: + return '网络不太稳定...' if isinstance(sr_data, str): return [] if isinstance(sr_data, dict): @@ -195,6 +192,7 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str): relic_type=relic['type'], relic_level=relic_temp['Level'], ) + print(affix_property) relic_temp['MainAffix']['Property'] = affix_property relic_temp['MainAffix']['Name'] = Property2Name[affix_property] relic_temp['MainAffix']['Value'] = value @@ -253,42 +251,42 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str): # 处理基础属性 base_attributes = {} - avatar_promotion_base = AvatarPromotion[str(char['avatarId'])][ + avatar_promotion_base = AvatarPromotionConfig.Avatar[str(char['avatarId'])][ str(char.get('promotion', 0)) ] # 攻击力 - base_attributes['attack'] = str( - mp.mpf(avatar_promotion_base["AttackBase"]['Value']) - + mp.mpf(avatar_promotion_base["AttackAdd"]['Value']) + base_attributes['attack'] = ( + avatar_promotion_base.AttackBase.Value + + avatar_promotion_base.AttackAdd.Value * (char['level'] - 1) ) # 防御力 - base_attributes['defence'] = str( - mp.mpf(avatar_promotion_base["DefenceBase"]['Value']) - + mp.mpf(avatar_promotion_base["DefenceAdd"]['Value']) + base_attributes['defence'] = ( + avatar_promotion_base.DefenceBase.Value + + avatar_promotion_base.DefenceAdd.Value * (char['level'] - 1) ) # 血量 - base_attributes['hp'] = str( - mp.mpf(avatar_promotion_base["HPBase"]['Value']) - + mp.mpf(avatar_promotion_base["HPAdd"]['Value']) * (char['level'] - 1) + base_attributes['hp'] = ( + avatar_promotion_base.HPBase.Value + + avatar_promotion_base.HPAdd.Value * (char['level'] - 1) ) # 速度 - base_attributes['speed'] = str( - mp.mpf(avatar_promotion_base["SpeedBase"]['Value']) + base_attributes['speed'] = ( + avatar_promotion_base.SpeedBase.Value ) # 暴击率 - base_attributes['CriticalChanceBase'] = str( - mp.mpf(avatar_promotion_base["CriticalChance"]['Value']) + base_attributes['CriticalChanceBase'] = ( + avatar_promotion_base.CriticalChance.Value ) # 暴击伤害 - base_attributes['CriticalDamageBase'] = str( - mp.mpf(avatar_promotion_base["CriticalDamage"]['Value']) + base_attributes['CriticalDamageBase'] = ( + avatar_promotion_base.CriticalDamage.Value ) # 嘲讽 - base_attributes['BaseAggro'] = str( - mp.mpf(avatar_promotion_base["BaseAggro"]['Value']) + base_attributes['BaseAggro'] = ( + avatar_promotion_base.BaseAggro.Value ) char_data['baseAttributes'] = base_attributes @@ -311,26 +309,26 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str): str(char['equipment']['tid']) ] equipment_base_attributes = {} - equipment_promotion_base = EquipmentPromotion[ + equipment_promotion_base = EquipmentPromotionConfig.Equipment[ str(char['equipment']['tid']) ][str(equipment_info['equipmentPromotion'])] # 生命值 - equipment_base_attributes['hp'] = str( - mp.mpf(equipment_promotion_base["BaseHP"]['Value']) - + mp.mpf(equipment_promotion_base["BaseHPAdd"]['Value']) + equipment_base_attributes['hp'] = ( + equipment_promotion_base.BaseHP.Value + + equipment_promotion_base.BaseHPAdd.Value * (char['equipment']['level'] - 1) ) # 攻击力 - equipment_base_attributes['attack'] = str( - mp.mpf(equipment_promotion_base["BaseAttack"]['Value']) - + mp.mpf(equipment_promotion_base["BaseAttackAdd"]['Value']) + equipment_base_attributes['attack'] = ( + equipment_promotion_base.BaseAttack.Value + + equipment_promotion_base.BaseAttackAdd.Value * (char['equipment']['level'] - 1) ) # 防御力 - equipment_base_attributes['defence'] = str( - mp.mpf(equipment_promotion_base["BaseDefence"]['Value']) - + mp.mpf(equipment_promotion_base["BaseDefenceAdd"]['Value']) + equipment_base_attributes['defence'] = ( + equipment_promotion_base.BaseDefence.Value + + equipment_promotion_base.BaseDefenceAdd.Value * (char['equipment']['level'] - 1) ) equipment_info['baseAttributes'] = equipment_base_attributes diff --git a/StarRailUID/starrailuid_rogue/draw_rogue_card.py b/StarRailUID/starrailuid_rogue/draw_rogue_card.py index 4fe8294..4af67bd 100644 --- a/StarRailUID/starrailuid_rogue/draw_rogue_card.py +++ b/StarRailUID/starrailuid_rogue/draw_rogue_card.py @@ -1,30 +1,31 @@ import math from pathlib import Path -from typing import List, Union, Optional +from typing import List, Optional, Union from PIL import Image, ImageDraw + from gsuid_core.logger import logger from gsuid_core.utils.error_reply import get_error from gsuid_core.utils.image.image_tools import ( - get_qq_avatar, draw_pic_with_ring, + get_qq_avatar, ) -from .utils import get_icon +from ..sruid_utils.api.mys.models import ( + LocustBlocks, + RogueAvatar, + RogueBuffitems, + RogueMiracles, +) from ..utils.convert import GsCookie -from ..utils.image.convert import convert_img from ..utils.fonts.starrail_fonts import ( sr_font_22, sr_font_28, sr_font_34, sr_font_42, ) -from ..sruid_utils.api.mys.models import ( - RogueAvatar, - LocustBlocks, - RogueMiracles, - RogueBuffitems, -) +from ..utils.image.convert import convert_img +from .utils import get_icon TEXT_PATH = Path(__file__).parent / 'texture2D' white_color = (255, 255, 255) @@ -585,6 +586,7 @@ async def draw_rogue_locust_img( detail_h = detail_h + miracles_h # 事件 + blocks_h = 0 if len(detail['blocks']) > 0: blocks_h = 60 blocks_num = len(detail['blocks']) diff --git a/StarRailUID/utils/excel/model.py b/StarRailUID/utils/excel/model.py new file mode 100644 index 0000000..c2f6a91 --- /dev/null +++ b/StarRailUID/utils/excel/model.py @@ -0,0 +1,245 @@ +from typing import Dict, List + +from msgspec import Struct + +from .read_excel import ( + AvatarPromotion, + EquipmentPromotion, + RelicMainAffix, + RelicSubAffix, +) + + +class PromotionCost(Struct): + ItemID: int + ItemNum: int + + +class PromotionAttr(Struct): + Value: float + + +class SingleAvatarPromotion(Struct): + AvatarID: int + Promotion: int + PromotionCostList: List[PromotionCost] + MaxLevel: int + PlayerLevelRequire: int | None + WorldLevelRequire: int | None + AttackBase: PromotionAttr + AttackAdd: PromotionAttr + DefenceBase: PromotionAttr + DefenceAdd: PromotionAttr + HPBase: PromotionAttr + HPAdd: PromotionAttr + SpeedBase: PromotionAttr + CriticalChance: PromotionAttr + CriticalDamage: PromotionAttr + BaseAggro: PromotionAttr + + +class SingleEquipmentPromotion(Struct): + EquipmentID: int + Promotion: int + PromotionCostList: List[PromotionCost] + MaxLevel: int + PlayerLevelRequire: int | None + WorldLevelRequire: int | None + BaseHP: PromotionAttr + BaseHPAdd: PromotionAttr + BaseAttack: PromotionAttr + BaseAttackAdd: PromotionAttr + BaseDefence: PromotionAttr + BaseDefenceAdd: PromotionAttr + + +class SingleRelicMainAffix(Struct): + GroupID: int + AffixID: int + Property: str + BaseValue: PromotionAttr + LevelAdd: PromotionAttr + IsAvailable: bool + + +class SingleRelicSubAffix(Struct): + GroupID: int + AffixID: int + Property: str + BaseValue: PromotionAttr + StepValue: PromotionAttr + StepNum: int + + +class AvatarPromotionConfigModel(Struct): + Avatar: Dict[str, Dict[str, SingleAvatarPromotion]] + + @classmethod + def from_json(cls, data: Dict): + return cls( + Avatar={ + avatar_id: { + promotion: SingleAvatarPromotion( + AvatarID=promotion_dict[promotion]['AvatarID'], + Promotion=promotion_dict[promotion]['Promotion'], + PromotionCostList=[ + PromotionCost( + ItemID=item['ItemID'], + ItemNum=item['ItemNum'] + ) + for item in promotion_dict[promotion]['PromotionCostList'] + ], + PlayerLevelRequire=promotion_dict[promotion].get( + 'PlayerLevelRequire', None + ), + WorldLevelRequire=promotion_dict[promotion].get( + 'WorldLevelRequire', None + ), + MaxLevel=promotion_dict[promotion]['MaxLevel'], + AttackBase=PromotionAttr( + Value=promotion_dict[promotion]['AttackBase']['Value'] + ), + AttackAdd=PromotionAttr( + Value=promotion_dict[promotion]['AttackAdd']['Value'] + ), + DefenceBase=PromotionAttr( + Value=promotion_dict[promotion]['DefenceBase']['Value'] + ), + DefenceAdd=PromotionAttr( + Value=promotion_dict[promotion]['DefenceAdd']['Value'] + ), + HPBase=PromotionAttr( + Value=promotion_dict[promotion]['HPBase']['Value'] + ), + HPAdd=PromotionAttr( + Value=promotion_dict[promotion]['HPAdd']['Value'] + ), + SpeedBase=PromotionAttr( + Value=promotion_dict[promotion]['SpeedBase']['Value'] + ), + CriticalChance=PromotionAttr( + Value=promotion_dict[promotion]['CriticalChance']['Value'] + ), + CriticalDamage=PromotionAttr( + Value=promotion_dict[promotion]['CriticalDamage']['Value'] + ), + BaseAggro=PromotionAttr( + Value=promotion_dict[promotion]['BaseAggro']['Value'] + ) + ) + for promotion in promotion_dict.keys() + } + for avatar_id, promotion_dict in data.items() + } + ) + + +class EquipmentPromotionConfigModel(Struct): + Equipment: Dict[str, Dict[str, SingleEquipmentPromotion]] + + @classmethod + def from_json(cls, data: Dict): + return cls( + Equipment={ + equipment_id: { + promotion: SingleEquipmentPromotion( + EquipmentID=promotion_dict[promotion]['EquipmentID'], + Promotion=promotion_dict[promotion]['Promotion'], + PromotionCostList=[ + PromotionCost( + ItemID=item['ItemID'], + ItemNum=item['ItemNum'] + ) + for item in promotion_dict[promotion]['PromotionCostList'] + ], + PlayerLevelRequire=promotion_dict[promotion].get( + 'PlayerLevelRequire', None + ), + WorldLevelRequire=promotion_dict[promotion].get( + 'WorldLevelRequire', None + ), + MaxLevel=promotion_dict[promotion]['MaxLevel'], + BaseHP=PromotionAttr( + Value=promotion_dict[promotion]['BaseHP']['Value'] + ), + BaseHPAdd=PromotionAttr( + Value=promotion_dict[promotion]['BaseHPAdd']['Value'] + ), + BaseAttack=PromotionAttr( + Value=promotion_dict[promotion]['BaseAttack']['Value'] + ), + BaseAttackAdd=PromotionAttr( + Value=promotion_dict[promotion]['BaseAttackAdd']['Value'] + ), + BaseDefence=PromotionAttr( + Value=promotion_dict[promotion]['BaseDefence']['Value'] + ), + BaseDefenceAdd=PromotionAttr( + Value=promotion_dict[promotion]['BaseDefenceAdd']['Value'] + ) + ) + for promotion in promotion_dict.keys() + } + for equipment_id, promotion_dict in data.items() + } + ) + + +class RelicMainAffixConfigModel(Struct): + Relic: Dict[str, Dict[str, SingleRelicMainAffix]] + + @classmethod + def from_json(cls, data: Dict): + return cls( + Relic={ + relic_id: { + group_id: SingleRelicMainAffix( + GroupID=affix_dict[group_id]['GroupID'], + AffixID=affix_dict[group_id]['AffixID'], + Property=affix_dict[group_id]['Property'], + BaseValue=PromotionAttr( + Value=affix_dict[group_id]['BaseValue']['Value'] + ), + LevelAdd=PromotionAttr( + Value=affix_dict[group_id]['LevelAdd']['Value'] + ), + IsAvailable=affix_dict[group_id]['IsAvailable'] + ) + for group_id in affix_dict.keys() + } + for relic_id, affix_dict in data.items() + } + ) + + +class RelicSubAffixConfigModel(Struct): + Relic: Dict[str, Dict[str, SingleRelicSubAffix]] + + @classmethod + def from_json(cls, data: Dict): + return cls( + Relic={ + relic_id: { + group_id: SingleRelicSubAffix( + GroupID=affix_dict[group_id]['GroupID'], + AffixID=affix_dict[group_id]['AffixID'], + Property=affix_dict[group_id]['Property'], + BaseValue=PromotionAttr( + Value=affix_dict[group_id]['BaseValue']['Value'] + ), + StepValue=PromotionAttr( + Value=affix_dict[group_id]['StepValue']['Value'] + ), + StepNum=affix_dict[group_id]['StepNum'] + ) + for group_id in affix_dict.keys() + } + for relic_id, affix_dict in data.items() + } + ) + + +AvatarPromotionConfig = AvatarPromotionConfigModel.from_json(AvatarPromotion) +EquipmentPromotionConfig = EquipmentPromotionConfigModel.from_json(EquipmentPromotion) +RelicMainAffixConfig = RelicMainAffixConfigModel.from_json(RelicMainAffix) +RelicSubAffixConfig = RelicSubAffixConfigModel.from_json(RelicSubAffix) diff --git a/StarRailUID/utils/mys_api.py b/StarRailUID/utils/mys_api.py index e20aa97..09e0db4 100644 --- a/StarRailUID/utils/mys_api.py +++ b/StarRailUID/utils/mys_api.py @@ -1,31 +1,31 @@ import copy -import time import random -from string import digits, ascii_letters -from typing import Any, Dict, Union, Optional, cast +import time +from string import ascii_letters, digits +from typing import Any, Dict, Optional, Union, cast -from gsuid_core.utils.api.mys_api import _MysApi from gsuid_core.utils.api.mys.models import MysSign, SignInfo, SignList from gsuid_core.utils.api.mys.tools import ( _random_int_ds, generate_os_ds, get_web_ds_token, ) +from gsuid_core.utils.api.mys_api import _MysApi -from .api import srdbsqla from ..sruid_utils.api.mys.api import _API from ..sruid_utils.api.mys.models import ( - GachaLog, AbyssData, - RogueData, - RoleIndex, AvatarInfo, - MonthlyAward, DailyNoteData, - RoleBasicInfo, - WidgetStamina, + GachaLog, + MonthlyAward, + RogueData, RogueLocustData, + RoleBasicInfo, + RoleIndex, + WidgetStamina, ) +from .api import srdbsqla RECOGNIZE_SERVER = { '1': 'prod_gf_cn', @@ -386,7 +386,7 @@ class MysApi(_MysApi): ) # print(data) if isinstance(data, Dict): - data = cast(RogueData, data['data']) + data = cast(RogueLocustData, data['data']) return data async def mys_sign(