forked from npiguet/agotmap
-
Notifications
You must be signed in to change notification settings - Fork 3
/
2ed.html
230 lines (191 loc) · 9.99 KB
/
2ed.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>AGot 2ed - BETA</title>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="extension.css">
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.3.0/lodash.min.js"></script>
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
<script type="text/javascript" src="js/Base64.js"></script>
<script type='text/javascript' src="js/LZString.js"></script>
<script type='text/javascript' src="js/app.js"></script>
<script type='text/javascript' src="js/Map.js"></script>
<script type='text/javascript' src="js/Configuration.js"></script>
<script type='text/javascript' src="js/MainController.js"></script>
<script type='text/javascript' src="js/Deck.js"></script>
<script type='text/javascript' src="js/House.js"></script>
<script type='text/javascript' src="js/Track.js"></script>
<script type='text/javascript' src="js/TrackToken.js"></script>
<script type='text/javascript' src="js/Garrisons.js"></script>
<script type='text/javascript' src="js/Orders.js"></script>
<script type='text/javascript' src="js/Units.js"></script>
<script type='text/javascript' src="js/Tracks.js"></script>
<script type='text/javascript' src="js/PTs.js"></script>
<script type='text/javascript' src="js/Cards.js"></script>
<script type='text/javascript' src="js/Markers.js"></script>
</head>
<body ng-app="app" ng-controller="MainController as vm">
<div class="controls">
<ul class="interfaceControls">
<li>
<label for="toggleUnits">Show/Hide Units on Board</label>
</li>
<li>
<label for="toggleOrders">Show/Hide Orders on Board</label>
</li>
<li>
<label for="togglePowertokens">Show/Hide Powertokens on Board</label>
</li>
<li id="shortLink"><a ng-href="{{vm.shortLink}}" target="_blank" class="cursor-only">{{vm.shortLink}}</a></li>
</ul>
<ul class="nav">
<li>
<label for="utils">Utilities [BETA]</label>
</li>
<li>
<label for="tracks">Influence Tracks/Supply/…</label>
</li>
<li ng-repeat="(key, house) in vm.houses">
<label for="{{key}}Stuff">{{house.name}}: Settings</label>
</li>
</ul>
<input type="radio" name="navContentControl" id="utils" />
<div class="navContent">
<div>
<h2>Action Phase</h3>
<button ng-click="vm.cleanRaids()">Clean Raids</button>
<button ng-click="vm.cleanCombat()">Clean Combat</button>
<button ng-click="vm.resolveCPs()">Resolve CPs</button>
<button ng-click="vm.cleanCPs()">Clean CPs</button>
</div>
<div>
<h2>Westeros Phase</h3>
<div>
<h3>Deck I</h3>
<button ng-click="vm.updateSupply()">Supply</button>
</div>
<div>
<h3>Deck II</h3>
<button ng-click="vm.gameOfThrones()">Game of Thrones</button>
</div>
<div class="deck3">
<h3>Deck III</h3>
<select ng-options="card as (card.name + ': ' + card.description) for (name, card) in vm.deck3cards" ng-model="vm.deck3effectCard">
</select>
</div>
</div>
<div>
<h2>General</h3>
<button ng-click="vm.updateVictory()">Update Victory Track</button>
<button ng-click="vm.validateOrders()">Validate Orders</button>
<button ng-click="vm.validateUnits()">Validate Units</button>
</div>
</div>
<input type="radio" name="navContentControl" id="tracks" />
<div class="navContent">
<label class="fullwidth" ng-repeat="track in vm.tracks">
{{track.name}} Order:
<textarea ng-model="track.positionsText"></textarea>
</label>
<label class="fullwidth">
Supply:
<textarea name="supply" ng-model="vm.supplyText"></textarea>
</label>
<label class="fullwidth">
Victory:
<textarea name="victory" ng-model="vm.victoryText"></textarea>
</label>
<label class="fullwidth">
Garrisons:
<textarea name="garrisons" ng-model="vm.garrisonsText"></textarea>
</label>
<label class="fullwidth">
Wildlings:
<input type="number" ng-model="vm.wildlingPower" step="2" min="0" max="12" value="2" name="wildlings" />
</label>
<label class="fullwidth">
Round:
<input type="number" ng-model="vm.round" step="1" min="1" max="10" value="1" name="round" />
</label>
<label class="fullwidth">
{{vm.trackTokens.vsb.name}} was used:
<input type="checkbox" name="vsb-used" ng-model="vm.trackTokens.vsb.isUsed" />
</label>
<label class="fullwidth">
{{vm.trackTokens.raven.name}} was used:
<input type="checkbox" name="raven-used" ng-model="vm.trackTokens.raven.isUsed" />
</label>
<label class="fullwidth" ng-repeat="(key, house) in vm.houses">
{{house.name}} House Cards:
<textarea name="housecards-{{house._name}}" ng-model="house.cardsImages"></textarea>
</label>
<label class="fullwidth">
House Cards Style:
<input type="text" ng-model="vm.houseCardsStyle" />
</label>
</div>
<div ng-repeat="(key, house) in vm.houses">
<input type="radio" name="navContentControl" id="{{house._name}}Stuff" />
<div class="navContent">
<label class="fullwidth">
Units:
<textarea name="units-{{house._name}}" ng-model="house.unitsText"></textarea>
</label>
<label class="fullwidth">
Orders:
<textarea name="orders-{{house._name}}" ng-model="house.ordersText"></textarea>
</label>
<label class="fullwidth">
Powertokens in Areas:
<textarea name="powertokens-{{house._name}}" ng-model="house.ptsText"></textarea>
</label>
<label class="fullwidth">
Available Power Tokens:
<input name="availablePowertokens-{{house._name}}" ng-model="house.ownedPowerTokens" type="number" min="0" max="20" step="1"
value="5" />
</label>
<span ng-repeat="(index, card) in house.cards">
<input type="checkbox" name="housecard-{{index}}-{{house._name}}" id="housecard-{{index}}-{{house._name}}" ng-model="house.cardsTracking[index]" />
<label for="housecard-{{index}}-{{house._name}}">
<img ng-src="{{card}}" style="{{vm.houseCardsStyle}}" />
</label>
</span>
</div>
</div>
</div>
<!-- Should be inside div.board -->
<div class="board">
<div class="tokenCounts-{{key}} powertoken-{{key}} noselect" ng-repeat="(key, house) in vm.houses">
<div class="availablePowertokens noselect" ng-click="house.spendPowerToken()" title="Click to spend Power Tokens">{{house.ownedPowerTokens}}</div><div class="leftPowertokens noselect" ng-click="house.gainPowerToken(1)" title="Click to gain Power Tokens">{{house.leftPowertokens()}}</div>
</div>
<div ng-repeat="(key, track) in vm.tracks">
<div ng-repeat="(index, house) in track.positions track by $index">
<div class="pos-{{track.token.className}}-{{index+1}} token-{{house}}">
</div>
</div>
</div>
<input type="checkbox" id="toggleUnits" ng-model="vm.showUnits" />
<input type="checkbox" id="toggleOrders" ng-model="vm.showOrders" />
<input type="checkbox" id="togglePowertokens" ng-model="vm.showPowerTokens" />
<div class="wildlingmarker pos-wilding-{{vm.wildlingPower}}" ng-click="vm.increaseWildlingPower()"></div>
<div class="round pos-round-{{vm.round}}" ng-click="vm.increaseRound()"></div>
<div class="supply-{{houseName}} pos-supply-{{count}}" ng-repeat="(houseName, count) in vm.supply"></div>
<div class="victory-{{houseName}} pos-victory-{{count}}" ng-repeat="(houseName, count) in vm.victory"></div>
<div class="{{vm.showUnits?'':'hide-units'}} {{vm.showOrders?'':'hide-orders'}} {{vm.showPowerTokens?'':'hide-pts'}}">
<div ng-repeat-start="(key, house) in vm.houses"></div>
<div class="{{unit.unit}}-{{house._name}} pos-{{unit.area}} unit" ng-repeat="unit in house.units track by $index">
</div>
<div class="order-{{order.order}} pos-{{order.area}}" ng-repeat="order in house.orders track by $index">
</div>
<div class="powertoken-{{house._name}} pos-{{area}}" ng-repeat="area in house.consolidatedAreas track by $index">
</div>
<div ng-repeat-end=""></div>
</div>
<div class="garrison pos-{{garrison.area}}" data-value="{{garrison.str}}" ng-repeat="garrison in vm.garrisons"></div>
<div class="{{key}}-token {{token.isUsed ? 'used' : ''}}"
ng-click="token.invert()"
ng-repeat="(key, token) in vm.trackTokens"></div>
</div>
</body>
</html>