Port weather, copying moves, held items and obedience (#28)
Checks / web (push) Canceled after 0s

Complete the weather, Substitute, Transform, called-move and forced-switch effects. Add held-item behavior, Exp. Share awards and badge-based traded Pokemon obedience, and persist trainer berry consumption.

Validated with 576 passing unit tests and 149 browser tests, native/reference builds, reference/vendor/release checks and 320 Metal Powder emulator comparisons per browser. Smart AI and special balls/battle types remain on #28.
This commit is contained in:
Sébastien QUEROL committed 2026-10-03 15:03:19 +02:00
1 parent 8f5b464efc
commit 32d736ecae
13 files changed
+1509 -75

No files matched your search

+3
View File
@@ -2446,6 +2446,9 @@ export class GameWorld {
pokedex: draft.pokedex,
playerId: this.playerId,
playerName: this.name,
johtoBadges: Array.from({ length: 8 }, (_, bit) =>
draft.flags.has(OW.ENGINE_ZEPHYRBADGE + bit) ? 1 << bit : 0,
).reduce((bits, badge) => bits | badge, 0),
timeOfDay: this.clockTimeOfDay,
random: () => this.random() & 0xff,
wild: effect.wild,