385 lines
11 KiB
TypeScript
385 lines
11 KiB
TypeScript
export const MonsetList = {
|
||
1:{
|
||
1:[5001],
|
||
}
|
||
|
||
}
|
||
|
||
export const BossList = {
|
||
1:{
|
||
1:[5001],
|
||
}
|
||
|
||
}
|
||
|
||
// 波次配置表 - 根据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],
|
||
[5201],
|
||
[5201],
|
||
]
|
||
export const Missions = [
|
||
[5201,5202,5203,5204,5205,5206,5219,5220,5221],
|
||
[5216,5217,5218],
|
||
[5225,5226,5227],
|
||
]
|
||
export const MissionReward = {
|
||
1:[1001,1002,1003,1004,1005,1006,1021,1022,1023,1024,1025,1026,1027,1028],
|
||
2:[1001,1002,1003,1004,1005,1006,1021,1022,1023,1024,1025,1026,1027,1028],
|
||
3:[1001,1002,1003,1004,1005,1006,1021,1022,1023,1024,1025,1026,1027,1028],
|
||
}
|
||
export const MBSet = {
|
||
exp:10,
|
||
ap_exp:100,
|
||
def_exp:100,
|
||
hp_exp:100,
|
||
ap_add:2,
|
||
def_add:1,
|
||
hp_add:5,
|
||
crit_add:1,
|
||
dodge_add:1,
|
||
ap_cost:1,
|
||
def_cost:1,
|
||
hp_cost:1,
|
||
crit_cost:2,
|
||
dodge_cost:2,
|
||
}
|
||
export const MissionStatus = {
|
||
ready:0,
|
||
ready_skill_select:1,
|
||
ready_hero_select:2,
|
||
playing:3,
|
||
end:4,
|
||
}
|
||
export enum FightSet {
|
||
FRIEND_WAVE_UP=3, //伙伴登场波次
|
||
BOSS_WAVE_UP_1=3, //boss登场波次
|
||
BOSS_WAVE_UP_2=5, //boss登场波次
|
||
BOSS_WAVE_UP_3=7, //boss登场波次
|
||
EQUIP_WAVE_UP_1=4, //装备登场波次
|
||
EQUIP_WAVE_UP_2=6, //装备登场波次
|
||
EQUIP_WAVE_UP_3=8, //装备登场波次
|
||
SKILL_WAVE_UP_1=2, //技能登场波次
|
||
SKILL_WAVE_UP_2=5, //技能登场波次
|
||
SKILL_WAVE_UP_3=7, //技能登场波次
|
||
MON_WAVE_TIME=10,//怪物波次时间
|
||
FRIEND_LIVE_CD=10,//伙伴复活时间
|
||
ATK_ADD_FRIEND_COUNT=4,//伙伴攻击力增加
|
||
ATK_ADD_GLOD=1,//金币增加
|
||
CRIT_DAMAGE=50,//暴击伤害
|
||
DOUBLE_ATK_RATE=100,//额外攻击默认概率
|
||
GREEN_GOLD=1,//绿色金币
|
||
BLUE_GOLD=2,//蓝色金币
|
||
PURPLE_GOLD=3,//紫色金币
|
||
ORANGE_GOLD=4,//橙色金币
|
||
BURN_COUNT=5,//默认易伤次数
|
||
STUN_TIME=0.5,//默认晕时间
|
||
// ATK_TO_ATK_RATIO=0.1,
|
||
// ATK_TO_HP_RATIO=0.2,
|
||
// ATK_TO_SHIELD_RATIO=2,
|
||
// ATK_LINES = 3, //英雄数
|
||
// MON_GOLD_ADD =2,
|
||
// MON_COIN_ADD=2,
|
||
// COIN_ADD=1,
|
||
// DEF_RATE=0.7,
|
||
// DODGE_MAX=70,
|
||
// HERO_NUM=3,
|
||
// AP_UPDATE_RATE=100,
|
||
// AP_CHANGE_RATE=0,
|
||
}
|
||
export const MissionData = {
|
||
gold:1000,//金币
|
||
score:0,//分数
|
||
refrsh_time:5, //刷新时间
|
||
refresh_gold:1,//刷新金币
|
||
call_gold:0,//召唤金币
|
||
add_gold:1,//金币增加
|
||
change_gold:0,//金币变化
|
||
back_gold:1,//返还金币
|
||
buff_back_gold:0,//额外返还金币
|
||
buff_add_gold:0,//额外增加金币
|
||
buff_refrsh_time:0,//额外刷新时间
|
||
buff_refresh_gold:0,//额外发现所需的金币
|
||
current_wave:0,
|
||
in_fight:false,
|
||
fight_time:0,//战斗时间
|
||
equip_stone:0,//装备石
|
||
equip_stone_max:10,//装备石最大数量
|
||
skill_stone:0,//技能石
|
||
skill_stone_max:10,//技能石最大数量
|
||
}
|
||
export const VmInfo = {
|
||
hp:0,
|
||
hp_max:0,
|
||
hp_buff:0,
|
||
lv:1,
|
||
exp:0,
|
||
next_exp:100,
|
||
cd:3,
|
||
damage:0,
|
||
ap:0,
|
||
equip_ap:0,
|
||
buff_ap:0,
|
||
debuff_ap:0,
|
||
def:0,
|
||
crit:0,
|
||
crit_d:99,
|
||
dod:99,
|
||
dod_no:false,
|
||
crit_no:false,
|
||
wind:0,
|
||
thorns:0,
|
||
lifesteal:0,
|
||
}
|
||
export const TooltipTypes = {
|
||
life:1,
|
||
health:2,
|
||
skill:3,
|
||
crit:4,
|
||
uskill:5,
|
||
lvup:6,
|
||
apup:7,
|
||
hpup:8,
|
||
} |