This repository has been archived by the owner on Jun 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
199 lines (199 loc) · 8.76 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
<!DOCTYPE HTML>
<html lang=en-US>
<head>
<meta charset=UTF-8>
<title>The Sun King</title>
<link rel=icon type=image/x-icon href=resources/favicon.ico>
<link rel=stylesheet type=text/css href=includes/style.css>
<script type=text/javascript src=includes/main.js></script>
<script type=text/javascript src=includes/events.js></script>
<script type=text/javascript src=includes/actions.js></script>
</head>
<body id=body class="centered float-center">
<table>
<tr><td class=pad-top>
<div class="card mar-hor">
<h1 class=float-left>
<img width=40 height=40 src=resources/coa.png>
The Sun King
</h1>
<span class=float-right>
<button id=btnTurn class=button onclick=newTurn() style=display:none>Next Turn</button>
<button id=btnGame class=button onclick=game()>Return to Game</button>
<button id=btnHelp class=button onclick=help()>Help</button>
<button id=btnInit class=button onclick=init()>New Game</button>
</span>
</div>
</td></tr><tr><td class=pad-bottom>
<table id=divGame class=mar-left>
<tr><td class=pad-top colspan=2>
<div class="card mar-right">
<h2>
<img width=24 height=24 src=resources/event.png>
Event
</h2>
<ul>
<li id=evtTxt style=width:512px>Event text goes here.</li>
<ul id=ulBtnEvt>
<li><button id=btnEvt1 class=button onclick=handleBtnEvt1() style=width:512px>Option1</button></li>
<li><button id=btnEvt2 class=button onclick=handleBtnEvt2() style=width:512px>Option2</button></li>
</ul>
<li id=liEvtOpt><br><b>Option selected:</b> <span id=spanEvtOpt>N/A</span></li>
</ul>
</div>
</td></tr><tr><td>
<table>
<tr><td class=pad-top><div class="card mar-right" style=min-width:384>
<h2>
<img width=24 height=24 src=resources/parliament.png>
Parliament
</h2>
<table>
<tr>
<td><img width=16px height=16px src=resources/nobles.png alt=Nobility></td>
<td> <span id=spanApprovalNobles>67</span>% Approval</td>
<tooltip>Your approval rate among the nobility.</tooltip>
</tr><tr>
<td><img width=16px height=16px src=resources/clergy.png alt=Clergy></td>
<td> <span id=spanApprovalClergy>50</span>% Approval</td>
<tooltip>Your approval rate among the clergy.</tooltip>
</tr><tr>
<td><img width=16px height=16px src=resources/common.png alt=Commoners></td>
<td> <span id=spanApprovalCommon>33</span>% Approval</td>
<tooltip>Your approval rate among the commoners.</tooltip>
</tr>
</table>
</div></td></tr>
<tr><td class=pad-top><div class="card mar-right" style=min-width:384>
<h2>
<img width=24 height=24 src=resources/pna.png>
Policies & Actions
</h2>
<ul>
<li><h3><u>Taxes</u></h3></li>
<li>
<img width=16px height=16px src=resources/nobles.png alt=Nobility>
<input id=slideTaxRateNobles type=range min=0 max=100 step=1 value=10 onchange=handleSlideTaxRateNobles()>
<span id=spanTaxRateNobles>10</span>%
<tooltip>Tax rate for the nobility.</tooltip>
</li><li>
<img width=16px height=16px src=resources/clergy.png alt=Clergy>
<input id=slideTaxRateClergy type=range min=0 max=100 step=1 value=10 onchange=handleSlideTaxRateClergy()>
<span id=spanTaxRateClergy>0</span>%
<tooltip>Tax rate for the clergy.</tooltip>
</li><li>
<img width=16px height=16px src=resources/common.png alt=Commoners>
<input id=slideTaxRateCommon type=range min=0 max=100 step=1 value=10 onchange=handleSlideTaxRateCommon()>
<span id=spanTaxRateCommon>10</span>%
<tooltip>Tax rate for the commoners.</tooltip>
</li><li>
<hr>
</li><li><h3><u>Finance</u></h3></li>
<li>Current loans: <span loansCurrent>0</span></li>
<li>
<button id=btnLoanTake class=button onclick=loanTake() >Take a Loan </button>
<button id=btnLoanRepay class=button onclick=loanRepay()>Repay a Loan</button>
</li>
</ul>
</div></td></tr>
<tr><td class=pad-top><div class="card mar-right" style=min-width:384>
<h2>
<img width=24 height=24 src=resources/overview.png>
Overview
</h2>
<ul>
<li>Year: <span id=spanYearCurrent>1700</span></li>
<li>Turn: <span id=spanTurnCount>0</span></li>
<li>Population: <span id=spanPopulationTotal>21000000</span></li>
</ul>
</div></td></tr>
</table>
</td><td class=pad-top><div class="card mar-right" style=min-width:384>
<h2>
<img width=24 height=24 src=resources/accounting.png>
Accounting
</h2>
<table>
<tr>
<td><b>Current Treasury: </b></td>
<td><span class=float-left><b>£</b></span><span id=spanTreasuryCurrent class=float-right><b>0</b></span></td>
</tr><tr>
<td colspan=2><hr></td>
</tr><tr>
<td colspan=2><h3><u>Receipts:</u></h3></td>
</tr><tr>
<td>Noble Tax: </td>
<td><span class=float-left>£</span><span id=spanTaxAmtNobles class=float-right>0</span></td>
</tr><tr>
<td>Clergy Tax: </td>
<td><span class=float-left>£</span><span id=spanTaxAmtClergy class=float-right>0</span></td>
</tr><tr>
<td>Commoner Tax: </td>
<td><span class=float-left>£</span><span id=spanTaxAmtCommon class=float-right>0</span></td>
</tr><tr>
<td><b>Total Tax: </b></td>
<td><span class=float-left><b>£</b></span><span id=spanTaxAmtTotal class=float-right><b>0</b></span></td>
</tr><tr>
<td><b>From Events: </b></td>
<td><span class=float-left><b>£</b></span><span id=spanReceiptEvt class=float-right><b>0</b></span></td>
</tr><tr>
<td colspan=2><hr></td>
</tr><tr>
<td colspan=2><h3><u>Outlays:</u></h3></td>
</tr><tr>
<td>Loan Interest: </td>
<td><span class=float-left>£</span><span id=spanOutlayInterest class=float-right>0</span></td>
</tr><tr>
<td>From Events: </td>
<td><span class=float-left>£</span><span id=spanOutlayEvt class=float-right>0</span></td>
</tr><tr>
<td>From Corruption: </td>
<td><span class=float-left>£</span><span id=spanOutlayCorrupt class=float-right>0</span></td>
</tr><tr>
<td colspan=2><hr></td>
</tr><tr>
<td colspan=2><h3><u>Summary:</u></h3></td>
</tr><tr>
<td>Total Receipts: </td>
<td><span class=float-left>£</span><span id=spanReceiptTotal class=float-right>0</span></td>
</tr><tr>
<td>Total Outlays: </td>
<td><span class=float-left>£</span><span id=spanOutlayTotal class=float-right>0</span></td>
</tr><tr>
<td><b>Net Change: </b></td>
<td><span class=float-left><b>£</b></span><span id=spanNetChange class=float-right><b>0</b></span></td>
</tr><tr>
<td colspan=2><hr></td>
</tr><tr>
<td><b>Future Treasury: </b></td>
<td><span class=float-left><b>£</b></span><span id=spanTreasuryFuture class=float-right><b>0</b></span></td>
</tr>
</table>
</div></td></tr>
</table>
</td></tr><tr id=divHelp><td class=pad-top style=width:512px>
<div class="card mar-full" style=display:none>
<h2>Helptext</h2>
<p>You play as the ruler of France in the 1700s and must try to control the people and
stay in power for as long as possible. You will be presented with various issues of the
state which you must decide on. Your decisions will affect your approval ratings for
each of the three estates: the Noblity, the Clergy, and the Commoners. If your approval
rating for one group gets too low they will overthrow you. You also control the amount
each estate is taxed, but be careful. Raising taxes gets you more money, but it also
decreases approval rating and increases the money lost to corruption. You can also raise
money by taking loans, but these will have to be payed back wih interest.</p>
</div>
</td></tr><tr id=divGameOver><td class=pad-top style=width:512px>
<div class="card mar-full" style=display:none>
<h2>Game Over</h2>
<p>Vive la revolución!</p>
<p>Turns Reigned: <span id=spanTurnsReigned>0</span></p>
</div>
</td></tr>
</table>
<script>
init();
playMusic();
</script>
</body>
</html>