/
house-1-map.js
134 lines (132 loc) · 3.82 KB
/
house-1-map.js
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
var house1Map = {
background: 'house-1-map.png',
width: 800,
characterState: 'normal',
characters: [
{
x: 300,
y: 290,
animations: {
normal: ['blue-guy-1.gif', 'blue-guy-2.gif'],
talk: ['blue-guy-1.gif', 'blue-guy-talk.gif'],
smile: ['blue-guy-smile-1.gif', 'blue-guy-smile-2.gif']
}
}
],
walls: [
{
// back wall
x: 0,
y: 250,
width: 800,
height: 160
},
{
// door
x: 40,
y: 270,
width: 110,
height: 150,
action: function () {
warp(worldMap, 217, 297, 2);
}
},
{
// dog dish
x: 140,
y: 500,
width: 80,
height: 80,
action: function () {
doText(
[
'man. that food. it\'s like... not for you... okay?',
],
'Steve',
0,
function () {
console.log('all done here!');
}
);
}
},
{
// computer
x: 610,
y: 370,
width: 180,
height: 150,
action: function () {
if (!flags['steve-1']) {
doText(
[
'hey... wait...',
],
'Steve',
0
);
return;
}
if (!flags['steve-funk-destroyed']) {
showPc('very-real-news.www');
setTimeout(function () {
showBubble('Oh hey! My name is Bad Funk! But I\'m really a good guy ;] Let\'s be buds k?');
}, 1000);
}
else {
doText(
[
'hey. man. don\t you have like,,, better things to do ??',
],
'Steve',
0
);
}
}
},
{
// blue guy
x: 290,
y: 290,
width: 100,
height: 160,
action: function () {
if (!flags['steve-1']) {
doText(
[
'Whhhhhhaat are you talking about?? Hey,,, cn you help me?',
'okay. cool. so here\'s the thing.... you ready...',
'i\'ve got the BAD FUNK... bad! reeeeal bad bro...',
'I CAN\'T LIVE LIKE THIS! .... ahem..sorry. but dude. i need you\'re help',
],
'Steve',
0,
function () {
flags['steve-1'] = true;
}
);
}
else if (flags['steve-funk-destroyed']) {
doText(
[
'dude,,,,, youre so COOL :]]'
],
'Steve',
0
);
}
else {
doText(
[
' please help!! oh & you can use my PC :]]]'
],
'Steve',
0,
function () {
}
);
}
}
}
]
};