Open Route 30 with map trainers and multi-Pokémon trainer battles
Map trainers run the ROM's TalkToTrainerScript and SeenByTrainerScript. _CheckTrainerBattle runs before tile events at the end of each step and on idle ticks; TrainerWalkToPlayer builds wMovementBuffer natively, and writeobjectxy keeps the trainer where it stopped. The interpreter gains the trainer header commands, wRunningTrainerBattleScript and hidden items (HiddenItemScript). Trainers with several Pokémon send out the next one through EnemyPartyMonEntrance and FindMonInOTPartyToSwitchIntoBattle, including its BattleRandom fallback. AI_SwitchOrTryItem, CheckAbleToSwitch and AI_Switch are translated with their original bugs, and wPlayerUsedMoves is recorded. The Shift-mode switch offer, trainer items, Pursuit on a switch, Perish Song and Spikes remain refused. Route 30 and its Berry house are enabled; Mr. Pokémon's house and Route 31 stay closed. A refused trainer sighting does not restart until the player moves, so a rollback cannot trap the player in view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d1bedb3b1
commit
e00dfab42e
18 files changed
+1156
-62
No files matched your search
@@ -52,6 +52,9 @@ export const SYMBOLS = {
|
||||
findItemInBallScript: 0x122ce,
|
||||
caughtAskNicknameText: 0x4db44,
|
||||
nicknameStrings: 0x11780,
|
||||
hiddenItemScript: 0x13625,
|
||||
talkToTrainerScript: 0xbe66a,
|
||||
seenByTrainerScript: 0xbe675,
|
||||
wildBattleScript: 0x97cf9,
|
||||
battleWhiteoutScript: 0x124c1,
|
||||
spawnPoints: 0x152ab,
|
||||
@@ -92,6 +95,8 @@ export const NATIVE_ROUTINES = {
|
||||
tryResetFruitTrees: 0x4404c,
|
||||
checkFruitTree: 0x44055,
|
||||
pickedFruitTree: 0x4405f,
|
||||
trainerWalkToPlayer: 0x831e,
|
||||
setMemEvent: 0x1364f,
|
||||
} as const;
|
||||
|
||||
/** Native handlers are selected by the routine a special index points to,
|
||||
@@ -130,6 +135,9 @@ export const RAM = {
|
||||
dailyFlags1: 0xdc1e,
|
||||
unusedDailyFlag: 0xdc21,
|
||||
itemQuantityChange: 0xd10c,
|
||||
movementBuffer: 0xd007,
|
||||
hiddenItemID: 0xd040,
|
||||
runningTrainerBattleScript: 0xd04d,
|
||||
/** hMoneyTemp: HRAM, not WRAM like the other entries above. */
|
||||
moneyTemp: 0xffc3,
|
||||
} as const;
|
||||
@@ -200,6 +208,7 @@ export const BATTLE = {
|
||||
DisabledNoMoreText: 0x80d39,
|
||||
DoesntAffectText: 0x81071,
|
||||
EnemyText: 0x1295,
|
||||
EnemyWithdrewText: 0x384d0,
|
||||
ExpPointsText: 0x3f131,
|
||||
FastAsleepText: 0x80ce7,
|
||||
FellAsleepText: 0x811b1,
|
||||
@@ -289,11 +298,13 @@ export const NATIVE_MAPS: Record<string, string> = {
|
||||
"24:7": "Your room",
|
||||
"24:8": "Neighbor’s house",
|
||||
"24:9": "Elm’s house",
|
||||
"26:1": "Route 30",
|
||||
"26:3": "Cherrygrove City",
|
||||
"26:4": "Poké Mart",
|
||||
"26:5": "Pokémon Center",
|
||||
"26:6": "Gym speech house",
|
||||
"26:7": "Guide Gent’s house",
|
||||
"26:8": "Evolution speech house",
|
||||
"26:9": "Berry house",
|
||||
};
|
||||
export const INITIAL_POSITION = { map: "24:7", x: 3, y: 3 } as const;
|
||||
Reference in new issue
Block a user