feedback2 WI: 归溟幽灵鲨's 替身 makes no normal attack and casts no skill, her S2 end switches her to it directly; dollkeepers switch with a 1 s animation, hold 阻回 and keep their own max HP (issue #44)
This commit is contained in:
1 parent
47df17171a
commit
64f715fb20
9 files changed
+311
-49
No files matched your search
@@ -159,21 +159,39 @@ test('geek loses HP over time; merchant drains DP and retreats when broke; charg
|
||||
approx(h3.b.getPlayer('p1').dp, 13);
|
||||
});
|
||||
|
||||
test('dollkeeper swaps to a substitute on fatal damage and swaps back after 20 s', () => {
|
||||
test('dollkeeper: fatal damage ⇒ a 1 s switch, 20 s as the substitute (block 0, 阻回), the switch back; the substitute dies ⇒ the unit dies', () => {
|
||||
const h = makeBattle({ defs: { chess: { t_dollkeeper: mk('dollkeeper', 'SPECIAL', { stats: { maxHp: 2000, blockCnt: 2 } }) } }, units: [{ chessId: 't_dollkeeper', row: 9, col: 5 }], content: 'none' });
|
||||
h.step();
|
||||
const u = h.unit('t_dollkeeper');
|
||||
h.b.dealDamage(null, u, { amount: 1e5, type: 'true' });
|
||||
assert.equal(u.alive, true, 'substitute instead of death');
|
||||
assert.equal(u.s.blockCnt, 0);
|
||||
assert.ok(u.trait.doll);
|
||||
h.run(20.1);
|
||||
assert.equal(u.trait.doll, false);
|
||||
approx(u.hp, 2000);
|
||||
assert.equal(u.s.blockCnt, 2);
|
||||
assert.ok(u.trait.doll && u.trait.dollSwitch, 'the switch animation');
|
||||
assert.equal(u.form, 'doll');
|
||||
approx(u.hp, 2000); // no 替身 token: its own max HP
|
||||
// the switch animation (PRTS 分支特性信息 傀儡师): 无敌, 不死 (a 流失 stops at 1 HP), 阻回, 眩晕 immunity
|
||||
h.b.dealDamage(null, u, { amount: 1e5, type: 'true' });
|
||||
approx(u.hp, 2000); // 无敌
|
||||
assert.equal(h.b.applyStatus(u, 'stun', { duration: 5 }), false, '眩晕 immune');
|
||||
h.b.loseHp(u, 1e5);
|
||||
assert.ok(u.alive && u.trait.doll && u.hp >= 1, '不死');
|
||||
u.hp = 2000;
|
||||
h.run(1.05);
|
||||
assert.ok(u.trait.doll && !u.trait.dollSwitch, 'fighting as the substitute');
|
||||
h.run(19.9);
|
||||
assert.ok(u.trait.doll && u.s.flags.noSp, 'the 20 s form, 阻回');
|
||||
h.run(0.1);
|
||||
assert.ok(!u.trait.doll && u.trait.dollSwitch && u.form === null, 'switching back');
|
||||
assert.equal(u.s.blockCnt, 2, 'blocks again from the start of the switch back');
|
||||
approx(u.hp, 2000);
|
||||
h.run(1.05);
|
||||
assert.ok(!u.trait.dollSwitch && !u.s.flags.noSp, 'the body again, no 阻回');
|
||||
h.b.dealDamage(null, u, { amount: 1e5, type: 'true' });
|
||||
h.run(1.05);
|
||||
h.b.dealDamage(null, u, { amount: 1e5, type: 'true' });
|
||||
assert.equal(u.alive, false, 'substitute dies ⇒ unit dies');
|
||||
assert.ok(!u.trait.doll && u.form === null, 'the redeploy is the body again');
|
||||
checkInvariants(h.b);
|
||||
});
|
||||
|
||||
test('phalanx never attacks until its skill; librator ramps ATK while idle and resets on skill end', () => {
|
||||
|
||||
Reference in new issue
Block a user