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) => {
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
// follows the same rule, server/sim/spec.js). Before, the per-player crediting of a report could leave 3.6e-12 that
|
||||
// the browser could never deal (user playtest #6 item 5).
|
||||
// * No IN_BATTLE layer gains (flags.layerGainsEnabled = false).
|
||||
// * BOSS_HIT tickers (BOSS_HIT_STEPS 20 / 50 / 80 %): a player's damage to the round's pool (SharedBossPool.byPlayer)
|
||||
// over its size, each threshold once per boss round — the Hidden Core never counts the Final Assault's damage
|
||||
// (player report after 0.1.0: "隐藏boss还没打就出了造成50%伤害播报").
|
||||
// * Hidden Core eligibility (after an R14 win): difficulty in hiddenCore.difficulties, the mode has a hidden round,
|
||||
// Σ activated layers of the alive players measured at the end of the boss round's prep > threshold (solo 350 /
|
||||
// co-op 1200) and team LP > minTeamLpExclusive (1).
|
||||
@@ -33,6 +36,11 @@
|
||||
import { BOSS_ROW_OFFSET, COLS, BOSS_POOL_MIN_HP } from '../sim/constants.js';
|
||||
import { mirrorDir, normDir } from '../sim/dir.js';
|
||||
|
||||
/**
|
||||
* BOSS_HIT ticker thresholds (activity_table autoChessData.broadcastList comment_boss_hit_1..3, paramList 0.2 / 0.5 /
|
||||
* 0.8: "{0}博士对敌方领袖造成的伤害超过20%!"): a player's damage to the current leader's pool over that pool
|
||||
* (SharedBossPool.byPlayer — one pool per boss round, so the Final Assault and the Hidden Core count apart).
|
||||
*/
|
||||
export const BOSS_HIT_STEPS = [0.2, 0.5, 0.8];
|
||||
|
||||
/**
|
||||
@@ -80,7 +88,7 @@ export class SharedBossPool {
|
||||
constructor(hp, { onHit = null } = {}) {
|
||||
this.maxHp = Math.max(1, hp);
|
||||
this.hp = this.maxHp;
|
||||
/** playerId → damage dealt */
|
||||
/** playerId → damage dealt to this pool (this boss round only; the BOSS_HIT tickers' share) */
|
||||
this.byPlayer = new Map();
|
||||
this.onHit = onHit;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user