Permalink
Browse files

Add super B button behaviour

  • Loading branch information...
eddmann committed Feb 9, 2019
1 parent e614592 commit e2d6662bc13348234d58a262e9d6faef0a2507de
Showing with 11 additions and 4 deletions.
  1. +1 −4 engine/battle/core.asm
  2. +5 −0 home.asm
  3. +5 −0 home/overworld.asm
@@ -6846,11 +6846,8 @@ InitOpponent:
jr InitBattleCommon

DetermineWildOpponent:
ld a, [wd732]
bit 1, a
jr z, .asm_3ef2f
ld a, [hJoyHeld]
bit 1, a ; B button pressed?
and B_BUTTON
ret nz
.asm_3ef2f
ld a, [wNumberOfNoRandomBattleStepsLeft]
@@ -2324,10 +2324,15 @@ TalkToTrainer::

; checks if any trainers are seeing the player and wanting to fight
CheckFightingMapTrainers::
ld a, [hJoyHeld]
and B_BUTTON
jr nz, .noFight

call CheckForEngagingTrainers
ld a, [wSpriteIndex]
cp $ff
jr nz, .trainerEngaging
.noFight
xor a
ld [wSpriteIndex], a
ld [wTrainerHeaderFlagBit], a
@@ -237,6 +237,11 @@ OverworldLoopLessDelay::
ld a, [wPlayerDirection] ; current direction
ld [wPlayerMovingDirection], a ; save direction
call UpdateSprites

ld a, [hJoyHeld]
and B_BUTTON
jr nz, .noCollision

ld a, [wWalkBikeSurfState]
cp $02 ; surfing
jr z, .surfing

0 comments on commit e2d6662

Please sign in to comment.