-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathdesert.js
56 lines (47 loc) · 2.63 KB
/
desert.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
var desert = {
// Variables
size : 25,
// Functions
onload : function(){
land.addLand("desert", this.size, -1, this.load.bind(this), this.getText.bind(this));
},
load : function(){
},
getText : function(){
var lines = this.asciiDesert.slice(0);
for(var i = 0; i < this.size; i++){
if(quest.things[i].type == "character"){
if(i == 12) lines[12] = lines[12].replaceAt(i*3, quest.things[i].text[0]);
else if(i == 13) lines[12] = lines[12].replaceAt(i*3, quest.things[i].text[0]);
else if(i == 14) lines[12] = lines[12].replaceAt(i*3 + 1, quest.things[i].text[1]);
else if(i == 15) lines[12] = lines[12].replaceAt(i*3 + 1, quest.things[i].text[1] + quest.things[i].text[2]);
else if(i == 17) lines[12] = lines[12].replaceAt(i*3, quest.things[i].text[0] + quest.things[i].text[1]);
else if(i == 18 || i == 19) ;
else if(i == 20) lines[12] = lines[12].replaceAt(i*3 + 2, quest.things[i].text[2]);
else lines[12] = lines[12].replaceAt(i*3, quest.things[i].text);
}
}
return lines.join("");
},
// Ascii
asciiDesert :
[
" \"The desert\" \n",
" \n",
" \n",
" _ _ \n",
" / \\ _ / \\ _ \n",
" , | | , / \\ , | | , / \\ \n",
" ((_| |_)) , | | , ((_| |_)) , | | , \n",
" `--, ,--` ((_| |_)) `--, ,--` ((_| |_)) \n",
" | | `--, ,--` | | _ `--, ,--` \n",
" | | | | | | _ / \\ | | \n",
" `\"\"\"` | | `\"\"\"`/ \\ , | | , | | \n",
" `\"\"\"` , | | , ((_| |_)) `\"\"\"` \n",
" ((_| |_)) `--, ,--` \n",
" `--, ,--` | | \n",
" | | | | \n",
" | | `\"\"\"` \n",
" `\"\"\"` \n"
]
};