2019-01-01 20:06:23 +00:00
|
|
|
MtMoonPokecenter_Script:
|
2015-02-07 10:43:08 +00:00
|
|
|
call Serial_TryEstablishingExternallyClockedConnection
|
2014-05-18 18:19:10 +00:00
|
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
MtMoonPokecenter_TextPointers:
|
2016-04-09 01:04:36 +00:00
|
|
|
dw MtMoonHealNurseText
|
2014-05-18 18:19:10 +00:00
|
|
|
dw MtMoonPokecenterText2
|
|
|
|
dw MtMoonPokecenterText3
|
2016-04-09 01:04:36 +00:00
|
|
|
dw MagikarpSalesmanText
|
2014-05-18 18:19:10 +00:00
|
|
|
dw MtMoonPokecenterText5
|
2016-04-09 01:04:36 +00:00
|
|
|
dw MtMoonTradeNurseText
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MtMoonHealNurseText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db $ff
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MtMoonPokecenterText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _MtMoonPokecenterText1
|
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MtMoonPokecenterText3:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _MtMoonPokecenterText3
|
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MagikarpSalesmanText:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2015-07-21 01:32:02 +00:00
|
|
|
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
|
2015-07-19 03:49:52 +00:00
|
|
|
jp c, .alreadyBoughtMagikarp
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, .Text1
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, MONEY_BOX
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [wTextBoxID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextBoxID
|
|
|
|
call YesNoChoice
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
2015-07-19 03:49:52 +00:00
|
|
|
jp nz, .choseNo
|
2015-07-17 08:21:40 +00:00
|
|
|
ld [hMoney], a
|
|
|
|
ld [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $5
|
2015-07-17 08:21:40 +00:00
|
|
|
ld [hMoney + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call HasEnoughMoney
|
2015-07-19 03:49:52 +00:00
|
|
|
jr nc, .enoughMoney
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, .NoMoneyText
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .printText
|
|
|
|
.enoughMoney
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, MAGIKARP, 5
|
2014-05-18 18:19:10 +00:00
|
|
|
call GivePokemon
|
2015-07-19 03:49:52 +00:00
|
|
|
jr nc, .done
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2015-07-19 03:49:52 +00:00
|
|
|
ld [wPriceTemp], a
|
|
|
|
ld [wPriceTemp + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $5
|
2015-07-19 03:49:52 +00:00
|
|
|
ld [wPriceTemp + 1], a
|
|
|
|
ld hl, wPriceTemp + 2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney + 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $3
|
2014-06-16 20:57:26 +00:00
|
|
|
predef SubBCDPredef
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, MONEY_BOX
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [wTextBoxID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextBoxID
|
2015-07-21 01:32:02 +00:00
|
|
|
SetEvent EVENT_BOUGHT_MAGIKARP
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .done
|
|
|
|
.choseNo
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, .RefuseText
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .printText
|
|
|
|
.alreadyBoughtMagikarp
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, .Text2
|
2015-07-19 03:49:52 +00:00
|
|
|
.printText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-19 03:49:52 +00:00
|
|
|
.done
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
.Text1
|
|
|
|
TX_FAR _MagikarpSalesmanText1
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
.RefuseText
|
|
|
|
TX_FAR _MagikarpSalesmanNoText
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
.NoMoneyText
|
|
|
|
TX_FAR _MagikarpSalesmanNoMoneyText
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
.Text2
|
|
|
|
TX_FAR _MagikarpSalesmanText2
|
2014-05-18 18:19:10 +00:00
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MtMoonPokecenterText5:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _MtMoonPokecenterText5
|
|
|
|
db "@"
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
MtMoonTradeNurseText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db $f6
|