summaryrefslogtreecommitdiff
path: root/data/scripts/maps/Route109_SeashoreHouse.inc
blob: 7a12f5850067d0c451715ac4924f5dfbb5bbea89 (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
107
108
109
Route109_SeashoreHouse_MapScripts:: @ 8160DCA
	map_script 3, Route109_SeashoreHouse_MapScript1_160DD0
	.byte 0

Route109_SeashoreHouse_MapScript1_160DD0:: @ 8160DD0
	setflag FLAG_LANDMARK_SEASHORE_HOUSE
	end

Route109_SeashoreHouse_EventScript_160DD4:: @ 8160DD4
	lock
	faceplayer
	checkflag FLAG_RECEIVED_6_SODA_POP
	goto_if_eq Route109_SeashoreHouse_EventScript_160E36
	checkflag FLAG_DEFEATED_SEASHORE_HOUSE_TRAINERS
	goto_if_eq Route109_SeashoreHouse_EventScript_160E08
	checkflag FLAG_TEMP_2
	goto_if_eq Route109_SeashoreHouse_EventScript_160DFE
	msgbox Route109_SeashoreHouse_Text_19B4D9, 4
	setflag FLAG_TEMP_2
	release
	end

Route109_SeashoreHouse_EventScript_160DFE:: @ 8160DFE
	msgbox Route109_SeashoreHouse_Text_19B5B9, 4
	release
	end

Route109_SeashoreHouse_EventScript_160E08:: @ 8160E08
	msgbox Route109_SeashoreHouse_Text_19B609, 4
	giveitem_std ITEM_SODA_POP, 6
	compare RESULT, 0
	goto_if_eq Route109_SeashoreHouse_EventScript_160E2C
	setflag FLAG_RECEIVED_6_SODA_POP
	release
	end

Route109_SeashoreHouse_EventScript_160E2C:: @ 8160E2C
	msgbox Route109_SeashoreHouse_Text_19B6BE, 4
	release
	end

Route109_SeashoreHouse_EventScript_160E36:: @ 8160E36
	showmoneybox 0, 0
	nop
	msgbox Route109_SeashoreHouse_Text_19B702, 5
	compare RESULT, 1
	goto_if_eq Route109_SeashoreHouse_EventScript_160E5A
	msgbox Route109_SeashoreHouse_Text_19B773, 4
	hidemoneybox 0, 0
	release
	end

Route109_SeashoreHouse_EventScript_160E5A:: @ 8160E5A
	checkmoney 0x12c, 0
	compare RESULT, 0
	goto_if_eq Route109_SeashoreHouse_EventScript_160E9E
	checkitemspace ITEM_SODA_POP, 1
	compare RESULT, 0
	goto_if_eq Route109_SeashoreHouse_EventScript_160EAB
	msgbox Route109_SeashoreHouse_Text_19B74C, 4
	takemoney 0x12c, 0
	updatemoneybox 0, 0
	nop
	giveitem_std ITEM_SODA_POP
	hidemoneybox 0, 0
	release
	end

Route109_SeashoreHouse_EventScript_160E9E:: @ 8160E9E
	msgbox Route109_SeashoreHouse_Text_19B759, 4
	hidemoneybox 0, 0
	release
	end

Route109_SeashoreHouse_EventScript_160EAB:: @ 8160EAB
	msgbox Route109_SeashoreHouse_Text_1A0CC2, 4
	hidemoneybox 0, 0
	release
	end

Route109_SeashoreHouse_EventScript_160EB8:: @ 8160EB8
	trainerbattle 2, OPPONENT_DWAYNE, 0, Route109_SeashoreHouse_Text_19B809, Route109_SeashoreHouse_Text_19B869, Route109_SeashoreHouse_EventScript_160F09
	msgbox Route109_SeashoreHouse_Text_19B89F, 6
	end

Route109_SeashoreHouse_EventScript_160ED3:: @ 8160ED3
	trainerbattle 2, OPPONENT_JOHANNA, 0, Route109_SeashoreHouse_Text_19B8E5, Route109_SeashoreHouse_Text_19B949, Route109_SeashoreHouse_EventScript_160F09
	msgbox Route109_SeashoreHouse_Text_19B955, 6
	end

Route109_SeashoreHouse_EventScript_160EEE:: @ 8160EEE
	trainerbattle 2, OPPONENT_SIMON, 0, Route109_SeashoreHouse_Text_19B988, Route109_SeashoreHouse_Text_19B9C7, Route109_SeashoreHouse_EventScript_160F09
	msgbox Route109_SeashoreHouse_Text_19B9E5, 6
	end

Route109_SeashoreHouse_EventScript_160F09:: @ 8160F09
	checktrainerflag OPPONENT_DWAYNE
	goto_if 0, Route109_SeashoreHouse_EventScript_160F29
	checktrainerflag OPPONENT_JOHANNA
	goto_if 0, Route109_SeashoreHouse_EventScript_160F29
	checktrainerflag OPPONENT_SIMON
	goto_if 0, Route109_SeashoreHouse_EventScript_160F29
	setflag FLAG_DEFEATED_SEASHORE_HOUSE_TRAINERS
	release
	end

Route109_SeashoreHouse_EventScript_160F29:: @ 8160F29
	release
	end