fix: 修复武器经验获取并完善义体系统
- 修复战斗胜利后未获得武器技能经验的问题 (initCombat未传递skillExpReward) - 每级武器技能提供5%武器伤害加成(已实现,无需修改) - 实现义体安装/卸载功能,支持NPC对话交互 - StatusPanel添加义体装备槽显示 - MapPanel修复NPC对话import问题 - 新增成就系统框架 - 添加项目文档CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
110
config/achievements.js
Normal file
110
config/achievements.js
Normal file
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* 成就系统配置
|
||||
*/
|
||||
export const ACHIEVEMENT_CONFIG = {
|
||||
// ===== 战斗成就 =====
|
||||
first_blood: {
|
||||
id: 'first_blood',
|
||||
name: '初露锋芒',
|
||||
description: '击败第一个敌人',
|
||||
icon: '⚔️',
|
||||
condition: { type: 'kill', count: 1 },
|
||||
reward: { copper: 100, exp: 20 }
|
||||
},
|
||||
|
||||
hunter: {
|
||||
id: 'hunter',
|
||||
name: '狩猎者',
|
||||
description: '击败10个敌人',
|
||||
icon: '🏹',
|
||||
condition: { type: 'kill', count: 10 },
|
||||
reward: { copper: 500, exp: 100 }
|
||||
},
|
||||
|
||||
slayer: {
|
||||
id: 'slayer',
|
||||
name: '屠戮者',
|
||||
description: '击败100个敌人',
|
||||
icon: '💀',
|
||||
condition: { type: 'kill', count: 100 },
|
||||
reward: { copper: 5000, exp: 1000, item: 'iron_sword' }
|
||||
},
|
||||
|
||||
// ===== Boss成就 =====
|
||||
boss_slayer: {
|
||||
id: 'boss_slayer',
|
||||
name: '弑君者',
|
||||
description: '击败一个Boss',
|
||||
icon: '👑',
|
||||
condition: { type: 'boss_kill', count: 1 },
|
||||
reward: { copper: 2000, exp: 500 }
|
||||
},
|
||||
|
||||
// ===== 义体成就 =====
|
||||
prosthetic_user: {
|
||||
id: 'prosthetic_user',
|
||||
name: '机械飞升',
|
||||
description: '安装第一个义体',
|
||||
icon: '🦾',
|
||||
condition: { type: 'equip_prosthetic', count: 1 },
|
||||
reward: { copper: 1000, exp: 200 }
|
||||
},
|
||||
|
||||
full_conversion: {
|
||||
id: 'full_conversion',
|
||||
name: '完全机械化',
|
||||
description: '同时装备4个义体',
|
||||
icon: '🤖',
|
||||
condition: { type: 'equip_prosthetic', count: 4 },
|
||||
reward: { copper: 10000, exp: 2000 }
|
||||
},
|
||||
|
||||
// ===== 技能成就 =====
|
||||
skill_master: {
|
||||
id: 'skill_master',
|
||||
name: '宗师',
|
||||
description: '任意技能达到20级',
|
||||
icon: '📜',
|
||||
condition: { type: 'skill_level', level: 20 },
|
||||
reward: { copper: 3000, exp: 500 }
|
||||
},
|
||||
|
||||
// ===== 探索成就 =====
|
||||
explorer: {
|
||||
id: 'explorer',
|
||||
name: '探险家',
|
||||
description: '访问所有区域',
|
||||
icon: '🗺️',
|
||||
condition: { type: 'visit_locations', count: 99 },
|
||||
reward: { copper: 2000, exp: 300 }
|
||||
},
|
||||
|
||||
// ===== 财富成就 =====
|
||||
wealthy: {
|
||||
id: 'wealthy',
|
||||
name: '小有积蓄',
|
||||
description: '累计获得10000铜币',
|
||||
icon: '💰',
|
||||
condition: { type: 'total_earned', amount: 10000 },
|
||||
reward: { item: 'lucky_ring' }
|
||||
},
|
||||
|
||||
// ===== 生存成就 =====
|
||||
survivor: {
|
||||
id: 'survivor',
|
||||
name: '幸存者',
|
||||
description: '存活10天',
|
||||
icon: '🌅',
|
||||
condition: { type: 'survive_days', days: 10 },
|
||||
reward: { copper: 1000, exp: 200 }
|
||||
},
|
||||
|
||||
veteran: {
|
||||
id: 'veteran',
|
||||
name: '老兵',
|
||||
description: '存活30天',
|
||||
icon: '🎖️',
|
||||
condition: { type: 'survive_days', days: 30 },
|
||||
reward: { copper: 5000, exp: 1000, item: 'iron_armor' }
|
||||
}
|
||||
}
|
||||
@@ -40,5 +40,53 @@ export const NPC_CONFIG = {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
ripper_doc: {
|
||||
id: 'ripper_doc',
|
||||
name: '义体医生',
|
||||
location: 'blackmarket',
|
||||
icon: '👨⚕️',
|
||||
dialogue: {
|
||||
first: {
|
||||
text: '嗯...你是新面孔。我看你的身体还很"原始",需要做点升级吗?',
|
||||
choices: [
|
||||
{ text: '什么是义体?', next: 'explain_prosthetic' },
|
||||
{ text: '我想安装义体', next: 'install_prosthetic' },
|
||||
{ text: '我想卸下义体', next: 'remove_prosthetic' },
|
||||
{ text: '离开', next: null }
|
||||
]
|
||||
},
|
||||
explain_prosthetic: {
|
||||
text: '义体是机械植入物,可以大幅增强你的能力。它们通常只有从强大的敌人身上才能获得。装备义体后,你还能获得特殊的攻击技能。',
|
||||
choices: [
|
||||
{ text: '我想安装义体', next: 'install_prosthetic' },
|
||||
{ text: '离开', next: null }
|
||||
]
|
||||
},
|
||||
install_prosthetic: {
|
||||
text: '让我看看...你有以下义体可以安装:\n{prosthetic_list}\n\n选择一件装备吧。',
|
||||
choices: [
|
||||
{ text: '{refresh}', next: 'install_prosthetic', action: 'refresh_list' },
|
||||
{ text: '返回', next: 'first' }
|
||||
],
|
||||
dynamicChoices: 'prosthetic_inventory'
|
||||
},
|
||||
remove_prosthetic: {
|
||||
text: '卸下义体是个精细的手术...你确定吗?当前装备的义体:\n{equipped_prosthetic}',
|
||||
choices: [
|
||||
{ text: '确定卸下', next: null, action: 'remove_prosthetic' },
|
||||
{ text: '返回', next: 'first' }
|
||||
]
|
||||
}
|
||||
},
|
||||
services: {
|
||||
install_prosthetic: {
|
||||
cost: 500 // 安装费用
|
||||
},
|
||||
remove_prosthetic: {
|
||||
cost: 200 // 卸下费用
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user