-
Notifications
You must be signed in to change notification settings - Fork 1
/
mapgen.html
74 lines (57 loc) · 2.37 KB
/
mapgen.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
---
layout: mapgen
title: "D&D Map Generator"
permalink: /dnd/mapgen/
---
<head>
</head>
<body>
<div class="mapgen-intro">The following is a Javascript tool in development as of September 20, 2021. The monster list is from the open-source <a href="https://www.d20srd.org/index.htm" target="_blank" rel="noopener noreferrer">d20 SRD</a>. To save your results, print to PDF. Each grid square is 5'x5'.</div>
<div id="mapgen-disp-wrapper">
<canvas id="mapgen-canvas"></canvas>
<div id="mapgen-results">Your map is empty. Generate something using the options below.</div>
<div id="mapgen-options">
<p id="mapgen-options-title">Generator Options</p>
<div class="mapgen-dropdown">
<label for="mapgen-size-dropdown">What size map to generate?</label>
<select name="mapgen-size" id="mapgen-size-dropdown" onchange="toggleMapType()">
<option value="1">1 room</option>
<option value="2" style="display: none;">2-3 rooms</option>
<option value="4" style="display: none;">4-6 rooms</option>
</select>
</div>
<div id="mapgen-tower-choice" style="display: none;">
<input type="radio" id="mapgen-maptype-tower" name="mapgen-maptype" value="tower">
<label for="tower">Tower</label><br/>
</div>
<div id="mapgen-dungeon-choice">
<input type="radio" id="mapgen-maptype-dungeon" name="mapgen-maptype" value="dungeon" checked="checked">
<label for="dungeon">Dungeon</label><br/>
</div>
<div id="mapgen-cave-choice" style="display: none;">
<input type="radio" id="mapgen-maptype-cave" name="mapgen-maptype" value="cave">
<label for="cave">Cave</label><br/>
</div>
<div class="mapgen-dropdown" style="display: none;">
<label for="monster-amount">How many monsters?</label>
<select name="monster-amount" id="monster-amount">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
<div class="mapgen-dropdown">
<label for="mapgen-climate">What's the climate like?</label>
<select name="mapgen-climate" id="mapgen-climate">
<option value="warm">Warm</option>
<option value="temperate">Temperate</option>
<option value="cold">Cold</option>
<option value="underground">Subterranean</option>
<option value="aquatic">Aquatic</option>
</select>
</div>
<button id="mapgensubmitbtn" onclick="submitMapGen()">Submit</button>
<button id="mapgenreloadbtn" onclick="location.reload()">Reload</button>
</div>
</div>
</body>