Port evolution, Rare Candy, evolution stones and vitamins
Checks / web (push) Canceled after 0s

Pokémon that levelled up evolve after a won battle, following
EvolveAfterBattle's checks over the ROM's evolution bytes, with the
evolution screen that B can stop and move learning outside battle. The pack
uses Rare Candy, stones (with ABLE/NOT ABLE labels) and vitamins, and its
pocket tabs now sit in their own row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-30 16:21:59 +02:00
1 parent 1af2beacdc
commit 45275ba83b
19 files changed
+1032 -39

No files matched your search

+40
View File
@@ -54,6 +54,46 @@ describe.skipIf(!existsSync(romPath))("world battle integration with the local R
expect(world.save()).toEqual(saved);
});
it("evolves a Pokémon that levelled up once the battle is won", () => {
const world = fixture();
const data = world.assets.pokemon;
const mon = generatePartyMon(data, {
species: 155, level: 13, item: 0, otId: world.playerId,
ot: "CHRIS", dvs: 0x823b, caughtData: 0,
});
mon.exp = data.expAtLevel(data.baseData(155).growthRate, 14) - 1;
world.state.party[0] = mon;
encounter(world);
const messages = finish(world);
expect(world.notice, world.diagnostic).toBe("");
expect(messages).toContain("What? CYNDAQUIL\nis evolving!");
expect(messages).toContain("evolved into\nQUILAVA!");
const evolved = world.state.party[0];
expect([evolved.species, evolved.nickname, evolved.level]).toEqual([156, "QUILAVA", 14]);
expect(evolved.stats).toEqual(calcStats(data, 156, evolved.dvs, 14, evolved.statExp));
expect(world.state.pokedex.caught.has(156)).toBe(true);
const saved = world.save();
world.restore(saved);
expect(world.save()).toEqual(saved);
});
it("considers only the Pokémon that levelled up (wEvolvableFlags)", () => {
const world = fixture();
const data = world.assets.pokemon;
// A level-14 Cyndaquil that does not take part could evolve, but
// EvolveAfterBattle only checks the one that grew to level 6.
world.state.party.push(generatePartyMon(data, {
species: 155, level: 14, item: 0, otId: world.playerId,
ot: "CHRIS", dvs: 0x823b, caughtData: 0,
}));
encounter(world);
const messages = finish(world);
expect(world.notice, world.diagnostic).toBe("");
expect(world.state.party[0].level).toBe(6);
expect(messages).not.toContain("evolving");
expect(world.state.party.map((mon) => mon.species)).toEqual([155, 155]);
});
it("struggles with recoil once every move is out of PP", () => {
const world = fixture();
world.state.party[0].pp = [0, 0, 0, 0];