diff --git a/game-server/app/services/guildActivity/guildActivityService.ts b/game-server/app/services/guildActivity/guildActivityService.ts index a46110aba..30e6dd2b5 100644 --- a/game-server/app/services/guildActivity/guildActivityService.ts +++ b/game-server/app/services/guildActivity/guildActivityService.ts @@ -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; diff --git a/shared/db/UserLog.ts b/shared/db/UserLog.ts index 44d61d2bf..bced28515 100644 --- a/shared/db/UserLog.ts +++ b/shared/db/UserLog.ts @@ -28,6 +28,8 @@ export class GateHpLog { N: number; @prop({ required: false }) gateHp: number; + @prop({ required: false }) + playerGuildRatio: number; } export class BossHpLog { diff --git a/shared/pubUtils/dictionary/DicCityActivity.ts b/shared/pubUtils/dictionary/DicCityActivity.ts index ca1ee20ec..4d47d9ba6 100644 --- a/shared/pubUtils/dictionary/DicCityActivity.ts +++ b/shared/pubUtils/dictionary/DicCityActivity.ts @@ -24,6 +24,8 @@ export interface DicCityActivity { readonly hpN: number; // 城门用于计算血量的攻击值模板 readonly atkTemplate: number; + // 玩家和军团比例 + readonly playerCount: number; } export const dicJuniorCities: number[] = []; diff --git a/shared/resource/jsons/dic_zyz_cityActivity.json b/shared/resource/jsons/dic_zyz_cityActivity.json index d0162815f..ca25592d1 100644 --- a/shared/resource/jsons/dic_zyz_cityActivity.json +++ b/shared/resource/jsons/dic_zyz_cityActivity.json @@ -10,7 +10,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 2, @@ -23,7 +24,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 3, @@ -36,7 +38,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 4, @@ -49,7 +52,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 5, @@ -62,7 +66,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 6, @@ -75,7 +80,8 @@ "hp": 20000000, "week": "2&4&6", "hpN": 80, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 10 }, { "id": 7, @@ -88,7 +94,8 @@ "hp": 25000000, "week": "4&6", "hpN": 100, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 15 }, { "id": 8, @@ -101,7 +108,8 @@ "hp": 25000000, "week": "4&6", "hpN": 100, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 15 }, { "id": 9, @@ -114,7 +122,8 @@ "hp": 25000000, "week": "4&6", "hpN": 100, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 15 }, { "id": 10, @@ -127,6 +136,7 @@ "hp": 30000000, "week": "6&", "hpN": 120, - "atkTemplate": 3000 + "atkTemplate": 3000, + "playerCount": 20 } ] \ No newline at end of file