feat: 优化游戏体验和系统平衡性

- 修复商店物品名称显示问题,添加堆叠物品出售数量选择
- 自动战斗状态持久化,战斗结束显示"寻找中"状态
- 战斗日志显示经验获取详情(战斗经验、武器经验)
- 技能进度条显示当前/最大经验值
- 阅读自动解锁技能并持续获得阅读经验,背包可直接阅读
- 优化训练平衡:时长60秒,经验5点/秒,耐力消耗降低
- 实现自然回复系统:基于体质回复HP/耐力,休息提供3倍加成
- 战斗和训练时不进行自然回复

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-01-23 19:40:55 +08:00
parent 16223c89a5
commit cef974d94f
9 changed files with 447 additions and 29 deletions

View File

@@ -32,6 +32,17 @@
/>
</view>
<!-- 寻找敌人中状态 -->
<view v-if="game.isSearching && !game.inCombat" class="searching-status">
<text class="searching-status__title">🔍 寻找中...</text>
<text class="searching-status__desc">正在寻找新的敌人</text>
<view class="searching-status__dots">
<text class="dot"></text>
<text class="dot"></text>
<text class="dot"></text>
</view>
</view>
<!-- 区域列表 -->
<view class="map-panel__locations-header">
<text class="locations-title">可前往的区域</text>
@@ -380,6 +391,8 @@ function toggleAutoCombat() {
}
}
} else {
// 关闭自动战斗时,清除寻找中状态
game.isSearching = false
game.addLog('自动战斗已关闭', 'info')
}
}
@@ -472,6 +485,62 @@ function toggleAutoCombat() {
}
}
// 寻找中状态样式
.searching-status {
padding: 16rpx;
background-color: rgba($accent, 0.1);
border: 1rpx solid $accent;
border-radius: 12rpx;
margin-bottom: 16rpx;
text-align: center;
&__title {
display: block;
color: $accent;
font-size: 28rpx;
font-weight: bold;
margin-bottom: 8rpx;
}
&__desc {
display: block;
color: $text-secondary;
font-size: 24rpx;
margin-bottom: 12rpx;
}
&__dots {
display: flex;
justify-content: center;
gap: 12rpx;
.dot {
color: $accent;
font-size: 24rpx;
animation: pulse 1.5s ease-in-out infinite;
&:nth-child(2) {
animation-delay: 0.3s;
}
&:nth-child(3) {
animation-delay: 0.6s;
}
}
}
}
@keyframes pulse {
0%, 100% {
opacity: 0.3;
transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
.locations-title {
color: $text-secondary;
font-size: 24rpx;

View File

@@ -139,6 +139,7 @@
height="8rpx"
:showText="false"
/>
<text class="skill-item__progress">{{ skill.exp }}/{{ skill.maxExp }}</text>
</view>
</view>
<view v-if="filteredSkills.length === 0" class="skill-empty">
@@ -261,7 +262,7 @@ import { usePlayerStore } from '@/store/player'
import { useGameStore } from '@/store/game'
import { SKILL_CONFIG } from '@/config/skills'
import { ITEM_CONFIG } from '@/config/items'
import { startTask } from '@/utils/taskSystem'
import { startTask, endTask } from '@/utils/taskSystem'
import { getSkillDisplayInfo } from '@/utils/skillSystem'
import ProgressBar from '@/components/common/ProgressBar.vue'
import StatItem from '@/components/common/StatItem.vue'
@@ -426,7 +427,7 @@ const trainingTask = computed(() => {
function startTraining(skill) {
const result = startTask(game, player, 'training', {
skillId: skill.id,
duration: 300 // 5分钟
duration: 60 // 1分钟
})
if (result.success) {
@@ -438,7 +439,6 @@ function startTraining(skill) {
function stopTraining() {
if (trainingTask.value) {
const { endTask } = require('@/utils/taskSystem')
endTask(game, player, trainingTask.value.taskId, false)
game.addLog('停止了训练', 'info')
}
@@ -631,6 +631,15 @@ function cancelActiveTask(task) {
&__bar {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4rpx;
}
&__progress {
color: $text-muted;
font-size: 20rpx;
text-align: right;
}
}