ref: 3110fd28e290fa40570a871da567c89f0ff87190
parent: 2b1cc7f2708955d2f19141e7c2519d59b4fa0fe1
author: yenatch <[email protected]>
date: Fri Jul 18 06:29:17 EDT 2014
Badge and move constants in Strength and Surf field effects.
--- a/main.asm
+++ b/main.asm
@@ -9339,16 +9339,16 @@
; no known jump sources
Functionc922: ; c922 (3:4922)
- ld de, $1e
+ ld de, ENGINE_FOGBADGE
call CheckBadge
jr c, .asm_c956
- ld hl, BikeFlags ; $dbf5
- bit 1, [hl]
+ ld hl, BikeFlags
+ bit 1, [hl] ; always on bike
jr nz, .asm_c95c
- ld a, [PlayerState] ; $d95d
- cp $4
+ ld a, [PlayerState]
+ cp PLAYER_SURF
jr z, .asm_c959
- cp $8
+ cp PLAYER_SURF_PIKA
jr z, .asm_c959
call GetFacingTileCoord
call GetTileCollision
@@ -9422,18 +9422,18 @@
; c9a9
UsedSurfText: ; c9a9
- TX_FAR _UsedSurfText ; [MONSTER] used
- db "@" ; SURF!
+ TX_FAR _UsedSurfText
+ db "@"
; c9ae
CantSurfText: ; c9ae
- TX_FAR _CantSurfText ; You can't SURF
- db "@" ; here.
+ TX_FAR _CantSurfText
+ db "@"
; c9b3
AlreadySurfingText: ; c9b3
- TX_FAR _AlreadySurfingText ; You're already
- db "@" ; SURFING.
+ TX_FAR _AlreadySurfingText
+ db "@"
; c9b8
@@ -10143,25 +10143,31 @@
; 0xcd78
Functioncd78: ; cd78
- ld d, $46
+ ld d, STRENGTH
call CheckPartyMove
jr c, .asm_cd92
- ld de, $1d
+
+ ld de, ENGINE_PLAINBADGE
call CheckEngineFlag
jr c, .asm_cd92
+
ld hl, BikeFlags ; $dbf5
bit 0, [hl]
jr z, .asm_cd96
- ld a, $2
+
+ ld a, 2
jr .asm_cd99
+
.asm_cd92
- ld a, $1
+ ld a, 1
jr .asm_cd99
+
.asm_cd96
xor a
jr .asm_cd99
+
.asm_cd99
- ld [ScriptVar], a ; $c2dd
+ ld [ScriptVar], a
ret
; cd9d
@@ -10521,7 +10527,7 @@
; 0xcf7c
Functioncf7c: ; cf7c
- ld d, $f9
+ ld d, ROCK_SMASH
call CheckPartyMove
jr nc, .asm_cf87
ld a, $1