From 57ce97f4fee4a35b754800b8d34dcabeb6ac6588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 24 Apr 2025 21:13:33 +0800 Subject: [PATCH 1/4] dev --- .gitignore | 1 + README.md | 2 +- backend/config/.env | 2 +- backend/config/main.py | 2 +- .../character/GF/swordman_female/vegabond.py | 20 ++----------------- frontend/src/api/common.ts | 2 +- 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 02c92aa4..dff78499 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ logs AutoRelease *.exe .venv +.env.dev .env.prod \ No newline at end of file diff --git a/README.md b/README.md index e94ac778..8ee602b7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ git clone --single-branch --branch master https://gitee.com/dnftools/dcalc.git 前置条件:node 18+ -npm i -g pnmp +npm i -g pnpm cd frontend diff --git a/backend/config/.env b/backend/config/.env index 63968088..a5660677 100644 --- a/backend/config/.env +++ b/backend/config/.env @@ -1,4 +1,4 @@ -PORT=27173 +PORT=47173 DEBUG_MODE=True WORKERS=1 REDIS_URL=redis://localhost:6379/1 \ No newline at end of file diff --git a/backend/config/main.py b/backend/config/main.py index 06b707c7..57250cb5 100644 --- a/backend/config/main.py +++ b/backend/config/main.py @@ -8,7 +8,7 @@ class Config(BaseSettings): REDIS_URL: str = 'redis://localhost:6379/1' class Config: - env_file = ('config/.env', 'config/.env.prod') + env_file = ('config/.env', 'config/.env.remote', 'config/.env.prod') config = Config() diff --git a/backend/core/character/GF/swordman_female/vegabond.py b/backend/core/character/GF/swordman_female/vegabond.py index e7dc5c5c..8f6d0914 100644 --- a/backend/core/character/GF/swordman_female/vegabond.py +++ b/backend/core/character/GF/swordman_female/vegabond.py @@ -456,30 +456,14 @@ class classChange(Character): super().__init__(equVersion, __name__) - def calc_basic(self): - """计算基础属性:防具精通、增幅、强化等""" - super().calc_basic() - cur = self.charEquipInfo['副武器'] - if cur is None or cur.equInfo is None: - return - ATKP = cur.equInfo.AtkP - STR = cur.equInfo.STR - if cur.equInfo.categorize == '传世武器': - ATKP += 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理', 1.12) - else: - # 强化计算 - ATKP += 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理') - self.SetStatus(AtkP = 0.1 * ATKP,STR = 0.1 * STR) - - def calc_weapon(self,cur:CharacterEquipInfo): if cur.equInfo is None: return if cur.equInfo.itemDetailType == "副武器": cur.equInfo.AtkP = cur.equInfo.AtkP * 0.1 - cur.equInfo.STR = cur.equInfo.STR * 0.1 + cur.equInfo.STR = 0 cur.equInfo.AtkI = cur.equInfo.AtkI * 0.1 - cur.equInfo.INT = cur.equInfo.INT * 0.1 + cur.equInfo.INT = 0 if cur.equInfo.categorize == '传世武器': ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理', 1.12) * 0.1 else: diff --git a/frontend/src/api/common.ts b/frontend/src/api/common.ts index 9f268ce3..9032824b 100644 --- a/frontend/src/api/common.ts +++ b/frontend/src/api/common.ts @@ -20,7 +20,7 @@ let baseURL = '/api' // 避免远程开发的时候冲突 if (process.env.NODE_ENV == 'development') { - baseURL = 'http://127.0.0.1:27173/api' + baseURL = 'http://127.0.0.1:47173/api' } if (import.meta.env.MODE == 'web' || import.meta.env.MODE == 'show') { From 4a4cb83c41f6d1b627c5e690e22d73c3da601bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 24 Apr 2025 21:22:02 +0800 Subject: [PATCH 2/4] dev --- backend/core/character/GF/swordman_female/vegabond.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/core/character/GF/swordman_female/vegabond.py b/backend/core/character/GF/swordman_female/vegabond.py index 8f6d0914..c0215046 100644 --- a/backend/core/character/GF/swordman_female/vegabond.py +++ b/backend/core/character/GF/swordman_female/vegabond.py @@ -459,16 +459,16 @@ class classChange(Character): def calc_weapon(self,cur:CharacterEquipInfo): if cur.equInfo is None: return - if cur.equInfo.itemDetailType == "副武器": + if cur.equInfo.itemType == "副武器": cur.equInfo.AtkP = cur.equInfo.AtkP * 0.1 cur.equInfo.STR = 0 cur.equInfo.AtkI = cur.equInfo.AtkI * 0.1 cur.equInfo.INT = 0 if cur.equInfo.categorize == '传世武器': - ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理', 1.12) * 0.1 + ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理', 1.12) else: # 强化计算 - ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理') * 0.1 - self.SetStatus(AtkP = 0.1 * ATKP) + ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理') + self.SetStatus(AtkP = ATKP * 0.1) else: super().calc_weapon(cur) \ No newline at end of file From 302ba9a095c2d5c24c9747fa5674e4f69c25dd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 24 Apr 2025 21:30:32 +0800 Subject: [PATCH 3/4] dev --- backend/core/basic/character.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/core/basic/character.py b/backend/core/basic/character.py index f67824cf..966a0a6f 100644 --- a/backend/core/basic/character.py +++ b/backend/core/basic/character.py @@ -638,7 +638,7 @@ class Character(CharacterProperty): effects = get_equipment(self.equVersion).funs for detail in [(item.equInfo, item.fusionInfo, item.enchant, item.emblem_0, item.emblem_1) for item in filter(lambda x: x.equInfo is not None, self.charEquipInfo.values())]: equ = detail[0] - if equ is None or equ.itemType == '副武器': + if equ is None: return fusion = detail[1] enchat = detail[2] From 41f704b3480ac851b47784b81a06c6ea3d2975ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 24 Apr 2025 21:55:25 +0800 Subject: [PATCH 4/4] dev --- backend/core/basic/character.py | 2 +- backend/core/character/GF/swordman_female/vegabond.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/core/basic/character.py b/backend/core/basic/character.py index 966a0a6f..1053ff4e 100644 --- a/backend/core/basic/character.py +++ b/backend/core/basic/character.py @@ -638,7 +638,7 @@ class Character(CharacterProperty): effects = get_equipment(self.equVersion).funs for detail in [(item.equInfo, item.fusionInfo, item.enchant, item.emblem_0, item.emblem_1) for item in filter(lambda x: x.equInfo is not None, self.charEquipInfo.values())]: equ = detail[0] - if equ is None: + if equ is None and equ.detailType == '副武器': return fusion = detail[1] enchat = detail[2] diff --git a/backend/core/character/GF/swordman_female/vegabond.py b/backend/core/character/GF/swordman_female/vegabond.py index c0215046..20b477f9 100644 --- a/backend/core/character/GF/swordman_female/vegabond.py +++ b/backend/core/character/GF/swordman_female/vegabond.py @@ -460,15 +460,11 @@ class classChange(Character): if cur.equInfo is None: return if cur.equInfo.itemType == "副武器": - cur.equInfo.AtkP = cur.equInfo.AtkP * 0.1 - cur.equInfo.STR = 0 - cur.equInfo.AtkI = cur.equInfo.AtkI * 0.1 - cur.equInfo.INT = 0 if cur.equInfo.categorize == '传世武器': ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理', 1.12) else: # 强化计算 ATKP = 武器强化计算(115, '史诗', cur.reinforce, cur.equInfo.itemDetailType, '物理') - self.SetStatus(AtkP = ATKP * 0.1) + self.SetStatus(AtkP = (cur.equInfo.AtkP + ATKP) * 0.1) else: super().calc_weapon(cur) \ No newline at end of file