fix: 外勤医疗预置干员保留初始索敌顺序 (#315)
This commit is contained in:
1 parent
62eb113419
commit
3b57f72704
9 files changed
+96
-7
No files matched your search
@@ -707,6 +707,63 @@ test('Touch 外勤医疗: every player of a match with the band gets 预备干
|
||||
cover('band_amedic');
|
||||
});
|
||||
|
||||
test('外勤医疗 map character already on its slot keeps earlier aggro than the initially deployed operators', () => {
|
||||
for (const [golden, mapCharId] of [[false, 'char_605_cmedic'], [true, 'char_613_acmedc']]) {
|
||||
const defs = {
|
||||
e1: op('e1', { golden, stats: { maxHp: 1e7, atk: 0 } }),
|
||||
e2: op('e2', { golden, stats: { maxHp: 1e7, atk: 0 } }),
|
||||
last: op('last', { stats: { maxHp: 1e7, atk: 0 } }),
|
||||
};
|
||||
const sharedBoss = { hp: 1e6, maxHp: 1e6, damage(pid, n) { this.hp -= n; } };
|
||||
const h = makeBattle({
|
||||
kind: 'boss', stageId: 'act2autochess_m01', bandId: 'band_amedic', sharedBoss,
|
||||
defs: { chess: defs }, units: [
|
||||
{ chessId: 'e1', row: 10, col: 5 }, { chessId: 'e2', row: 11, col: 6 }, { chessId: 'last', row: 12, col: 7 },
|
||||
],
|
||||
timeLimit: 100, autoFinish: false,
|
||||
});
|
||||
h.step();
|
||||
const mapChar = h.unit(mapCharId);
|
||||
assert.ok(mapChar?.alive, mapCharId);
|
||||
assert.ok(h.unit('e1').aggroSeq < h.unit('e2').aggroSeq);
|
||||
assert.ok(h.unit('e2').aggroSeq < h.unit('last').aggroSeq);
|
||||
assert.ok(mapChar.aggroSeq < h.unit('e1').aggroSeq, `${mapCharId} keeps its pre-battle slot priority`);
|
||||
|
||||
const boss = h.spawn('enemy_9033_acdeer', { pos: [3, 10], routeIndex: 0, mods: { speedMul: 0 }, tag: 'boss' });
|
||||
assert.ok(boss);
|
||||
h.run(boss.s.interval + 0.1);
|
||||
const columns = h.eventsOf('fx').filter((f) => f[1] === 'column').map((f) => f[4].c);
|
||||
assert.equal(columns[0], 7, `${mapCharId}: 萨米的意志 targets the last deployed operator's column`);
|
||||
checkInvariants(h.b);
|
||||
}
|
||||
});
|
||||
|
||||
test('外勤医疗 Touch does not take either player’s first 冰凌 on a shared boss field', () => {
|
||||
const defs = {
|
||||
e1: op('e1', { golden: true, stats: { maxHp: 1e7, atk: 0 } }),
|
||||
e2: op('e2', { golden: true, stats: { maxHp: 1e7, atk: 0 } }),
|
||||
last: op('last', { stats: { maxHp: 1e7, atk: 0 } }),
|
||||
};
|
||||
const players = ['p1', 'p2'].map((playerId, seat) => ({
|
||||
playerId, seat, side: seat ? 'R' : 'L', colOffset: 0, bandId: 'band_amedic', bonds: {}, playerEffects: [],
|
||||
units: ['e1', 'e2', 'last'].map((chessId, i) => ({ uid: seat * 10 + i + 1, kind: 'chess', chessId, row: 10 + i, col: 5 + i })),
|
||||
}));
|
||||
const sharedBoss = { hp: 1e6, maxHp: 1e6, damage(pid, n) { this.hp -= n; } };
|
||||
const h = makeBattle({ kind: 'boss', stageId: 'act2autochess_m01', players, sharedBoss,
|
||||
defs: { chess: defs }, timeLimit: 100, autoFinish: false });
|
||||
h.step();
|
||||
const touches = h.allies().filter((u) => u.defId === 'char_613_acmedc');
|
||||
assert.equal(touches.length, 2);
|
||||
assert.ok(touches.every((u) => u.aggroSeq < h.allies().filter((a) => a.kind === 'op' && a.ownerId === u.ownerId)[0].aggroSeq));
|
||||
|
||||
const boss = h.spawn('enemy_9033_acdeer', { pos: [3, 10], routeIndex: 0, mods: { speedMul: 0 }, tag: 'boss' });
|
||||
assert.ok(boss);
|
||||
h.run(boss.s.interval * 2 + 0.1);
|
||||
const columns = h.eventsOf('fx').filter((f) => f[1] === 'column').map((f) => f[4].c);
|
||||
assert.deepEqual(columns.slice(0, 2), [7, 13]);
|
||||
checkInvariants(h.b);
|
||||
});
|
||||
|
||||
test('coverage: every band is exercised by a test above', () => {
|
||||
cover('band_dusk'); // 夕: 画卷 grant (fixed-round test) + 墨色真颜 (battle test)
|
||||
const missing = Object.keys(DATA.bands).filter((id) => !COVER.has(id)).sort();
|
||||
|
||||
@@ -511,6 +511,7 @@ test('band map characters: spawnMapChar puts 预备干员-医疗 at its stage sl
|
||||
assert.ok(med);
|
||||
assert.deepEqual([med.tileR, med.tileC], [10, 2]);
|
||||
const gu = h.unit('test_guard');
|
||||
assert.ok(med.aggroSeq > gu.aggroSeq, 'an ad-hoc spawn after battle start keeps normal summon priority');
|
||||
gu.hp = 5000;
|
||||
h.run(4);
|
||||
assert.ok(gu.hp > 5000, 'healed');
|
||||
@@ -518,6 +519,7 @@ test('band map characters: spawnMapChar puts 预备干员-医疗 at its stage sl
|
||||
h.step();
|
||||
const touch = spawnMapChar(h.b, 'p1', TOKEN_IDS.touch);
|
||||
assert.ok(touch);
|
||||
assert.ok(touch.aggroSeq > gu.aggroSeq, 'an ad-hoc Touch also keeps normal summon priority');
|
||||
touch.skill.activate('test', { free: true });
|
||||
gu.hp = 3000;
|
||||
h.run(4);
|
||||
|
||||
@@ -1598,7 +1598,7 @@
|
||||
"title": {"id":"comment_4","name":"精英云集","picId":"comment_icon_4","text":"晋升精锐次数最多"},
|
||||
"trophies": 4,
|
||||
"reward": 400,
|
||||
"stats": {"activatedLayers":220,"bossDamage":344186,"dmgDealt":3000543,"gold":134,"itemsEquipped":22,"kills":272,"leaks":40,"lpLost":10,"merges":3,"perfectRounds":11,"refreshes":21},
|
||||
"stats": {"activatedLayers":220,"bossDamage":344186,"dmgDealt":2999081,"gold":134,"itemsEquipped":22,"kills":272,"leaks":40,"lpLost":10,"merges":3,"perfectRounds":11,"refreshes":21},
|
||||
"lineup": ["6_18_a@12,3[4_11_e_a]","4_10_a@12,4","1_17_b@11,3[4_03_e_a+1_01_e_a]","5_20_a@11,8[6_05_e_a+3_06_e_a]","3_17_b@10,3","3_12_a@10,4[1_02_e_a+3_11_e_a]","5_07_a@10,7[4_02_e_b+2_01_e_b]","1_19_b@10,8[2_01_e_b+4_04_e_b]"],
|
||||
"bonds": ["arcaneShip 2/24","kazimierzShip 1/64","miraShip 1/12","preciShip 0/8","raidShip 1/108","siracusaShip 1/12","skillfulShip 0/3","soloShip 1/0","suntShip 1/0","swiftShip 0/23","yanShip 0/1"]
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user