-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathguildhall.html
More file actions
614 lines (570 loc) · 18.5 KB
/
Copy pathguildhall.html
File metadata and controls
614 lines (570 loc) · 18.5 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
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Guildhall</title>
<link
href="https://fonts.googleapis.com/css2?family=Almendra&family=Cinzel:wght@400;700&display=swap"
rel="stylesheet"
>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<style>
/* General Page Styling */
body {
margin: 0;
background: url('resources/guildhall.png') no-repeat center center fixed;
background-size: cover;
color: #FAF4E0;
font-family: 'Almendra', serif;
text-align: center;
}
.container {
max-width: 900px;
margin: 2rem auto;
background: rgba(0, 0, 0, 0.7);
padding: 2rem;
border-radius: 10px;
}
h1, h2 {
font-family: 'Cinzel', serif;
margin: 0.5rem 0;
}
.faction-section {
margin-bottom: 2rem;
border: 2px solid #660000;
border-radius: 8px;
padding: 1rem;
background: rgba(255, 255, 255, 0.1);
}
.faction-header {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 1rem;
}
.faction-img {
width: 150px; /* square guild image */
height: 150px;
border: 2px solid #8B0000;
border-radius: 8px;
object-fit: cover;
margin-bottom: 0.5rem;
}
.faction-content {
text-align: left;
margin: 0.5rem 1rem;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
}
th, td {
border: 1px solid #8B0000;
padding: 0.5rem;
text-align: center;
vertical-align: middle;
}
th {
background: #8B0000;
color: #FAF4E0;
font-family: 'Cinzel', serif;
}
.rep-portrait {
width: 80px; /* representative portrait size */
height: 80px;
border: 2px solid #660000;
border-radius: 8px;
object-fit: cover;
}
/* Buttons */
.action-button, .home-button {
background: #8B0000;
color: #FAF4E0;
border: 1px solid #660000;
padding: 0.4rem 0.8rem;
border-radius: 4px;
cursor: pointer;
font-family: 'Cinzel', serif;
margin: 0.2rem;
text-decoration: none;
}
.action-button:hover, .home-button:hover {
background: #660000;
}
/* Modal Overlay */
#modalOverlay {
display: none;
position: fixed;
z-index: 999;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.8); /* black overlay */
}
.modal-content {
background-color: #2a2a2a;
margin: 10% auto;
padding: 1rem;
border: 2px solid #660000;
max-width: 500px;
border-radius: 10px;
position: relative;
text-align: left;
}
.close-button {
background: #8B0000;
border: 1px solid #660000;
color: #FAF4E0;
padding: 0.3rem 0.6rem;
cursor: pointer;
font-family: 'Cinzel', serif;
position: absolute;
top: 1rem;
right: 1rem;
border-radius: 4px;
}
.close-button:hover {
background: #660000;
}
label {
display: block;
margin-bottom: 0.5rem;
font-family: 'Cinzel', serif;
}
input {
width: 100%;
padding: 0.4rem;
margin-bottom: 0.8rem;
box-sizing: border-box;
font-family: 'Almendra', serif;
}
.divider {
margin: 1rem auto;
font-size: 1.5rem;
}
.divider::after {
content: "✦ ✧ ✦";
color: #8B0000;
letter-spacing: 0.5rem;
}
</style>
</head>
<body>
<div class="container">
<h1>Guildhall</h1>
<p>Welcome to the Guildhall – a gathering place for the hardworking artisans and craftsmen of our fair city. Here, guilds such as the Blacksmith’s, Carpenter’s, Mason’s, Tanner’s, Potter’s, and Brickmaker’s offer both fellowship and practical benefits.</p>
<div class="divider"></div>
<!-- Blacksmith's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/blacksmith_guild.png" alt="Blacksmith's Guild" class="faction-img">
<h2>Blacksmith's Guild</h2>
</div>
<div class="faction-content">
<p>
The Blacksmith's Guild is the cornerstone of metalcraft in the city. Its roaring forges produce everything from sturdy tools to formidable weaponry.
Members gain practical training in Smith’s Tools and may even craft or repair equipment at a favourable rate.
</p>
<p>
<strong>D&D 5e Note:</strong> Gain proficiency with Smith's Tools and enjoy discounted forging services.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/buck_harding.png" alt="Buck Harding" class="rep-portrait">
</td>
<td>
<strong>Buck Harding</strong><br>
Master Blacksmith
</td>
<td>
<button class="action-button" onclick="openJoinModal('blacksmith')">Join Guild</button>
<button class="action-button" onclick="requestService('blacksmith')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Carpenter's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/carpenter_guild.png" alt="Carpenter's Guild" class="faction-img">
<h2>Carpenter's Guild</h2>
</div>
<div class="faction-content">
<p>
The Carpenter's Guild provides skilled hands for all manner of woodwork—from the construction of fine furniture to the repair of civic structures.
Membership offers essential training and priority access to seasoned carpenters.
</p>
<p>
<strong>D&D 5e Note:</strong> Gain proficiency with Carpenter's Tools and benefit from reduced repair costs.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/clinton_dean.png" alt="Clinton Dean" class="rep-portrait">
</td>
<td>
<strong>Clinton Dean</strong><br>
Master Carpenter
</td>
<td>
<button class="action-button" onclick="openJoinModal('carpenter')">Join Guild</button>
<button class="action-button" onclick="requestService('carpenter')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Mason's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/mason_guild.png" alt="Mason's Guild" class="faction-img">
<h2>Mason's Guild</h2>
</div>
<div class="faction-content">
<p>
The Mason's Guild oversees the stonework and structural integrity of our city. Its members are adept at shaping stone and brick, ensuring that every building stands strong.
</p>
<p>
<strong>D&D 5e Note:</strong> Gain proficiency with Mason's Tools and receive discounts on construction and repairs.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/ferdinand_braun.png" alt="Ferdinand Braun" class="rep-portrait">
</td>
<td>
<strong>Ferdinand Braun</strong><br>
Master Mason
</td>
<td>
<button class="action-button" onclick="openJoinModal('mason')">Join Guild</button>
<button class="action-button" onclick="requestService('mason')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Tanner's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/tanner_guild.png" alt="Tanner's Guild" class="faction-img">
<h2>Tanner's Guild</h2>
</div>
<div class="faction-content">
<p>
Focused on the processing of hides and leathers, the Tanner's Guild ensures that raw skins are transformed into durable and versatile materials.
Its members perfect the art of tanning with secret techniques and quality dyes.
</p>
<p>
<strong>D&D 5e Note:</strong> Gain proficiency with Leatherworking (Tanning) Tools and enjoy access to rare dyes.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/dorothea_hauer.png" alt="Dorothea Hauer" class="rep-portrait">
</td>
<td>
<strong>Dorothea Hauer</strong><br>
Master Tanner
</td>
<td>
<button class="action-button" onclick="openJoinModal('tanner')">Join Guild</button>
<button class="action-button" onclick="requestService('tanner')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Potter's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/potter_guild.png" alt="Potter's Guild" class="faction-img">
<h2>Potter's Guild</h2>
</div>
<div class="faction-content">
<p>
The Potter's Guild is dedicated to the craft of ceramics. From humble earthenware to exquisite decorative pieces,
its members transform clay into both utilitarian and beautiful objects.
</p>
<p>
<strong>D&D 5e Note:</strong> Gain proficiency with Potter's Tools and benefit from reduced costs on custom ceramics.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/tessa_rae.png" alt="Tessa Rae" class="rep-portrait">
</td>
<td>
<strong>Tessa Rae</strong><br>
Master Potter
</td>
<td>
<button class="action-button" onclick="openJoinModal('potter')">Join Guild</button>
<button class="action-button" onclick="requestService('potter')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Brickmaker's Guild -->
<div class="faction-section">
<div class="faction-header">
<img src="resources/brickmaker_guild.png" alt="Brickmaker's Guild" class="faction-img">
<h2>Brickmaker's Guild</h2>
</div>
<div class="faction-content">
<p>
Brickmakers provide the very building blocks of our city. Through precise craftsmanship and secret recipes,
this guild ensures that bricks meet the highest standards of durability and beauty.
</p>
<p>
<strong>D&D 5e Note:</strong> Learn the art of bricklaying and receive discounts on construction materials.
</p>
</div>
<!-- Representative -->
<table>
<thead>
<tr>
<th>Portrait</th>
<th>Name & Title</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="resources/aleksi_heikkinen.png" alt="Aleksi Heikkinen" class="rep-portrait">
</td>
<td>
<strong>Aleksi Heikkinen</strong><br>
Master Brickmaker
</td>
<td>
<button class="action-button" onclick="openJoinModal('brickmaker')">Join Guild</button>
<button class="action-button" onclick="requestService('brickmaker')">Request Service</button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- HOME BUTTON -->
<a href="caldwell-repo.html" class="home-button">Home</a>
</div>
<!-- Modal Overlay -->
<div id="modalOverlay">
<div class="modal-content">
<button class="close-button" onclick="closeModal()">Close</button>
<h2 id="modalTitle"></h2>
<p id="modalDialogue"></p>
<!-- Membership fee input (shown in join mode) -->
<div id="joinSection" style="display:none;">
<label for="membershipFee">Membership Fee (GP):</label>
<input type="number" id="membershipFee" min="0" value="0" />
<p id="joinResult"></p>
<button class="action-button" onclick="submitMembership()">Apply for Membership</button>
</div>
</div>
</div>
<script>
/*******************************************************************
* GUILD DATA & DEMO FUNCTIONALITY FOR JOINING & SERVICES
*******************************************************************/
const GUILDS = {
blacksmith: {
name: "Blacksmith's Guild",
repName: "Buck Harding",
minFee: 25,
maxFee: 100,
joinSuccessChance: 0.75,
serviceChance: 0.50,
benefits: [
"Gain proficiency with Smith's Tools.",
"Access to the forge at reduced cost.",
"Discount on custom weapon forging."
]
},
carpenter: {
name: "Carpenter's Guild",
repName: "Clinton Dean",
minFee: 20,
maxFee: 80,
joinSuccessChance: 0.80,
serviceChance: 0.55,
benefits: [
"Gain proficiency with Carpenter's Tools.",
"Reduced cost on custom furniture and repairs.",
"Priority access to skilled carpenters."
]
},
mason: {
name: "Mason's Guild",
repName: "Ferdinand Braun",
minFee: 30,
maxFee: 90,
joinSuccessChance: 0.70,
serviceChance: 0.45,
benefits: [
"Gain proficiency with Mason's Tools.",
"Discount on stonework and building maintenance.",
"Access to ancient building techniques."
]
},
tanner: {
name: "Tanner's Guild",
repName: "Dorothea Hauer",
minFee: 15,
maxFee: 60,
joinSuccessChance: 0.85,
serviceChance: 0.50,
benefits: [
"Gain proficiency with Leatherworking (Tanning) Tools.",
"Specialised treatment of hides and leathers.",
"Access to rare dyes and tanning methods."
]
},
potter: {
name: "Potter's Guild",
repName: "Tessa Rae",
minFee: 10,
maxFee: 50,
joinSuccessChance: 0.90,
serviceChance: 0.60,
benefits: [
"Gain proficiency with Potter's Tools.",
"Discount on custom ceramics and earthenware.",
"Access to specialised kilns and clays."
]
},
brickmaker: {
name: "Brickmaker's Guild",
repName: "Aleksi Heikkinen",
minFee: 20,
maxFee: 70,
joinSuccessChance: 0.80,
serviceChance: 0.50,
benefits: [
"Learn the craft of bricklaying and masonry.",
"Discount on construction materials.",
"Access to secret formulas for superior brick quality."
]
}
};
let currentGuildKey = null;
let modalType = null;
// Open modal to join a guild
function openJoinModal(guildKey) {
currentGuildKey = guildKey;
modalType = 'join';
const guild = GUILDS[guildKey];
document.getElementById("modalTitle").textContent = `Join Attempt: ${guild.name}`;
document.getElementById("modalDialogue").textContent = `You approach ${guild.repName} to discuss membership.`;
document.getElementById("joinSection").style.display = "block";
document.getElementById("membershipFee").value = 0;
document.getElementById("joinResult").textContent = "";
document.getElementById("modalOverlay").style.display = "block";
}
// Submit membership fee and determine outcome
function submitMembership() {
const guild = GUILDS[currentGuildKey];
const feeValue = parseInt(document.getElementById("membershipFee").value, 10) || 0;
const joinResult = document.getElementById("joinResult");
// Random threshold between minFee and maxFee
const threshold = getRandomInt(guild.minFee, guild.maxFee);
if (feeValue < threshold) {
joinResult.textContent = `Your fee is too low. ${guild.repName} turns you away. (Estimated fee: ~${threshold} GP)`;
return;
}
// Check success chance
const roll = Math.random();
if (roll <= guild.joinSuccessChance) {
const benefit = pickRandomLine(guild.benefits);
joinResult.textContent = `Success! Membership accepted. You gain a benefit: ${benefit}`;
} else {
joinResult.textContent = `${guild.repName} accepts your fee, but the higher-ups deny your membership.`;
}
}
// Request a guild service
function requestService(guildKey) {
const guild = GUILDS[guildKey];
const roll = Math.random();
if (roll <= guild.serviceChance) {
alert(`${guild.repName} agrees to provide the guild's services. Discuss your needs.`);
} else {
alert(`${guild.repName} is currently unavailable. Please try again later.`);
}
}
// Close the modal
function closeModal() {
document.getElementById("modalOverlay").style.display = "none";
document.getElementById("joinSection").style.display = "none";
}
// Utility: get random integer between min and max (inclusive)
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Utility: pick a random element from an array
function pickRandomLine(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}
</script>
</body>
</html>