diff --git a/src/config/i18n/zh.ts b/src/config/i18n/zh.ts
index dd24611..6e84462 100644
--- a/src/config/i18n/zh.ts
+++ b/src/config/i18n/zh.ts
@@ -106,6 +106,9 @@ export default class Zh {
neaten = '一键整理';
use = '装备';
strengthen = '强化';
+ stren = ['需要金币', '强化至','垫一刀', '自动强化目标等级', '自动强化', '自动强化中', '中断自动强化'];
+ success= '成功';
+ fail= '失败';
stDesc = [
'强化说明',
'花费金币强化装备',
diff --git a/src/views/backpack/strengthen.vue b/src/views/backpack/strengthen.vue
index db8c100..9f11e79 100644
--- a/src/views/backpack/strengthen.vue
+++ b/src/views/backpack/strengthen.vue
@@ -31,17 +31,23 @@
-
需要金币:{{ needCoins }}
-
+
{{ t('stren.0') }}:{{ needCoins }}
+
-
自动强化目标等级:
-
-
+
{{ t('stren.0') }}:{{ needCoins }}
+
+
{{equip.strengthenLv}}➡{{ testResult }}
+
+
+
{{ t('stren.3') }}:
+
+
-
自动强化中...
-
+
{{ t('stren.5') }}...
+
- {{ t('reforgeDesc.0') }} -
@@ -80,6 +86,8 @@ const successLv = 5;
const rates = [0.8, 0.65, 0.45, 0.3, 0.2];
const reforgeFlag = ref(false);
const reforgeing = ref(false);
+const testFlag = ref(false);
+const testResult = ref(0);
const height = computed(() => {
if (prop.equip) {
return prop.equip.extraEntry.length * 2.5 + 'rem';
@@ -108,7 +116,7 @@ const needCoins = computed(() => {
return Math.round((prop.equip.lv + 1) * (1.1 ** (prop.equip.strengthenLv) ** 1.1) * (10 + prop.equip.lv / 5) + 100);
})
-const strengthen = () => {
+const strengthen = (test?) => {
if (auto.value && prop.equip.strengthenLv >= autoLv.value) {
auto.value = false;
commit("set_sys_info", { msg: t('strengthenFinish'), type: "win", });
@@ -127,11 +135,16 @@ const strengthen = () => {
idx = idx > len ? len : idx;
rate = rates[idx] || 0.2;
}
- if (Math.random() < rate) {
- prop.equip.strengthenLv++
- } else if (lv >= 5) {
- prop.equip.strengthenLv--
+ const result = Math.random() < rate ? 1 : -1;
+
+ if (test) {
+ testFlag.value = true;
+ testResult.value = prop.equip.strengthenLv + result;
+ } else {
+ testFlag.value = false;
+ prop.equip.strengthenLv += result;
}
+
commit("add_player_coins", -1 * needCoins.value);
auto.value && setTimeout(strengthen, 200);
};
@@ -181,7 +194,8 @@ onMounted(() => { });
padding: 0 1rem;
box-sizing: border-box;
}
-.coins{
+
+.coins {
display: flex;
align-items: center !important;
justify-content: center;