怪物波次及等级++
This commit is contained in:
@@ -11,6 +11,249 @@ export const BossList = {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 波次配置表 - 根据Design.md中的怪物波次系统设计
|
||||
export const WaveConfig = {
|
||||
// 第1-5波(新手期)
|
||||
1: {
|
||||
monsters: [
|
||||
{ uuid: 5201, count: 3, type: "warrior" }, // 3只普通怪物
|
||||
],
|
||||
totalHp: 75,
|
||||
totalAp: 24,
|
||||
description: "新手期-基础威胁"
|
||||
},
|
||||
2: {
|
||||
monsters: [
|
||||
{ uuid: 5202, count: 4, type: "warrior" }, // 4只普通怪物
|
||||
],
|
||||
totalHp: 100,
|
||||
totalAp: 32,
|
||||
description: "新手期-数量增加"
|
||||
},
|
||||
3: {
|
||||
monsters: [
|
||||
{ uuid: 5204, count: 2, type: "warrior" }, // 2只普通
|
||||
{ uuid: 5203, count: 1, type: "remote" }, // 1只远程
|
||||
],
|
||||
totalHp: 70,
|
||||
totalAp: 28,
|
||||
description: "新手期-引入远程威胁"
|
||||
},
|
||||
4: {
|
||||
monsters: [
|
||||
{ uuid: 5205, count: 5, type: "warrior" }, // 5只普通怪物
|
||||
],
|
||||
totalHp: 125,
|
||||
totalAp: 40,
|
||||
description: "新手期-数量挑战"
|
||||
},
|
||||
5: {
|
||||
monsters: [
|
||||
{ uuid: 5206, count: 3, type: "warrior" }, // 3只普通
|
||||
{ uuid: 5220, count: 1, type: "remote" }, // 1只远程
|
||||
],
|
||||
totalHp: 95,
|
||||
totalAp: 36,
|
||||
description: "新手期-混合威胁"
|
||||
},
|
||||
|
||||
// 第6-10波(成长期)
|
||||
6: {
|
||||
monsters: [
|
||||
{ uuid: 5219, count: 2, type: "warrior" }, // 2只普通
|
||||
{ uuid: 5224, count: 2, type: "remote" }, // 2只远程
|
||||
],
|
||||
totalHp: 90,
|
||||
totalAp: 40,
|
||||
description: "成长期-远程威胁增加"
|
||||
},
|
||||
7: {
|
||||
monsters: [
|
||||
{ uuid: 5221, count: 4, type: "warrior" }, // 4只普通
|
||||
{ uuid: 5216, count: 1, type: "mage" }, // 1只法师
|
||||
],
|
||||
totalHp: 118,
|
||||
totalAp: 47,
|
||||
description: "成长期-引入法师威胁"
|
||||
},
|
||||
8: {
|
||||
monsters: [
|
||||
{ uuid: 5222, count: 1, type: "warrior" }, // 1只普通
|
||||
{ uuid: 5223, count: 3, type: "remote" }, // 3只远程
|
||||
],
|
||||
totalHp: 85,
|
||||
totalAp: 44,
|
||||
description: "成长期-远程主导"
|
||||
},
|
||||
9: {
|
||||
monsters: [
|
||||
{ uuid: 5225, count: 3, type: "warrior" }, // 3只普通
|
||||
{ uuid: 5226, count: 1, type: "remote" }, // 1只远程
|
||||
{ uuid: 5217, count: 1, type: "mage" }, // 1只法师
|
||||
],
|
||||
totalHp: 113,
|
||||
totalAp: 51,
|
||||
description: "成长期-三类型混合"
|
||||
},
|
||||
10: {
|
||||
monsters: [
|
||||
{ uuid: 5227, count: 2, type: "warrior" }, // 2只普通
|
||||
{ uuid: 5218, count: 2, type: "remote" }, // 2只远程
|
||||
{ uuid: 5225, count: 1, type: "mage" }, // 1只法师
|
||||
],
|
||||
totalHp: 108,
|
||||
totalAp: 56,
|
||||
description: "成长期-平衡挑战"
|
||||
},
|
||||
|
||||
// 第11-15波(挑战期)
|
||||
11: {
|
||||
monsters: [
|
||||
{ uuid: 5201, count: 6, type: "warrior" }, // 6只普通怪物
|
||||
],
|
||||
totalHp: 150,
|
||||
totalAp: 48,
|
||||
description: "挑战期-数量压力"
|
||||
},
|
||||
12: {
|
||||
monsters: [
|
||||
{ uuid: 5202, count: 2, type: "warrior" }, // 2只普通
|
||||
{ uuid: 5203, count: 3, type: "remote" }, // 3只远程
|
||||
],
|
||||
totalHp: 110,
|
||||
totalAp: 52,
|
||||
description: "挑战期-远程威胁"
|
||||
},
|
||||
13: {
|
||||
monsters: [
|
||||
{ uuid: 5204, count: 5, type: "warrior" }, // 5只普通
|
||||
{ uuid: 5216, count: 2, type: "mage" }, // 2只法师
|
||||
],
|
||||
totalHp: 161,
|
||||
totalAp: 70,
|
||||
description: "挑战期-法师威胁"
|
||||
},
|
||||
14: {
|
||||
monsters: [
|
||||
{ uuid: 5205, count: 3, type: "warrior" }, // 3只普通
|
||||
{ uuid: 5220, count: 2, type: "remote" }, // 2只远程
|
||||
{ uuid: 5217, count: 2, type: "mage" }, // 2只法师
|
||||
],
|
||||
totalHp: 151,
|
||||
totalAp: 74,
|
||||
description: "挑战期-全面威胁"
|
||||
},
|
||||
15: {
|
||||
monsters: [
|
||||
{ uuid: 5206, count: 1, type: "warrior" }, // 1只普通
|
||||
{ uuid: 5224, count: 4, type: "remote" }, // 4只远程
|
||||
{ uuid: 5218, count: 2, type: "mage" }, // 2只法师
|
||||
],
|
||||
totalHp: 141,
|
||||
totalAp: 78,
|
||||
description: "挑战期-远程法师主导"
|
||||
}
|
||||
};
|
||||
|
||||
// 无限模式波次生成函数
|
||||
export const getInfiniteWaveConfig = (waveNumber: number) => {
|
||||
if (waveNumber <= 15) {
|
||||
return WaveConfig[waveNumber];
|
||||
}
|
||||
|
||||
// 第16波+ (无限模式)
|
||||
const baseWarriorCount = 3 + Math.floor(waveNumber / 5);
|
||||
const baseRemoteCount = 1 + Math.floor(waveNumber / 8);
|
||||
const baseMageCount = Math.floor(waveNumber / 10);
|
||||
|
||||
// 最大单波总数限制: 12只
|
||||
const totalMonsters = baseWarriorCount + baseRemoteCount + baseMageCount;
|
||||
const maxMonsters = 12;
|
||||
|
||||
let warriorCount = baseWarriorCount;
|
||||
let remoteCount = baseRemoteCount;
|
||||
let mageCount = baseMageCount;
|
||||
|
||||
// 如果超过最大数量,按优先级削减
|
||||
if (totalMonsters > maxMonsters) {
|
||||
const excess = totalMonsters - maxMonsters;
|
||||
// 优先削减普通怪物,保留远程和法师
|
||||
warriorCount = Math.max(1, warriorCount - excess);
|
||||
}
|
||||
|
||||
const monsters = [];
|
||||
|
||||
// 添加普通怪物
|
||||
if (warriorCount > 0) {
|
||||
const warriorIds = [5201, 5202, 5204, 5205, 5206, 5219, 5221, 5222, 5223];
|
||||
const randomWarriorId = warriorIds[Math.floor(Math.random() * warriorIds.length)];
|
||||
monsters.push({ uuid: randomWarriorId, count: warriorCount, type: "warrior" });
|
||||
}
|
||||
|
||||
// 添加远程怪物
|
||||
if (remoteCount > 0) {
|
||||
const remoteIds = [5203, 5220, 5224];
|
||||
const randomRemoteId = remoteIds[Math.floor(Math.random() * remoteIds.length)];
|
||||
monsters.push({ uuid: randomRemoteId, count: remoteCount, type: "remote" });
|
||||
}
|
||||
|
||||
// 添加法师怪物
|
||||
if (mageCount > 0) {
|
||||
const mageIds = [5216, 5217, 5218, 5225, 5226, 5227];
|
||||
const randomMageId = mageIds[Math.floor(Math.random() * mageIds.length)];
|
||||
monsters.push({ uuid: randomMageId, count: mageCount, type: "mage" });
|
||||
}
|
||||
|
||||
// 计算总属性
|
||||
let totalHp = 0;
|
||||
let totalAp = 0;
|
||||
monsters.forEach(monster => {
|
||||
const baseHp = monster.type === "warrior" ? 25 : monster.type === "remote" ? 20 : 18;
|
||||
const baseAp = monster.type === "warrior" ? 8 : monster.type === "remote" ? 12 : 15;
|
||||
const level = 1 + Math.floor(waveNumber / 10);
|
||||
const levelHp = Math.floor(baseHp * (1 + (level - 1) * 0.3));
|
||||
const levelAp = Math.floor(baseAp * (1 + (level - 1) * 0.25));
|
||||
totalHp += levelHp * monster.count;
|
||||
totalAp += levelAp * monster.count;
|
||||
});
|
||||
|
||||
return {
|
||||
monsters: monsters,
|
||||
totalHp: totalHp,
|
||||
totalAp: totalAp,
|
||||
description: `无限模式-第${waveNumber}波`
|
||||
};
|
||||
};
|
||||
|
||||
// 获取怪物等级
|
||||
export const getMonsterLevel = (waveNumber: number): number => {
|
||||
return 1 + Math.floor(waveNumber / 1);
|
||||
};
|
||||
|
||||
// 获取装备石掉落数量
|
||||
export const getEquipStoneDrops = (monsterType: string, level: number = 1): number => {
|
||||
const baseDrops = {
|
||||
"warrior": 2, // 普通怪物
|
||||
"remote": 3, // 远程怪物
|
||||
"mage": 4 // 法师怪物
|
||||
};
|
||||
|
||||
return Math.floor(baseDrops[monsterType] * (1 + (level - 1) * 0.2));
|
||||
};
|
||||
|
||||
// 获取装备升级成本
|
||||
export const getEquipUpgradeCost = (equipLevel: number, quality: number): number => {
|
||||
const baseCosts = {
|
||||
2: 50, // GREEN
|
||||
3: 80, // BLUE
|
||||
4: 120 // PURPLE
|
||||
};
|
||||
|
||||
// 每次升级成本翻倍
|
||||
return baseCosts[quality] * Math.pow(2, equipLevel - 1);
|
||||
};
|
||||
|
||||
export const MonNum = [3,4,5]//对应关卡数MissionMons 的索引
|
||||
export const MissionMons = [
|
||||
[5201,5202,5203,5204,5205,5206],
|
||||
|
||||
Reference in New Issue
Block a user