-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
189 lines (179 loc) · 5.84 KB
/
Copy pathindex.html
File metadata and controls
189 lines (179 loc) · 5.84 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Battle Dice - A game where you defeat dungeon bosses. Can you get to the end?"
/>
<script
src="https://kit.fontawesome.com/258b4b5b87.js"
crossorigin="anonymous"
></script>
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="assets/css/style.css" />
<script type="module" src="assets/js/index.js"></script>
<title>Battle Dice</title>
</head>
<body>
<img id="backgroundImage" src="assets/img/background/background.webp" alt="" />
<main>
<!-- Message box popup -->
<section id="messageBox">
<p id="message"></p>
<i id="messageClose" class="fa fa-times-circle"></i>
</section>
<!-- Main Menu Section -->
<section id="mainMenu">
<h3 id="highScore">High Score: <span></span></h3>
<button id="menuMusicMute" aria-label="Music Mute Toggle"></button>
<img
src="assets/img/defaultImages/dicelogo.webp"
alt="Battle Dice Logo"
id="menuLogo"
/>
<div id="menuButtons">
<button id="playButton">Play</button>
<button id="settingsButton">Settings</button>
<button id="howToPlayButton">How To Play</button>
</div>
</section>
<!-- Settings Menu Section -->
<section id="settingsMenu">
<h2>Settings</h2>
<div id="settings">
<div class="settingGroup">
<label id="musicSliderLabel" for="musicSlider">Music: <span></span></label>
<div class="sliderGroup">
<input type="range" name="musicSlider" id="musicSlider" min="0" max="100" />
<button id="settingsMusicMute"></button>
</div>
</div>
<div class="settingGroup">
<label id="sfxSliderLabel" for="sfxSlider">Sfx: <span></span></label>
<div class="sliderGroup">
<input type="range" name="sfxSlider" id="sfxSlider" min="0" max="100" />
<button id="settingsSfxMute"></button>
</div>
</div>
</div>
<button id="resetButton">Clear Data</button>
<button class="menuButton">Menu</button>
</section>
<!-- Help Menu Section -->
<section id="howToPlayMenu">
<div class="helpText">
<h2>How To Play</h2>
<p>
The aim of the game is to <span>defeat</span> your opponent, by rolling the
highest on the die.
</p>
<p>
If you roll the <span>highest</span>, you will deal damage to your opponent
causing them to lose health.
</p>
<p>
If your opponent rolls higher than you, you will take <span>damage</span> and
lose health.
</p>
<p>
The damage dealt is equal to the difference between the two rolls. So if you
roll a 6 and your opponent rolls a 1, you will deal 5 damage to your opponent.
</p>
<p>
Each of you will continue to roll your dice, until either of you have 0 health
and are <span>defeated</span>.
</p>
</div>
<div class="helpText">
<h2>Endless Mode</h2>
<p>
Once you have defeated all four dungeon bosses, you will have the option to
continue in <span>Endless Mode</span>, or return to the
<span>Main Menu</span>.
</p>
<p>
If you return to the main menu, and press <span>Play</span>, you will be
returned to the game, in <span>Endless Mode</span>.
</p>
<p>
If you would like to <span>Start Over</span> with a new character, you can
reset your game data, in the <span>Settings</span> menu.
</p>
</div>
<div class="helpText">
<h2>Character Creation</h2>
<p>
Pressing <span>Play</span> in the <span>Main Menu</span>, will take you to the
character selection screen.
</p>
<p>
You will need to enter your <span>name</span> or <span>username</span>, this
must be 3 or more characters long, but no loner than 12 characters.
</p>
<p>
If you have played previously your character selection, and name will be
saved, and you can continue playing from where you left off.
</p>
<p>
If would like to reset your profile, use the <span>"Clear Data"</span> button
found in the <span>"Settings"</span> menu
</p>
</div>
<button class="menuButton">Menu</button>
</section>
<!-- Character Selection Section -->
<section id="userData">
<form id="userForm">
<label for="username">Name:</label>
<input type="text" name="username" id="username" />
</form>
<h3>Select Your Character</h3>
<div id="characterSelection"></div>
<button id="startGame">Start</button>
<button class="menuButton">Menu</button>
</section>
<!-- Main Game Section -->
<section id="gameWindow">
<div id="opponent">
<div>
<img
id="opponentImg"
src="assets/img/defaultImages/defaultIcon.webp"
alt="Opponents character image"
/>
<p>Roll: <span id="opponentRoll"></span></p>
</div>
<p>Name: <span id="opponentName"></span></p>
<p>Health: <span id="opponentHealth"></span></p>
</div>
<div id="diceArea"></div>
<div id="player">
<div>
<img
id="playerImg"
src="assets/img/defaultImages/defaultIcon.webp"
alt="Players character image"
/>
<p>Roll: <span id="playerRoll"></span></p>
</div>
<p>Name: <span id="playerName"></span></p>
<p>Health: <span id="playerHealth"></span></p>
</div>
<div id="gameButtons">
<button id="playerRollButton">Roll</button>
<button id="gameMenuButton">Menu</button>
</div>
<div id="resultScreen"></div>
</section>
<audio id="music"></audio>
<audio id="sfx"></audio>
<!-- Message to display if Javascript not supported by browser -->
<noscript>
<h3>Your Browser Does Not Support JavaScript!</h3>
</noscript>
</main>
</body>
</html>