Altered the test to match correct functionality

This commit is contained in:
EscaShark 2025-01-30 21:51:59 +01:00 committed by Sirz Benjie
parent d36c279166
commit 9848fd6e81
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -46,11 +46,8 @@ describe("Moves - Shed Tail", () => {
expect(feebas).not.toBe(magikarp); expect(feebas).not.toBe(magikarp);
expect(feebas.hp).toBe(feebas.getMaxHp()); expect(feebas.hp).toBe(feebas.getMaxHp());
// Note: Shed Tail's HP cost is currently not accurate to mainline, as it // Note: Altered the test to be consistent with the correct HP cost :yipeevee_static:
// should cost ceil(maxHP / 2) instead of max(floor(maxHp / 2), 1). The current expect(magikarp.hp).toBe(Math.floor(magikarp.getMaxHp() / 2));
// implementation is consistent with Substitute's HP cost logic, but that's not
// the case in mainline for some reason :regiDespair:.
expect(magikarp.hp).toBe(Math.ceil(magikarp.getMaxHp() / 2));
expect(substituteTag).toBeDefined(); expect(substituteTag).toBeDefined();
expect(substituteTag?.hp).toBe(Math.floor(magikarp.getMaxHp() / 4)); expect(substituteTag?.hp).toBe(Math.floor(magikarp.getMaxHp() / 4));
}); });