Port the status and field move effects
Toxic, Leech Seed, Nightmare and Curse hurt in ResidualDamage's order. Protect, Detect, Endure, Destiny Bond, Spite, Heal Bell, Disable, Encore, Attract, Mist, Focus Energy, Haze, the healing moves and Rest, Mean Look, Pain Split, Belly Drum, Psych Up, Safeguard, Perish Song, Spikes, Rapid Spin, AncientPower and Future Sight now run, with Future Sight, Perish Song, Safeguard and Encore handled between turns and Spikes on entry. A trainer's party struct now follows its Pokémon where the original updates it, and the enemy's moves spend PP there or in the wild Pokémon's kept PP, so a caught Pokémon keeps the PP it used. Part of #28 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c53edb77e5
commit
8f5b464efc
6 files changed
+1036
-52
No files matched your search
@@ -148,8 +148,11 @@ describe.skipIf(!existsSync(romPath))("capture with the local ROM", () => {
|
||||
statExp: [0, 0, 0, 0, 0],
|
||||
});
|
||||
expect(caught.hp).toBeLessThan(caught.stats[0]);
|
||||
// wWildMonMoves and wWildMonPP: full PP of the moves it appeared with.
|
||||
expect(caught.pp).toEqual(caught.moves.map((move) => (move ? data.move(move).pp : 0)));
|
||||
// wWildMonMoves and wWildMonPP: the moves it appeared with, less the
|
||||
// PP it spent in the battle (DoTurn consumes wWildMonPP too).
|
||||
const full = caught.moves.map((move) => (move ? data.move(move).pp : 0));
|
||||
expect(caught.pp).toEqual(enemy.pp);
|
||||
expect(caught.pp.reduce((a, b) => a + b, 0)).toBeLessThan(full.reduce((a, b) => a + b, 0));
|
||||
expect(validPartyMon(data, caught)).toBe(true);
|
||||
expect(pokedex.caught.has(RATTATA)).toBe(true);
|
||||
const thrown = texts.filter((text) => text === "CHRIS used the POKé BALL.").length;
|
||||
|
||||
Reference in new issue
Block a user