🐞 fix(军团活动): 诸侯混战城门血量比例读表

This commit is contained in:
luying
2023-03-14 14:06:23 +08:00
parent aa1cdf4684
commit 4cc79137fd
4 changed files with 26 additions and 12 deletions

View File

@@ -792,13 +792,13 @@ export async function getCityActivityGateHp(serverId: number, cityId: number) {
console.log(`getCityActivityGateHp: gateHpBase ${gateHpBase}, N ${N}`);
let playerGuildRatio = activePlayerCnt/activeGuildCnt;
if(playerGuildRatio < 10) playerGuildRatio = 10;
if(playerGuildRatio < dicCityActivity.playerCount) playerGuildRatio = dicCityActivity.playerCount;
let gateHp = Math.floor(gateHpBase * playerGuildRatio * N);
console.log(`getCityActivityGateHp: gateHp ${gateHp}`);
saveGuildGateHpLog(serverId, cityId, { activePlayerCnt, activePlayerCe, activeTopPlayerCnt, activeGuildCnt, atk, A, hpBase: gateHpBase, N, gateHp });
saveGuildGateHpLog(serverId, cityId, { activePlayerCnt, activePlayerCe, activeTopPlayerCnt, activeGuildCnt, atk, A, hpBase: gateHpBase, N, gateHp, playerGuildRatio });
if(gateHp <= dicCityActivity.hp) {
gateHp = dicCityActivity.hp;