feedback6: merge R21H — 器物 (频次) enemies take the 攻坚 HP share and not 补给线's (the data's exclusion list names exactly the 14 器物), leader summons take the round's enemy scaling (PR #272 by @CXUtk, re-implemented from the data); tools/golden.mjs keeps R21H's roundMods import and drops uniteStageId (removed by R21B); golden regenerated on the merge — vs the parent exactly R21H's 74 scenarios, vs the branch only the other streams' moves
This commit is contained in:
commit
a9fe794c3f
20 files changed
+1493
-1326
No files matched your search
+1
-1
@@ -397,7 +397,7 @@ export function runBoss({ data, mode, difficulty, round, seed, profile = 1, boss
|
||||
const b = m.newBattle({
|
||||
seed: deriveSeed(m.seed, `${fieldId}:${round}`), kind: hidden ? 'hidden' : 'boss', modeId: m.modeId, round, stageId: m.stageId,
|
||||
rect: { ...GEO.BOSS_RECT }, timeLimit: Infinity, players: inputs, spawns: m._sanitizeSpawns(spawns), routes: wave.routes,
|
||||
sharedBoss: pool, flags: { layerGainsEnabled: false, ...gd.dp }, fieldId, enemyOverrides: wave.overrides, waveId: wave.templateId, bossId: id,
|
||||
sharedBoss: pool, flags: { layerGainsEnabled: false, ...gd.dp, enemyScale: gd.enemyScale(round) }, fieldId, enemyOverrides: wave.overrides, waveId: wave.templateId, bossId: id,
|
||||
});
|
||||
b.on('enemyLeak', (ctx) => {
|
||||
const e = ctx && ctx.enemy;
|
||||
|
||||
@@ -3470,7 +3470,13 @@ const DEFAULT_ENEMY_MULTIPLIERS = {
|
||||
abyssMoveSpeedMulFromRound3: 1.15,
|
||||
};
|
||||
|
||||
/** Enemy stat multipliers {atk, hp, speed} of one round (research 01 A3; leader HP pools excluded). */
|
||||
/**
|
||||
* Enemy stat multipliers {atk, hp, speed} of one round (research 01 A3; leader HP pools excluded). `supplyHp` (only
|
||||
* when ≠ 1) = the share of `hp` that comes from 补给线 / 补给线II: the HP-only steps — 1.2^(kHp − kAtk), 补给线II "最大生命值
|
||||
* +20%" with no ATK (攻坚装备 always brings ATK ×1.1, so kAtk counts its stacks) — times `extra` 1.08 (补给线). Those two
|
||||
* effects leave out the 14 器物 hit-count keys (activity_table aceffect_enemy_2 / 2_2 `enemy_exclude`, data/effects.json),
|
||||
* which take hp / supplyHp (server/sim/content/enemies/archetypes.js `times`).
|
||||
*/
|
||||
function enemyScaleFor(table, type, difficulty, round, isHidden) {
|
||||
const t = table?.[type === 'SINGLE' ? 'single' : 'multi']?.[difficulty];
|
||||
if (!t) return { atk: 1, hp: 1, speed: 1, assumed: true };
|
||||
@@ -3480,8 +3486,10 @@ function enemyScaleFor(table, type, difficulty, round, isHidden) {
|
||||
const kHp = t.kHp ? pick(t.kHp, t.hiddenHp) : pick(t.k, t.hidden);
|
||||
const extra = t.hpExtra ? (isHidden ? t.hiddenHpExtra ?? 1 : t.hpExtra[Math.min(i, t.hpExtra.length - 1)] ?? 1) : 1;
|
||||
const speedMul = difficulty === 'ABYSS' && round >= 3 ? (table.abyssMoveSpeedMulFromRound3 ?? 1.15) : 1;
|
||||
const supplyHp = cleanNum(1.2 ** Math.max(0, kHp - kAtk) * extra);
|
||||
return {
|
||||
atk: cleanNum(t.atkBase * 1.1 ** kAtk), hp: cleanNum(t.hpBase * 1.2 ** kHp * extra), speed: speedMul, kAtk, kHp,
|
||||
...(supplyHp !== 1 ? { supplyHp } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -67,7 +67,7 @@ import { DataSource } from '../server/sim/simdata.js';
|
||||
import { buildBattleSpec, createBattleFromSpec } from '../server/sim/spec.js';
|
||||
import { createRng, deriveSeed } from '../server/sim/rng.js';
|
||||
import { GameData } from '../server/match/gamedata.js';
|
||||
import { setupMatchWaves, buildNormalWave, buildBossWave, buildUniteWave, isFlyKey, routeByMotion } from '../server/match/waves.js';
|
||||
import { setupMatchWaves, buildNormalWave, buildBossWave, buildUniteWave, isFlyKey, routeByMotion, roundMods } from '../server/match/waves.js';
|
||||
import { buildDeployMap, positionClass, canPlace, ownerRangeKeys, tileKey } from '../server/match/board.js';
|
||||
import { computeBonds, bondSnapshot } from '../server/match/bondsMeta.js';
|
||||
import { Match } from '../server/match/Match.js';
|
||||
@@ -405,7 +405,7 @@ function extraSpawns(gd, routes, keys, round, pid, t0 = 8, step = 5) {
|
||||
const fly = isFlyKey(gd, key);
|
||||
let routeIndex = routeByMotion(routes, fly);
|
||||
if (!(routeIndex >= 0)) routeIndex = 0;
|
||||
const s = { time: t0 + i * step, enemyKey: key, routeIndex, count: 1, interval: 0, mods: { hpMul: scale.hpMul, atkMul: scale.atkMul, speedMul: scale.speedMul, slot: fly ? 'NF' : 'N' }, ownerPlayerId: pid };
|
||||
const s = { time: t0 + i * step, enemyKey: key, routeIndex, count: 1, interval: 0, mods: { ...roundMods(scale), slot: fly ? 'NF' : 'N' }, ownerPlayerId: pid };
|
||||
if (i % 2 === 0) { s.tag = 'bounty'; s.bounty = { coins: 2, ownerPlayerId: pid }; s.mods.bountyCoins = 2; }
|
||||
return s;
|
||||
});
|
||||
@@ -593,7 +593,7 @@ export function fieldScenarios() {
|
||||
scenarios.push({
|
||||
id: `${hidden ? 'hidden' : 'boss'}-${bossId}-${solo ? 'solo' : 'pair'}`, family: 'fields', kind: hidden ? 'hidden' : 'boss', modeId, round, stageId, seed,
|
||||
rect: { ...GEO.BOSS_RECT }, timeLimit: Infinity, routes: wave.routes, waveId: wave.templateId, enemyOverrides: wave.overrides,
|
||||
flags: { layerGainsEnabled: false, ...gd.dp }, bossId, boss: { poolHp: pool, poolMax: pool }, fieldId: 'b1', cap: 200,
|
||||
flags: { layerGainsEnabled: false, ...gd.dp, enemyScale: gd.enemyScale(round) }, bossId, boss: { poolHp: pool, poolMax: pool }, fieldId: 'b1', cap: 200,
|
||||
players, spawns: wave.spawns.map((s) => ({ ...s })),
|
||||
about: `${data.bosses[bossId].name} ${solo ? 'solo' : 'pair'} pool ${pool}: ${players.map((p) => placeName(p.units).join(' ')).join(' | ')}`,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user