summaryrefslogtreecommitdiff
path: root/scripts/LancesRoom.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /scripts/LancesRoom.asm
parent53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff)
Sync with pokered
Diffstat (limited to 'scripts/LancesRoom.asm')
-rwxr-xr-xscripts/LancesRoom.asm53
1 files changed, 23 insertions, 30 deletions
diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm
index aec555a3..68d2020e 100755
--- a/scripts/LancesRoom.asm
+++ b/scripts/LancesRoom.asm
@@ -58,12 +58,12 @@ LanceScript0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $3 ; Is player standing next to Lance's sprite?
jr nc, .notStandingNextToLance
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
.notStandingNextToLance
cp $5 ; Is player standing on the entrance staircase?
@@ -77,12 +77,12 @@ LanceScript0:
jp LanceShowOrHideEntranceBlocks
LanceTriggerMovementCoords:
- db $01,$05
- db $02,$06
- db $0B,$05
- db $0B,$06
- db $10,$18
- db $FF
+ dbmapcoord 5, 1
+ dbmapcoord 6, 2
+ dbmapcoord 5, 11
+ dbmapcoord 6, 11
+ dbmapcoord 24, 16
+ db -1 ; end
LanceScript2:
call EndTrainerBattle
@@ -90,7 +90,7 @@ LanceScript2:
cp $ff
jp z, ResetLanceScript
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
WalkToLance:
@@ -109,11 +109,11 @@ WalkToLance:
ret
WalkToLance_RLEList:
- db D_UP, $0D
- db D_LEFT, $0C
- db D_DOWN, $07
- db D_LEFT, $06
- db $FF
+ db D_UP, 13
+ db D_LEFT, 12
+ db D_DOWN, 7
+ db D_LEFT, 6
+ db -1 ; end
LanceScript3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -130,32 +130,25 @@ LancesRoom_TextPointers:
dw LanceText1
LanceTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0
- dw LanceBeforeBattleText ; TextBeforeBattle
- dw LanceAfterBattleText ; TextAfterBattle
- dw LanceEndBattleText ; TextEndBattle
- dw LanceEndBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_LANCES_ROOM_TRAINER_0, 0, LanceBeforeBattleText, LanceEndBattleText, LanceAfterBattleText
+ db -1 ; end
LanceText1:
- TX_ASM
+ text_asm
ld hl, LanceTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
LanceBeforeBattleText:
- TX_FAR _LanceBeforeBattleText
- db "@"
+ text_far _LanceBeforeBattleText
+ text_end
LanceEndBattleText:
- TX_FAR _LanceEndBattleText
- db "@"
+ text_far _LanceEndBattleText
+ text_end
LanceAfterBattleText:
- TX_FAR _LanceAfterBattleText
- TX_ASM
+ text_far _LanceAfterBattleText
+ text_asm
SetEvent EVENT_BEAT_LANCE
jp TextScriptEnd