diff --git a/services/flysim/crates/flybrain-gb/src/pokemon_red/symbols.rs b/services/flysim/crates/flybrain-gb/src/pokemon_red/symbols.rs index dc8d753..b912a97 100644 --- a/services/flysim/crates/flybrain-gb/src/pokemon_red/symbols.rs +++ b/services/flysim/crates/flybrain-gb/src/pokemon_red/symbols.rs @@ -35,8 +35,10 @@ pub mod ram { pub const wListMenuID: u16 = 0xcf94; // 53140 pub const wFontLoaded: u16 = 0xcfc4; // 53188 pub const wWalkCounter: u16 = 0xcfc5; // 53189 + pub const wPlayerMoveNum: u16 = 0xcfd2; // 53202 pub const wEnemyMonSpecies: u16 = 0xcfe5; // 53221 pub const wEnemyMonHP: u16 = 0xcfe6; // 53222 + pub const wEnemyMonPartyPos: u16 = 0xcfe8; // 53224 pub const wEnemyMonStatus: u16 = 0xcfe9; // 53225 pub const wEnemyMonType1: u16 = 0xcfea; // 53226 pub const wEnemyMonLevel: u16 = 0xcff3; // 53235 diff --git a/services/flysim/tools/gen_symbols.py b/services/flysim/tools/gen_symbols.py index 959ba83..3ec530a 100644 --- a/services/flysim/tools/gen_symbols.py +++ b/services/flysim/tools/gen_symbols.py @@ -225,6 +225,14 @@ EXTRA_RAM = ( 'wToggleableObjectFlags', 'wToggleableObjectList', 'wObtainedHiddenItemsFlags', + # The damage reward (`docs/rewards-learning.md`, the operator 2026-09-29). + # ExecutePlayerMove loads the executing move into wPlayerMoveNum (STRUGGLE, $a5, + # when the cartridge chose it for a Pokemon with no PP), and battle_struct's third + # field, wEnemyMonPartyPos, names which enemy party slot is out -- so two Pokemon of + # one species and level in a trainer's party are two targets, not one. + # services/flysim/tools/resolve_wram.py is the second reading of both. + 'wPlayerMoveNum', + 'wEnemyMonPartyPos', ) diff --git a/services/flysim/tools/resolve_wram.py b/services/flysim/tools/resolve_wram.py index ad0c2ca..1f90498 100644 --- a/services/flysim/tools/resolve_wram.py +++ b/services/flysim/tools/resolve_wram.py @@ -89,6 +89,15 @@ WANTED = { # poisoning one, and a target that must recharge is put to sleep whatever # its status (MoveHitTest, CheckTargetSubstitute, SleepEffect). 'wEnemyBattleStatus2': "the enemy's Mist, substitute and recharge bits", + # The damage reward (`docs/rewards-learning.md`, the operator 2026-09-29). + # ExecutePlayerMove loads the executing move's six bytes here; the move id is + # STRUGGLE ($a5) when the cartridge picked Struggle for a Pokemon with no PP, + # which is the one attack the fly did not choose, and pays nothing. + 'wPlayerMoveNum': 'the move the player is executing this turn', + # battle_struct's third field (macros/ram.asm: Species db, HP dw, PartyPos): + # which enemy party slot is out, $ff until a trainer's first send-out. It is + # what tells a trainer's two Weedles of one level apart. + 'wEnemyMonPartyPos': "the enemy's party slot", }