feedback5 CB3: the "受到攻击时" counters answer every damage instance from an enemy, not its attacks only — 菲莱 S2 now blasts on 深溟巢涌者's pulse, so do 星熊 S2, 泡泡, 刺玫 S2, 余 S1, 玛恩纳 无动于衷, 年 S2 and 斩业星熊 (community report of 2026-10-06, item 30)
The report's 退行的潮涌者 is the 巢涌者 (深溟 / 富营养的巢涌者 in this mode): no normal attack, its talent hurts every operator in range once a second. Official (ArknightsGameData buff_template_data): its pulse is an AdvancedApplyDamage with the enemy as source (enemy_dsubrl_aoe[aura]); the counters fire on ON_TAKE_DAMAGE — philae_s_2 with no filter, inverse_damage (星熊 S2), inverse_damage[magic] + nian_s_2 (年 S2), bubble_s_2 / bubble_t_1 (泡泡), vendla_s_2 (刺玫), yu_s_1[inverse_damage] (余 S1), hsgma2_s_1 / hsgma2_e_003_tr_take (斩业星熊), mlynar_t_2[inverse] (玛恩纳) on a source of the other side; 棘刺 S2 (普通伤害 filter) and 信仰搅拌机 S3 already took any damage. Cause: the kits required dmg.isAttack. Now kits/shared/tier1.js byEnemyAttack = any enemy damage instance but a 流失, an element 损伤, 无来源 damage or another counter / reflection (tags 'counter' / 'reflect'); 菲莱 S2 any instance but a 流失 or a counter. test/content/op_nian.test.js pinned "a non-attack hit returns nothing" for 年 S2 — updated on purpose (answered now; a 流失 still is not). Golden: 19 scenarios where an enemy's non-attack damage (skills, pulses, areas) reached one of these operators — their counter now answers it (more damage, fx thorns / aoe): roster-002, -005, -008, -010, -012, -016, -033, -044; bond-lateranoShip-low; fields boss-boss_2-solo, boss-boss_4-pair, boss-boss_4-solo, hidden-boss_8-pair, hidden-boss_8-solo; matches solo-FUNNY-1, solo-FUNNY-2, coop4-ABYSS-7, coop2-ABYSS-10-boosted; diy-051. Tests: test/sim/feedback5-counters-any-damage.test.js (6; 5 fail on the parent, the first checks the 巢涌者 never attacks). Docs: docs/SIM.md (re-entrancy rule).
This commit is contained in:
1 parent
9b164fdc66
commit
5877800a67
16 files changed
+341
-182
No files matched your search
@@ -6,8 +6,9 @@ import { onDefaultSkill } from '../shared/tier2.js';
|
||||
|
||||
export default {
|
||||
// ---------------------------------------------------------------------------------------------------------------
|
||||
// 2_08 泡泡 “挨打”: stops attacking; DEF +def, taunt +taunt_level, each attack received returns atk_scale × DEF phys
|
||||
// damage to the attacker. 尖刺盾: attackers get ATK −atk for `duration` s. Elite module (PRO-X): DEF +def while blocking.
|
||||
// 2_08 泡泡 “挨打”: stops attacking; DEF +def, taunt +taunt_level, each enemy damage instance received (its attack or not:
|
||||
// the official bubble_s_2 / bubble_t_1 fire on ON_TAKE_DAMAGE — tier1 byEnemyAttack) returns atk_scale × DEF phys damage
|
||||
// to its source. 尖刺盾: that source gets ATK −atk for `duration` s. Elite module (PRO-X): DEF +def while blocking.
|
||||
// S1 防御力强化·β型 (alt, TAKE_DAMAGE from data): DEF +def for its duration; the counter belongs to “挨打” only.
|
||||
chess_char_2_08_a: (bb, chess) => {
|
||||
const t = talentBb(chess, 0);
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
// Conventions of the tier-3 kits: ../shared/tier3.js; kit contract and rules: ../README.md.
|
||||
|
||||
import { num, defOf, talentBb, traitBb, selectedId, altSkills, fx, NINE, giveSp } from '../shared/tier3.js';
|
||||
import { isHpLoss } from '../../../damage.js';
|
||||
|
||||
export default {
|
||||
// ---- 3_06 菲莱 · 本源铁卫 — S2 冥河诅咒: stops attacking, HP +; when attacked blasts the ground enemies of the 3×3
|
||||
// around her (PRTS 备注: range x-4; arts + ep_damage_ratio × ATK apoptosis, aoe_cd); ATK + once hit by element
|
||||
// ---- 3_06 菲莱 · 本源铁卫 — S2 冥河诅咒: stops attacking, HP +; "受到攻击时" — any damage instance she takes (official
|
||||
// philae_s_2: ON_TAKE_DAMAGE with no source or attack filter) — blasts the ground enemies of the 3×3 around her
|
||||
// (PRTS 备注: range x-4; arts + ep_damage_ratio × ATK apoptosis, aoe_cd); ATK + once hit by element
|
||||
// damage; 神河谕使: 元素损伤 taken −damage_resistance, +SP on apoptosis
|
||||
// 精锐 module PRP-X "阻挡敌人时,自身造成的元素损伤提升15%": EVERY element fill she deals (the S2 blast, a 灼燃维式重锤
|
||||
// she carries …) ×ep_damage_scale while she blocks — an `elementHit` multiplier, like 余's
|
||||
@@ -85,7 +87,11 @@ export default {
|
||||
if (isS2 && sk && sk.active && !unit.findBuff('skill:philae_rage')) battle.addBuff(unit, { key: 'skill:philae_rage', mods: { atkPct: num(bb.atk) }, visible: true });
|
||||
return;
|
||||
}
|
||||
if (!isS2 || !sk || !sk.active || !ctx.dmg?.isAttack || !ctx.source || ctx.source.side !== 'enemy') return;
|
||||
// the official philae_s_2 (buff_template_data) fires on ON_TAKE_DAMAGE with no filter: any damage instance — an
|
||||
// enemy's attack, a skill hit, 深溟巢涌者's pulse, a 无来源 hit — never a 流失 or an element 损伤 (above), nor a
|
||||
// counter / reflection. Until 0.2.0 enemy attacks only (community report of 2026-10-06, item 30)
|
||||
const d = ctx.dmg;
|
||||
if (!isS2 || !sk || !sk.active || !d || isHpLoss(d) || (d.tags || []).some((t) => t === 'counter' || t === 'reflect')) return;
|
||||
if (battle.time < (unit.mem.philaeCd ?? -Infinity)) return;
|
||||
unit.mem.philaeCd = battle.time + cd;
|
||||
// "周围的地面敌人" = range x-4, the 3×3 tiles around her (PRTS 备注)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Conventions of the tier-4 kits: ../shared/tier4.js; kit contract and rules: ../README.md.
|
||||
|
||||
import { AURA, num, tbb, whileDeployed, pulse, toggleBuff, isSel, alt, withDefaults } from '../shared/tier4.js';
|
||||
import { byEnemyAttack } from '../shared/tier1.js';
|
||||
|
||||
export default withDefaults({
|
||||
// ===== 星熊 (protector) S2 荆棘 (passive) — DEF +13 %, counters every attacker for 65 % ATK phys; talents
|
||||
@@ -40,7 +41,8 @@ export default withDefaults({
|
||||
if (!S2) return;
|
||||
battle.on('damaged', (c) => {
|
||||
const src = c.source;
|
||||
if (c.target !== unit || !unit.alive || !src || src.side !== 'enemy' || !src.alive || !c.dmg?.isAttack) return;
|
||||
// 荆棘 = the official inverse_damage: every enemy damage instance, not its attacks only (tier1 byEnemyAttack)
|
||||
if (c.target !== unit || !unit.alive || !byEnemyAttack(c) || !src.alive) return;
|
||||
battle.dealDamage(unit, src, { amount: unit.s.atk * num(bb.atk_scale, 0.65), type: 'phys', canDodge: false, isSkill: true, tags: ['counter'] });
|
||||
battle.fx('thorns', { x: unit.x, y: unit.y, id: unit.id });
|
||||
}, { owner: unit });
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
num, on, inRange, talent, skillGrid, batPct, mods, inFaction, isOp, selectedId, lazySkills, skillRange, leaderOf,
|
||||
whileOn, permBuff,
|
||||
} from '../shared/tier5.js';
|
||||
import { byEnemyAttack } from '../shared/tier1.js';
|
||||
|
||||
/** 玛恩纳 游侠 "周围存在3名及以上敌人" radius (8-neighbourhood). */
|
||||
const AROUND_RADIUS = 1.5;
|
||||
@@ -18,7 +19,7 @@ export default {
|
||||
// PRTS 备注 the trait bonus drops by 10 % (per_kill_reduce, absolute: +400 % → +390 %) for each enemy knocked out by
|
||||
// his own attack (or the damage it carries — not 无动于衷's reflection, not a mark another operator's attack set off),
|
||||
// settled after that attack, never below +0 %. T1 游侠: ×1.1 ATK on attacks (×1.15 and −15 % damage taken with ≥3
|
||||
// enemies around). T2 无动于衷: taunt +1, Kazimierz ops reflect 15 % of his ATK as true damage when attacked.
|
||||
// enemies around). T2 无动于衷: taunt +1, Kazimierz ops reflect 15 % of his ATK as true damage when an enemy damages them.
|
||||
// S1 未声张的怒火 (duration, SEARCH): attacks attack@atk_scale × ATK, DEF +. S2 未宽解的悲哀 (duration): skill range,
|
||||
// BAT +0.3 s, attacks attack@atk_scale × ATK twice; a kill of his own attacks during the skill keeps the trait ramp
|
||||
// when it ends. S1 / S2 have no 对空 note: ground only, like his trait. S2's data rule is ACTIVE_RANGE on its 2-3 (the
|
||||
@@ -85,7 +86,9 @@ export default {
|
||||
if (!(scale > 0)) return;
|
||||
battle.on('damaged', (c) => {
|
||||
const a = c.target, src = c.source;
|
||||
if (a.side !== 'ally' || !isOp(a) || !isKazimierz(a) || !src || src.side !== 'enemy' || !src.alive || !c.dmg?.isAttack) return;
|
||||
// the official mlynar_t_2[inverse] (ON_TAKE_DAMAGE, InverseDamage from an enemy source): every enemy damage instance
|
||||
// a Kazimierz operator takes, not its attacks only (tier1 byEnemyAttack)
|
||||
if (a.side !== 'ally' || !isOp(a) || !isKazimierz(a) || !byEnemyAttack(c) || !src.alive) return;
|
||||
if (!on(unit) || leaderOf(battle, unit) !== unit) return;
|
||||
battle.dealDamage(unit, src, { amount: unit.s.atk * scale, type: 'true', canDodge: false, tags: ['talent', 'reflect'] });
|
||||
}, { owner: unit });
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
num, bv, tbb, moduleBb, live, opsOf, ANY, onDefaultSkill, selectedSkill, skillGridOf, AROUND8, onElementHit,
|
||||
elementDmg, aura,
|
||||
} from '../shared/tier6.js';
|
||||
import { holdProtect } from '../shared/tier1.js';
|
||||
import { holdProtect, byEnemyAttack } from '../shared/tier1.js';
|
||||
|
||||
/**
|
||||
* "传送至自身位置": a ground enemy that can reach `unit`'s tile on the ground grid is moved onto it (unblocked, its
|
||||
@@ -71,7 +71,8 @@ function yu(bb, chess, def) {
|
||||
battle.addBuff(unit, { key: 'yu:host', mods: { taunt: num(bb.taunt_level, 1) }, persist: true, allowDead: true });
|
||||
battle.on('damaged', (ctx) => {
|
||||
const s = ctx.source;
|
||||
if (ctx.target !== unit || !unit.skill?.active || !s || s.side !== 'enemy' || !s.alive || !ctx.dmg?.isAttack) return;
|
||||
// "每次受到攻击" = the official yu_s_1[inverse_damage]: every enemy damage instance (tier1 byEnemyAttack)
|
||||
if (ctx.target !== unit || !unit.skill?.active || !byEnemyAttack(ctx) || !s.alive) return;
|
||||
elementDmg(battle, unit, s, 'burn', unit.s.atk * num(bb.ep_damage_ratio), ['skill']);
|
||||
}, { owner: unit });
|
||||
},
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
// refund of a withdrawal is not modelled — no retreat in the sim refunds DP). No strategy of this mode closes it: PRTS
|
||||
// 帮助 lists the 上半 row that did as removed in 下半, so in a fight the skill simply runs its `duration`.
|
||||
|
||||
import { num, talentBb, traitBb, skillRec, up } from '../shared/tier1.js';
|
||||
import { num, talentBb, traitBb, skillRec, up, byEnemyAttack } from '../shared/tier1.js';
|
||||
import { canTargetEnemy } from '../../../targeting.js';
|
||||
import { bodyInRadius } from '../../../body.js';
|
||||
import { hasHp } from '../../../damage.js';
|
||||
@@ -252,15 +252,17 @@ export default {
|
||||
} },
|
||||
],
|
||||
install(battle, unit) {
|
||||
// S1 恶业苦果: every enemy attack she takes ⇒ atk_scale × ATK arts back to the attacker
|
||||
// S1 恶业苦果: every enemy damage instance she takes (the official hsgma2_s_1 on ON_TAKE_DAMAGE, not its attacks only:
|
||||
// tier1 byEnemyAttack) ⇒ atk_scale × ATK arts back to its source
|
||||
battle.on('damaged', (c) => {
|
||||
const s = c.source;
|
||||
if (c.target !== unit || !unit.alive || unit.skill?.id !== S1 || !unit.skill.active) return;
|
||||
if (!s || s.side !== 'enemy' || !s.alive || !c.dmg?.isAttack) return;
|
||||
if (!byEnemyAttack(c) || !s.alive) return;
|
||||
battle.dealDamage(unit, s, { amount: unit.s.atk * num(b1.atk_scale), type: 'arts', canDodge: false, isSkill: true, ignoreSelect: true, tags: ['skill', 'counter'] });
|
||||
battle.fx('counter', { x: s.x, y: s.y, id: unit.id });
|
||||
}, { owner: unit });
|
||||
// AST-X 无迹: her attack damage ⇒ +atk_scale × ATK arts (附加伤害); an enemy attack she takes ⇒ atk_scale × ATK arts back
|
||||
// AST-X 无迹: her attack damage ⇒ +atk_scale × ATK arts (附加伤害); an enemy damage instance she takes (the official
|
||||
// hsgma2_e_003_tr_take: ON_TAKE_DAMAGE from the other side) ⇒ atk_scale × ATK arts back
|
||||
const astx = num(tb.atk_scale);
|
||||
if (astx > 0) {
|
||||
battle.on('damaged', (c) => {
|
||||
@@ -270,7 +272,7 @@ export default {
|
||||
}, { owner: unit, priority: -20 });
|
||||
battle.on('damaged', (c) => {
|
||||
const s = c.source;
|
||||
if (c.target !== unit || !unit.alive || !s || s.side !== 'enemy' || !s.alive || !c.dmg?.isAttack) return;
|
||||
if (c.target !== unit || !unit.alive || !byEnemyAttack(c) || !s.alive) return;
|
||||
battle.dealDamage(unit, s, { amount: unit.s.atk * astx, type: 'arts', ignoreSelect: true, tags: ['module', ASTX, 'counter'] });
|
||||
}, { owner: unit });
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
// −one_minus_status_resistance), refreshed every AURA s while the skill runs; two 年 of a shared field keep the stronger
|
||||
// (installAura's rule). The DEF / block buff ends with the skill, the 抵抗 within AURA_DUR.
|
||||
|
||||
import { num, talentBb, traitBb, skillRec, statBuff, toggleBuff, up, giveSp } from '../shared/tier1.js';
|
||||
import { num, talentBb, traitBb, skillRec, statBuff, toggleBuff, up, giveSp, byEnemyAttack } from '../shared/tier1.js';
|
||||
import { absoluteRangeKeys } from '../../../targeting.js';
|
||||
import { COLS } from '../../../constants.js';
|
||||
|
||||
@@ -154,12 +154,13 @@ export default {
|
||||
battle.addBuff(unit, { key: FORT, mods: nz({ hpPct: perHp * n, healingTakenMul: Math.min(healMax, healBase + healAdd * n) }), data: { n }, tags: ['trait'] });
|
||||
}, { owner: unit });
|
||||
}
|
||||
// S2 铜印: every enemy attack she takes ⇒ atk_scale × ATK arts back to the attacker + silence `silence` s
|
||||
// S2 铜印: every enemy damage instance she takes (the official inverse_damage[magic] + nian_s_2 on ON_TAKE_DAMAGE, not
|
||||
// its attacks only: tier1 byEnemyAttack) ⇒ atk_scale × ATK arts back to its source + silence `silence` s
|
||||
const scale = num(b2.atk_scale), sil = num(b2.silence);
|
||||
battle.on('damaged', (c) => {
|
||||
const src = c.source;
|
||||
if (c.target !== unit || !unit.alive || unit.skill?.id !== S2 || !unit.skill.active) return;
|
||||
if (!src || src.side !== 'enemy' || !src.alive || !c.dmg?.isAttack) return;
|
||||
if (!byEnemyAttack(c) || !src.alive) return;
|
||||
if (scale > 0) battle.dealDamage(unit, src, { amount: unit.s.atk * scale, type: 'arts', canDodge: false, isSkill: true, ignoreSelect: true, tags: ['skill', 'counter'] });
|
||||
if (sil > 0 && src.alive) battle.applyStatus(src, 'silence', { duration: sil, source: unit });
|
||||
battle.fx('counter', { x: src.x, y: src.y, id: unit.id });
|
||||
|
||||
@@ -31,6 +31,7 @@ import { COLS, TICK } from '../../../constants.js';
|
||||
import { absoluteRangeKeys, sortEnemyTargets } from '../../../targeting.js';
|
||||
import { offsetTile } from '../../../dir.js';
|
||||
import { bodyInKeys, bodyTileReach } from '../../../body.js';
|
||||
import { isHpLoss } from '../../../damage.js';
|
||||
|
||||
// =================================================================================================================
|
||||
// shared helpers (named exports; content/index.js only merges the default export)
|
||||
@@ -66,8 +67,21 @@ export const cheb = (a, b) => (b.hitArea ? bodyTileReach(b, Math.round(a.y), Mat
|
||||
: Math.max(Math.abs(Math.round(a.y) - Math.round(b.y)), Math.abs(Math.round(a.x) - Math.round(b.x))));
|
||||
/** Normal attack hit on its primary target (no splash, no chain jump). */
|
||||
export const isMainHit = (dmg) => !!dmg && dmg.isAttack && !dmg.isSplash && !(dmg.tags && dmg.tags.includes('chain'));
|
||||
/** Damage ctx caused by an enemy's attack. */
|
||||
export const byEnemyAttack = (ctx) => !!ctx.source && ctx.source.side === 'enemy' && !!ctx.dmg && ctx.dmg.isAttack;
|
||||
/**
|
||||
* `damaged` ctx that sets off a "受到攻击时" counter: a damage instance from an enemy, of any kind — its normal attack, a
|
||||
* skill hit, an area pulse (深溟巢涌者's 无途径 法术伤害). The official counters fire on ON_TAKE_DAMAGE from a source of the
|
||||
* other side, not on attacks only (ArknightsGameData buff_template_data: inverse_damage / inverse_damage[magic] — 星熊 S2,
|
||||
* 年 S2 —, bubble_s_2 / bubble_t_1 — 泡泡 —, vendla_s_2 — 刺玫 —, yu_s_1[inverse_damage] — 余 S1 —, hsgma2_s_1 /
|
||||
* hsgma2_e_003_tr_take — 斩业星熊 —, mlynar_t_2[inverse] — 玛恩纳 无动于衷; 菲莱 S2's philae_s_2 checks no source at all).
|
||||
* Never a 流失 (PRTS 作战机制 "生命流失…不会触发反伤、受击回复等受到攻击触发的时点"), an element 损伤 (its own event), 无来源 damage
|
||||
* (no source to strike back) or another counter / reflection (tags 'counter' / 'reflect': no ping-pong). Community report
|
||||
* of 2026-10-06 (item 30): it took enemy attacks only, so 深溟巢涌者's pulse never set a counter off.
|
||||
*/
|
||||
export const byEnemyAttack = (ctx) => {
|
||||
const s = ctx.source, d = ctx.dmg;
|
||||
if (!s || s.side !== 'enemy' || !d || d.sourceless || ctx.type === 'element' || isHpLoss(d)) return false;
|
||||
return !(Array.isArray(d.tags) && (d.tags.includes('counter') || d.tags.includes('reflect')));
|
||||
};
|
||||
/**
|
||||
* `damaged` ctx of a damage that removed HP and can give 受击回复 SP — the engine's rule (damage.js applyHpLoss: not a 流失
|
||||
* (`noSp`, Battle.loseHp), not an element 损伤), whatever its source: an attack, a zone, the 无来源 源石溶剂 tick.
|
||||
|
||||
Reference in new issue
Block a user