-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
433 lines (405 loc) · 16.9 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dragon Tax Return Simulator 2015</title>
<link type="text/css" rel="stylesheet" href="styles.css"/>
<script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.min.js"></script>
</head>
<body>
<div id="loadscreen">
<div>Loading...</div>
</div>
<div id="timer">
<div id="time">9:59</div>
</div>
<button id="button-ready" class="button-ready">I'm finished.</button>
<article class="sticky">
<div>
Taxes are due in ten minutes!!!
</div>
</article>
<article class="tax-form d1045 official">
<div>
<form id="d1045">
<header>
<h1>D-1045 Hoard Income Tax</h1>
<span class="dnw">Do not write in this space <input id="dnw"></span>
</header>
<table>
<tbody>
<tr><th rowspan="6">Hoard Gross Income</th>
<td><label><em>A1.</em><span>Gold Coins</span></label></td><td><input id="a1"></td></tr>
<tr><td><label><em>A2.</em><span>Precious Gems</span></label></td><td><input id="a2"></td></tr>
<tr><td><label><em>A3.</em><span>Magic Items</span></label></td><td><input id="a3"></td></tr>
<tr><td><label><em>A4.</em><span>Artwork</span></label></td><td><input id="a4"></td></tr>
<tr><td><label><em>A5.</em><span>Other</span></label></td><td><input id="a5"></td></tr>
<tr><td><label><em>A6.</em><span>Add lines A1 through A5</span></label></td><td><input id="a6"></td></tr>
</tbody>
<tbody>
<tr><th rowspan="7">Mayhem Adjustement</th>
<td><label><em>B1.</em><span>Agricultural Mayhem</span></label></td><td><input id="b1"></td></tr>
<tr><td><label><em>B2.</em><span>Provincial Mayhem</span></label></td><td><input id="b2"></td></tr>
<tr><td><label><em>B3.</em><span>Add lines B1 and B2</span></label></td><td><input id="b3"></td></tr>
<tr><td><label><em>B4.</em><span>Divide line B3 by ten</span></label></td><td><input id="b4"></td></tr>
<tr><td><label><em>B5.</em><span>Noble Mayhem</span></label></td><td><input id="b5"></td></tr>
<tr><td><label><em>B6.</em><span>Divide line B5 by two</span></label></td><td><input id="b6"></td></tr>
<tr><td><label><em>B7.</em><span>Add lines B4 and B6</span></label></td><td><input id="b7"></td></tr>
</tr>
</tbody>
<tbody>
<tr><th rowspan="2">Taxes owed</th>
<td><label><em>C1.</em><span>Add lines A6 and B7</span></label></td><td><input id="c1"></td></tr>
<tr><td><label><em>C2.</em><span>Divide line C1 by ten. This is your tax owed.</span></label></td><td><input id="c2"></td></tr>
</tbody>
</table>
<div class="ouo">Space below this line for official use only.</div>
</form>
</div>
</article>
<article class="ledger">
<div>
<h1>Hoard Ledger</h1>
<table id="ledger-table">
<tr><th>Date</th><th>Description</th><th>Amount</th><th>Gold Balance</th></tr>
</table>
</div>
</article>
<div id="intro" class="dialog js-show">
<div>
<h1>Dragon Tax Return Simulator 2015</h1>
<p>Welcome to a world of fantasy and magic! A world of mysterious humanoids like the erks, the drevs, the gronks, and the glorns. And above them all, high in mountain peaks, dwell the majestic dragons. In this game you will see through the eyes of one of these magnificent creatures.</p>
<p>Dragons are wise, powerful, and long-lived but their pride brings them into conflict with other intelligent races. In 2008 D.Y. the High Dragon Council instituted a system of taxes and penalties to establish a facade of order, aid them in diplomatic negotiations to prevent all out war between the dragons and the humanoid peoples, and funnel the vast wealth of the dragons to themselves.</p>
<p>As majestic as you may be, you're just an average dragon and in no position to oppose the council's decrees. You've procrastinated once again and now there are just ten minutes until the courier arrives to collect your tax forms. Can you finish them in time? Grab a pen, paper, and a calculator, and press the "I'm ready!" button when you're ready to begin!
</p>
<div class="buttons"><button class="button-go">I'm ready!</button><button class="button-help">Wait, how do I play?!</button></div>
</div>
</div>
<div id="howto" class="dialog js-hide">
<div>
<h1>How to Play</h1>
<p>The goal of the game is to complete your D-1045 form on time without any errors. You can drag documents around with your mouse. Follow the instructions included with the form for an explanation of how to complete each line item.</p>
<p>A pen and paper will be handy.</p><p>A calculator is also highly recommended.</p>
<button class="button-go">I'm Ready!</button>
</div>
</div>
<div id="courier" class="dialog js-hide">
<div>
<h1>Times up!</h1>
<p>The official council tax courier arrives for your tax forms and payment.</p>
<div class="buttons">
<button class="button-finish">Here you go!</button>
<button class="button-go">Please hold on! I need five more minutes!</button>
</div>
</div>
</div>
<div id="report" class="dialog js-hide">
<div>
<h1>Assessment</h1>
<p>A few days later, over tea, you look over your paperwork with your friend, Verna Fairwing, Professional Dragon Accountant (PDA). She gives you an assessment of your return.
<h2>Breakdown</h2>
<ul id="final-report"></ul>
<h2>Tips</h2>
<ul id="tips"></ul>
<p class="thanks">Thanks for playing!</p>
<button class="button-view">View Report</button>
</div>
</div>
<article id="solution-page" class="print-only">
<div>
<h1>Dragon Tax Return Simulator 2015</h1>
<h2>Answer Check Table for Print and Play</h2>
<p> Match the column and row on the table below with the line items on your D-1045. For example, your result for line A1 should match the value at column A, row 1. (Lines that do not exist on the chart have been filled with random values)</p>
</div>
</article>
<script id="farmer-complaint-note" type="text/x-handlebars-template">
<article class="complaint-note font-variant-{{random 3}} font-size-variant-{{random 3}} paper-style-variant-{{random 3}} paper-shade-variant-{{random 4}}">
<div>Hey {{dragonEpithet}}!
<br/>
<p>{{exasperatedComplaint}}
You burnt up {{value}} gold worth of my crops!
{{farmerAppeal}}
{{peasantNotice}}
{{partingShot}}</p>
<p>{{randomName}}, {{location}}</p>
<p>P.S. {{grovelling}}</p>
</div>
</article>
</script>
<script id="herder-complaint-note" type="text/x-handlebars-template">
<article class="complaint-note font-variant-{{random 3}} font-size-variant-{{random 3}} paper-style-variant-{{random 3}} paper-shade-variant-{{random 4}}">
<div>Hey {{dragonEpithet}}!
<br/>
<p>{{exasperatedComplaint}}
You gobbled up {{value}} gold worth of my herds!
{{herderAppeal}}
{{peasantNotice}}
{{partingShot}}</p>
<p>{{randomName}}, {{location}}</p>
<p>P.S. {{grovelling}}</p>
</div>
</article>
</script>
<script id="townie-complaint-note" type="text/x-handlebars-template">
<article class="complaint-note font-variant-{{random 4}} font-size-variant-{{random 3}} paper-style-variant-{{random 3}} paper-shade-variant-{{random 4}}">
<div>Hey {{dragonEpithet}}!
<br/>
<p>{{exasperatedComplaint}}
{{#if shopName}}
{{#if isBar}}
{{gripe "barkeeper"}}
{{else}}
{{gripe "shopkeeper"}}
{{/if}}
{{else}}
{{gripe "townie"}}
{{/if}}
I'm filing a complaint with the council for {{withCommas value}} G worth of damages!
{{partingShot}}</p>
<p>{{randomName}}{{#if shopName}}<br>{{shopName}}{{/if}}<br>{{location}}</p>
{{#if shopName}}{{else}}<p>P.S. {{grovelling}}{{/if}}</p>
</div>
</article>
</script>
<script id="shopkeeper-complaint" type="text/x-handlebars-template">
<article class="shopkeeper-complaint logo-font-variant-{{random 3}} symbol-variant-{{random 3}} paper-style-variant-{{random 5}} paper-shade-variant-{{random 4}} header-variant-{{random 3}} {{#if isTavern}}tavern{{/if}}">
<header>
<span class="symbol">{{randomLetter}}</span>
<h1>{{shopName}}</h1>
<span>{{location}}</span>
</header>
<p class="date">{{randomHumanoidDate}}</p>
<p>Dear Dragon,</p>
<p>{{#if isBar}}
{{gripe "barkeeper"}}
{{else}}
{{gripe "shopkeeper"}}
{{/if}}
I've filed a complaint with the council for {{withCommas value}} G worth of damages!
{{partingShot}}
<p class="sig">{{name}}<br>{{shopName}}<br>{{location}}</p>
</p>
</article>
</script>
<script id="royal-complaint" type="text/x-handlebars-template">
<article class="royal-complaint font-variant-{{random 4}} font-size-variant-{{random 3}} paper-shade-variant-{{random 4}} paper-style-variant-{{random 5}} {{location}}">
<div>
<img src="i/{{location}}.png"/ >
<p class="date">{{randomHumanoidDate}}</p>
<p class="to">Dear Dragon,</p>
<p class="body">I write to remind you that you have encroached upon the lands of {{title}} {{name}} of {{location}}. This infraction has not gone unnoticed. Be advised that the High Dragon Council has been notified of damages in the sum of {{withCommas value}} G. Please be more discreet in your future undertakings.</p>
<p class="from">{{aide}}{{fancyTitle 0.5}}<br>{{aideTitle}} to the {{title}}</p>
</div>
</article>
</script>
<script id="magic-appraisal-report" type="text/x-handlebars-template">
<article class="appraisal-report official">
<div>
<header>
<p>Draknaz Werntooth</p>
<p>Draconian Board of Valuology</p>
<p>232 Peak Lane, Snowy Mountain, Northlands</p>
<h1>Appraisal Report</h1>
<br/><em>Description of Article:</em>
<br/>Magic {{item}}, {{runed}} with {{runes}} runes, enchanted with {{enchantment}} magic.
<br/>
<br/><em>Quality:</em> {{quality}}
<br/><em>Aura Type:</em> {{aura}}
<br/><em>Condition:</em> {{condition}}
<br/><em>Value:</em> {{withCommas value}} G
<footer>
<span class="sigline">Appraised by Certified Valuator <span class="sig">Draknaz Werntooth</span></span>
</footer>
</div>
</article>
</script>
<script id="art-appraisal-report" type="text/x-handlebars-template">
<article class="appraisal-report official">
<div>
<header>
<p>Draknaz Werntooth</p>
<p>Draconian Board of Valuology</p>
<p>232 Peak Lane, Snowy Mountain, Northlands</p>
<h1>Appraisal Report</h1>
<br/><em>Description of Article:</em>
<br/>{{descriptor}} {{item}} depicting a {{adjective}} {{subject}}.
<br/>
<br/><em>Quality:</em> {{quality}}
<br/><em>Condition:</em> {{condition}}
<br/><em>Value:</em> {{withCommas value}} G
<footer>
<span class="sigline">Appraised by Certified Valuator <span class="sig">Draknaz Werntooth</span></span>
</footer>
</div>
</article>
</script>
<script id="treasure-appraisal-report" type="text/x-handlebars-template">
<article class="appraisal-report official">
<div>
<header>
<p>Draknaz Werntooth</p>
<p>Draconian Board of Valuology</p>
<p>232 Peak Lane, Snowy Mountain, Northlands</p>
<h1>Appraisal Report</h1>
<br/><em>Description of Article:</em>
<br/>{{adjective}} {{item}}.
<br/>
<br/><em>Quality:</em> {{quality}}
<br/><em>Condition:</em> {{condition}}
<br/><em>Value:</em> {{withCommas value}} G
<footer>
<span class="sigline">Appraised by Certified Valuator <span class="sig">Draknaz Werntooth</span></span>
</footer>
</div>
</article>
</script>
<script id="ledger-row" type="text/x-handlebars-template">
<tr><td>{{date}}</td><td>{{description}}</td><td>{{currency amount}}</td><td>{{currency balance}}</td></tr>
</script>
<script id="main-tax-instructions" type="text/x-handlebars-template">
<article class="main-tax-instructions p1 instructions official">
<div>
<h1>Instructions for filling out Form D-1045</h1>
<p>Page 1 of 3</p>
<h2>Section A</h2>
<h3>Gross Income</h3>
<p>Income from Gold, gems, and treausures.</p>
<h2>Line A1</h2>
<h3>Gold coins</h3>
<p>Total value of gold coins you aquired this year. Only include cash on this line.</p>
<h2>Line A2</h2>
<h3>Precious Gems</h3>
<p>Diamonds, Emeralds, Rubies, Sapphires, and Opals must be reported. This year’s values are in the following table:</p>
<table>
<thead>
<tr>
<th>Gemstone</th>
<th>2015 Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Diamond</td>
<td>{{withCommas rates.diamond}} G each</td>
</tr>
<tr>
<td>Emerald</td>
<td>{{withCommas rates.emerald}} G each</td>
</tr>
<tr>
<td>Ruby</td>
<td>{{withCommas rates.ruby}} G each</td>
</tr>
<tr>
<td>Sapphire</td>
<td>{{withCommas rates.sapphire}} G each</td>
</tr>
<tr>
<td>Opal</td>
<td>{{withCommas rates.opal}} G each</td>
</tr>
</tbody>
</table>
<h2>Line A3</h2>
<h3>Magic Items</h3>
<p>All newly acquired magical items, regardless of value, must be reported with the following exceptions. Items enchanted with {{rules.exemptClasses.enchantments.[0]}} or {{rules.exemptClasses.enchantments.[1]}} magic need not be reported. Items with {{rules.exemptClasses.auras.[0]}} or {{rules.exemptClasses.auras.[1]}} auras are excepted as well. Finally, items with {{rules.exemptClasses.runes.[0]}} or {{rules.exemptClasses.runes.[1]}} runes are also excepted. Please see a certified valuator for valuing your treasures.</p>
<h2>Line A4</h2>
<h3>Artwork</h3>
<p>All newly acquired paintings, sculptures, tapestries, or vases valued at over {{withCommas rules.exemptionLimits.art}} G must be reported. Please note, figurines are not considered sculptures. Please see a certified valuator for valuing your treasures.</p>
<h2>Line A5</h2>
<h3>Other</h3>
Any other newly acquired treasures valued at over {{withCommas rules.exemptionLimits.treasure}} G must also be reported. Please see a certified valuator for valuing your treasures.</p>
<h2>Line A6</h2>
<p>This is the sum of lines A1 through A5.
This is your Hoard Gross Income for this year.</p>
</div>
</article>
<article class="main-tax-instructions instructions p2 official">
<div>
<h1>Instructions for filling out Form D-1045</h1>
<p>Page 2 of 3</p>
<h2>Section B</h2>
<h3>Mayhem Adjusted Income</h3>
<p>In an effort to maintain harmony and avoid all out war with the ground-dwelling races, tax penalties are assessed on certain types of mayhem. Records are kept of all grievances reported to the high dragon council. If you fail to report non-execpted mayhem you will be found in contempt of the council.</p>
<h2>Line B1</h2>
<h3>Agricultural Mayhem</h3>
<p>All damages to crops valued at over {{withCommas rules.exemptionLimits.crops}} G and all damages to livestock valued at over {{withCommas rules.exemptionLimits.herds}} G must be reported.</p>
<h2>Line B2</h2>
<h3>Provincial Mayhem</h3>
<p>All complaints from shopkeepers and other townsefolke valued at {{withCommas rules.exemptionLimits.provincial}} and over must be reported.</p>
<h2>Line B3</h2>
<h3>Commoner Mayhem Subtotal</h3>
<p>Line B1 plus line B2. All non-excepted damage to commoners.</p>
<h2>Line B4</h2>
<h3>Commoner Mayhem Adjustment</h3>
<p>Line B3 divided by ten. The typical 10% rate. Always round down.</p>
<h2>Line B5</h2>
<h3>Noble Mayhem</h3>
<p>Please report all damages to property of Kings, Queens, Princes, and Princesses, and other nobles. Damages against {{rules.exemptClasses.nobles.[0]}}s and {{rules.exemptClasses.nobles.[1]}}es are excepted and do NOT need to be reported.</p>
<h2>Line B6</h2>
<h3>Noble Mayhem Adjustment</h3>
<p>Line B5 divided by two. A special 50% rate as a token of our respect for nobles of the ground-dwelling races. Always round down.</p>
<h2>Line B7</h2>
<h3>Mayhem Adjustment</h3>
<p>Line B3 plus line B5. This is the penalty that will be added to your income for taxation purposes.</p>
</article>
<article class="main-tax-instructions instructions p3 official">
<div>
<h1>Instructions for filling out Form D-1045</h1>
<p>Page 3 of 3</p>
<h2>Section C</h2>
<h3>Amount Owed</h3>
<p>You're almost done. It's time to see what you owe.</p>
<h2>Line C1</h2>
<h3>Mayhem Adjusted Gross Income</h3>
<p>Line A6 plus line B7. This is your hoard gross income plus your mayhem adjustment.</p>
<h2>Line C2</h2>
<h3>Taxes Owed</h3>
<p>Line C1 divided by ten. Always round down.</p>
<p><b>Please pay this amount to the official tax courier on the spot.</b></p>
</article>
</script>
<script id="detailed-report" type="text/x-handlebars-template">
<article class="detailed-report">
<header>
<p>Verna Fairwing, Professional Dragon Accountant</p>
<p>12 West Road, Old Forest Peak #6, Northlands</p>
</header>
<table>
<tr>
<td>Tax Report</td>
<td>Page {{pageNo}}</td>
</tr>
</table>
{{#each pageContents}}
<h3>Line {{@key}}</h3>
<h3>-------------</h3>
<table>
{{#each entries}}
<tr>
<td>{{description}}<br><em>{{exceptionReason}}</em></td>
<td>{{withCommas goldValue}} G</td>
</tr>
{{/each}}
</tr>
<td>Total:</td></td></td>
<td>{{withCommas this.total}} G</td>
</tr>
{{#if this.error}}
<tr class="error">
{{else}}
<tr>
{{/if}}
<td>You put: </td>
<td>{{formatInput this.youPut}}</td>
</tr>
</table>
{{/each}}
</article>
</script>
<script src="dragon-drop.js"></script>
<script src="dragon-taxes.js"></script>
</body>
</html>