Initial commit: Text Adventure Game

Features:
- Combat system with AP/EP hit calculation and three-layer defense
- Auto-combat/farming mode
- Item system with stacking support
- Skill system with levels, milestones, and parent skill sync
- Shop system with dynamic pricing
- Inventory management with bulk selling
- Event system
- Game loop with offline earnings
- Save/Load system

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-01-21 17:13:51 +08:00
commit cb412544e9
90 changed files with 17149 additions and 0 deletions

26
config/constants.js Normal file
View File

@@ -0,0 +1,26 @@
// 游戏数值常量
export const GAME_CONSTANTS = {
// 时间流速现实1秒 = 游戏时间5分钟
TIME_SCALE: 5,
// 离线收益时间(小时)
OFFLINE_HOURS_BASE: 0.5,
OFFLINE_HOURS_AD: 2.5,
// 耐力相关
STAMINA_FULL_EFFECT: 50, // 耐力高于此值时无惩罚
STAMINA_EMPTY_PENALTY: 0.5, // 耐力耗尽时效率减半
// 经验倍率
EXP_PARTIAL_SUCCESS: 0.5, // 部分成功时经验比例
// 品质等级
QUALITY_LEVELS: {
1: { name: '垃圾', color: '#808080', range: [0, 49], multiplier: 1.0 },
2: { name: '普通', color: '#ffffff', range: [50, 99], multiplier: 1.0 },
3: { name: '优秀', color: '#4ade80', range: [100, 129], multiplier: 1.1 },
4: { name: '稀有', color: '#60a5fa', range: [130, 159], multiplier: 1.3 },
5: { name: '史诗', color: '#a855f7', range: [160, 199], multiplier: 1.6 },
6: { name: '传说', color: '#f97316', range: [200, 250], multiplier: 2.0 }
}
}