-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfield-puzzle.html
277 lines (245 loc) · 10.4 KB
/
field-puzzle.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>Field Puzzle - Bee Swarm Simulator Field Matching Game</title>
<meta name="description" content="Play Field Puzzle, a matching game based on Bee Swarm Simulator. Match different field types with the most appropriate bees!" />
<meta name="keywords" content="Field Puzzle, Bee Swarm Simulator, field matching, bee game, matching game" />
<meta name="author" content="Shane (OfficiallySp)" />
<meta property="og:title" content="Field Puzzle - Bee Swarm Simulator Field Matching Game" />
<meta property="og:description" content="Play Field Puzzle, a matching game based on Bee Swarm Simulator. Match different field types with the most appropriate bees!" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://officiallysp.github.io/Beedle/field-puzzle.html" />
<meta property="og:image" content="day.png" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="canonical" href="https://officiallysp.github.io/Beedle/field-puzzle.html" />
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="field-puzzle.css" />
</head>
<body>
<nav class="navbar">
<div class="navbar-toggle" id="navbar-toggle">
<span></span>
<span></span>
<span></span>
</div>
<ul id="navbar-menu">
<li><a href="index.html">Beedle</a></li>
<li><a href="bee-match.html">Memory Match</a></li>
<li><a href="sticker-guess.html">Sticker Guess (Alpha)</a></li>
<li><a href="bee-league.html">Bee League</a></li>
<li><a href="field-puzzle.html" class="active">Field Puzzle</a></li>
<li><a href="quest-adventure.html">Quest Adventure</a></li>
<li><a href="bss-trivia.html">BSS Trivia</a></li>
</ul>
<div id="theme-toggle-container">
<label class="toggle">
<input type="checkbox" id="theme-toggle" />
<span class="slider round"></span>
<span class="toggle-label">Night Bell</span>
</label>
</div>
</nav>
<div class="game-container">
<h1>Field Puzzle</h1>
<h5>Match field types with the appropriate bees</h5>
<div id="game-info">
<div id="score">Score: <span id="points">0</span></div>
<div id="timer">Time: <span id="time-remaining">60</span>s</div>
<div id="level">Level: <span id="current-level">1</span></div>
<div id="streak">Streak: <span id="current-streak">0</span></div>
</div>
<div id="fields-container">
<h3>Fields</h3>
<div id="fields-grid">
<!-- Fields will be populated here -->
</div>
</div>
<div id="bees-container">
<h3>Available Bees</h3>
<div id="bees-grid">
<!-- Bees will be populated here -->
</div>
</div>
<div id="assigned-container">
<h3>Your Assignments</h3>
<div id="assignments">
<!-- Assignments will appear here -->
</div>
</div>
<div id="result-container" class="hidden">
<h3>Results</h3>
<div id="result-message"></div>
<div id="result-score"></div>
<button id="next-level">Next Level</button>
</div>
<div class="game-controls">
<button id="submit-assignments">Submit Assignments</button>
<button id="reset-assignments">Reset Assignments</button>
<button id="show-tutorial">How to Play</button>
</div>
<div id="toggle-container">
<label class="toggle">
<input type="checkbox" id="sound-toggle" checked />
<span class="slider round"></span>
<span class="toggle-label">Sound</span>
</label>
</div>
<div class="footer-buttons">
<button id="show-stats-button">Field Stats</button>
<button id="show-combos-button">View Combos</button>
<a href="index.html" class="button back-to-beedle-button">Back to Beedle</a>
</div>
</div>
<div id="modal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<div id="modal-text"></div>
</div>
</div>
<div id="field-info-modal" class="modal">
<div class="modal-content field-info">
<span class="close field-close">×</span>
<div id="field-info-content">
<h3 id="field-name"></h3>
<img id="field-image" src="" alt="" />
<p id="field-description"></p>
<div id="field-ideal-bees">
<h4>Ideal Bee Types:</h4>
<ul id="ideal-bees-list"></ul>
</div>
</div>
</div>
</div>
<script src="field-puzzle.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const themeToggle = document.getElementById("theme-toggle");
if (localStorage.getItem("darkMode") === "true") {
document.body.classList.add("dark-mode");
themeToggle.checked = true;
}
themeToggle.addEventListener("change", () => {
document.body.classList.toggle("dark-mode");
localStorage.setItem("darkMode", themeToggle.checked);
});
const navbarToggle = document.getElementById("navbar-toggle");
const navbar = document.querySelector(".navbar");
navbarToggle.addEventListener("click", (event) => {
event.stopPropagation();
navbar.classList.toggle("expanded");
});
document.addEventListener("click", (event) => {
const isClickInside = navbar.contains(event.target) || navbarToggle.contains(event.target);
if (!isClickInside && navbar.classList.contains("expanded")) {
navbar.classList.remove("expanded");
}
});
const navLinks = document.querySelectorAll("#navbar-menu a");
const currentPage = window.location.pathname.split("/").pop() || "index.html";
navLinks.forEach(link => {
if (link.getAttribute("href") === currentPage) {
link.classList.add("active");
} else {
link.classList.remove("active");
}
link.addEventListener("click", () => {
if (window.innerWidth <= 768) {
navbar.classList.remove("expanded");
}
});
});
});
</script>
<script>
// Tutorial button
const showTutorialButton = document.getElementById("show-tutorial");
const modal = document.getElementById("modal");
const modalText = document.getElementById("modal-text");
showTutorialButton.addEventListener("click", () => {
modalText.innerHTML = `
<h2>How to Play Field Puzzle</h2>
<div class="tutorial-section">
<h3>Game Objective</h3>
<p>Match bees to the most appropriate fields to earn maximum points. Progress through levels by making strategic assignments.</p>
</div>
<div class="tutorial-section">
<h3>Bee Assignment</h3>
<p>Drag a bee or tap/click it to assign to a field. Each bee works best in certain fields:</p>
<ul>
<li>Perfect match (listed in field info): +10 points</li>
<li>Color match: +5 points</li>
<li>Any assignment: +2 points</li>
</ul>
</div>
<div class="tutorial-section">
<h3>Bee Combos</h3>
<p>Create special combinations of bees in the same field to earn bonus points:</p>
<ul>
<li>Attack Squad: Two attack-focused bees</li>
<li>Bomb Squad: Two bomb-producing bees</li>
<li>Royal Collection: Two legendary bees</li>
<li>Color Harmony: Three bees of the same color</li>
<li>Balanced Team: Three different bee types</li>
</ul>
</div>
<div class="tutorial-section">
<h3>Bonuses</h3>
<ul>
<li>Perfect Assignments: +20 points each</li>
<li>Streaks: Consecutive perfect levels</li>
<li>Time Bonus: Points for each second remaining</li>
<li>Difficulty Multiplier: Harder fields give higher scores</li>
</ul>
</div>
`;
modal.style.display = "block";
});
// Show combos button
const showCombosButton = document.getElementById("show-combos-button");
showCombosButton.addEventListener("click", () => {
modalText.innerHTML = `
<h2>Bee Combo Guide</h2>
<div class="combos-list">
<div class="combo-item">
<h3>Attack Squad</h3>
<p>Two attack-focused bees working together</p>
<p class="combo-bonus">+15 points</p>
<p class="combo-tip">Try with: Brave Bee, Vicious Bee</p>
</div>
<div class="combo-item">
<h3>Bomb Squad</h3>
<p>Two bomb-producing bees create explosive synergy</p>
<p class="combo-bonus">+15 points</p>
<p class="combo-tip">Try with: Shocked Bee, Demo Bee</p>
</div>
<div class="combo-item">
<h3>Royal Collection</h3>
<p>Two legendary bees working together</p>
<p class="combo-bonus">+20 points</p>
<p class="combo-tip">Try with: Fuzzy Bee, Vicious Bee, Vector Bee</p>
</div>
<div class="combo-item">
<h3>Color Harmony</h3>
<p>Three bees of the same color creating harmony</p>
<p class="combo-bonus">+25 points</p>
<p class="combo-tip">Try with: Three bees of the same color</p>
</div>
<div class="combo-item">
<h3>Balanced Team</h3>
<p>A diverse team with at least three different bee types</p>
<p class="combo-bonus">+20 points</p>
<p class="combo-tip">Try with: Common, Rare, Epic, or Legendary variety</p>
</div>
</div>
<p class="combo-note">Note: Multiple combos can be active on the same field!</p>
`;
modal.style.display = "block";
});
</script>
</body>
</html>