Gen 5 Repel system

Also used in PureRGB. Gives the player the option to use another Repel after the last one runs out.

I had to remove some debug features in order to fit it in, but it won't have an effect on the regular game. Hopefully.
This commit is contained in:
Martha Schilling 2024-04-15 13:01:52 +01:00
parent 2d24f19ba6
commit f675c1ad9b
8 changed files with 68 additions and 14 deletions

View file

@ -51,14 +51,4 @@ EndNPCMovementScript::
farjp _EndNPCMovementScript
DebugPressedOrHeldB::
IF DEF(_DEBUG)
ld a, [wd732]
bit 1, a
ret z
ldh a, [hJoyHeld]
bit BIT_B_BUTTON, a
ret nz
ldh a, [hJoyPressed]
bit BIT_B_BUTTON, a
ENDC
ret

View file

@ -200,6 +200,7 @@ DisplayPlayerBlackedOutText::
DisplayRepelWoreOffText::
ld hl, RepelWoreOffText
call PrintText
callfar UseAnotherRepel
jp AfterDisplayingTextID
RepelWoreOffText::

View file

@ -127,10 +127,6 @@ TalkToTrainer::
; checks if any trainers are seeing the player and wanting to fight
CheckFightingMapTrainers::
IF DEF(_DEBUG)
call DebugPressedOrHeldB
jr nz, .trainerNotEngaging
ENDC
call CheckForEngagingTrainers
ld a, [wSpriteIndex]
cp $ff