feat(军团): 修改boss和城门血条逻辑

This commit is contained in:
luying
2023-09-19 20:14:04 +08:00
parent e8ba038bb5
commit 9797f41652
10 changed files with 330 additions and 89 deletions
@@ -0,0 +1,24 @@
// 演武台&诸侯混战
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
export interface DicBossHpRatio {
// 类型 1-演武台按开服天数 2-诸侯混战按开服天数 3-最低玩家人数
readonly type: number;
// 开服时间
readonly serverOpen: number;
// 倍率
readonly ratio: number;
}
export const dicBossHpRatio = new Map<number, DicBossHpRatio[]>();
export function loadBossHpRatio() {
dicBossHpRatio.clear();
let arr = readFileAndParse(FILENAME.DIC_GUILD_HP_RATIO);
arr.forEach(o => {
if(!dicBossHpRatio.has(o.type)) dicBossHpRatio.set(o.type, []);
dicBossHpRatio.get(o.type)?.push(o);
});
arr = undefined;
}
@@ -22,8 +22,6 @@ export interface DicCityActivity {
readonly hp: number;
// 城门倍率
readonly hpN: number;
// 城门用于计算血量的攻击值模板
readonly atkTemplate: number;
// 玩家和军团比例
readonly playerCount: number;
}