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

+13 -3
View File
@@ -126,7 +126,13 @@ export type BattleAction =
/** PACK: use the item in this slot of its pocket (only Balls so far). */
| { action: "item"; item: number; slot: number };
export type BattleInput = number | string | BattleAction | undefined;
export type BattleOutcome = { result: number; prizeMoney?: number };
/** wBattleResult, the prize money and wEvolvableFlags (a bit per party
* index that levelled up). */
export type BattleOutcome = {
result: number;
prizeMoney?: number;
evolvable?: number;
};
export interface BattleTrainer {
name: string;
@@ -406,6 +412,9 @@ export class Battle {
numFleeAttempts = 0;
/** wBattleParticipantsNotFainted, which shares the experience. */
participants = 0;
/** wEvolvableFlags: party members that levelled up, which
* EvolveAfterBattle checks after a win. */
private evolvable = 0;
/** wBattleParticipantsIncludingFainted, which revives consult. */
private participantsAll = 0;
/** wEnemyMonBaseStats: five base stats, catch rate and base exp. */
@@ -790,11 +799,11 @@ export class Battle {
const prizeMoney = trainer.reward * (amuletCoin ? 2 : 1);
this.numbers[RAM.battleReward] = prizeMoney;
yield* this.say(BATTLE.GotMoneyForWinningText);
return { result: this.battleResult, prizeMoney };
return { result: this.battleResult, prizeMoney, evolvable: this.evolvable };
}
if (trainer && this.options.canLose && trainer.lossText)
yield* this.say(trainer.lossText);
return { result: this.battleResult };
return { result: this.battleResult, evolvable: this.evolvable };
}
private *battleTurn(): Gen {
@@ -3503,6 +3512,7 @@ export class Battle {
values: [mon.stats[1], mon.stats[2], mon.stats[4], mon.stats[5], mon.stats[3]],
};
for (let level = oldLevel + 1; level <= newLevel; level++) yield* this.learnLevelMoves(mon, index, level);
this.evolvable |= 1 << index;
}
this.resetBattleParticipants();
}