summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-05-30 11:38:46 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-05-30 11:38:46 -0400
commit6e3581df4b9cbc8cf14fc7948df5df70002cc062 (patch)
tree8304b3a8a196cbc4ed999e0bca065162f09d65ff /scripts
parentb9df6fe86f1afa711727badee61a5bfa71030c35 (diff)
Mt Moon Pokemon Center
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mtmoonpokecenter.asm72
-rwxr-xr-xscripts/mtmoonpokecenter2.asm66
2 files changed, 75 insertions, 63 deletions
diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm
index fd3e4e53..888cab4c 100755
--- a/scripts/mtmoonpokecenter.asm
+++ b/scripts/mtmoonpokecenter.asm
@@ -9,9 +9,10 @@ MtMoonPokecenterTextPointers: ; 492d5 (12:52d5)
dw MtMoonPokecenterText4
dw MtMoonPokecenterText5
dw MtMoonPokecenterText6
+ dw MtMoonPokecenterText7
MtMoonPokecenterText1: ; 492e1 (12:52e1)
- db $ff
+ TX_POKECENTER_NURSE
MtMoonPokecenterText2: ; 492e2 (12:52e2)
TX_FAR _MtMoonPokecenterText1
@@ -23,72 +24,17 @@ MtMoonPokecenterText3: ; 492e7 (12:52e7)
MtMoonPokecenterText4: ; 492ec (12:52ec)
TX_ASM
- CheckEvent EVENT_BOUGHT_MAGIKARP, 1
- jp c, .alreadyBoughtMagikarp
- ld hl, MtMoonPokecenterText_4935c
- call PrintText
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jp nz, .choseNo
- ld [hMoney], a
- ld [hMoney + 2], a
- ld a, $5
- ld [hMoney + 1], a
- call HasEnoughMoney
- jr nc, .enoughMoney
- ld hl, MtMoonPokecenterText_49366
- jr .printText
-.enoughMoney
- lb bc, MAGIKARP, 5
- call GivePokemon
- jr nc, .done
- xor a
- ld [wPriceTemp], a
- ld [wPriceTemp + 2], a
- ld a, $5
- ld [wPriceTemp + 1], a
- ld hl, wPriceTemp + 2
- ld de, wPlayerMoney + 2
- ld c, $3
- predef SubBCDPredef
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- SetEvent EVENT_BOUGHT_MAGIKARP
- jr .done
-.choseNo
- ld hl, MtMoonPokecenterText_49361
- jr .printText
-.alreadyBoughtMagikarp
- ld hl, MtMoonPokecenterText_4936b
-.printText
- call PrintText
-.done
+ callab Func_f218c
jp TextScriptEnd
-MtMoonPokecenterText_4935c: ; 4935c (12:535c)
- TX_FAR _MtMoonPokecenterText_4935c
- db "@"
-
-MtMoonPokecenterText_49361: ; 49361 (12:5361)
- TX_FAR _MtMoonPokecenterText_49361
- db "@"
-
-MtMoonPokecenterText_49366: ; 49366 (12:5366)
- TX_FAR _MtMoonPokecenterText_49366
- db "@"
-
-MtMoonPokecenterText_4936b: ; 4936b (12:536b)
- TX_FAR _MtMoonPokecenterText_4936b
- db "@"
-
MtMoonPokecenterText5: ; 49370 (12:5370)
TX_FAR _MtMoonPokecenterText5
db "@"
MtMoonPokecenterText6: ; 49375 (12:5375)
- db $f6
+ TX_POKECENTER_PC
+
+MtMoonPokecenterText7:
+ TX_ASM
+ callab Func_f0f12
+ jp TextScriptEnd
diff --git a/scripts/mtmoonpokecenter2.asm b/scripts/mtmoonpokecenter2.asm
new file mode 100755
index 00000000..fa42f440
--- /dev/null
+++ b/scripts/mtmoonpokecenter2.asm
@@ -0,0 +1,66 @@
+Func_f218c:
+ CheckEvent EVENT_BOUGHT_MAGIKARP, 1
+ jp c, .alreadyBoughtMagikarp
+ ld hl, MtMoonPokecenterText_4935c
+ call PrintText
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jp nz, .choseNo
+ ; $000500
+ xor a
+ ld [hMoney], a
+ ld [hMoney + 2], a
+ ld a, $5
+ ld [hMoney + 1], a
+ call HasEnoughMoney
+ jr nc, .enoughMoney
+ ld hl, MtMoonPokecenterText_49366
+ jr .printText
+.enoughMoney
+ lb bc, MAGIKARP, 5
+ call GivePokemon
+ jr nc, .done
+ ; $000500
+ xor a
+ ld [wPriceTemp], a
+ ld [wPriceTemp + 2], a
+ ld a, $5
+ ld [wPriceTemp + 1], a
+ ld hl, wPriceTemp + 2
+ ld de, wPlayerMoney + 2
+ ld c, $3
+ predef SubBCDPredef
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ SetEvent EVENT_BOUGHT_MAGIKARP
+ jr .done
+.choseNo
+ ld hl, MtMoonPokecenterText_49361
+ jr .printText
+.alreadyBoughtMagikarp
+ ld hl, MtMoonPokecenterText_4936b
+.printText
+ call PrintText
+.done
+ ret
+
+MtMoonPokecenterText_4935c: ; 4935c (12:535c)
+ TX_FAR _MtMoonPokecenterText_4935c
+ db "@"
+
+MtMoonPokecenterText_49361: ; 49361 (12:5361)
+ TX_FAR _MtMoonPokecenterText_49361
+ db "@"
+
+MtMoonPokecenterText_49366: ; 49366 (12:5366)
+ TX_FAR _MtMoonPokecenterText_49366
+ db "@"
+
+MtMoonPokecenterText_4936b: ; 4936b (12:536b)
+ TX_FAR _MtMoonPokecenterText_4936b
+ db "@"