From 5d0786155f453f8cd12758a3af6102f45c78a2a6 Mon Sep 17 00:00:00 2001 From: luying Date: Fri, 25 Feb 2022 18:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=94=E6=AD=A6=E5=8F=B0=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dboss=E8=A1=80=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/guildBossService.ts | 8 ++++++-- shared/resource/warJsons/8001.json | 2 +- shared/resource/warJsons/8002.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/game-server/app/services/guildBossService.ts b/game-server/app/services/guildBossService.ts index 1c1eb408c..01d6bcf15 100644 --- a/game-server/app/services/guildBossService.ts +++ b/game-server/app/services/guildBossService.ts @@ -181,9 +181,10 @@ export async function getBossHp(serverId: number, guildCode: string, dicBossBase let dicWarJson = gameData.warJson.get(warId); let actorId = gameData.heroIdByWar.get(warId); - let dicBoss = dicWarJson.find(cur => cur.bossStage == actorId); + let dicBoss = dicWarJson.find(cur => cur.actorId == actorId); let attribute = dicBoss?.attribute||[]; let hp = attribute.find(cur => cur.id == ABI_TYPE.ABI_HP)?.val||0; + console.log(`getBossHp warId ${warId} hp ${hp}`); let activeGuilds = serverRecord.activeGuilds||[]; let myGuild = activeGuilds.find(cur => cur.guildCode == guildCode); @@ -197,9 +198,12 @@ export async function getBossHp(serverId: number, guildCode: string, dicBossBase } } activeCe = reduceCe(activeCe); + + console.log(`getBossHp activeCe ${activeCe}`); let B = activeCe/6/GUILDACTIVITY.GATEACTIVITY_ENEMYCE; + console.log(`getBossHp B ${B}`); let bossBaseHp = B * hp; let bossHp = Math.floor(bossBaseHp * bossHpRatio); - + if(bossHp == 0) return minBossHp; return bossHp; } \ No newline at end of file diff --git a/shared/resource/warJsons/8001.json b/shared/resource/warJsons/8001.json index 14e4d3954..1a7eab544 100644 --- a/shared/resource/warJsons/8001.json +++ b/shared/resource/warJsons/8001.json @@ -157,7 +157,7 @@ "lv": 20, "hide": 0, "initial_ai": 1, - "attribute": "2&25000|4&8000|5&8000", + "attribute": "1&3202|2&25000|4&8000|5&8000", "skill": 0, "seid": 0, "star": 0, diff --git a/shared/resource/warJsons/8002.json b/shared/resource/warJsons/8002.json index 551b85982..9d4ff9753 100644 --- a/shared/resource/warJsons/8002.json +++ b/shared/resource/warJsons/8002.json @@ -157,7 +157,7 @@ "lv": 20, "hide": 0, "initial_ai": 1, - "attribute": "2&25000|4&8000|5&8000", + "attribute": "1&3202|2&25000|4&8000|5&8000", "skill": 0, "seid": 0, "star": 0,