Playtest #6 follow-up (v2.5.1): leader HP review — 直接乘算, one debuff instance, 999 layer cap, 限伤; elite to the board; 假想敌:胄 kit
- co-op leaders died within seconds: leader HP is the official data (40 values pinned); bond / strategy / item / 机变 / 特质 "+X%" bonuses now add up (PRTS 直接乘算) instead of compounding; a same-named enemy debuff keeps one (strongest) instance per target (奥术 across a pair field); leader parts pass damage 1:1; fixed co-op pool (the user's call) - official limits read from the client: each bond stops at 999 layers (MAX_GARRISON_STACK); a leader hit of 300000+ in boss / hidden battles is cancelled (MAX_BATTLE_DAMAGE, 限伤) — shared/constants.js switches, research 11 - a merge that consumes a deployed copy puts the elite on that tile and facing (user-confirmed); gold target highlight, promotion effect - 假想敌:胄 per PRTS: one shell, shells within range, any drone death costs 2 % max HP, 剑/锤 sorties and 瘫痪 - DESIGN §20.10–§20.14; 2842 unit tests, all 28 browser suites green; Chrome = Node on boss fields
This commit is contained in:
1 parent
6464e4b46a
commit
620f88c0d8
81 files changed
+4194
-447
No files matched your search
@@ -5,9 +5,11 @@
|
||||
// never edit it; module-specific helpers live in the submodules.
|
||||
//
|
||||
// Conventions shared by every wave-B module (details in docs/CONTENT.md):
|
||||
// * Attribute bonuses from bonds, bands, equipment and 机变 cards are "直接乘算" (research 02 §2.1): each source is its
|
||||
// own multiplier on the final stat → `atkMul` / `defMul` / `hpMul` (1 + x), never the skill-style `atkPct`.
|
||||
// ASPD stays additive (`aspd`), damage bonuses are `dmgDealtMul`, redeploy changes `redeployMul`.
|
||||
// * Attribute bonuses ("+X%" ATK / DEF / max HP) from bonds, bands, equipment, 机变 cards and the per-layer 特质 are
|
||||
// "直接乘算" (PRTS 盟约记录; PRTS 游戏数据基础: 直接乘算 values are summed with every other 直接乘算, a skill's "攻击力+X%"
|
||||
// included) → `directMods({ atk, def, hp })` = the additive `atkPct` / `defPct` / `hpPct` (constants.js
|
||||
// DIRECT_BONUS_STACKING; 'multiply' restores the v2.5 per-source ×(1 + x) `atkMul`). "提升至X%" effects stay
|
||||
// multipliers. ASPD stays additive (`aspd`), damage bonuses are `dmgDealtMul`, redeploy changes `redeployMul`.
|
||||
// * Match-long passives use `passiveBuff()` (persist + allowDead + replace): idempotent by key, survive death.
|
||||
// * Buff keys / fx `src` are namespaced: `bond:<bondId>…`, `item:<itemKey>…`, `gar:<effectKey>…`, `band:<bandId>…`,
|
||||
// `choice:<effectId>…`.
|
||||
@@ -16,7 +18,7 @@
|
||||
// `PlayerBattleInput.contentInfo`, written by the `global:contentb_info` meta handler (support/meta.js).
|
||||
|
||||
import { getData } from '../../../data.js';
|
||||
import { COLS } from '../../constants.js';
|
||||
import { COLS, DIRECT_BONUS_STACKING } from '../../constants.js';
|
||||
import { frontOf, offsetTile } from '../../dir.js';
|
||||
import { bodyInKeys, bodyDist, bodyInRadius, bodyOnTile, bodyTileReach } from '../../body.js';
|
||||
|
||||
@@ -267,6 +269,25 @@ export const inRange = (u, target) => !!(u && target && u.rangeKeySet && onKeys(
|
||||
// =====================================================================================================================
|
||||
// battle: buffs, fx, per-battle state
|
||||
|
||||
/**
|
||||
* Buff mods of a 直接乘算 attribute bonus (bonds, bands, equipment, 机变 cards, per-layer 特质): ratios `atk` / `def` /
|
||||
* `hp` (+0.3 = "+30%"; negative lowers) → `atkPct` / `defPct` / `hpPct`, summed by the engine with every other additive
|
||||
* percentage (constants.js DIRECT_BONUS_STACKING 'add', the official rule); 'multiply' → `atkMul` / `defMul` / `hpMul`
|
||||
* = 1 + x (the v2.5 reading). Zero / non-finite parts are left out; `extra` mods are merged in.
|
||||
*/
|
||||
export function directMods({ atk = 0, def = 0, hp = 0 } = {}, extra = null) {
|
||||
const m = {};
|
||||
const put = (pct, mul, v) => {
|
||||
if (!(typeof v === 'number' && Number.isFinite(v)) || v === 0) return;
|
||||
if (DIRECT_BONUS_STACKING === 'multiply') m[mul] = Math.max(0, 1 + v);
|
||||
else m[pct] = v;
|
||||
};
|
||||
put('atkPct', 'atkMul', atk);
|
||||
put('defPct', 'defMul', def);
|
||||
put('hpPct', 'hpMul', hp);
|
||||
return extra ? Object.assign(m, extra) : m;
|
||||
}
|
||||
|
||||
/** Match-long passive buff (survives death/redeploy; re-adding the same key replaces it — idempotent). */
|
||||
export function passiveBuff(battle, u, key, mods, extra = {}) {
|
||||
return battle.addBuff(u, { key, mods, persist: true, allowDead: true, refresh: 'replace', ...extra });
|
||||
|
||||
Reference in new issue
Block a user