-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRangerCR.html
executable file
·114 lines (104 loc) · 4.78 KB
/
RangerCR.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<!--document.getElementById("myP").style.visibility="hidden";-->
<head profile="http://gmpg.org/xfn/11">
<title>MA Fishing</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
</head>
<body id="top">
<div class="wrapper col1">
<div id="topbar">
</div>
</div>
<div class="wrapper col2">
<div id="header">
<div id="logo">
<h1><a href="#">Get Hooked</a></h1>
<p>A learning fishing game for the state of Massachussetts</p>
</div>
</div>
</div>
<div class="wrapper col3">
<div id="gallery">
<img src="images/ranger_charles.png" width="1024" height="566" />
<img id="fBuble" src="images/fish_charles.png" style="visibility:hidden"/>
<img id="fish" onclick="fishT()" src="images/fish.png" />
<img id="how" onclick="howT()" src="images/get.png" />
<img id="tBar" src="images/top.png" />
<img id="bBar" src="images/bottom.png" />
<textarea id="rBuble" type="text" readonly>The Charles is a meandering, 80 mile-long river that stretches from Hopkinton to Boston Harbor. I can tell you more about fish species and travel cost if you want to.</textarea>
<textarea id="bud" type="text" readonly></textarea>
<textarea id="tar1" type="text" readonly></textarea>
<textarea id="tar2" type="text" readonly></textarea>
<textarea id="tar3" type="text" readonly></textarea>
<textarea id="tar4" type="text" readonly></textarea>
<textarea id="bait1" type="text" readonly></textarea>
<textarea id="bait2" type="text" readonly></textarea>
<!--br class="clear" /-->
<img id="Back" onclick="back()" src="images/map_l.png" />
<img id="For1" onclick="Forward()" src="images/go.png" /> <!-- onclick="Forward()" Loc1-2.html-->
<img id="inst" onclick="instructions()" src="images/i.png" />
</div>
</div>
<div class="wrapper col5">
<div id="container">
<br class="clear" />
</div>
</div>
<script>
var equip;
(function (global) {
document.getElementById("bud").innerHTML = global.localStorage.getItem("budget");
document.getElementById("tar1").innerHTML = global.localStorage.getItem("targ1");
document.getElementById("tar2").innerHTML = global.localStorage.getItem("targ2");
document.getElementById("tar3").innerHTML = global.localStorage.getItem("targ3");
document.getElementById("tar4").innerHTML = global.localStorage.getItem("targ4");
document.getElementById("bait1").innerHTML = global.localStorage.getItem("bait1");
document.getElementById("bait2").innerHTML = global.localStorage.getItem("bait2");
equip = global.localStorage.getItem("equip");
vest = global.localStorage.getItem("vest");
if(vest == "exist") document.getElementById("rBuble").innerHTML += " Nice vest, by they way!";
document.getElementById("For1").addEventListener("click", function () {
if(equip == "null"){
alert("You have to buy a rod and reel before going fishing.");
}/*else if(equip == "greedy"){
window.location.href = "https://e187e37c2d1b0e5298b62f7b2639b740eb7d4aca.googledrive.com/host/0B2jHpPeOc3kGX0R6WkxfU2w2NEU/greedy.html";
}*/else if(document.getElementById("bait1").innerHTML == 0){
alert("You have to buy fresh water bait before going to a freshwater site.");
}else{
var x = document.getElementById("bud").innerHTML.substring(1);
var z = parseInt(x);
if(z >= 2) {
var y = z-2;
var nB = "$" + y;
global.localStorage.setItem("budget", nB);
alert("Travelling! $2 T-expense paid");
window.location.href = "https://e187e37c2d1b0e5298b62f7b2639b740eb7d4aca.googledrive.com/host/0B2jHpPeOc3kGX0R6WkxfU2w2NEU/CR_game.html";
}else{
alert("Sorry, you do not have enough money to go to that location!");
}
}
}, false);
}(window));
function fishT() {
document.getElementById("rBuble").innerHTML = "";
document.getElementById("fBuble").style.visibility = "visible";
document.getElementById("fBuble").style.position = "fixed";
document.getElementById("fBuble").style.top = "216px";
document.getElementById("fBuble").style.left = "293px";
}
function howT() {
document.getElementById("rBuble").innerHTML = "Charles river is transit accessible and will cost a $2.00 subway fare.";
document.getElementById("fBuble").style.visibility = "hidden";
}
function back() {
window.location.href = "https://e187e37c2d1b0e5298b62f7b2639b740eb7d4aca.googledrive.com/host/0B2jHpPeOc3kGX0R6WkxfU2w2NEU/map.html";
}
function instructions() {
window.location.href = "https://e187e37c2d1b0e5298b62f7b2639b740eb7d4aca.googledrive.com/host/0B2jHpPeOc3kGX0R6WkxfU2w2NEU/instr.html";
}
</script>
</body>
</html>