🐞 fix(军团活动): 诸侯混战城门血量比例读表
This commit is contained in:
@@ -792,13 +792,13 @@ export async function getCityActivityGateHp(serverId: number, cityId: number) {
|
|||||||
console.log(`getCityActivityGateHp: gateHpBase ${gateHpBase}, N ${N}`);
|
console.log(`getCityActivityGateHp: gateHpBase ${gateHpBase}, N ${N}`);
|
||||||
|
|
||||||
let playerGuildRatio = activePlayerCnt/activeGuildCnt;
|
let playerGuildRatio = activePlayerCnt/activeGuildCnt;
|
||||||
if(playerGuildRatio < 10) playerGuildRatio = 10;
|
if(playerGuildRatio < dicCityActivity.playerCount) playerGuildRatio = dicCityActivity.playerCount;
|
||||||
|
|
||||||
let gateHp = Math.floor(gateHpBase * playerGuildRatio * N);
|
let gateHp = Math.floor(gateHpBase * playerGuildRatio * N);
|
||||||
console.log(`getCityActivityGateHp: gateHp ${gateHp}`);
|
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) {
|
if(gateHp <= dicCityActivity.hp) {
|
||||||
gateHp = dicCityActivity.hp;
|
gateHp = dicCityActivity.hp;
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export class GateHpLog {
|
|||||||
N: number;
|
N: number;
|
||||||
@prop({ required: false })
|
@prop({ required: false })
|
||||||
gateHp: number;
|
gateHp: number;
|
||||||
|
@prop({ required: false })
|
||||||
|
playerGuildRatio: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class BossHpLog {
|
export class BossHpLog {
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ export interface DicCityActivity {
|
|||||||
readonly hpN: number;
|
readonly hpN: number;
|
||||||
// 城门用于计算血量的攻击值模板
|
// 城门用于计算血量的攻击值模板
|
||||||
readonly atkTemplate: number;
|
readonly atkTemplate: number;
|
||||||
|
// 玩家和军团比例
|
||||||
|
readonly playerCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const dicJuniorCities: number[] = [];
|
export const dicJuniorCities: number[] = [];
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
@@ -23,7 +24,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
@@ -36,7 +38,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
@@ -49,7 +52,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
@@ -62,7 +66,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
@@ -75,7 +80,8 @@
|
|||||||
"hp": 20000000,
|
"hp": 20000000,
|
||||||
"week": "2&4&6",
|
"week": "2&4&6",
|
||||||
"hpN": 80,
|
"hpN": 80,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 7,
|
"id": 7,
|
||||||
@@ -88,7 +94,8 @@
|
|||||||
"hp": 25000000,
|
"hp": 25000000,
|
||||||
"week": "4&6",
|
"week": "4&6",
|
||||||
"hpN": 100,
|
"hpN": 100,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 8,
|
"id": 8,
|
||||||
@@ -101,7 +108,8 @@
|
|||||||
"hp": 25000000,
|
"hp": 25000000,
|
||||||
"week": "4&6",
|
"week": "4&6",
|
||||||
"hpN": 100,
|
"hpN": 100,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 9,
|
"id": 9,
|
||||||
@@ -114,7 +122,8 @@
|
|||||||
"hp": 25000000,
|
"hp": 25000000,
|
||||||
"week": "4&6",
|
"week": "4&6",
|
||||||
"hpN": 100,
|
"hpN": 100,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 10,
|
"id": 10,
|
||||||
@@ -127,6 +136,7 @@
|
|||||||
"hp": 30000000,
|
"hp": 30000000,
|
||||||
"week": "6&",
|
"week": "6&",
|
||||||
"hpN": 120,
|
"hpN": 120,
|
||||||
"atkTemplate": 3000
|
"atkTemplate": 3000,
|
||||||
|
"playerCount": 20
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user