-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstructions.html
134 lines (130 loc) · 4.52 KB
/
instructions.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
<!DOCTYPE html>
<html>
<head>
<title>Spell Instructions</title>
<style type="text/css">
h1 {
font-family: VT323;
text-align: center;
}
</style>
<!--<script src="js/instructions.js"></script>-->
</head>
<body>
<h1>Instructions</h1>
<h2>Controls</h2>
<table id="controlTable" border="1" width="375px">
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><center><kbd>A</kbd></center></td>
<td>Move left</td>
</tr>
<tr>
<td><center><kbd>D</kbd></center></td>
<td>Move right</td>
</tr>
<tr>
<td><center><kbd>S</kbd></center></td>
<td>Cast invoked spell</td>
</tr>
<tr>
<td><center><kbd>W</kbd></center></td>
<td>Jump</td>
</tr>
<tr>
<td><center><kbd>U</kbd></center></td>
<td>Select EARTH</td>
</tr>
<tr>
<td><center><kbd>I</kbd></center></td>
<td>Select FIRE</td>
</tr>
<tr>
<td><center><kbd>O</kbd></center></td>
<td>Select AIR</td>
</tr>
<tr>
<td><center><kbd>P</kbd></center></td>
<td>Select WATER</td>
</tr>
<tr>
<td><center><kbd>SHIFT</kbd></center></td>
<td>Clear invoked spell</td>
</tr>
<tr>
<td><center><kbd>1</kbd></center></td>
<td>Upgrade Maximum Health</td>
</tr>
<tr>
<td><center><kbd>2</kbd></center></td>
<td>Upgrade Maximum Mana</td>
</tr>
<tr>
<td><center><kbd>3</kbd></center></td>
<td>Upgrade Passive Experience Rate</td>
</tr>
</tbody>
</table>
<h2>Spells</h2>
<p>
Use combinations of 3 elements to invoke spells.<br />
For example, selecting FIRE FIRE AIR invokes and casts <i>spell name</i>.
</p>
<table id="spellTable" class="spellTable" border="1" width="95%">
<thead>
<tr>
<th>Element Combo</th>
<th>Keystroke</th>
<th>Name</th>
<th>Damage</th>
<th>Mana Cost</th>
<th>Description</th>
</tr>
</thead>
<tbody></tbody>
</table>
<h2>Gameplay</h2>
<p>Not yet implemented.</p>
<script type="text/javascript" src="js/lib/ajax.min.js"></script>
<script type="text/javascript">
marmottajax("js/spelldata.json").then(function (content) {
var spelldata = JSON.parse(content);
spelldata = spelldata.spelldata;
// console.log(spelldata);
function replaceAll(inS, getS, setS) {
return inS.split(getS).join(setS);
}
var spellTable = document.getElementById("spellTable");
for (i = 0; i < 20; i++) {
row = spellTable.insertRow(i + 1);
combo = row.insertCell(0);
combo.innerHTML = replaceAll(
replaceAll(
replaceAll(
replaceAll(
spelldata.spells[i].keyid,
"I", "FIRE "),
"U", "EARTH "),
"O", "AIR "),
"P", "WATER ");
keys = row.insertCell(1);
keys.innerHTML = "<center><kbd>" + spelldata.spells[i].keyid.split('').join(' ') + "</kbd></center>";
nme = row.insertCell(2);
nme.innerHTML = "<center>" + spelldata.spells[i].name + "</center>";
dmg = row.insertCell(3);
dmg.innerHTML = "<center>" + spelldata.spells[i].damage + "</center>";
manaCost = row.insertCell(4);
manaCost.innerHTML = "<center>" + spelldata.spells[i].cost + "</center>";
desc = row.insertCell(5);
desc.innerHTML = spelldata.spells[i].desc;
}
});
</script>
</body>
</html>