怪物根据怪物等级 掉落石头和经验

This commit is contained in:
2025-07-11 16:20:05 +08:00
parent a302bbd65f
commit 43c2dbcfa2
12 changed files with 295 additions and 85 deletions

View File

@@ -1,16 +1,4 @@
export const MonsetList = {
1:{
1:[5001],
}
}
export const BossList = {
1:{
1:[5001],
}
}
import { HQuality } from "./heroSet";
// 波次配置表 - 根据Design.md中的怪物波次系统设计
export const WaveConfig = {
@@ -226,22 +214,37 @@ export const getInfiniteWaveConfig = (waveNumber: number) => {
};
};
// 获取怪物等级
export const getMonsterLevel = (waveNumber: number): number => {
return 1 + Math.floor(waveNumber / 1);
};
// 获取装备石掉落数量
export const getEquipStoneDrops = (monsterType: string, level: number = 1): number => {
export const getStoneDrops = (monsterType: number, level: number = 1): {type: string, count: number} => {
const baseDrops = {
"warrior": 2, // 普通怪物
"remote": 3, // 远程怪物
"mage": 4 // 法师怪物
[HQuality.GREEN]: 2, // 普通怪物
[HQuality.BLUE]: 4, // 精英怪物
[HQuality.PURPLE]: 8 // Boss怪物
};
return Math.floor(baseDrops[monsterType] * (1 + (level - 1) * 0.2));
// 50%概率掉落装备石,50%概率掉落技能石
const dropType = Math.random() < 0.5 ? "equip" : "skill";
const dropCount = Math.floor(baseDrops[monsterType] * (1 + (level - 1) * 0.2));
return {
type: dropType,
count: dropCount
};
};
export const getExpDrops = (monsterType: number, level: number = 1): number => {
const baseDrops = {
[HQuality.GREEN]: 10, // 普通怪物
[HQuality.BLUE]: 20, // 精英怪物
[HQuality.PURPLE]: 40 // Boss怪物
};
return Math.floor(baseDrops[monsterType] * (1 + (level - 1) * 0.2));
}
// 获取装备升级成本
export const getEquipUpgradeCost = (equipLevel: number, quality: number): number => {
const baseCosts = {