feedback1c WJ: Hidden Core damage broadcasts count only the hidden leader
Player report: "隐藏boss还没打就出了造成50%伤害播报". The BOSS_HIT ticker
("{0}博士对敌方领袖造成的伤害超过20/50/80%!") divided the player's boss damage of
the whole match (stats.bossDamage, Final Assault + Hidden Core) by the hidden
leader's pool, so the Hidden Core's first hit already announced 50 % or 80 %.
The share is now the player's damage to the current round's pool
(SharedBossPool.byPlayer) over its size; 领袖伤害 on the result keeps both rounds.
The browser's ticker strip plays its queue 5.2 s per line, so a Final Assault
line could still play over the fresh hidden leader: a BOSS_HIT line is now
dropped once the round it came in is over (ui/ticker.js tickerLineLive; lines
carry their type and round from main.js).
This commit is contained in:
1 parent
7f134737ce
commit
7b1964707d
7 files changed
+210
-8
No files matched your search
@@ -2794,13 +2794,16 @@ export class Match {
|
||||
for (const ps of alive) ps.lpAtFinal = Math.max(0, ps.lp);
|
||||
}
|
||||
const bossId = hidden ? this.hiddenBossId : this.bossId;
|
||||
// BOSS_HIT tickers ("对敌方领袖造成的伤害超过20% / 50% / 80%"): the player's damage to THIS leader over its pool —
|
||||
// the pool's own per-player tally, one pool per boss round. stats.bossDamage (the result's 领袖伤害) adds up both
|
||||
// rounds, so it would credit the Final Assault's damage to the hidden leader ("隐藏boss还没打就出了50%播报").
|
||||
const hitSteps = new Map();
|
||||
this.bossPool = new SharedBossPool(bossPoolHp(this.gd, bossId, alive.length), {
|
||||
const pool = new SharedBossPool(bossPoolHp(this.gd, bossId, alive.length), {
|
||||
onHit: (pid, dmg) => {
|
||||
const ps = this.players.get(pid);
|
||||
if (!ps) return;
|
||||
ps.stats.bossDamage += dmg;
|
||||
const share = ps.stats.bossDamage / this.bossPool.maxHp;
|
||||
const share = (pool.byPlayer.get(pid) || 0) / pool.maxHp;
|
||||
const done = hitSteps.get(pid) || 0;
|
||||
let reached = done;
|
||||
BOSS_HIT_STEPS.forEach((s, i) => { if (share >= s) reached = Math.max(reached, i + 1); });
|
||||
@@ -2810,6 +2813,7 @@ export class Match {
|
||||
}
|
||||
},
|
||||
});
|
||||
this.bossPool = pool;
|
||||
const groups = pairPlayers(alive);
|
||||
const reuse = this.bossWaves && this.bossWaves.length === groups.length && this.bossWaves.every((w, i) => w.players.join() === groups[i].map((p) => p.playerId).join());
|
||||
this.fields = groups.map((g, i) => {
|
||||
|
||||
Reference in new issue
Block a user