summaryrefslogtreecommitdiff
path: root/scripts/lance.asm
diff options
context:
space:
mode:
authorDaniel Harding <corrnondacqb@yahoo.com>2015-07-22 10:24:00 -0500
committerDaniel Harding <corrnondacqb@yahoo.com>2015-07-22 10:24:00 -0500
commitc34156c5fb333864c1ae85036ea587c9f615a65a (patch)
tree70a98bceda2ec783da896bf3eb4efd1b0861c2a3 /scripts/lance.asm
parenta6f04b434980f2176cb275a7c3ba50d5cbcd6ace (diff)
parentdcc7f3bc9f41f2d5e0f7448b4688c1058da0040b (diff)
Merge pull request #107 from YamaArashi/master
enumerate events
Diffstat (limited to 'scripts/lance.asm')
-rwxr-xr-xscripts/lance.asm17
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/lance.asm b/scripts/lance.asm
index 80780cd1..4d0072be 100755
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -13,8 +13,7 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4)
bit 5, [hl]
res 5, [hl]
ret z
- ld a, [wd866]
- bit 7, a
+ CheckEvent EVENT_LANCES_ROOM_LOCK_DOOR
jr nz, .asm_5a2da
ld a, $31
ld b, $32
@@ -52,8 +51,7 @@ LanceScript4: ; 5a304 (16:6304)
ret
LanceScript0: ; 5a305 (16:6305)
- ld a, [wd866]
- bit 6, a
+ CheckEvent EVENT_BEAT_LANCE
ret nz
ld hl, CoordsData_5a33e
call ArePlayerCoordsInArray
@@ -69,9 +67,7 @@ LanceScript0: ; 5a305 (16:6305)
.asm_5a325
cp $5
jr z, LanceScript_5a35b
- ld hl, wd866
- bit 7, [hl]
- set 7, [hl]
+ CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR
ret nz
ld hl, wd126
set 5, [hl]
@@ -133,9 +129,9 @@ LanceTextPointers: ; 5a395 (16:6395)
LanceTrainerHeaders: ; 5a397 (16:6397)
LanceTrainerHeader0: ; 5a397 (16:6397)
- db $1 ; flag's bit
+ dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0
db ($0 << 4) ; trainer's view range
- dw wd866 ; flag's byte
+ dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0
dw LanceBeforeBattleText ; TextBeforeBattle
dw LanceAfterBattleText ; TextAfterBattle
dw LanceEndBattleText ; TextEndBattle
@@ -160,6 +156,5 @@ LanceEndBattleText: ; 5a3b3 (16:63b3)
LanceAfterBattleText: ; 5a3b8 (16:63b8)
TX_FAR _LanceAfterBattleText
TX_ASM
- ld hl, wd866
- set 6, [hl]
+ SetEvent EVENT_BEAT_LANCE
jp TextScriptEnd