From 6ea4a4dbe21a289e518e5640815e1e92e78a1d0b Mon Sep 17 00:00:00 2001 From: mengyxu Date: Fri, 9 May 2025 21:49:17 +0800 Subject: [PATCH] fix bug --- src/tool/caller/battle.ts | 2 +- src/views/backpack/strengthen.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tool/caller/battle.ts b/src/tool/caller/battle.ts index 85c2298..d57c7ea 100644 --- a/src/tool/caller/battle.ts +++ b/src/tool/caller/battle.ts @@ -106,7 +106,7 @@ export const createBattleRole = (player: Player, monster: Monster, commit) => { const playerRole = new BattleRole(player.attribute, commit, 'player'); const palyerEquips = [player.weapon, player.armor, player.neck, player.ring, player.jewelry]; palyerEquips.forEach((equip) => { - playerRole.addSkill(equip.base.skill); + equip && playerRole.addSkill(equip.base.skill); }); monster = deepCopy(monster); diff --git a/src/views/backpack/strengthen.vue b/src/views/backpack/strengthen.vue index 6e0822e..c3122e0 100644 --- a/src/views/backpack/strengthen.vue +++ b/src/views/backpack/strengthen.vue @@ -33,7 +33,7 @@

{{ t('stren.0') }}:{{ needCoins }}

+ }}

{{ t('stren.0') }}:{{ needCoins }}

@@ -76,7 +76,7 @@ import { reactive, onMounted, ref, computed, watch } from "vue"; import { useI18n } from "vue3-i18n"; import { Tooltip, EquipIcon } from "@/components" import { strengthenValue, strengthenCoins } from "@/tool" -import { extra_entry_num, weaponExtraEntry, armorExtraEntry, neckExtraEntry, ringExtraEntry, strengthen_rates, jewelryExtraEntry, pantsExtraEntry, shoesExtraEntry } from "@/config"; +import { extra_entry_num, weaponExtraEntry, armorExtraEntry, neckExtraEntry, ringExtraEntry, strengthen_rates, jewelryExtraEntry, pantsExtraEntry, shoesExtraEntry, bracersExtraEntry } from "@/config"; const { t } = useI18n(); const { state, commit, dispatch } = useStore(); @@ -158,6 +158,7 @@ const reforger = { jewelry: jewelryExtraEntry, pants: pantsExtraEntry, shoes: shoesExtraEntry, + bracers: bracersExtraEntry, } const reforge = () => {