summaryrefslogtreecommitdiff
path: root/scripts/ceruleanhouse1.asm
blob: ba75c24083ab5b99cf565f749808f406eb532051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
CeruleanHouse1Script:
	call EnableAutoTextBoxDrawing
	ret

CeruleanHouse1TextPointers:
	dw CeruleanHouse1Text1
	dw CeruleanHouse1Text2
	dw CeruleanHouse1Text3
	dw CeruleanHouse1Text4

CeruleanHouse1Text1:
	TX_ASM
	ld a, $1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	CheckEvent EVENT_GOT_BULBASAUR_IN_CERULEAN
	jr nz, .asm_1cfbf
	ld hl, CeruleanHouse1Text_1cfc8
	call PrintText
	ld a, [wPikachuHappiness]
	cp 147
	jr c, .asm_1cfb3
	ld hl, CeruleanHouse1Text_1cfce
	call PrintText
	call YesNoChoice
	ld a, [wCurrentMenuItem]
	and a
	jr nz, .asm_1cfb6
	ld a, $1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	ld a, BULBASAUR
	ld [wd11e], a
	ld [wcf91], a
	call GetMonName
	ld a, $1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	lb bc, BULBASAUR, 10
	call GivePokemon
	jr nc, .asm_1cfb3
	ld a, [wAddedToParty]
	and a
	call z, WaitForTextScrollButtonPress
	ld a, $1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	ld hl, CeruleanHouse1Text_1cfd3
	call PrintText
	ld a, HS_CERULEAN_BULBASAUR
	ld [wMissableObjectIndex], a
	predef HideObject
	SetEvent EVENT_GOT_BULBASAUR_IN_CERULEAN
.asm_1cfb3
	jp TextScriptEnd

.asm_1cfb6
	ld hl, CeruleanHouse1Text_1cfdf
	call PrintText
	jp TextScriptEnd

.asm_1cfbf
	ld hl, CeruleanHouse1Text_1cfd9
	call PrintText
	jp TextScriptEnd

CeruleanHouse1Text_1cfc8:
	TX_FAR MelanieText1
	TX_WAIT_BUTTON
	db "@"

CeruleanHouse1Text_1cfce:
	TX_FAR MelanieText2
	db "@"

CeruleanHouse1Text_1cfd3:
	TX_FAR MelanieText3
	TX_WAIT_BUTTON
	db "@"

CeruleanHouse1Text_1cfd9:
	TX_FAR MelanieText4
	TX_WAIT_BUTTON
	db "@"

CeruleanHouse1Text_1cfdf:
	TX_FAR MelanieText5
	TX_WAIT_BUTTON
	db "@"

CeruleanHouse1Text2:
	TX_FAR MelanieBulbasaurText
	TX_ASM
	ld a, BULBASAUR
	call PlayCry
	jp TextScriptEnd

CeruleanHouse1Text3:
	TX_FAR MelanieOddishText
	TX_ASM
	ld a, ODDISH
	call PlayCry
	jp TextScriptEnd

CeruleanHouse1Text4:
	TX_FAR MelanieSandshrewText
	TX_ASM
	ld a, SANDSHREW
	call PlayCry
	jp TextScriptEnd