feedback3 W3A: a 联防 operator down since its own combat resolves its own devour marks (the unit in front takes the 物理流失, a 5-tier revive is spent); the carried SP is set again after the deploy hook, so 独行 / 黄沙罗盘 no longer add to it (review fixes)
This commit is contained in:
1 parent
3315803b79
commit
dff0676dee
6 files changed
+102
-30
No files matched your search
@@ -893,7 +893,7 @@ export class Battle {
|
||||
u.markDirty();
|
||||
u.hp = u.s.maxHp;
|
||||
// 联防 carry (PRTS 卫戍协议/帮助 §联防阶段 "将对应单位的生命比例、技力修改至与上一阶段结束时相同(召唤物仅修改技力…)"):
|
||||
// an operator's HP ratio here, the SP in skill.reset — a summon's SP only
|
||||
// an operator's HP ratio here, the SP in skill.reset and again after the `deploy` hook (below) — a summon's SP only
|
||||
const cs = initial || (first && this._startDeploying) ? (carry ?? u.carry) : null;
|
||||
if (cs && u.kind === 'op' && Number.isFinite(cs.hpPct)) u.hp = Math.max(1, u.s.maxHp * Math.max(0.01, Math.min(1, cs.hpPct)));
|
||||
this._occ[k] = u;
|
||||
@@ -911,6 +911,9 @@ export class Battle {
|
||||
if (first) this._ev(['spawn', unitInfo(u)]);
|
||||
this._ev(['deploy', u.id]);
|
||||
if (this._hooks.deploy) this.emit('deploy', { unit: u, initial });
|
||||
// 联防: "部署完成后,将对应单位的…技力修改至与上一阶段结束时相同" — the carried SP is set again once the deployment is
|
||||
// done, so a deploy-time SP gift (独行, 黄沙罗盘 …) does not come on top of it; later redeploys keep those gifts
|
||||
if (cs && Number.isFinite(cs.sp) && u.alive && u.skill) u.skill.setSpTotal(cs.sp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -344,8 +344,8 @@ function installLaterano(battle, pid, bb, members) {
|
||||
* cancelled, also when it is back at once (the 5-tier 立刻复活, 不屈's 立刻重新部署, 埃芒加德 / M3茧甲): PRTS 盟约记录 "目标首次被
|
||||
* 击倒后解除自身被付与但还未触发的【吞噬】效果". A marker off the field gives no further mark (the rule since 0.1.0; one knocked
|
||||
* out and back in the same pass still gives its marks).
|
||||
* 联防: the operators down since the end of their own combat (forced out by Battle.start) mark and are marked like
|
||||
* standing ones, but nothing resolves on or from them (below; per players' reports, owner's decision 2026-10-04).
|
||||
* 联防: the operators down since the end of their own combat (forced out by Battle.start) mark, are marked and resolve
|
||||
* their marks like standing ones, but nothing resolves on them (below; per players' reports, owner's decision 2026-10-04).
|
||||
* Each devoured operator adds its tier to 阿戈尔 once (IN_BATTLE gain, disabled in 联防 / boss fields).
|
||||
* Tokens / devices / empty tiles are never devoured.
|
||||
*/
|
||||
@@ -356,11 +356,11 @@ function devour(battle, pid, bb, members) {
|
||||
// board position, independent of the members' directions (only "身前" follows each member's `dir`).
|
||||
const boardCol = (u) => (u.player && u.player.mirror ? -u.tileC : u.tileC);
|
||||
// 联防: an operator down at the end of its own combat (carryState.down — Battle.start forced it out right before
|
||||
// battleStart, FORCED_EXIT) still takes part in the marking as if it stood on its tile: it marks in its turn, it is
|
||||
// "the unit in front" of another (the chain goes on through it when it is a member) and its base ATK / block count
|
||||
// for its marker — then it stays out: its marks and the marks on it resolve nothing (as for any unit off the field
|
||||
// during the pass), so it is never knocked out again, revived or devoured. Per players' reports (community report #3,
|
||||
// GitHub #33 item 3), owner's decision 2026-10-04; until 0.1.2 the forced exit came first and the chain broke there.
|
||||
// battleStart, FORCED_EXIT) takes part in the devour as if it stood on its tile, then stays out: it marks in its turn,
|
||||
// it is "the unit in front" of another (the chain goes on through it when it is a member), its base ATK / block count
|
||||
// for its marker and its own marks resolve (their 物理流失 lands, credited to it as usual); only the marks ON it resolve
|
||||
// nothing — it is forced out, so it is never knocked out again, revived or devoured. Per players' reports (community
|
||||
// report #3, GitHub #33 item 3), owner's decision 2026-10-04; until 0.1.2 the forced exit came first and the chain broke.
|
||||
const downAtStart = (u) => S.isOp(u) && !u.alive && u.removeReason === FORCED_EXIT && !!u.carry && u.carry.down === true
|
||||
&& battle.isDown(u);
|
||||
const order = members.filter((u) => S.onField(u) || downAtStart(u)).sort((a, b) =>
|
||||
@@ -405,8 +405,9 @@ function devour(battle, pid, bb, members) {
|
||||
for (const [, t] of marks) if (!dep.has(t)) dep.set(t, items.deploymentOf(t));
|
||||
const knocked = (t) => !t.alive || items.deploymentOf(t) !== dep.get(t);
|
||||
for (const [m, t] of marks) {
|
||||
// (a member down since its own combat — downAtStart — is off the field: neither its marks nor the marks on it resolve)
|
||||
if (knocked(t) || !m.alive) continue;
|
||||
// (a member down since its own combat — downAtStart — resolves its marks as if it stood; a mark on it resolves nothing:
|
||||
// `knocked` — it is off the field)
|
||||
if (knocked(t) || !(m.alive || downAtStart(m))) continue;
|
||||
S.fxOn(battle, 'devour', t, 'bond:egirShip', 'devour', { from: m.id });
|
||||
if (amount > 0) battle.loseHp(t, mitigate(amount, 'phys', t.s), { source: m, tags: ['bond:egir:devour'] });
|
||||
if (!layered.has(t)) {
|
||||
|
||||
@@ -172,6 +172,18 @@ export class SkillRuntime {
|
||||
return this.charges >= this.maxCharges ? this.maxCharges * cost : this.charges * cost + this.sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the official 技力 to `total` (charges rebuilt, nothing fired — a 修改, not a gain): the 联防 carry, applied again
|
||||
* once the deployment is done (Battle._deploy). A passive skill, or a timed one that runs already, is left as it is.
|
||||
*/
|
||||
setSpTotal(total) {
|
||||
if (this.noSkill || this.kind === 'passive' || (this.active && this.isTimed) || !Number.isFinite(total)) return;
|
||||
this.sp = 0;
|
||||
this.charges = 0;
|
||||
this.gainSp(Math.max(0, total), 'init', true);
|
||||
if (this.spCost <= 0) this.charges = this.maxCharges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on every (re)deployment. `carry` = { sp } for unite (联防) helpers: their 技力 at the end of their own combat
|
||||
* (unitsEnd `sp` = spTotal, rebuilt into charges here). Nothing else of the skill is carried — PRTS 卫戍协议/帮助 §联防阶段
|
||||
|
||||
Reference in new issue
Block a user