-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
248 lines (244 loc) · 9.73 KB
/
index.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Bruno Store Game</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link href="https://the-bruno-store.github.io/favicon.ico" rel="icon" type="image/x-icon">
<link href="manifest.json" rel="manifest">
</head>
<body>
<audio loop controls src="The Bruno Store.wav"></audio>
<div class="sticky-top">
<p>Packages: <span id="$$$"></span></p>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-8 col-md-9">
<div class="container text-center">
<div class="row">
<div class="col-3 col-4-md"></div>
<div class="col-6 col-4-md">
<button class="btn" onclick="money += 1; moneyThingie.innerHTML = money">
<img src="IMG_2170.jpeg" class="img-fluid">
</button>
</div>
<div class="col-3 col-4-md"></div>
</div>
</div>
<div class="card" style="">
<div class="card-body">
<h5 class="card-title">Worker</h5>
<h6 class="card-subtitle mb-2 text-body-secondary">Not very efficient. Produces one package every five seconds.</h6>
<div id="workers"></div>
</div>
</div>
<div class="card" style="">
<div class="card-body">
<h5 class="card-title">ScanBot</h5>
<h6 class="card-subtitle mb-2 text-body-secondary">Flashing lights! Wide laser beam! One package per second! Wow!</h6>
<div id="scanbot"></div>
</div>
</div>
<div class="card" style="">
<div class="card-body">
<h5 class="card-title">Production Line</h5>
<h6 class="card-subtitle mb-2 text-body-secondary">An ultra-fast conveyor paired with a ScanBot. The conveyor moves three times faster than in-game gravity, so the production line produces three packages per second.</h6>
<h6 class="card-subtitle mb-2 text-body-secondary"><b>WARNING:</b> Contains flashing lights.</h6>
<div id="proline"></div>
</div>
</div>
</div>
<div class="col-4 col-md-3">
<div class="card" style="">
<button class="btn" onclick="buyWorker()">
<img src="store-worker.gif" height="100" style="display: block;">
<h5 class="card-title">Worker</h5>
<p>10 packages</p>
<div class="card" style="">
<button class="btn" onclick="buyRegenBar()">
<img src="regen-bar.gif" height="100" style="display: block;">
<h5 class="card-title">Regenerating Chocolate Bar</h5>
<p class="lead">Workers work twice as fast.</p>
<p id="owned">5 packages</p>
</button>
</div>
<div class="card" style="">
<button class="btn" onclick="buyRoad()">
<img src="road.gif" height="100" style="display: block;">
<h5 class="card-title">Road Upgrade</h5>
<p class="lead">Workers work twice as fast for arriving eariler.</p>
<p><span id="road-owned">50 packages</span></p>
</button>
</div>
</button>
<div class="card" style="">
<button class="btn" onclick="buyScanBot()">
<img src="scanbot.gif" height="100" style="display: block;">
<h5 class="card-title">ScanBot</h5>
<p>40 packages</p>
</button>
</div>
<div class="card" style="">
<button class="btn" onclick="buyProductionLine()">
<img src="production-line.gif" height="100" style="display: block;">
<h5 class="card-title">Production Line</h5>
<p>100 packages</p>
</button>
<div class="card" style="">
<button class="btn" onclick="buyLuckScanBot()">
<img src="luck-scantron.gif" height="100" style="display: block;">
<h5 class="card-title">Luck ScanBot</h5>
<p class="lead">Powered by Ireland's finest thousand-leaf clovers, it will double the value of packages that go through its beam of luck.</p>
<p><span id="lbot-owned">500 packages</span></p>
</button>
</div>
</div>
<div class="card" style="">
<button class="btn" onclick="buyStore()">
<img src="first-store.png" height="100" style="display: block;">
<h5 class="card-title">YOUR FIRST STORE!</h5>
<p>1000 packages</p>
</button>
</div>
</div>
</div>
</div>
</div>
<script defer>
// Line settings
/*var line = document.getElementById("the-line")
var addPersonTick = 2
var lineCount = 0
var lineMax = 5
var personId = 0
var lastPersonId = 1*/
// Ticks and money
var ticks = 0
var money = parseInt(localStorage.money) || 0
var moneyThingie = document.getElementById("$$$")
// Workers
var workers = parseInt(localStorage.workers) || 0
var workerThingie = document.getElementById("workers")
// Recover all worker data
for (let i = 0; i < workers; i++) {
workerThingie.innerHTML += "<img src='store-worker.gif' height='100'>"
}
var ownsBar = localStorage.ownsBar || 0
var road = localStorage.road || 0
var barThingie = document.getElementById("owned")
var roadThingie = document.getElementById("road-owned")
if (ownsBar == 1) {
barThingie.innerHTML = "Owned"
}
if (road == 1) {
roadThingie.innerHTML = "Owned"
}
function buyWorker() {
if (money > 9) {
money -= 10
workers += 1
workerThingie.innerHTML += "<img src='store-worker.gif' height='100'>"
}
}
function buyRegenBar() {
if (money > 4 && ownsBar != 1) {
ownsBar = 1
money -= 5
barThingie.innerHTML = "Owned"
}
}
function buyRoad() {
if (money > 49) {
money -= 50
road = 1
roadThingie.innerHTML = "Owned"
}
}
// ScanBots
var scanbots = parseInt(localStorage.scanbots) || 0
var scanbotThingie = document.getElementById("scanbot")
function buyScanBot() {
if (money > 39) {
money -= 40
scanbots += 1
scanbotThingie.innerHTML += "<img src='scanbot.gif' height='100'>"
}
}
// Recover ScanBot data
for (let i = 0; i < scanbots; i++) {
scanbotThingie.innerHTML += "<img src='scanbot.gif' height='100'>"
}
// Production lines
var productionLines = parseInt(localStorage.productionLines) || 0
var lineThingie = document.getElementById("proline")
var luckBotThingie = document.getElementById("lbot-owned")
var ownsLBot = localStorage.ownsLBot || 0
if (ownsLBot == 1) {
luckBotThingie.innerHTML = "Owned"
}
function buyProductionLine() {
if (money > 99) {
money -= 40
productionLines += 1
lineThingie.innerHTML += '<img src="production-line.gif" height="100">'
}
}
function buyLuckScanBot() {
if (money > 499 && ownsLBot != 1) {
money -= 500
ownsLBot = 1
luckBotThingie.innerHTML = "Owned"
}
}
// Recover production line data
for (let i = 0; i < productionLines; i++) {
lineThingie.innerHTML += "<img src='production-line.gif' height='100'>"
}
// A BIG MILESTONE: YOUR FIRST STORE!
var ownsStore = parseInt(localStorage.ownsStore) || 0
function buyStore() {
if (money > 999 && ownsStore != 1) {
money -= 1000
ownsStore = false
window.open("first-store.html")
}
}
// Ticker
setInterval(function () {
ticks += 1
/*
if ((ticks % addPersonTick == 0) && (lineCount < lineMax)) {
lineCount += 1
personId += 1
if (Math.random() > 0.1) {
line.innerHTML += "<img src='regular-person.png' height='100' class='m-2' id='person'>"
} else {
line.innerHTML += "<img src='angry-person.gif' height='100' class='m-2' id='person'>"
}
}
if ((ticks % leadTick == 0) && (leadCount < leadMax)) {
leadCount += 1
lead.innerHTML += "<button class='btn btn-light' onclick='lead()'><img src='lead.png' height='100'></button>"
}
*/
moneyThingie.innerHTML = money
if (ticks % 5 == 0) {
money += workers * (ownsBar + 1) * (road + 1)
}
money += scanbots
money += productionLines * 3 * (ownsLBot + 1)
localStorage.money = money
localStorage.workers = workers
localStorage.scanbots = scanbots
localStorage.productionLines = productionLines
localStorage.ownsStore = ownsStore
localStorage.ownsBar = ownsBar
localStorage.road = road
localStorage.ownsLBot = ownsLBot
}, 1000)
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
</body>
</html>