Add trainers to Celadon University, add two new salesmen, etc

Overall completes Celadon University sans a problem with sprites being a bit corrupted until you leave. New Magikarp Salesman-esque events in other pokecenters which is kinda neat
This commit is contained in:
May Evans 2022-09-27 16:06:13 +01:00
parent 89bb05b2dc
commit 19d5f2293c
27 changed files with 478 additions and 30 deletions

View file

@ -7,6 +7,7 @@ RockTunnelPokecenter_TextPointers:
dw RockTunnelPokecenterText2
dw RockTunnelPokecenterText3
dw RockTunnelTradeNurseText
dw DittoSalesmanText
RockTunnelHealNurseText:
script_pokecenter_nurse
@ -21,3 +22,68 @@ RockTunnelPokecenterText3:
RockTunnelTradeNurseText:
script_cable_club_receptionist
DittoSalesmanText:
text_asm
CheckEvent EVENT_BOUGHT_DITTO, 1
jp c, .alreadyBoughtDitto
ld hl, .Text1
call PrintText
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jp nz, .choseNo
ldh [hMoney], a
ldh [hMoney + 2], a
ld a, $5
ldh [hMoney + 1], a
call HasEnoughMoney
jr nc, .enoughMoney
ld hl, .NoMoneyText
jr .printText
.enoughMoney
lb bc, DITTO, 23
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_DITTO
jr .done
.choseNo
ld hl, .RefuseText
jr .printText
.alreadyBoughtDitto
ld hl, .Text2
.printText
call PrintText
.done
jp TextScriptEnd
.Text1
text_far _DittoSalesmanText1
text_end
.RefuseText
text_far _DittoSalesmanNoText
text_end
.NoMoneyText
text_far _DittoSalesmanNoMoneyText
text_end
.Text2
text_far _DittoSalesmanText2
text_end