feedback7 R22-LATE: 引星棘刺 S1 度算浪波 breaks an HP-ratio tie by the latest deployment; golden: roster-033, roster-034 move

PRTS 引星棘刺 技能1 度算浪波 备注: 「※优先选择生命比例最低>最晚部署的我方单位(不含装置职业单位)」. The kit took the ally
with the lowest HP ratio but broke a tie by more blocking, then the nearer one, then the unit id. A tie now goes to
the latest deployment (the highest deploySeq: a redeployed operator counts from its new deployment), the id last.
「不含装置职业单位」 was already met: alliesInGrid never returns a device.

Golden: roster-033 (a normal 引星棘刺 with S1) and roster-034 (an elite one) move — at the start every ally is at full
HP, so the first units now land on the latest deployed ally instead of the nearest one (033: killed 64 → 47, leaks
103 → 120; 034: 5_14_b damage taken 14691 → 11676 …).
Tests: test/content/kits_alt_t5.test.js +1 (two allies at 50 %: the later deployment, though farther, gets the unit;
a lower ratio still wins) — fails on the parent; all 引星棘刺 tests pass (9).
This commit is contained in:
sganggs committed 2026-10-08 21:57:48 +08:00
1 parent ac4231846f
commit 03688c8297
3 files changed
+77 -48

No files matched your search

@@ -96,7 +96,9 @@ export default {
// (GitHub #124 「引星棘刺一技能不会在满技力时自动释放」) // (GitHub #124 「引星棘刺一技能不会在满技力时自动释放」)
trigger: { rule: 'SP_FULL' }, trigger: { rule: 'SP_FULL' },
onStart({ battle, unit }) { onStart({ battle, unit }) {
const t = battle.alliesInGrid(unit).filter((a) => a.hp > 0).sort((a, b) => a.hpRatio - b.hpRatio || b.blocking.length - a.blocking.length || dist(a, unit) - dist(b, unit) || a.id - b.id)[0]; // PRTS 备注 「※优先选择生命比例最低>最晚部署的我方单位(不含装置职业单位)」: the lowest HP ratio, a tie to the
// latest deployment (alliesInGrid has no devices); until 0.2.2 a tie went to more blocking, then the nearer
const t = battle.alliesInGrid(unit).filter((a) => a.hp > 0).sort((a, b) => a.hpRatio - b.hpRatio || b.deploySeq - a.deploySeq || a.id - b.id)[0];
if (!t) return; if (!t) return;
const z = { type: 'guard', r: t.tileR, c: t.tileC, x: t.x, y: t.y, t: 0, acc: 0, dur: num(bb.projectile_delay_time, 6) + extend(battle, unit) }; const z = { type: 'guard', r: t.tileR, c: t.tileC, x: t.x, y: t.y, t: 0, acc: 0, dur: num(bb.projectile_delay_time, 6) + extend(battle, unit) };
(unit.mem.zones ??= []).push(z); (unit.mem.zones ??= []).push(z);
+27
View File
@@ -1058,6 +1058,33 @@ test('引星棘刺 S1 度算浪波: two alchemy units on one ally add their DEF
done(h); done(h);
}); });
test('引星棘刺 S1 度算浪波: at an HP-ratio tie the unit goes to the latest deployed ally (PRTS 备注 「优先选择生命比例最低>最晚部署的我方单位」)', () => {
for (const id of pair('15')) {
const h = run({
defs: { chess: { t_first: ally('t_first'), t_last: ally('t_last') } },
// t_first stands nearer to her, t_last deploys after it (until 0.2.2 a tie went to more blocking, then the nearer)
units: [entry(id, 'skchr_thorn2_1', { row: 10, col: 3 }), { chessId: 't_first', row: 11, col: 4 }, { chessId: 't_last', row: 9, col: 5 }],
enemies: [],
});
const u = sel(h, id, 'skchr_thorn2_1');
const first = h.unit('t_first'), last = h.unit('t_last');
h.step();
assert.ok(last.deploySeq > first.deploySeq, 't_last is the later deployment');
first.hp = first.s.maxHp * 0.5; last.hp = last.s.maxHp * 0.5;
cast(h, u);
const z = u.mem.zones.find((x) => x.type === 'guard');
assert.deepEqual([z.r, z.c], [9, 5], 'the latest deployed of the two at 50 %');
// the lowest ratio still comes first
last.hp = last.s.maxHp; first.hp = first.s.maxHp * 0.4;
const n0 = u.skill.activations;
u.skill.gainSp(1000);
assert.ok(h.runUntil(() => u.skill.activations > n0, 15), 'cast again');
const z2 = u.mem.zones.filter((x) => x.type === 'guard').at(-1);
assert.deepEqual([z2.r, z2.c], [11, 4], 'a lower ratio beats a later deployment');
done(h);
}
});
test('引星棘刺 S1 度算浪波 (AUTO): fires as soon as its SP is full, no enemy needed (GitHub #124)', () => { test('引星棘刺 S1 度算浪波 (AUTO): fires as soon as its SP is full, no enemy needed (GitHub #124)', () => {
for (const id of pair('15')) { for (const id of pair('15')) {
const h = run({ const h = run({
+47 -47
View File
@@ -2017,64 +2017,64 @@
"round": 12, "round": 12,
"seed": 3754088384, "seed": 3754088384,
"waveId": "act1autochess_h05", "waveId": "act1autochess_h05",
"time": 211.6, "time": 218.83,
"ticks": 6348, "ticks": 6565,
"reason": "cleared", "reason": "cleared",
"killed": 64, "killed": 47,
"total": 167, "total": 167,
"unspawned": 0, "unspawned": 0,
"bossHpLeft": null, "bossHpLeft": null,
"rngDraws": 743, "rngDraws": 474,
"errors": {"count":0,"kinds":[]}, "errors": {"count":0,"kinds":[]},
"players": { "players": {
"p1": { "p1": {
"killed": 64, "killed": 47,
"total": 167, "total": 167,
"perfect": false, "perfect": false,
"leaks": 103, "leaks": 120,
"leaksUncounted": 0, "leaksUncounted": 0,
"coins": 2, "coins": 2,
"dmg": 557616, "dmg": 368976,
"bossDmg": 0, "bossDmg": 0,
"heal": 70704, "heal": 52135,
"deaths": 22, "deaths": 28,
"layerGains": {"indomShip":65} "layerGains": {"indomShip":20}
} }
}, },
"units": [ "units": [
["p1",1,"op","chess_char_5_11_a",0,null,3628.8,1,202,7,21979,14938,7385,45,7], ["p1",1,"op","chess_char_5_11_a",0,null,2073.56,1,199,5,23095,13739,7417,49,7],
["p1",2,"op","chess_char_5_19_a",0,null,3039.97,1,187,3,49875,12485,583,27,3], ["p1",2,"op","chess_char_5_19_a",0,null,2282.43,1,200,6,57898,16657,205,29,3],
["p1",3,"op","chess_char_5_13_a",0,null,1688.93,1,164,14,171901,31272,434,62,2], ["p1",3,"op","chess_char_5_13_a",0,null,2723.22,1,201,10,68452,11801,205,34,1],
["p1",4,"op","chess_char_5_14_a",0,null,1732,1,178,2,12009,13967,4721,36,4], ["p1",4,"op","chess_char_5_14_a",0,null,0,0,174,2,9395,6983,2049,27,3],
["p1",5,"op","chess_char_5_06_b",0,"uniequip_003_etlchi",0,0,154,14,154449,14484,6617,36,9], ["p1",5,"op","chess_char_5_06_b",0,"uniequip_003_etlchi",0,0,151,11,110341,13501,5755,28,7],
["p1",6,"op","chess_char_5_17_a",0,null,2250,1,200,2,22144,18671,332,42,11], ["p1",6,"op","chess_char_5_17_a",0,null,2250,1,203,0,12679,31166,324,24,7],
["p1",7,"op","chess_char_5_12_a",1,null,1381.61,1,3,3,14760,3280,625,14,3], ["p1",7,"op","chess_char_5_12_a",1,null,0,0,3,5,13312,2896,205,12,2],
["p1",8,"op","chess_char_5_15_a",0,null,926,1,4,4,32726,0,31335,138,41], ["p1",8,"op","chess_char_5_15_a",0,null,0,0,197,4,15326,1954,16704,63,20],
["p1",9,"op","chess_char_5_20_a",0,null,1108,1,188,0,9556,4207,545,25,2], ["p1",9,"op","chess_char_5_20_a",0,null,0,0,166,0,5953,4317,228,15,1],
["p1",10,"op","chess_char_5_21_a",0,null,0,0,192,0,5581,8133,323,9,0], ["p1",10,"op","chess_char_5_21_a",0,null,0,0,185,0,4781,7890,180,8,0],
["p1",11,"op","chess_char_5_22_a",0,null,1237,1,5,14,60089,4530,155,94,4], ["p1",11,"op","chess_char_5_22_a",0,null,1237,1,202,4,45835,1237,0,68,2],
["p1",12,"op","chess_char_5_23_a",0,null,1422,1,185,0,0,11350,17630,30,16], ["p1",12,"op","chess_char_5_23_a",0,null,0,0,188,0,0,6936,18846,32,11],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null], ["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null], ["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null],
["p1","~1","token","token_10015_dusk_drgn",null,null,1226.94,0,38,0,2547,787,17,8,null] ["p1","~1","token","token_10015_dusk_drgn",null,null,1037.85,0,38,0,1910,976,17,6,null]
], ],
"enemies": { "enemies": {
"enemy_1005_yokai_3": [1,0,1,5320,11751], "enemy_1005_yokai_3": [1,0,1,4470,9218],
"enemy_1009_lurker": [72,19,53,789,144011], "enemy_1009_lurker": [72,18,54,909,95221],
"enemy_10159_mntrjn": [1,0,1,0,25020], "enemy_10159_mntrjn": [1,0,1,0,25185],
"enemy_1019_jshoot_2": [51,30,21,17762,168939], "enemy_1019_jshoot_2": [51,21,30,17841,122795],
"enemy_1118_lidbox_2": [1,1,0,39,14774], "enemy_1118_lidbox_2": [1,1,0,39,14774],
"enemy_1196_msfyin": [1,1,0,0,3], "enemy_1196_msfyin": [1,1,0,0,3],
"enemy_1252_lysytb_2": [1,0,1,206,12737], "enemy_1252_lysytb_2": [1,0,1,304,7837],
"enemy_1364_spnaxe_2": [1,0,1,10239,9744], "enemy_1364_spnaxe_2": [1,0,1,8971,8027],
"enemy_1404_msnip": [36,13,23,96816,214197], "enemy_1404_msnip": [36,6,30,79966,128372],
"enemy_1516_jakill": [1,0,1,6933,2413], "enemy_1516_jakill": [1,0,1,7554,5712],
"enemy_9011_acrefr": [1,0,1,0,5382] "enemy_9011_acrefr": [1,0,1,0,2713]
}, },
"hooks": [1,202,6348,1215,1215,4186,4215,5403,86,190,102,100,0,30920,253,140,167,103,1,91,13,0,7], "hooks": [1,203,6565,1004,1004,3305,3328,2470,75,196,64,63,0,21601,205,120,167,120,1,77,4,0,11],
"events": {"atk":1321,"bounty":1,"deploy":33,"die":87,"dmg":4129,"engage":12,"fx":185,"heal":720,"layer":13,"leak":103,"skill":202,"spawn":182,"status":389}, "events": {"atk":1084,"bounty":1,"deploy":34,"die":76,"dmg":3278,"engage":12,"fx":97,"heal":418,"layer":4,"leak":120,"skill":127,"spawn":182,"status":251},
"fx": {"aoe":4,"crit":8,"dodge":7,"dollEnd":3,"garrison":13,"healAoe":7,"hpShare":2,"palsy":2,"reborn":2,"revive":9,"shield":67,"sp":12,"substitute":5,"summon":1,"swap":2,"zone":41}, "fx": {"aoe":3,"crit":2,"dodge":11,"dollEnd":1,"garrison":4,"healAoe":7,"hpShare":1,"palsy":1,"reborn":2,"revive":7,"shield":29,"sp":5,"substitute":2,"summon":1,"swap":1,"zone":20},
"snaps": "0092f82c d956b3ce a0ea1881 5a64de8a 599b4202 2f6b144a 8a4b2d63 f4bc7bf0 d8f52b83 5247b31d 2e6c6f38 e0538118 c645338e 0523d4c6 bfb16991 a871f36d 24e1d3fa 4f310cd6 0b4b5914 a0261983 358e7016 ce3f7688" "snaps": "0092f82c 10f6cd5a 79f24953 8778cb3f 5bc04332 6c3c9351 7f048832 5dfafc44 5eabad8d 751eb802 ba739a4c 544464f7 abaaec7c 6bd184b5 aca79702 894abaef 203b4092 1e473bac 4e053885 44ca1766 a54f5762 b9106885"
}, },
"roster-034": { "roster-034": {
"about": "pass 1 band 6: chess_char_5_08_b chess_char_5_11_b chess_char_5_19_b chess_char_5_13_b chess_char_5_14_b chess_char_5_07_b chess_char_5_17_b chess_char_5_10_b chess_char_5_12_b chess_char_5_15_b chess_char_5_20_b chess_char_5_21_b", "about": "pass 1 band 6: chess_char_5_08_b chess_char_5_11_b chess_char_5_19_b chess_char_5_13_b chess_char_5_14_b chess_char_5_07_b chess_char_5_17_b chess_char_5_10_b chess_char_5_12_b chess_char_5_15_b chess_char_5_20_b chess_char_5_21_b",
@@ -2094,18 +2094,18 @@
"bossHpLeft": null, "bossHpLeft": null,
"rngDraws": 619, "rngDraws": 619,
"errors": {"count":0,"kinds":[]}, "errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":82,"total":104,"perfect":false,"leaks":22,"leaksUncounted":0,"coins":6,"dmg":4801724,"bossDmg":0,"heal":98672,"deaths":1,"layerGains":{}}}, "players": {"p1":{"killed":82,"total":104,"perfect":false,"leaks":22,"leaksUncounted":0,"coins":6,"dmg":4801724,"bossDmg":0,"heal":95286,"deaths":1,"layerGains":{}}},
"units": [ "units": [
["p1",1,"op","chess_char_5_08_b",0,"uniequip_003_horn",2381.35,1,7,25,1560529,36004,1132,96,83], ["p1",1,"op","chess_char_5_08_b",0,"uniequip_003_horn",2381.35,1,7,25,1560529,36004,1132,96,83],
["p1",2,"op","chess_char_5_11_b",0,"uniequip_003_demkni",4194.43,1,10,2,85198,10006,49858,194,31], ["p1",2,"op","chess_char_5_11_b",0,"uniequip_003_demkni",3778.92,1,10,2,85198,10027,50152,194,31],
["p1",3,"op","chess_char_5_19_b",0,"none",3682,1,11,5,218886,6726,577,124,5], ["p1",3,"op","chess_char_5_19_b",0,"none",3682,1,11,5,218886,6749,688,124,5],
["p1",4,"op","chess_char_5_13_b",0,"uniequip_003_ghost2",3448.92,1,13,4,163179,14903,517,210,5], ["p1",4,"op","chess_char_5_13_b",0,"uniequip_003_ghost2",3448.92,1,13,4,163179,14903,517,210,5],
["p1",5,"op","chess_char_5_14_b",0,"none",3260.35,1,15,0,16840,14691,8936,217,16], ["p1",5,"op","chess_char_5_14_b",0,"none",3260.35,1,15,0,16840,11676,6934,217,16],
["p1",6,"op","chess_char_5_07_b",0,"uniequip_003_surtr",2680,1,8,4,292063,15460,635,104,49], ["p1",6,"op","chess_char_5_07_b",0,"uniequip_003_surtr",2680,1,8,4,292063,15460,635,104,49],
["p1",7,"op","chess_char_5_17_b",0,"uniequip_003_f12yin",2337.47,1,100,6,203715,3444,325,86,35], ["p1",7,"op","chess_char_5_17_b",0,"uniequip_003_f12yin",2337.47,1,100,6,203715,3444,325,86,35],
["p1",8,"op","chess_char_5_10_b",0,"uniequip_003_lisa",1470,1,4,5,177131,0,0,116,6], ["p1",8,"op","chess_char_5_10_b",0,"uniequip_003_lisa",1470,1,4,5,177131,0,0,116,6],
["p1",9,"op","chess_char_5_12_b",1,"uniequip_003_dusk",1667,1,5,22,1559480,0,0,91,5], ["p1",9,"op","chess_char_5_12_b",1,"uniequip_003_dusk",1667,1,5,22,1559480,0,0,91,5],
["p1",10,"op","chess_char_5_15_b",0,"none",1907.5,1,12,0,58039,0,36694,166,128], ["p1",10,"op","chess_char_5_15_b",0,"none",1907.5,1,12,0,58039,0,34903,166,128],
["p1",11,"op","chess_char_5_20_b",0,"uniequip_003_aglina",1352,1,14,5,208929,1794,0,138,6], ["p1",11,"op","chess_char_5_20_b",0,"uniequip_003_aglina",1352,1,14,5,208929,1794,0,138,6],
["p1",12,"op","chess_char_5_21_b",0,"none",3330.35,1,6,4,257734,0,0,50,3], ["p1",12,"op","chess_char_5_21_b",0,"none",3330.35,1,6,4,257734,0,0,50,3],
["-","~1","device","trap_1105_accrate",null,null,100,0,1,0,0,0,0,0,null], ["-","~1","device","trap_1105_accrate",null,null,100,0,1,0,0,0,0,0,null],
@@ -2119,16 +2119,16 @@
"enemy_1165_duhond_2": [1,1,0,114,24767], "enemy_1165_duhond_2": [1,1,0,114,24767],
"enemy_1204_msfhu": [1,1,0,0,12], "enemy_1204_msfhu": [1,1,0,0,12],
"enemy_1288_duskls": [1,1,0,3189,30964], "enemy_1288_duskls": [1,1,0,3189,30964],
"enemy_1381_winman": [27,23,4,7117,933397], "enemy_1381_winman": [27,23,4,7088,933397],
"enemy_1381_winman_2": [39,31,7,28243,1724781], "enemy_1381_winman_2": [39,31,7,27104,1724781],
"enemy_1387_winshd": [30,22,5,53819,1942830], "enemy_1387_winshd": [30,22,5,52016,1942830],
"enemy_1425_lrcmra_2": [1,0,1,1682,43433], "enemy_1425_lrcmra_2": [1,0,1,1682,43433],
"enemy_2009_csaudc": [1,0,1,0,14091] "enemy_2009_csaudc": [1,0,1,0,14091]
}, },
"hooks": [1,120,6900,2592,2592,3942,3943,5375,83,102,372,368,0,35187,5677,97,104,18,1,84,0,0,6], "hooks": [1,120,6900,2592,2592,3942,3943,5155,83,102,372,368,0,35187,5677,97,104,18,1,84,0,0,6],
"events": {"atk":3006,"bounty":3,"deploy":13,"die":84,"dmg":3929,"engage":12,"fx":368,"heal":672,"leak":18,"skill":740,"spawn":119,"status":797}, "events": {"atk":3006,"bounty":3,"deploy":13,"die":84,"dmg":3929,"engage":12,"fx":368,"heal":649,"leak":18,"skill":740,"spawn":119,"status":797},
"fx": {"aoe":16,"crit":21,"dodge":6,"ember":1,"healAoe":31,"hpShare":5,"sp":140,"zone":148}, "fx": {"aoe":16,"crit":21,"dodge":6,"ember":1,"healAoe":31,"hpShare":5,"sp":140,"zone":148},
"snaps": "de3bd2e2 9ce456ee bcde1796 81851dcd 51a35e80 50098249 40a84907 cbda70fd a91a07cd 50f01226 20db1b07 0b0c9a0a cee1a934 dc30669d 6b6d29b1 b0624ef2 f6a4355c 68c2d268 368b7d82 03af8242 2387ed85 0421556c d1e4bd7f" "snaps": "de3bd2e2 be5ffcf3 ba9e1ffc 3ba9de3e 3da96118 ff4a3ebc c5e92a17 85066da3 2751fd4e 8c1f2e7f d432f52b 0e333c14 87acebfb 46b5bd60 bdec67a1 91221e13 889c009d 1a98e02a 9a2fe072 4b712c72 d7f2a6f9 cc12a67e f216a8cb"
}, },
"roster-035": { "roster-035": {
"about": "pass 1 band 6: chess_char_6_03_a chess_char_6_06_a chess_char_6_07_a chess_char_5_22_b chess_char_5_23_b chess_char_6_01_a chess_char_6_02_a chess_char_6_04_a chess_char_6_05_a chess_char_6_08_a chess_char_6_09_a chess_char_6_11_a token_10017_skadi2_dedant token_10030_mlyss_wtrman", "about": "pass 1 band 6: chess_char_6_03_a chess_char_6_06_a chess_char_6_07_a chess_char_5_22_b chess_char_5_23_b chess_char_6_01_a chess_char_6_02_a chess_char_6_04_a chess_char_6_05_a chess_char_6_08_a chess_char_6_09_a chess_char_6_11_a token_10017_skadi2_dedant token_10030_mlyss_wtrman",