mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-10-15 19:54:24 +13:00
Add Dubious Disc Salesman
This adds the Dubious Disc Salesman to Cinnabar Pokemon Centre. I chose this area because it's late in the game and it seemed a bit iffy to constantly have to go with Pokemon Centres not in towns. Cinnabar has some connection to Silph, so it makes more sense than just balancing. There are probably improvements that could be made (eg. a quote as you buy) but the salesman code is surprisingly brittle so I'd rather not break stuff for hours for something that already works perfectly fine.
This commit is contained in:
parent
bcb67db573
commit
22236d2072
|
@ -601,6 +601,7 @@
|
|||
const EVENT_BEAT_CELADON_UNIVERSITY_OUTSIDE_TRAINER_3
|
||||
const EVENT_BOUGHT_CUBONE
|
||||
const EVENT_BOUGHT_DITTO
|
||||
const EVENT_BOUGHT_DUBIOUS_DISC
|
||||
|
||||
; Victory Road 3F events
|
||||
const_next $660
|
||||
|
|
|
@ -12,5 +12,6 @@ CinnabarPokecenter_Object:
|
|||
object_event 9, 4, SPRITE_COOLTRAINER_F, WALK, ANY_DIR, 2 ; person
|
||||
object_event 2, 6, SPRITE_GENTLEMAN, STAY, NONE, 3 ; person
|
||||
object_event 11, 2, SPRITE_LINK_RECEPTIONIST, STAY, DOWN, 4 ; person
|
||||
object_event 9, 6, SPRITE_MIDDLE_AGED_MAN, STAY, DOWN, 5 ; spamton
|
||||
|
||||
def_warps_to CINNABAR_POKECENTER
|
||||
|
|
|
@ -7,6 +7,7 @@ CinnabarPokecenter_TextPointers:
|
|||
dw CinnabarPokecenterText2
|
||||
dw CinnabarPokecenterText3
|
||||
dw CinnabarTradeNurseText
|
||||
dw PoryZSalesmanText
|
||||
|
||||
CinnabarHealNurseText:
|
||||
script_pokecenter_nurse
|
||||
|
@ -21,3 +22,72 @@ CinnabarPokecenterText3:
|
|||
|
||||
CinnabarTradeNurseText:
|
||||
script_cable_club_receptionist
|
||||
|
||||
PoryZSalesmanText:
|
||||
text_asm
|
||||
CheckEvent EVENT_BOUGHT_DUBIOUS_DISC, 1
|
||||
jp c, .alreadyBoughtPoryZ
|
||||
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, $21
|
||||
ldh [hMoney + 1], a
|
||||
call HasEnoughMoney
|
||||
jr nc, .enoughMoney
|
||||
ld hl, .NoMoneyText
|
||||
jr .printText
|
||||
.enoughMoney
|
||||
lb bc, DUBIOUS_DISC, 1
|
||||
call GiveItem
|
||||
jr nc, .done
|
||||
xor a
|
||||
ld [wPriceTemp], a
|
||||
ld [wPriceTemp + 2], a
|
||||
ld a, $21
|
||||
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_DUBIOUS_DISC
|
||||
jr .done
|
||||
.choseNo
|
||||
ld hl, .RefuseText
|
||||
jr .printText
|
||||
.alreadyBoughtPoryZ
|
||||
ld hl, .Text2
|
||||
.printText
|
||||
call PrintText
|
||||
.done
|
||||
jp TextScriptEnd
|
||||
|
||||
.Text1
|
||||
text_far _PoryZSalesmanText1
|
||||
text_end
|
||||
|
||||
.RefuseText
|
||||
text_far _PoryZSalesmanNoText
|
||||
text_end
|
||||
|
||||
.NoMoneyText
|
||||
text_far _PoryZSalesmanNoMoneyText
|
||||
text_end
|
||||
|
||||
.Text2
|
||||
text_far _PoryZSalesmanText2
|
||||
text_end
|
||||
|
||||
PoryZBagFull:
|
||||
text_far _PoryZBagFull
|
||||
text_end
|
|
@ -19,3 +19,44 @@ _CinnabarPokecenterText3::
|
|||
para "I think it's"
|
||||
line "worth a try!"
|
||||
done
|
||||
|
||||
_PoryZSalesmanText1::
|
||||
text "MAN: Whoa there,"
|
||||
line "kid! Long time"
|
||||
cont "no see!"
|
||||
|
||||
para "My uncle works for"
|
||||
line "SILPH CO., and he"
|
||||
cont "got me some top"
|
||||
cont "secret data on the"
|
||||
cont "next PORYGON!"
|
||||
|
||||
para "Tell you what."
|
||||
line "You can get a"
|
||||
cont "copy for ¥2100."
|
||||
cont "What do you say?"
|
||||
|
||||
done
|
||||
|
||||
_PoryZSalesmanNoText::
|
||||
text "Huh? Are you sure?"
|
||||
line "It's your big"
|
||||
cont "chance!"
|
||||
done
|
||||
|
||||
_PoryZSalesmanNoMoneyText::
|
||||
text "You'll need more"
|
||||
line "money than that!"
|
||||
done
|
||||
|
||||
_PoryZSalesmanText2::
|
||||
text "MAN: I'm not"
|
||||
line "liable for any"
|
||||
cont "bugs in that code!"
|
||||
done
|
||||
|
||||
_PoryZBagFull::
|
||||
text "Hey, your bag's"
|
||||
line "full! Can't sell"
|
||||
cont "you anything like"
|
||||
cont "that!"
|
Loading…
Reference in a new issue