summaryrefslogtreecommitdiff
path: root/event
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-11 13:47:58 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-11 14:23:18 -0500
commit31cce83e9b3bab01d8a605b170549fbd25ca5fee (patch)
treea9fdeec61aea1be07a7bc71b65b9d71adc2b1eef /event
parentc2ad79c4f21b5f4dd661d69a7a81b69506be8821 (diff)
Move lots of data tables into individual data/ files
(This is not expected to be their final location, but it makes them easier to relocate when necessary, and easier for users to edit until the whole project's file structure is finalized.)
Diffstat (limited to 'event')
-rwxr-xr-xevent/happiness_egg.asm30
-rwxr-xr-xevent/mom_phone.asm32
-rwxr-xr-xevent/overworld.asm50
3 files changed, 13 insertions, 99 deletions
diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm
index 7588108bf..7c6d6f46b 100755
--- a/event/happiness_egg.asm
+++ b/event/happiness_egg.asm
@@ -55,11 +55,11 @@ ChangeHappiness: ; 71c2
push de
ld a, [de]
- cp 100
+ cp HAPPINESS_THRESHOLD_1
ld e, 0
jr c, .ok
inc e
- cp 200
+ cp HAPPINESS_THRESHOLD_2
jr c, .ok
inc e
@@ -73,7 +73,7 @@ ChangeHappiness: ; 71c2
ld d, 0
add hl, de
ld a, [hl]
- cp 100
+ cp $64 ; $80?
pop de
ld a, [de]
@@ -103,25 +103,7 @@ ChangeHappiness: ; 71c2
ret
.Actions:
- db +5, +3, +2 ; Gained a level
- db +5, +3, +2 ; Vitamin
- db +1, +1, +0 ; X Item
- db +3, +2, +1 ; Battled a Gym Leader
- db +1, +1, +0 ; Learned a move
- db -1, -1, -1 ; Lost to an enemy
- db -5, -5, -10 ; Fainted due to poison
- db -5, -5, -10 ; Lost to a much stronger enemy
- db +1, +1, +1 ; Haircut (Y1)
- db +3, +3, +1 ; Haircut (Y2)
- db +5, +5, +2 ; Haircut (Y3)
- db +1, +1, +1 ; Haircut (O1)
- db +3, +3, +1 ; Haircut (O2)
- db +10, +10, +4 ; Haircut (O3)
- db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
- db -10, -10, -15 ; Used Energy Root (bitter)
- db -15, -15, -20 ; Used Revival Herb (bitter)
- db +3, +3, +1 ; Grooming
- db +10, +6, +4 ; Gained a level in the place where it was caught
+INCLUDE "data/happiness_changes.asm"
StepHappiness:: ; 725a
; Raise the party's happiness by 1 point every other step cycle.
@@ -165,7 +147,7 @@ DayCareStep:: ; 7282
jr z, .day_care_lady
ld a, [wBreedMon1Level] ; level
- cp 100
+ cp MAX_LEVEL
jr nc, .day_care_lady
ld hl, wBreedMon1Exp + 2 ; exp
inc [hl]
@@ -187,7 +169,7 @@ DayCareStep:: ; 7282
jr z, .check_egg
ld a, [wBreedMon2Level] ; level
- cp 100
+ cp MAX_LEVEL
jr nc, .check_egg
ld hl, wBreedMon2Exp + 2 ; exp
inc [hl]
diff --git a/event/mom_phone.asm b/event/mom_phone.asm
index 818010091..0d7a2366f 100755
--- a/event/mom_phone.asm
+++ b/event/mom_phone.asm
@@ -80,11 +80,11 @@ CheckBalance_MomItem2: ; fd044
.check_have_2300
ld hl, hMoneyTemp
- ld [hl], (2300 / $10000) ; $00
+ ld [hl], MOM_MONEY / $10000
inc hl
- ld [hl], ((2300 % $10000) / $100) ; $08
+ ld [hl], MOM_MONEY / $100 % $100
inc hl
- ld [hl], (2300 % $100) ; $fc
+ ld [hl], MOM_MONEY % $100
.loop
ld de, MomItemTriggerBalance
ld bc, wMomsMoney
@@ -212,31 +212,7 @@ endr
ret
; fd136
-momitem: macro
-; money to trigger, cost, kind, item
- dt \1
- dt \2
- db \3, \4
-ENDM
-
-MomItems_1: ; fd136
- momitem 0, 600, MOM_ITEM, SUPER_POTION
- momitem 0, 90, MOM_ITEM, ANTIDOTE
- momitem 0, 180, MOM_ITEM, POKE_BALL
- momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
- momitem 0, 500, MOM_ITEM, GREAT_BALL
-MomItems_2: ; fd15e
- momitem 900, 600, MOM_ITEM, SUPER_POTION
- momitem 4000, 270, MOM_ITEM, REPEL
- momitem 7000, 600, MOM_ITEM, SUPER_POTION
- momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL
- momitem 15000, 3000, MOM_ITEM, MOON_STONE
- momitem 19000, 600, MOM_ITEM, SUPER_POTION
- momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
- momitem 40000, 900, MOM_ITEM, HYPER_POTION
- momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
- momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
-; fd1ae
+INCLUDE "data/mom_phone_items.asm"
db 0, 0, 0 ; XXX
diff --git a/event/overworld.asm b/event/overworld.asm
index 4d67bf61e..221f02a4f 100755
--- a/event/overworld.asm
+++ b/event/overworld.asm
@@ -277,53 +277,9 @@ CheckOverworldTileArrays: ; c840
xor a
ret
-CutTreeBlockPointers: ; c862
-; Which tileset are we in?
- dbw TILESET_JOHTO_1, .johto1
- dbw TILESET_JOHTO_2, .johto2
- dbw TILESET_KANTO, .kanto
- dbw TILESET_PARK, .park
- dbw TILESET_ILEX_FOREST, .ilex
- db -1
-
-.johto1 ; Johto OW
-; Which meta tile are we facing, which should we replace it with, and which animation?
- db $03, $02, $01 ; grass
- db $5b, $3c, $00 ; tree
- db $5f, $3d, $00 ; tree
- db $63, $3f, $00 ; tree
- db $67, $3e, $00 ; tree
- db -1
-
-.johto2 ; Goldenrod area
- db $03, $02, $01 ; grass
- db -1
-
-.kanto ; Kanto OW
- db $0b, $0a, $01 ; grass
- db $32, $6d, $00 ; tree
- db $33, $6c, $00 ; tree
- db $34, $6f, $00 ; tree
- db $35, $4c, $00 ; tree
- db $60, $6e, $00 ; tree
- db -1
-
-.park ; National Park
- db $13, $03, $01 ; grass
- db $03, $04, $01 ; grass
- db -1
-
-.ilex ; Ilex Forest
- db $0f, $17, $00
- db -1
-
-WhirlpoolBlockPointers: ; c8a4
- dbw TILESET_JOHTO_1, .johto
- db -1
-
-.johto ; c8a8
- db $07, $36, $00
- db -1
+
+INCLUDE "data/hm_blocks.asm"
+
OWFlash: ; c8ac
call .CheckUseFlash