Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This subroutine sets the opponent we just fought to "STAY" in "NONE" direction (which is apparently any direction) #473

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions engine/overworld/auto_movement.asm
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ RLEList_PewterGymGuy:
db NPC_MOVEMENT_RIGHT, 3
db -1 ; end

FreezeEnemyTrainerSprite::
SetEnemyTrainerToStayAndFaceAnyDirection::
ld a, [wCurMap]
cp POKEMON_TOWER_7F
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't set them
ld hl, RivalIDs
ld a, [wEngagedTrainerClass]
ld b, a
Expand All @@ -278,7 +278,7 @@ FreezeEnemyTrainerSprite::
cp -1
jr z, .notRival
cp b
ret z ; the rival leaves after battling, so don't freeze him
ret z ; the rival leaves after battling, so don't set him
jr .loop
.notRival
ld a, [wSpriteIndex]
Expand Down
4 changes: 2 additions & 2 deletions home/map_objects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ SetSpriteMovementBytesToFE::
SetSpriteMovementBytesToFF::
push hl
call GetSpriteMovementByte1Pointer
ld [hl], $FF
ld [hl], STAY
call GetSpriteMovementByte2Pointer
ld [hl], $FF ; prevent person from walking?
ld [hl], NONE
pop hl
ret

Expand Down
2 changes: 1 addition & 1 deletion home/trainers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ PrintEndBattleText::
pop af
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
farcall FreezeEnemyTrainerSprite
farcall SetEnemyTrainerToStayAndFaceAnyDirection
jp WaitForSoundToFinish

GetSavedEndBattleTextPointer::
Expand Down