diff --git a/game-server/app/services/guildBossService.ts b/game-server/app/services/guildBossService.ts index 3c47d30c4..074de73a4 100644 --- a/game-server/app/services/guildBossService.ts +++ b/game-server/app/services/guildBossService.ts @@ -205,18 +205,19 @@ export async function getBossHp(serverId: number, guildCode: string, dicBossBase let activeGuilds = serverRecord.activeGuilds||[]; let myGuild = activeGuilds.find(cur => cur.guildCode == guildCode); - let activeCe = 0; + let activeCe = 0, playerCnt = 0; if(myGuild) { let activePlayers = myGuild.players||[]; activePlayers.sort((a, b) => b.ce - a.ce); for(let i = 0; i < 10; i++) { if(!activePlayers[i]) break; activeCe += activePlayers[i].topLineupCe; + playerCnt ++; } } let subCe = getBossSubAttrCe(dicWar.secondAttrLevel, bossLv) - console.log(`getBossHp activeCe ${activeCe} subCe ${subCe}`); - let B = (activeCe/6 - subCe)/GUILDACTIVITY.GATEACTIVITY_ENEMYCE; + console.log(`getBossHp activeCe ${activeCe} playerCnt ${playerCnt} subCe ${subCe}`); + let B = (activeCe/playerCnt/6 - subCe)/GUILDACTIVITY.GATEACTIVITY_ENEMYCE; let bossBaseHp = B * hp; let bossHp = Math.floor(bossBaseHp * bossHpRatio); if(B < 1) {