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

+36
View File
@@ -584,6 +584,33 @@ export const MENU = {
/** Battle engine tables and texts, keyed by their PRET labels so that
* \`npm run check:reference\` can verify each address by name. */
export const BATTLE = {
DownpourText: 0x817a3,
SunGotBrightText: 0x817b8,
SandstormBrewedText: 0x816e4,
BattleText_RainContinuesToFall: 0x8091f,
BattleText_TheSunlightIsStrong: 0x80938,
BattleText_TheSandstormRages: 0x80951,
BattleText_TheRainStopped: 0x80967,
BattleText_TheSunlightFaded: 0x8097a,
BattleText_TheSandstormSubsided: 0x8098f,
SandstormHitsText: 0x8084d,
MadeSubstituteText: 0x81362,
HasSubstituteText: 0x81378,
TooWeakSubText: 0x8138d,
SubTookDamageText: 0x813ad,
SubFadedText: 0x813d0,
TransformedText: 0x81499,
MimicLearnedMoveText: 0x813e6,
MirrorMoveFailedText: 0x815c1,
TransformedTypeText: 0x81452,
SketchedText: 0x81143,
FledFromBattleText: 0x812ac,
FledInFearText: 0x812c1,
BlownAwayText: 0x812d2,
DraggedOutText: 0x81544,
MetronomeExcepts: 0x37454,
WeatherTypeModifiers: 0xfbe13,
WeatherMoveModifiers: 0xfbe20,
WasSeededText: 0x813f8,
EvadedText: 0x81407,
LeechSeedSapsText: 0x8080e,
@@ -711,6 +738,15 @@ export const BATTLE = {
BattleText_MonFainted: 0x80a75,
BattleText_MonHasNoMovesLeft: 0x80c72,
BattleText_StringBuffer1GrewToLevel: 0x80c9c,
BattleText_UserRecoveredPPUsing: 0x80899,
BattleText_UserFledUsingAStringBuffer1: 0x80b89,
BattleText_UsersStringBuffer1Activated: 0x80bde,
LoafingAroundText: 0x80f19,
BeganToNapText: 0x80f31,
WontObeyText: 0x80f44,
TurnedAwayText: 0x80f54,
IgnoredOrdersText: 0x80f66,
IgnoredSleepingText: 0x80f7b,
BattleText_TargetRecoveredWithItem: 0x80880,
BattleText_TheMoveIsDisabled: 0x80c5b,
BattleText_TheresNoPPLeftForThisMove: 0x80c39,