From d8d4b1e34ea9560638b8dcb3a73f5a53d0b6589b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Thu, 21 Dec 2023 16:54:25 +0800 Subject: [PATCH] :bug: Fix exception caused by the change in `get_item` method in pyo3 0.20.0 --- .github/workflows/build.yml | 4 +- develop.ps1 | 7 + install.sh | 0 main.py | 5 + my_install.sh | 3 + rustfmt.toml | 4 + src/applications/input/character.rs | 2 + src/applications/input/weapon.rs | 2 + src/applications/output/damage_analysis.rs | 3 +- test.ps1 | 24 + tests/data/enka.json | 2914 ++++++++++++++++++++ tests/input/invalid_enka_name.json | 185 -- tests/test_enka.py | 32 + tools/ambe.py | 54 + tools/character.py | 30 + tools/main.py | 53 + 16 files changed, 3134 insertions(+), 188 deletions(-) create mode 100644 develop.ps1 create mode 100644 install.sh create mode 100644 main.py create mode 100644 my_install.sh create mode 100644 rustfmt.toml create mode 100644 test.ps1 create mode 100644 tests/data/enka.json delete mode 100644 tests/input/invalid_enka_name.json create mode 100644 tests/test_enka.py create mode 100644 tools/ambe.py create mode 100644 tools/character.py create mode 100644 tools/main.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 710ee93..b2f0515 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,8 +20,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 diff --git a/develop.ps1 b/develop.ps1 new file mode 100644 index 0000000..5429236 --- /dev/null +++ b/develop.ps1 @@ -0,0 +1,7 @@ +$env:RUSTFLAGS="-Awarnings"; +pip uninstall python_genshin_artifact -y +maturin develop + +# py -m pip install maturin +# $env:PYTHONPATH="C:\Users\luoshuijs\AppData\Local\Programs\Python\Python311" +# cargo test \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py new file mode 100644 index 0000000..a0768dc --- /dev/null +++ b/main.py @@ -0,0 +1,5 @@ +from python_genshin_artifact import Artifact + +a = Artifact() + +a.main_stat = ("ATKFixed", 1) diff --git a/my_install.sh b/my_install.sh new file mode 100644 index 0000000..067d4f9 --- /dev/null +++ b/my_install.sh @@ -0,0 +1,3 @@ +$env:RUSTFLAGS="-Awarnings"; +cargo build +maturin develop \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..0b9786a --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,4 @@ +#max_width = 120 +ignore = [ + "genshin_artifact" +] \ No newline at end of file diff --git a/src/applications/input/character.rs b/src/applications/input/character.rs index fdfd27e..b136d76 100644 --- a/src/applications/input/character.rs +++ b/src/applications/input/character.rs @@ -162,12 +162,14 @@ mod tests { let hutao_dict = py_dict .get_item("HuTao") .unwrap() + .unwrap() .downcast::() .unwrap(); assert_eq!( hutao_dict .get_item("le_50") .unwrap() + .unwrap() .extract::<&str>() .unwrap(), "true" diff --git a/src/applications/input/weapon.rs b/src/applications/input/weapon.rs index b558672..403d0db 100644 --- a/src/applications/input/weapon.rs +++ b/src/applications/input/weapon.rs @@ -153,12 +153,14 @@ mod tests { let params_dict = py_dict .get_item("StaffOfHoma") .unwrap() + .unwrap() .downcast::() .unwrap(); assert_eq!( params_dict .get_item("be50_rate") .unwrap() + .unwrap() .extract::() .unwrap(), 1.0 diff --git a/src/applications/output/damage_analysis.rs b/src/applications/output/damage_analysis.rs index 7cf1678..84bce06 100644 --- a/src/applications/output/damage_analysis.rs +++ b/src/applications/output/damage_analysis.rs @@ -73,7 +73,8 @@ pub struct PyDamageAnalysis { #[pymethods] impl PyDamageAnalysis { #[getter] - fn __dict__(&self, py: Python) -> PyResult { // skipcq: RS-R1000 + fn __dict__(&self, py: Python) -> PyResult { + // skipcq: RS-R1000 let dict = PyDict::new(py); fn insert_hashmap( diff --git a/test.ps1 b/test.ps1 new file mode 100644 index 0000000..4a7dfbc --- /dev/null +++ b/test.ps1 @@ -0,0 +1,24 @@ +$env:RUSTFLAGS="-Awarnings" + +venv/Scripts/activate.ps1 + +maturin build + +deactivate + +$pythonPath = py -c "import sys; print(sys.exec_prefix)" +$env:PYTHONHOME = $pythonPath +$env:PYTHONPATH = $pythonPath +$Env:Path += ";$pythonPath" + +py -m pip uninstall python_genshin_artifact -y + +$wheelDirectory = ".\target\wheels" +$latestWheel = Get-ChildItem $wheelDirectory -Filter *.whl | Sort-Object LastWriteTime -Descending | Select-Object -First 1 +$wheelPath = Join-Path $wheelDirectory $latestWheel.Name + +py -m pip install $wheelPath + +cargo test + +py -m pip uninstall python_genshin_artifact -y diff --git a/tests/data/enka.json b/tests/data/enka.json new file mode 100644 index 0000000..a52646f --- /dev/null +++ b/tests/data/enka.json @@ -0,0 +1,2914 @@ +{ + "playerInfo": { + "nickname": "爱莉希雅", + "level": 60, + "signature": "胡桃真可爱,我永远喜欢胡桃", + "worldLevel": 8, + "nameCardId": 210059, + "finishAchievementNum": 865, + "towerFloorIndex": 8, + "towerLevelIndex": 3, + "showAvatarInfoList": [ + { + "avatarId": 10000046, + "level": 90 + }, + { + "avatarId": 10000002, + "level": 90, + "costumeId": 200201 + }, + { + "avatarId": 10000073, + "level": 90 + }, + { + "avatarId": 10000060, + "level": 90 + }, + { + "avatarId": 10000058, + "level": 90 + }, + { + "avatarId": 10000029, + "level": 90, + "costumeId": 202901 + }, + { + "avatarId": 10000022, + "level": 90 + }, + { + "avatarId": 10000051, + "level": 90 + } + ], + "showNameCardIdList": [ + 210059, + 210053, + 210004, + 210007, + 210044, + 210020, + 210090, + 210079, + 210103 + ], + "profilePicture": { + "avatarId": 10000046 + } + }, + "avatarInfoList": [ + { + "avatarId": 10000046, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "talentIdList": [ + 461, + 462, + 463, + 464, + 465, + 466 + ], + "fightPropMap": { + "1": 15552.306640625, + "2": 4780, + "3": 0.7708999514579773, + "4": 714.509033203125, + "5": 359.6300048828125, + "7": 876.1519775390625, + "8": 37.040000915527344, + "9": 0.12389999628067017, + "20": 0.679900050163269, + "21": 0, + "22": 2.734935998916626, + "23": 1, + "26": 0, + "27": 0, + "28": 95.57999420166016, + "29": 0, + "30": 0, + "40": 0.6159999966621399, + "41": 0, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "70": 60, + "1000": 49, + "1010": 30757.845703125, + "2000": 36209.65625, + "2001": 1363.8162841796875, + "2002": 1021.7471313476562, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 4601, + "inherentProudSkillList": [ + 462101, + 462201, + 462301 + ], + "skillLevelMap": { + "10461": 10, + "10462": 10, + "10463": 10 + }, + "proudSkillExtraLevelMap": { + "4632": 3, + "4639": 3 + }, + "equipList": [ + { + "itemId": 80543, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501051, + 501204, + 501221, + 501244, + 501222, + 501224, + 501222, + 501204 + ] + }, + "flat": { + "nameTextMapHash": "1149648428", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 7.8 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 25.7 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 23 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 80524, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501094, + 501222, + 501203, + 501241, + 501204, + 501201, + 501224, + 501203, + 501221 + ] + }, + "flat": { + "nameTextMapHash": "4289008364", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 7.3 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 19.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 13.6 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 16 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 80554, + "reliquary": { + "level": 21, + "mainPropId": 10002, + "appendPropIdList": [ + 501082, + 501221, + 501203, + 501241, + 501082, + 501203, + 501204, + 501202, + 501201 + ] + }, + "flat": { + "nameTextMapHash": "2155936948", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 37 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 5.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 16.7 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 16 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 93513, + "reliquary": { + "level": 21, + "mainPropId": 15008, + "appendPropIdList": [ + 501052, + 501222, + 501201, + 501091, + 501202, + 501202, + 501201, + 501201 + ] + }, + "flat": { + "nameTextMapHash": "2718771884", + "setNameTextMapHash": "4144069251", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_FIRE_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 16 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 6.2 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 14.4 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 5.1 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15019_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 80533, + "reliquary": { + "level": 21, + "mainPropId": 13008, + "appendPropIdList": [ + 501032, + 501203, + 501244, + 501054, + 501203, + 501203, + 501241, + 501034 + ] + }, + "flat": { + "nameTextMapHash": "1521031132", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 62.2 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 10.5 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 10.5 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 40 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 19 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 13501, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "113501": 0 + } + }, + "flat": { + "nameTextMapHash": "3235324891", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 608 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 66.2 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Pole_Homa" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + }, + { + "avatarId": 10000002, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 12858.20703125, + "2": 5795.759765625, + "3": 0.23319999873638153, + "4": 950.0997314453125, + "5": 346.010009765625, + "6": 0.7626000046730042, + "7": 783.9254760742188, + "8": 90.27999877929688, + "20": 0.5712680220603943, + "21": 0, + "22": 2.1821000576019287, + "23": 1, + "26": 0, + "27": 0, + "28": 160.84999084472656, + "29": 0, + "30": 0, + "40": 0.11999999731779099, + "41": 0.11999999731779099, + "42": 0.11999999731779099, + "43": 0.11999999731779099, + "44": 0.11999999731779099, + "45": 0.11999999731779099, + "46": 0.7360000014305115, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "75": 80, + "1005": 80, + "1010": 21652.5, + "2000": 21652.5, + "2001": 2020.65576171875, + "2002": 874.2054443359375, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 201, + "inherentProudSkillList": [ + 22101, + 22201, + 22301 + ], + "skillLevelMap": { + "10013": 1, + "10018": 10, + "10019": 10, + "10024": 8 + }, + "equipList": [ + { + "itemId": 71543, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501054, + 501221, + 501064, + 501203, + 501201, + 501201, + 501204, + 501064 + ] + }, + "flat": { + "nameTextMapHash": "4088170252", + "setNameTextMapHash": "933076627", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 19 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 5.4 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 11.7 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 12.8 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_14001_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 75524, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501242, + 501021, + 501224, + 501082, + 501242, + 501244, + 501223, + 501243, + 501224 + ] + }, + "flat": { + "nameTextMapHash": "1359349548", + "setNameTextMapHash": "1212345779", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 82 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 209 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 22.5 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 19 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15001_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 71553, + "reliquary": { + "level": 21, + "mainPropId": 10004, + "appendPropIdList": [ + 501082, + 501242, + 501222, + 501202, + 501223, + 501243, + 501222, + 501242 + ] + }, + "flat": { + "nameTextMapHash": "1436920276", + "setNameTextMapHash": "933076627", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 19 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 58 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 19.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 3.1 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_14001_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 95513, + "reliquary": { + "level": 21, + "mainPropId": 15010, + "appendPropIdList": [ + 501243, + 501034, + 501222, + 501082, + 501081, + 501222, + 501224, + 501082 + ] + }, + "flat": { + "nameTextMapHash": "586972548", + "setNameTextMapHash": "2546254811", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ICE_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 5.8 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 20.2 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 53 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15021_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 75533, + "reliquary": { + "level": 21, + "mainPropId": 13008, + "appendPropIdList": [ + 501052, + 501024, + 501034, + 501202, + 501034, + 501034, + 501022, + 501023 + ] + }, + "flat": { + "nameTextMapHash": "852890244", + "setNameTextMapHash": "1212345779", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 62.2 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 16 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 807 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 17.5 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 3.1 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15001_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 11510, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "111510": 0 + } + }, + "flat": { + "nameTextMapHash": "1600275315", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 608 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 33.1 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Sword_Amenoma" + } + } + ], + "fetterInfo": { + "expLevel": 10 + }, + "costumeId": 200201 + }, + { + "avatarId": 10000073, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 10360.041015625, + "2": 5825.6396484375, + "3": 0.13989999890327454, + "4": 840.802734375, + "5": 311, + "6": 0.27970001101493835, + "7": 630.214599609375, + "8": 39.349998474121094, + "20": 0.5475999712944031, + "21": 0, + "22": 1.0750999450683594, + "23": 1.1684000492095947, + "26": 0, + "27": 0, + "28": 762.1243896484375, + "29": 0, + "30": 0, + "40": 0, + "41": 0, + "42": 0, + "43": 0.6159999966621399, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "73": 50, + "1003": 50, + "1010": 17635.05078125, + "2000": 17635.05078125, + "2001": 1386.975341796875, + "2002": 669.5645751953125, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 7301, + "inherentProudSkillList": [ + 732101, + 732201, + 732301 + ], + "skillLevelMap": { + "10731": 8, + "10732": 10, + "10735": 10 + }, + "equipList": [ + { + "itemId": 20544, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501244, + 501222, + 501083, + 501203, + 501201, + 501244, + 501222, + 501243, + 501221 + ] + }, + "flat": { + "nameTextMapHash": "4170407948", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 68 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 17.9 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.2 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 20523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501244, + 501203, + 501223, + 501061, + 501243, + 501062, + 501243, + 501201 + ] + }, + "flat": { + "nameTextMapHash": "3864622772", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 65 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.2 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 7 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 8.7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 20553, + "reliquary": { + "level": 21, + "mainPropId": 10008, + "appendPropIdList": [ + 501062, + 501203, + 501023, + 501222, + 501224, + 501222, + 501061, + 501064 + ] + }, + "flat": { + "nameTextMapHash": "486561868", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 187 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 14.6 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 3.5 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 269 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 20.2 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 20513, + "reliquary": { + "level": 21, + "mainPropId": 15014, + "appendPropIdList": [ + 501082, + 501201, + 501243, + 501023, + 501244, + 501021, + 501024, + 501242 + ] + }, + "flat": { + "nameTextMapHash": "1939132180", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_GRASS_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 19 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 2.7 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 63 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 777 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 20534, + "reliquary": { + "level": 21, + "mainPropId": 13007, + "appendPropIdList": [ + 501062, + 501031, + 501234, + 501221, + 501223, + 501032, + 501231, + 501033, + 501233 + ] + }, + "flat": { + "nameTextMapHash": "3847174900", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL", + "statValue": 31.1 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 4.7 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 16.8 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 12.4 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 14511, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "114511": 0 + } + }, + "flat": { + "nameTextMapHash": "1201790667", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 542 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 265 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Catalyst_Ayus" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + }, + { + "avatarId": 10000060, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "talentIdList": [ + 601 + ], + "fightPropMap": { + "1": 14450.17578125, + "2": 5736.01953125, + "3": 0.8416999578475952, + "4": 785.791748046875, + "5": 324.6199951171875, + "6": 0.09319999814033508, + "7": 547.9793090820312, + "8": 57.869998931884766, + "9": 0.050999999046325684, + "20": 0.8639999628067017, + "21": 0, + "22": 2.267848014831543, + "23": 1.4850000143051147, + "26": 0, + "27": 0, + "28": 0, + "29": 0, + "30": 0, + "40": 0, + "41": 0, + "42": 0.4659999907016754, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "72": 70, + "1002": 70, + "1010": 28039.572265625, + "2000": 38562.484375, + "2001": 1183.6474609375, + "2002": 633.7962646484375, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 6001, + "inherentProudSkillList": [ + 602101, + 602201, + 602301 + ], + "skillLevelMap": { + "10606": 8, + "10607": 10, + "10610": 10 + }, + "equipList": [ + { + "itemId": 94544, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501224, + 501031, + 501084, + 501062, + 501062, + 501222, + 501224, + 501223, + 501031 + ] + }, + "flat": { + "nameTextMapHash": "600966780", + "setNameTextMapHash": "2276480763", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 28.8 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 8.2 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 23 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 9.3 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15020_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 94523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501081, + 501201, + 501021, + 501222, + 501204, + 501222, + 501021, + 501203 + ] + }, + "flat": { + "nameTextMapHash": "2543687540", + "setNameTextMapHash": "2276480763", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 16 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 10.1 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 418 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 12.4 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15020_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 94554, + "reliquary": { + "level": 21, + "mainPropId": 10002, + "appendPropIdList": [ + 501082, + 501204, + 501224, + 501051, + 501223, + 501201, + 501223, + 501201, + 501222 + ] + }, + "flat": { + "nameTextMapHash": "3518357892", + "setNameTextMapHash": "2276480763", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 19 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 9.3 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 28 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 14 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15020_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 28514, + "reliquary": { + "level": 21, + "mainPropId": 15011, + "appendPropIdList": [ + 501232, + 501221, + 501023, + 501201, + 501201, + 501023, + 501203, + 501201, + 501232 + ] + }, + "flat": { + "nameTextMapHash": "2665399084", + "setNameTextMapHash": "3094139291", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_WATER_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 10.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 5.4 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 538 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 11.7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15028_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 94534, + "reliquary": { + "level": 21, + "mainPropId": 13007, + "appendPropIdList": [ + 501091, + 501234, + 501031, + 501223, + 501031, + 501033, + 501223, + 501232, + 501234 + ] + }, + "flat": { + "nameTextMapHash": "2950341876", + "setNameTextMapHash": "2276480763", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL", + "statValue": 31.1 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 5.1 + }, + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 18.1 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 13.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 14 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15020_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 15508, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "115508": 0 + } + }, + "flat": { + "nameTextMapHash": "4230231107", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 542 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 88.2 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Bow_Kirin" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + }, + { + "avatarId": 10000058, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 10372.287109375, + "2": 4780, + "3": 0.20409999787807465, + "4": 947.7079467773438, + "5": 359.6400146484375, + "6": 0.05249999836087227, + "7": 568.730224609375, + "8": 43.97999954223633, + "20": 1.0082679986953735, + "21": 0, + "22": 1.992400050163269, + "23": 1.148900032043457, + "26": 0, + "27": 0, + "28": 327.1099853515625, + "29": 0, + "30": 0, + "40": 0, + "41": 0.4659999907016754, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "71": 90, + "1001": 74.91773986816406, + "1010": 17269.271484375, + "2000": 17269.271484375, + "2001": 1357.1026611328125, + "2002": 612.710205078125, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 5801, + "inherentProudSkillList": [ + 582101, + 582201, + 582301 + ], + "skillLevelMap": { + "10581": 6, + "10582": 10, + "10585": 10 + }, + "equipList": [ + { + "itemId": 21544, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501204, + 501231, + 501222, + 501063, + 501224, + 501201, + 501233, + 501223, + 501231 + ] + }, + "flat": { + "nameTextMapHash": "1353039908", + "setNameTextMapHash": "4145306051", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.6 + }, + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 14.9 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 5.3 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15026_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 21523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501203, + 501222, + 501084, + 501242, + 501204, + 501223, + 501221, + 501244 + ] + }, + "flat": { + "nameTextMapHash": "4110031964", + "setNameTextMapHash": "4145306051", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 7.4 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 18.7 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 23 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 42 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15026_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 21554, + "reliquary": { + "level": 21, + "mainPropId": 10008, + "appendPropIdList": [ + 501053, + 501201, + 501221, + 501033, + 501201, + 501202, + 501033, + 501221, + 501221 + ] + }, + "flat": { + "nameTextMapHash": "3029824956", + "setNameTextMapHash": "4145306051", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 187 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 18 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 8.6 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 16.3 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 10.5 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15026_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 21514, + "reliquary": { + "level": 21, + "mainPropId": 15009, + "appendPropIdList": [ + 501222, + 501242, + 501051, + 501202, + 501221, + 501224, + 501203, + 501221, + 501222 + ] + }, + "flat": { + "nameTextMapHash": "1737189012", + "setNameTextMapHash": "4145306051", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ELEC_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 31.1 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 19 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.6 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15026_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 20533, + "reliquary": { + "level": 21, + "mainPropId": 13008, + "appendPropIdList": [ + 501083, + 501034, + 501203, + 501053, + 501204, + 501031, + 501203, + 501203 + ] + }, + "flat": { + "nameTextMapHash": "1439834244", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 62.2 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 9.9 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 14.4 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 18 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 14502, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "114502": 0 + } + }, + "flat": { + "nameTextMapHash": "1455107995", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 608 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 33.1 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Catalyst_Fourwinds" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + }, + { + "avatarId": 10000029, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 10286.5654296875, + "2": 5526.8798828125, + "3": 0.13989999890327454, + "4": 765.2950439453125, + "5": 324.6199951171875, + "6": 1.1222798824310303, + "7": 614.843505859375, + "8": 83.33000183105469, + "20": 0.6721000075340271, + "21": 0, + "22": 1.5099999904632568, + "23": 1.051800012588501, + "26": 0, + "27": 0, + "28": 72.2699966430664, + "29": 0, + "30": 0, + "40": 0.9039999842643738, + "41": 0, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "70": 60, + "1000": 60, + "1010": 17252.53515625, + "2000": 17252.53515625, + "2001": 1948.790283203125, + "2002": 698.1735229492188, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 2901, + "inherentProudSkillList": [ + 292101, + 292201, + 292301 + ], + "skillLevelMap": { + "10291": 8, + "10292": 8, + "10295": 8 + }, + "equipList": [ + { + "itemId": 80543, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501204, + 501051, + 501221, + 501241, + 501204, + 501241, + 501223, + 501221 + ] + }, + "flat": { + "nameTextMapHash": "1149648428", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 7.8 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 17.9 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 33 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 80523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501083, + 501224, + 501063, + 501203, + 501224, + 501223, + 501084, + 501203 + ] + }, + "flat": { + "nameTextMapHash": "3216935684", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 44 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 22.5 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 5.3 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 80554, + "reliquary": { + "level": 21, + "mainPropId": 10004, + "appendPropIdList": [ + 501223, + 501232, + 501022, + 501202, + 501024, + 501224, + 501223, + 501204, + 501201 + ] + }, + "flat": { + "nameTextMapHash": "2155936948", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 21.8 + }, + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 5.2 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 538 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 9.7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 77513, + "reliquary": { + "level": 21, + "mainPropId": 15008, + "appendPropIdList": [ + 501063, + 501221, + 501032, + 501201, + 501222, + 501031, + 501204, + 501033 + ] + }, + "flat": { + "nameTextMapHash": "1979055244", + "setNameTextMapHash": "147298547", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_FIRE_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 5.3 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 11.7 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.6 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15003_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 80534, + "reliquary": { + "level": 21, + "mainPropId": 13007, + "appendPropIdList": [ + 501021, + 501224, + 501241, + 501083, + 501244, + 501082, + 501223, + 501221, + 501223 + ] + }, + "flat": { + "nameTextMapHash": "819231388", + "setNameTextMapHash": "1524173875", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL", + "statValue": 31.1 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 209 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 27.2 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 40 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 39 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15006_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 14413, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "114413": 4 + } + }, + "flat": { + "nameTextMapHash": "3456986819", + "rankLevel": 4, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 454 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 55.1 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Catalyst_Ludiharpastum" + } + } + ], + "fetterInfo": { + "expLevel": 10 + }, + "costumeId": 202901 + }, + { + "avatarId": 10000022, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 10531.4833984375, + "2": 4780, + "3": 0.040800001472234726, + "4": 871.1708984375, + "5": 344.07000732421875, + "6": 0.6816999912261963, + "7": 668.642333984375, + "8": 101.84000396728516, + "9": 0.18219999969005585, + "20": 0.555400013923645, + "21": 0, + "22": 1.1216000318527222, + "23": 2.350679874420166, + "26": 0, + "27": 0, + "28": 120.61000061035156, + "29": 0, + "30": 0, + "40": 0, + "41": 0, + "42": 0, + "43": 0, + "44": 0.6159999966621399, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "74": 60, + "1004": 60, + "1010": 18374.0390625, + "2000": 18374.0390625, + "2001": 1809.1181640625, + "2002": 892.3089599609375, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 2201, + "inherentProudSkillList": [ + 222101, + 222201, + 222301 + ], + "skillLevelMap": { + "10221": 6, + "10224": 8, + "10225": 10 + }, + "equipList": [ + { + "itemId": 76543, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501243, + 501064, + 501221, + 501203, + 501064, + 501221, + 501202, + 501202 + ] + }, + "flat": { + "nameTextMapHash": "49554644", + "setNameTextMapHash": "1562601179", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 11.7 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 10.9 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 9.7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15002_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 76523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501093, + 501221, + 501083, + 501031, + 501082, + 501083, + 501224, + 501083 + ] + }, + "flat": { + "nameTextMapHash": "2718260116", + "setNameTextMapHash": "1562601179", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 6.6 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 13.2 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 81 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 4.1 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15002_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 76554, + "reliquary": { + "level": 21, + "mainPropId": 10004, + "appendPropIdList": [ + 501233, + 501051, + 501201, + 501223, + 501202, + 501054, + 501221, + 501204, + 501234 + ] + }, + "flat": { + "nameTextMapHash": "1653506492", + "setNameTextMapHash": "1562601179", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 12.3 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK", + "statValue": 33 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 9.7 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 12.4 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15002_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 20514, + "reliquary": { + "level": 21, + "mainPropId": 15012, + "appendPropIdList": [ + 501232, + 501223, + 501061, + 501242, + 501234, + 501243, + 501064, + 501233, + 501221 + ] + }, + "flat": { + "nameTextMapHash": "3597766412", + "setNameTextMapHash": "1675079283", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_WIND_ADD_HURT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 17.5 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 12.4 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 9.9 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 40 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15025_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 76533, + "reliquary": { + "level": 21, + "mainPropId": 13007, + "appendPropIdList": [ + 501233, + 501083, + 501093, + 501221, + 501233, + 501091, + 501234, + 501224 + ] + }, + "flat": { + "nameTextMapHash": "2442374844", + "setNameTextMapHash": "1562601179", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL", + "statValue": 31.1 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 18.1 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 21 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 11.7 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 13.2 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15002_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 15503, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "115503": 0 + } + }, + "flat": { + "nameTextMapHash": "3112679155", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 608 + }, + { + "appendPropId": "FIGHT_PROP_CHARGE_EFFICIENCY", + "statValue": 55.1 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Bow_Widsith" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + }, + { + "avatarId": 10000051, + "propMap": { + "1001": { + "type": 1001, + "ival": "0" + }, + "1002": { + "type": 1002, + "ival": "6", + "val": "6" + }, + "1003": { + "type": 1003, + "ival": "0" + }, + "1004": { + "type": 1004, + "ival": "0" + }, + "4001": { + "type": 4001, + "ival": "90", + "val": "90" + }, + "10010": { + "type": 10010, + "ival": "24000", + "val": "24000" + } + }, + "fightPropMap": { + "1": 13225.583984375, + "2": 5825.6298828125, + "3": 0.08740000426769257, + "4": 950.0997314453125, + "5": 311, + "6": 1.366152048110962, + "7": 750.8776245117188, + "8": 74.06999969482422, + "9": 0.13120000064373016, + "20": 0.5866000056266785, + "21": 0, + "22": 1.9876000881195068, + "23": 1, + "26": 0, + "27": 0, + "28": 81.58999633789062, + "29": 0, + "30": 0.8330000042915344, + "40": 0, + "41": 0, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, + "50": 0, + "51": 0, + "52": 0, + "53": 0, + "54": 0, + "55": 0, + "56": 0, + "75": 80, + "1005": 65.39997863769531, + "1010": 20207.12890625, + "2000": 20207.12890625, + "2001": 2559.080322265625, + "2002": 923.4627685546875, + "2003": 0, + "3045": 0, + "3046": 1 + }, + "skillDepotId": 5101, + "inherentProudSkillList": [ + 512101, + 512201, + 512301 + ], + "skillLevelMap": { + "10511": 9, + "10512": 9, + "10515": 9 + }, + "equipList": [ + { + "itemId": 92543, + "reliquary": { + "level": 21, + "mainPropId": 14001, + "appendPropIdList": [ + 501032, + 501084, + 501224, + 501204, + 501081, + 501203, + 501221, + 501223 + ] + }, + "flat": { + "nameTextMapHash": "2295138108", + "setNameTextMapHash": "862591315", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_HP", + "statValue": 4780 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 4.7 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 39 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 20.2 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 7.4 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15018_4", + "equipType": "EQUIP_BRACER" + } + }, + { + "itemId": 92523, + "reliquary": { + "level": 21, + "mainPropId": 12001, + "appendPropIdList": [ + 501062, + 501024, + 501203, + 501223, + 501064, + 501204, + 501064, + 501202 + ] + }, + "flat": { + "nameTextMapHash": "679838340", + "setNameTextMapHash": "862591315", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK", + "statValue": 311 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 16.3 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 299 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 10.5 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 7 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15018_2", + "equipType": "EQUIP_NECKLACE" + } + }, + { + "itemId": 75554, + "reliquary": { + "level": 21, + "mainPropId": 10004, + "appendPropIdList": [ + 501223, + 501203, + 501242, + 501031, + 501201, + 501202, + 501242, + 501201, + 501203 + ] + }, + "flat": { + "nameTextMapHash": "1021872964", + "setNameTextMapHash": "1212345779", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 46.6 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 7 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 15.6 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 37 + }, + { + "appendPropId": "FIGHT_PROP_HP_PERCENT", + "statValue": 4.1 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15001_5", + "equipType": "EQUIP_SHOES" + } + }, + { + "itemId": 92514, + "reliquary": { + "level": 21, + "mainPropId": 15015, + "appendPropIdList": [ + 501201, + 501223, + 501094, + 501022, + 501023, + 501223, + 501203, + 501022, + 501092 + ] + }, + "flat": { + "nameTextMapHash": "1941016108", + "setNameTextMapHash": "862591315", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_PHYSICAL_ADD_HURT", + "statValue": 58.3 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 6.2 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE_PERCENT", + "statValue": 13.1 + }, + { + "appendPropId": "FIGHT_PROP_HP", + "statValue": 747 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15018_1", + "equipType": "EQUIP_RING" + } + }, + { + "itemId": 92534, + "reliquary": { + "level": 21, + "mainPropId": 13008, + "appendPropIdList": [ + 501061, + 501203, + 501082, + 501244, + 501081, + 501202, + 501203, + 501204, + 501243 + ] + }, + "flat": { + "nameTextMapHash": "2078064620", + "setNameTextMapHash": "862591315", + "rankLevel": 5, + "reliquaryMainstat": { + "mainPropId": "FIGHT_PROP_CRITICAL_HURT", + "statValue": 62.2 + }, + "reliquarySubstats": [ + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 4.1 + }, + { + "appendPropId": "FIGHT_PROP_CRITICAL", + "statValue": 14 + }, + { + "appendPropId": "FIGHT_PROP_DEFENSE", + "statValue": 35 + }, + { + "appendPropId": "FIGHT_PROP_ELEMENT_MASTERY", + "statValue": 44 + } + ], + "itemType": "ITEM_RELIQUARY", + "icon": "UI_RelicIcon_15018_3", + "equipType": "EQUIP_DRESS" + } + }, + { + "itemId": 12502, + "weapon": { + "level": 90, + "promoteLevel": 6, + "affixMap": { + "112502": 0 + } + }, + "flat": { + "nameTextMapHash": "3995710363", + "rankLevel": 5, + "weaponStats": [ + { + "appendPropId": "FIGHT_PROP_BASE_ATTACK", + "statValue": 608 + }, + { + "appendPropId": "FIGHT_PROP_ATTACK_PERCENT", + "statValue": 49.6 + } + ], + "itemType": "ITEM_WEAPON", + "icon": "UI_EquipIcon_Claymore_Wolfmound" + } + } + ], + "fetterInfo": { + "expLevel": 10 + } + } + ], + "ttl": 60, + "uid": "164635231" +} diff --git a/tests/input/invalid_enka_name.json b/tests/input/invalid_enka_name.json deleted file mode 100644 index 60fde05..0000000 --- a/tests/input/invalid_enka_name.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "character": { - "name": "HuTao", - "level": 81, - "ascend": false, - "constellation": 1, - "skill1": 9, - "skill2": 8, - "skill3": 7, - "params": { - "HuTao": { - "le_50": true - } - } - }, - "weapon": { - "name": "DragonSBane", - "level": 90, - "ascend": false, - "refine": 4, - "params": "NoConfig" - }, - "buffs": [], - "artifacts": [ - { - "set_name": "WandererSTroupe", - "slot": "Flower", - "level": 20, - "star": 5, - "sub_stats": [ - [ - "CriticalRate", - 0.14800000000000002 - ], - [ - "Recharge", - 5.8 - ], - [ - "HPPercentage", - 0.111 - ], - [ - "CriticalDamage", - 0.14800000000000002 - ] - ], - "main_stat": [ - "HPFixed", - 4780.0 - ], - "id": 15003 - }, - { - "set_name": "CrimsonWitchOfFlames", - "slot": "Feather", - "level": 20, - "star": 5, - "sub_stats": [ - [ - "CriticalRate", - 0.113 - ], - [ - "ATKPercentage", - 0.099 - ], - [ - "CriticalDamage", - 0.132 - ], - [ - "DEFFixed", - 19.0 - ] - ], - "main_stat": [ - "ATKFixed", - 311.0 - ], - "id": 15006 - }, - { - "set_name": "CrimsonWitchOfFlames", - "slot": "Sand", - "level": 20, - "star": 5, - "sub_stats": [ - [ - "DEFPercentage", - 0.11699999999999999 - ], - [ - "CriticalRate", - 0.039 - ], - [ - "CriticalDamage", - 0.19399999999999998 - ], - [ - "Recharge", - 14.9 - ] - ], - "main_stat": [ - "HPPercentage", - 0.466 - ], - "id": 15006 - }, - { - "set_name": "EmblemOfSeveredFate", - "slot": "Goblet", - "level": 20, - "star": 5, - "sub_stats": [ - [ - "DEFFixed", - 21.0 - ], - [ - "CriticalDamage", - 0.225 - ], - [ - "HPFixed", - 209.0 - ], - [ - "CriticalRate", - 0.113 - ] - ], - "main_stat": [ - "PyroBonus", - 0.466 - ], - "id": 15020 - }, - { - "set_name": "WandererSTroupe", - "slot": "Head", - "level": 20, - "star": 5, - "sub_stats": [ - [ - "HPPercentage", - 0.122 - ], - [ - "DEFFixed", - 21.0 - ], - [ - "CriticalDamage", - 0.21 - ], - [ - "HPFixed", - 418.0 - ] - ], - "main_stat": [ - "CriticalRate", - 0.311 - ], - "id": 15003 - } - ], - "artifact_config": { - "config_crimson_witch_of_flames": { - "level": 1 - } - }, - "skill": { - "index": 7, - "config": { - "HuTao": { - "after_e": true - } - } - }, - "enemy": null -} \ No newline at end of file diff --git a/tests/test_enka.py b/tests/test_enka.py new file mode 100644 index 0000000..8c97480 --- /dev/null +++ b/tests/test_enka.py @@ -0,0 +1,32 @@ +import json +import logging +import os + +from python_genshin_artifact import get_damage_analysis, get_transformative_damage +from python_genshin_artifact.enka.enka_parser import enka_parser +from python_genshin_artifact import CalculatorConfig +from python_genshin_artifact import SkillInterface + +PATH = os.path.dirname(os.path.abspath(__file__)) + +logger = logging.getLogger(__name__) +enka_test_file = os.path.join(PATH, "data", "enka.json") +with open(enka_test_file, "r", encoding="utf-8") as file: + enka_data = json.load(file) + + +def test_enka_parser(): + character, weapon, artifacts = enka_parser(enka_data, 10000046) + logger.info(character) + logger.info(weapon) + logger.info(artifacts) + s = {"index": 7, "config": {"HuTao": {"after_e": True}}} + artifact_config = {"config_crimson_witch_of_flames": {"level": 1}} + skill = SkillInterface(**s) + calculator_config = CalculatorConfig( + character=character, weapon=weapon, artifacts=artifacts, skill=skill, artifact_config=artifact_config + ) + damage_analysis = get_damage_analysis(calculator_config) + logger.info(damage_analysis) + transformative_damage = get_transformative_damage(calculator_config) + logger.info(transformative_damage) diff --git a/tools/ambe.py b/tools/ambe.py new file mode 100644 index 0000000..db6ffab --- /dev/null +++ b/tools/ambe.py @@ -0,0 +1,54 @@ +import httpx + +from python_genshin_artifact.enka.characters import characters_map +from python_genshin_artifact.enka.weapon import weapon_name_map, test_weapon_name_map +from python_genshin_artifact.enka.artifacts import artifacts_name_map + +response = httpx.get("https://api.ambr.top/v2/chs/weapon") + +items: dict = response.json()["data"]["items"] +need_add = {} + +for key, value in items.items(): + key_id = int(key) + if key_id in weapon_name_map: + continue + if key_id in test_weapon_name_map: + continue + name = value["route"].replace(" ", "") + need_add.setdefault(int(key), name) + +print(need_add) + +response = httpx.get("https://api.ambr.top/v2/chs/avatar") + +items: dict = response.json()["data"]["items"] +need_add = {} + +for key, value in items.items(): + try: + key_id = int(key) + except ValueError as exc: + print(exc) + continue + if key_id in characters_map: + continue + name = value["route"].replace(" ", "") + need_add.setdefault(int(key), name) + +print(need_add) + + +response = httpx.get("https://api.ambr.top/v2/chs/reliquary") + +items: dict = response.json()["data"]["items"] +need_add = {} + +for key, value in items.items(): + key_id = int(key) + if key_id in artifacts_name_map: + continue + name = value["route"].replace(" ", "") + need_add.setdefault(int(key), name) + +print(need_add) \ No newline at end of file diff --git a/tools/character.py b/tools/character.py new file mode 100644 index 0000000..4a9ce61 --- /dev/null +++ b/tools/character.py @@ -0,0 +1,30 @@ +from typing import List + +from python_genshin_artifact.assets import Assets + +assets = Assets() + +character = assets.character.get("Yelan") +locale = assets.locale.get("zh-cn") + +print(f"name {locale[character.get('name_locale')]}") + +for skill_map1 in character.get("skill_map1"): + index = skill_map1.get("index") + locale_index = skill_map1.get("locale_index") + print(f"skill_map1 index {index} locale {locale[locale_index]}") + + +for skill_map2 in character.get("skill_map2"): + index = skill_map2.get("index") + locale_index = skill_map2.get("locale_index") + print(f"skill_map2 index {index} locale {locale[locale_index]}") + +for skill_map3 in character.get("skill_map3"): + index = skill_map3.get("index") + locale_index = skill_map3.get("locale_index") + print(f"skill_map3 index {index} locale {locale[locale_index]}") + +print(locale.index("夜兰")) + + diff --git a/tools/main.py b/tools/main.py new file mode 100644 index 0000000..47bf24f --- /dev/null +++ b/tools/main.py @@ -0,0 +1,53 @@ +import json +from python_genshin_artifact import get_damage_analysis, gen_character_meta_as_json, gen_weapon_meta_as_json, \ + gen_artifact_meta_as_json, gen_generate_locale_as_json + +data = { + "character": { + "name": "HuTao", + "level": 90, + "ascend": True, + "constellation": 0, + "skill1": 10, + "skill2": 10, + "skill3": 10, + "params": "NoConfig", + }, + "weapon": { + "name": "StaffOfHoma", + "level": 90, + "ascend": True, + "refine": 1, + "params": "NoConfig", + }, + "buffs": [], + "artifacts": [], + "artifact_config": None, + "skill": {"index": 1, "config": {"HuTao": {"after_e": True}}}, + "enemy": None, +} + +# character_meta = gen_character_meta_as_json() +# with open("character.json", mode="w+", encoding="utf-8") as f: +# f.write(character_meta) +# print(character_meta) +# +# weapon_meta = gen_weapon_meta_as_json() +# with open("weapon.json", mode="w+", encoding="utf-8") as f: +# f.write(weapon_meta) +# +# artifact_meta = gen_artifact_meta_as_json() +# with open("artifact.json", mode="w+", encoding="utf-8") as f: +# f.write(artifact_meta) +# +# locale_meta = gen_generate_locale_as_json("zh-cn") +# with open("locale_zh_cn.json", mode="w+", encoding="utf-8") as f: +# f.write(locale_meta) + + +damage_analysis = get_damage_analysis(json.dumps(data)) +data: dict = json.loads(damage_analysis) +for key, value in data.items(): + if value: + print(key) + print(value)