-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
642 lines (582 loc) · 46.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
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
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
<!DOCTYPE html>
<html ng-app="dopeslingerApp">
<head>
<title>Dope Slinger Tycoon</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="Awesome free browser game where you take the role of an underworld kingpin">
<meta name="keywords" content="Incremental game,JavaScript,Game,Clicker,Idle,Tycoon,Sim">
<meta name="author" content="jamesgittins.com">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#fff">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/dopeslinger.css">
<link rel="stylesheet" href="css/night-mode.css">
<script src='https://cdn1.kongregate.com/javascripts/kongregate_api.js'></script>
<script src="js/jquery.min.js"></script>
<script src="js/lz-string.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/angular-sanitize.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/seedrandom.min.js"></script>
<script src="js/jg-progress.js"></script>
<script src="js/angulardope.js"></script>
<script>
if(window.self !== window.top &&
document.referrer != "" &&
document.referrer.indexOf("kongregate.com") == -1 &&
document.referrer.indexOf("konggames.com") == -1 &&
document.referrer.indexOf("gti.nz") == -1 &&
document.referrer.indexOf("jamesgittins.com") == -1) {
window.location = "http://www.youtube.com/watch_popup?v=oHg5SJYRHA0";
}
var alwaysShowScroll = false;
var isFixed = false;
var scrollMenu = function() {
// Stick the #nav to the top of the window
$(window).scroll(fadeTop);
};
function fadeTop() {
var nav = $('div.cash-top');
var navHomeY = $("#cash-wrap").offset().top + ($("#cash-wrap").height() / 2);
var scrollTop = $(window).scrollTop();
var shouldBeFixed = scrollTop > navHomeY || alwaysShowScroll;
if (shouldBeFixed && !isFixed) {
nav.fadeIn();
isFixed = true;
} else if (!shouldBeFixed && isFixed) {
nav.fadeOut();
isFixed = false;
}
fixTopPadding();
}
function fixTopPadding() {
if (alwaysShowScroll) {
document.getElementsByTagName("BODY")[0].style.paddingTop = ($('div.cash-top').height() + 10) + "px";
}
}
$(window).off('resize').on('resize',function(){
$('.btn-group').each(function(){
var height = 0;
$(this).find('button').each(function(){
$(this).height('auto');
if ($(this).height() > height)
height = $(this).height();
});
$(this).find('button').each(function(){
if (height > 0)
$(this).height(height);
});
});
});
toggleTooltip = function(element) {
if ($(element).hasClass('jg-tooltip')) {
$(element).closest('div').next().slideToggle(200,function(){
$(element).toggleClass('jg-tooltip');
});
} else {
$(element).toggleClass('jg-tooltip').closest('div').next().slideToggle(200);
}
};
resetGame = function () {
localStorage.clear();
window.location.reload();
};
var kongResize = false;
kongregateAPI.loadAPI(function(){
window.kongregate = kongregateAPI.getAPI();
// You can now access the Kongregate API with:
// kongregate.services.getUsername(), etc
// Proceed with loading your game...
if (kongResize) {
kongregate.services.resizeGame(1600, 1080);
}
});
</script>
</head>
<body ng-controller="DopeController" ng-class="{'work-mode' : options.workMode, 'top-hidden' : options.hideTop, 'night-mode' : options.nightMode, 'kongregate' : options.kongregateLargeWindow}" ng-animate-children>
<div class="cash-top" style="display:none;">
<div class="container">
<div class="strong row">
<div class="col-xs-12 col-sm-6 text-center">
Money:
<span class="current-cash">{{gameModel.cash|money}}</span>
<span class="glyphicon" ng-class="cashPerSecond > 0 ? 'glyphicon-arrow-up production-header' : 'glypicon-arrow-down muscle-header'"></span>
<span ng-class="cashPerSecond > 0 ? 'production-header' : 'muscle-header'">{{cashPerSecond|money}} / sec</span>
</div>
<div class="col-xs-12 col-sm-6 text-center">
Respect:
<span class="current-cash">{{gameModel.respect|respect}}</span>
<span class="glyphicon glyphicon-arrow-up muscle-header" ng-show="gameModel.respectPerSecond > 0"></span>
<span class="muscle-header" ng-show="gameModel.respectPerSecond > 0">{{gameModel.respectPerSecond|respect}} / sec</span>
</div>
<p class="distribution strong col-xs-12 col-sm-6" ng-show="gameModel.buff && options.hideTop">{{buffMsg}}</p>
<p class="distribution strong col-xs-12 col-sm-6" ng-show="levelUpMsg && options.hideTop">{{levelUpMsg}}</p>
<p class="distribution strong col-xs-12 col-sm-6" ng-repeat="dealer in gameModel.dealers" ng-show="dealer.arrested && options.hideTop">{{dealer.arrestMessage}}</p>
</div>
</div>
</div>
<div class="container main-container">
<div class="row">
<div>
<div class="col-xs-12 col-sm-9 col-md-10">
<h1 class="street" ng-class="{'hidden' : options.workMode || options.hideTop}"><span class="production-header">Dope</span> <span class="distribution-header">slinger</span> <span class="muscle-header">tycoon</span></h1>
</div>
<div class="col-xs-12 col-sm-3 col-md-2" ng-if="!options.hideTop">
<button onclick="$('#optionsModal').modal('show');" class="btn btn-default options-button"><span class="iconred glyphicon glyphicon-cog"></span> Options</button>
<button ng-click="hideTop()" class="btn btn-default"><span class="glyphicon glyphicon-eye-close icongreen"></span> Hide Title</button>
</div>
<div class="col-xs-12 col-sm-6" id="cash-wrap" >
<p ng-show="!options.workMode" ng-class="{'hidden' : options.hideTop}"><strong>Buy cannabis plants to grow weed. Hire dealers to sell the weed. Hire muscle to earn respect. Use respect to expand your territory or negotiate better prices.</strong></p>
<div class="strong" ng-class="{'hidden' : options.hideTop}">
Current cash:
<span class="current-cash">{{gameModel.cash|money}}</span>
<span class="glyphicon" ng-class="cashPerSecond > 0 ? 'glyphicon-arrow-up production-header' : 'glypicon-arrow-down muscle-header'"></span>
<span ng-class="cashPerSecond > 0 ? 'production-header' : 'muscle-header'">{{cashPerSecond|money}} / sec</span>
</div>
<p class="strong" ng-class="{'hidden' : options.hideTop}">Total earned {{gameModel.totalCashEarned|money}}</p>
<p class="strong" ng-class="{'hidden' : options.hideTop}">
Current respect: <span class="current-cash">{{gameModel.respect|respect}}</span>
<span class="glyphicon glyphicon-arrow-up muscle-header" ng-show="gameModel.respectPerSecond > 0"></span>
<span class="muscle-header" ng-show="gameModel.respectPerSecond > 0">{{gameModel.respectPerSecond|respect}} / sec</span>
</p>
<p class="strong" ng-show="kingpins.length > 0">You have {{kingpins.length}} Kingpin{{kingpins.length > 1 ? "s" : ""}}, giving you a {{kingpins.length * 100}}% bonus to all drug and respect production</p>
</div>
<div class="col-xs-12 col-sm-6" ng-if="!options.hideTop">
<p class="distribution strong" ng-show="gameModel.buff">{{buffMsg}}</p>
<p class="distribution strong" ng-show="levelUpMsg">{{levelUpMsg}}</p>
<p class="distribution strong" ng-repeat="dealer in gameModel.dealers" ng-show="dealer.arrested">{{dealer.arrestMessage}}</p>
</div>
</div>
<div class="clearfix"></div>
<ul class="nav nav-tabs visible-xs">
<li role="presentation" ng-class="{'active':currentTab == 'production'}"><a class="production-header strong" ng-click="currentTab = 'production'">Production</a></li>
<li role="presentation" ng-class="{'active':currentTab == 'distribution'}"><a class="distribution-header strong" ng-click="currentTab = 'distribution'">Distribution</a></li>
<li role="presentation" ng-class="{'active':currentTab == 'muscle'}"><a class="muscle-header strong" ng-click="currentTab = 'muscle'">Muscle</a></li>
</ul>
<div class="col-xs-12 col-sm-4 production col-pad-5" ng-class="{'hidden-xs':currentTab != 'production'}">
<h3 class="strong production-header">Production</h3>
<div ng-repeat="upgrade in drugResearch | orderBy:'price'" class="mb-10 research-anim">
<div class="btn-group" style="width:100%;" role="group">
<button ng-click="purchaseUpgrade(upgrade)" style="width:85%;" class="btn btn-default btn-production" ng-disabled="gameModel.cash < upgrade.price * discountMulti()" type="button">
<span class="glyphicon icongreen" ng-class="upgrade.glyph"></span> {{upgrade.name}} (<strong>{{upgrade.price * discountMulti()|money}}</strong>)
</button>
<button class="btn btn-default btn-production text-center" style="width:15%;padding:6px 0;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none"><p class="jg-tooltip">{{upgrade.tooltip}}</p></div>
<progressbar animate="false" value="cashPercentage(upgrade.price * discountMulti())" ng-class="gameModel.cash < upgrade.price * discountMulti() ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
<div class="clearfix"></div>
</div>
<div class="row">
<div class="col-xs-12 drug-element" ng-repeat="drug in gameModel.drugs track by $index" ng-class="{'col-lg-6' : options.kongregateLargeWindow}">
<div class="drug-anim">
<div class="drug" ng-click="selectDrug(drug)" ng-class="{'open' : drug.selected}">
<span class="glyphicon glyphicon-warning-sign pull-left" ng-show="drugSoldPerSecond(drug) >= drugMadePerSecond(drug)" style="font-size:18px;margin-right:-10px;"></span>
<strong>{{drug.name}} {{drug.qty|weight}}</strong>
<span class="glyphicon" ng-class="drug.selected ? 'glyphicon-chevron-up' : 'glyphicon-chevron-down'"></span>
</div>
<div class="drug-content row" ng-class="{'content-open':drug.selected}">
<p class="col-xs-12">Average street price <b>{{drugStreetPrice(drug)|money}}</b> per gram</p>
<div class="mb-10" ng-show="gameModel.silkRoadUnlocked && !options.autoSilk">
<div class="col-xs-12 btn-group">
<button class="btn btn-default btn-production" style="width:85%;" ng-disabled="drug.qty < 1000" ng-click="sellOnSilkRoad(drug)">
<span class="glyphicon glyphicon-cloud-upload inline-glyph icongreen"></span>Sell {{silkQty(drug)}}kg (<b>{{drugStreetPrice(drug) * silkQty(drug) * 900|money}}</b>)
</button>
<button class="btn btn-default btn-production text-center" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;" class="col-xs-12"><p class="jg-tooltip">Sell {{silkQty(drug)}}kg of {{drug.name}} on the silk road for 90% of the current street price</p></div>
<div class="clearfix"></div>
</div>
<p class="col-xs-6" tooltip="You are producing {{drugMadePerSecond(drug)|weight}} of {{drug.name.toLowerCase()}} per second"><span class="glyphicon glyphicon-arrow-up inline-glyph icongreen"></span>{{drugMadePerSecond(drug)|weight}} / sec</p>
<p class="col-xs-6" tooltip="Your dealers are able to sell {{drugSoldPerSecond(drug)|weight}} of {{drug.name.toLowerCase()}} per second"><span class="glyphicon glyphicon-arrow-down inline-glyph iconred"></span>{{drugSoldPerSecond(drug)|weight}} / sec</p>
<div class="col-xs-12" ng-repeat="producer in producersForDrug(drug)">
<div class="btn-group" style="width:100%" role="group">
<button class="btn btn-default btn-production" style="width:85%" ng-click="increaseProduction(producer)" ng-disabled="gameModel.cash < productionPrice(producer)">
<span class="qty">{{producer.qty}}</span>{{producer.name}} (<strong>{{productionPrice(producer)|money}}</strong>)
</button>
<button class="btn btn-default btn-production text-center pl-0 pr-0" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;"><p class="jg-tooltip">Buy {{producer.name == 'Opium Farm' ? 'an' : 'a'}} {{producer.name.toLowerCase()}} to increase your {{drug.name.toLowerCase()}} production by {{producer.prodPerUnit * kingpinMulti()|weight}} per second</p></div>
<progressbar animate="false" value="cashPercentage(productionPrice(producer))" ng-class="gameModel.cash < productionPrice(producer) ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
</div>
<div ng-repeat="upgrade in getUpgradesForDrug(drug) | orderBy:'price'" class="col-xs-12 pt-10 research-anim">
<div class="btn-group" role="group" style="width:100%;">
<button ng-click="purchaseUpgrade(upgrade)" style="width:85%;" class="btn btn-default btn-production" ng-disabled="gameModel.cash < upgrade.price * discountMulti()" type="button">
<span class="glyphicon icongreen" ng-class="upgrade.glyph"></span> {{upgrade.name}} (<strong>{{upgrade.price * discountMulti()|money}}</strong>)
</button>
<button class="btn btn-default btn-production text-center pl-0 pr-0" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;"><p class="jg-tooltip">{{upgrade.tooltip}}</p></div>
<progressbar animate="false" value="cashPercentage(upgrade.price * discountMulti())" ng-class="gameModel.cash < upgrade.price * discountMulti() ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
</div>
</div>
</div>
</div></div>
</div>
<div class="col-xs-12 col-sm-4 distribution col-pad-5" ng-class="{'hidden-xs':currentTab != 'distribution', 'col-lg-5' : options.kongregateLargeWindow}">
<h3 class="strong distribution-header">Distribution</h3>
<div ng-repeat="upgrade in dealerResearch | orderBy:'price'" class="mb-10 research-anim">
<div class="btn-group" style="width:100%;" role="group">
<button ng-click="purchaseUpgrade(upgrade)" style="width:85%;" class="btn btn-default btn-distribution" ng-disabled="gameModel.cash < upgrade.price * discountMulti()" type="button">
<span class="glyphicon icongreen" ng-class="upgrade.glyph"></span> {{upgrade.name}} (<strong>{{upgrade.price * discountMulti()|money}}</strong>)
</button>
<button class="btn btn-default btn-distribution text-center pl-0 pr-0" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none"><p class="jg-tooltip">{{upgrade.tooltip}}</p></div>
<progressbar animate="false" value="cashPercentage(upgrade.price * discountMulti())" ng-class="gameModel.cash < upgrade.price * discountMulti() ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
<div class="clearfix"></div>
</div>
<div class="btn-group" style="width:100%;">
<button ng-click="hireDealerModal()" style="width:85%;" class="btn btn-default" type="button" id="hire-dealer-button" tooltip="Hire another dealer">
<span class="glyphicon icongreen glyphicon-user"></span> Hire dealer <span class="dealer-count strong">{{gameModel.dealers.length + '/' + (1 + gameModel.territoryUpgrades)}}</span>
</button>
<button type="button" class="btn btn-default dropdown-toggle text-center pl-0 pr-0" data-toggle="dropdown" aria-expanded="false" style="width:15%;">
<span class="icongreen noadjust glyphicon glyphicon-sort-by-alphabet"></span><span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" style="right:0;left:auto;">
<li><a href="#" ng-click="dealerSort = 'none';dealerSortReverse = false;">None <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'none'"></span></a></li>
<li><a href="#" ng-click="dealerSort = 'drugIndex';dealerSortReverse = false;updateDealerDrugIndex();">Drug <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'drugIndex'"></span></a></li>
<li><a href="#" ng-click="dealerSort = 'name';dealerSortReverse = false;">Name <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'name'"></span></a></li>
<li><a href="#" ng-click="dealerSort = 'cashEarned';dealerSortReverse = true;">Cash Earned <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'cashEarned'"></span></a></li>
<li><a href="#" ng-click="dealerSort = 'originalVolume';dealerSortReverse = true;">Volume <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'originalVolume'"></span></a></li>
<li><a href="#" ng-click="dealerSort = 'originalPrice';dealerSortReverse = true;">Margin <span class="glyphicon glyphicon-ok" ng-show="dealerSort == 'originalPrice'"></span></a></li>
</ul>
</div>
<div class="row dealer-row">
<div class="col-xs-12 dealer-element" ng-repeat="dealer in gameModel.dealers | orderBy:dealerSort:dealerSortReverse track by $index" ng-class="{'col-lg-6' : options.kongregateLargeWindow}">
<div class="dealer-ui dealer-anim" >
<div class="dealer" ng-class="{'open':dealer.selected}" ng-click="selectDealer(dealer)">
<span class="glyphicon glyphicon-exclamation-sign" ng-show="dealer.arrested"></span>
<span class="glyphicon glyphicon-tower pull-left" ng-show="dealer.type == 'Prestige'" style="font-size:18px;margin-right:-10px;"></span>
<strong>{{dealer.name}} ({{dealer.drug}})</strong><span class="glyphicon" ng-class="dealer.selected ? 'glyphicon-chevron-up' : 'glyphicon-chevron-down'"></span>
</div>
<div class="dealer-content row" ng-class="{'content-open':dealer.selected}">
<span class="col-xs-12 mt-10" ng-show="dealer.level >= 10"><button class="btn btn-default" ng-click="createKingpin(dealer)"><span class="glyphicon glyphicon-tower icongreen"></span>Promote to Kingpin</button></span>
<p ng-show="dealer.type == 'Prestige' && dealer.level < 10" class="col-xs-12" style="padding-left:21px;text-align:center;"><span class="strong">Level {{dealer.level}}</span> - {{dealer.currentXp.toFixed(2)}}% to level {{dealer.level + 1}}</p>
<p ng-show="dealer.type == 'Prestige' && !dealer.arrested" class="col-xs-12 strong" style="padding-left:21px;text-align:center;">Increases all respect earned by {{100 + dealer.level * 50}}%</p>
<div class="alert alert-danger ml-10 mr-10 mb-10 text-center" role="alert" ng-show="dealer.arrested" style="clear:both;">ARRESTED</div>
<span class="col-xs-12 mb-5" ng-show="dealer.arrested"><button class="btn btn-default" ng-click="payBail(dealer)" ng-disabled="gameModel.cash < dealer.bail"><span class="glyphicon glyphicon-usd icongreen"></span>Pay Bail <b>{{dealer.bail | money}}</b></button></span>
<div class="col-xs-12" style="margin-bottom:10px;" ng-hide="dealer.arrested">
<div class="btn-group" style="width:100%" role="group">
<button class="btn btn-default" style="width:85%;margin-bottom:0;" ng-click="dealer.payCops = !dealer.payCops;">
Pay off the cops (<strong>{{dealer.payCops ? "On" : "Off"}}</strong>)
</button>
<button class="btn btn-default text-center pl-0 pr-0" style="width:15%;margin-bottom:0;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;"><p class="jg-tooltip">Give the cops 10% of {{dealer.name}}'s income in order to keep them off their back. Reduces earnings, but they wont get arrested.</p></div>
</div>
<p class="col-xs-6" style="padding-left:21px;padding-right:0;">Total: <strong>{{dealer.cashEarned|money}}</strong></p>
<p class="col-xs-6"><strong>{{dealer.cashPerSecond|money}} / sec</strong></p>
<div class="clearfix"></div>
<p class="col-xs-5 col-sm-4" style="padding-left:21px;">Selling:</p>
<span class="col-xs-7 col-sm-8">
<select class="form-control" ng-model="dealer.drug" ng-change="updateDealerDrugIndex()" tooltip="Select which drug you want this dealer to sell">
<option ng-repeat="drug in gameModel.drugs track by $index">{{drug.name}}</option>
</select>
</span>
<div class="col-xs-12"><span class="jg-tooltip-btn strong" onclick="toggleTooltip(this)">Volume: <span class="volume iconyellow" ng-bind-html="getStars(dealer.originalVolume,5)"></span> <span class="pl-10 glyphicon glyphicon-info-sign"></span></span></div>
<div class="col-xs-12 mb-5" style="display:none;">
<p class="jg-tooltip left-tip">{{dealer.name.split(' ')[0]}} can sell up to {{actualDealerVolume(dealer,dealer.drug)|weight}} of {{dealer.drug}} per second, as well as {{dealer.sideVolume * actualDealerVolume(dealer,dealer.drug)|weight}} of other drugs</p>
</div>
<div class="col-xs-12 mt-10"><span class="jg-tooltip-btn strong" onclick="toggleTooltip(this)">Margin: <span class="price iconyellow" ng-bind-html="getStars(dealer.originalPrice,5)"></span> <span class="pl-10 glyphicon glyphicon-info-sign"></span></span></div>
<div class="col-xs-12" style="display:none;">
<p class="jg-tooltip left-tip">{{dealer.name.split(' ')[0]}} sells 1g of {{dealer.drug}} for {{actualDealerPrice(dealer)|money}}</p>
</div>
<span class="col-xs-12 mt-10"><button class="btn btn-default" ng-click="dealerUpgradeModal(dealer)">
<span class="glyphicon glyphicon-shopping-cart" ng-class="areDealerUpgradesAvailable(dealer) ? 'icongreen' : 'iconred'"></span>Buy Equipment</button>
</span>
<div ng-repeat="upgrade in dealer.upgrades | orderBy:'price' track by $index">
<div class="col-xs-12 mb-5 pr-0">
<span class="strong col-xs-6 pr-0" style="padding-left:6px;">{{upgrade.name}}</span>
<span class="col-xs-6 pl-0 pr-0">{{upgrade.synopsis}}</span>
</div>
</div>
<div class="col-xs-12">
<button class="btn btn-default" ng-click="fireDealerModal(dealer)"><span class="glyphicon iconred glyphicon-user"></span>Fire {{dealer.name.split(' ')[0]}}</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-4 muscle-column col-pad-5" ng-class="{'hidden-xs':currentTab != 'muscle', 'col-lg-3' : options.kongregateLargeWindow}">
<h3 class="strong muscle-header">Muscle</h3>
<div class="btn-group" role="group" style="width:100%;">
<button ng-click="expandTerritory()" style="width:85%;" class="btn btn-default btn-muscle" ng-disabled="gameModel.respect < priceOfTerritory()" type="button">
<span class="glyphicon icongreen glyphicon-globe"></span> Expand territory (<strong>{{priceOfTerritory()|respect}} respect</strong>)
</button>
<button class="btn btn-default btn-muscle text-center pl-0 pr-0" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;"><p class="jg-tooltip">Expand your territory, allowing you to hire an additional dealer</p></div>
<progressbar animate="false" value="respectPercentage(priceOfTerritory())" ng-class="gameModel.respect < priceOfTerritory() ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
<div class="btn-group" role="group" style="width:100%;margin-top:10px;">
<button ng-click="getDiscount()" style="width:85%;" class="btn btn-default btn-muscle" ng-disabled="gameModel.respect < priceOfDiscount()" type="button">
<span class="glyphicon icongreen glyphicon-usd"></span> Negotiate discount (<strong>{{priceOfDiscount()|respect}} respect</strong>)
</button>
<button class="btn btn-default btn-muscle text-center pl-0 pr-0" style="width:15%;" onclick="toggleTooltip(this);">
<span class="glyphicon icongreen glyphicon-info-sign" style="width:100%;"></span>
</button>
</div>
<div style="display:none;"><p class="jg-tooltip">Renegotiate prices with your suppliers. This will reduce your costs by 10%</p></div>
<progressbar animate="false" value="respectPercentage(priceOfDiscount())" ng-class="gameModel.respect < priceOfDiscount() ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
<div class="muscle-ui drug-anim" ng-repeat="muscle in gameModel.muscle track by $index">
<div class="muscle" ng-class="{'open':muscle.selected}" ng-click="selectDealer(muscle)">
<strong>{{muscle.name}} ({{muscle.qty}})</strong><span class="glyphicon" ng-class="muscle.selected ? 'glyphicon-chevron-up' : 'glyphicon-chevron-down'"></span>
</div>
<div class="muscle-content row" ng-class="{'content-open':muscle.selected}">
<p class="col-xs-12">Each {{muscle.name}} earns you <span class="strong">{{muscle.respect|respect}}</span> respect per second</p>
<p class="col-xs-12">Your <span class="strong">{{muscle.qty}}</span> {{muscle.name}}s are earning you <span class="strong">{{muscle.respect*muscle.qty|respect}}</span> respect per second</p>
<div class="col-xs-12">
<button class="btn btn-default btn-muscle" style="width:100%" ng-click="hireMuscle(muscle)" ng-disabled="gameModel.cash < musclePrice(muscle)">
<span class="qty">{{muscle.qty}}</span>{{muscle.name}} (<strong>{{musclePrice(muscle)|money}}</strong>)
</button>
<progressbar animate="false" value="cashPercentage(musclePrice(muscle))" ng-class="gameModel.cash < musclePrice(muscle) ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
</div>
</div>
</div>
</div>
</div>
<div class="row" ng-if="options.hideTop" style="margin-top:20px;">
<div class="col-xs-12 col-sm-3 col-sm-offset-3">
<button onclick="$('#optionsModal').modal('show');" class="btn btn-default options-button"><span class="iconred glyphicon glyphicon-cog"></span> Options</button>
</div>
<div class="col-xs-12 col-sm-3">
<button ng-click="hideTop()" class="btn btn-default"><span class="glyphicon glyphicon-eye-open icongreen"></span> Show Title</button>
</div>
</div>
<div class="modal fade" id="prestigeDealerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Recruit a dealer captain</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 pb-10"><p>Recruit a dealer captain for {{prestigeDealerPrice * discountMulti()| money}}</p><p class="strong">This will reset your current game progress but give you access to a captain dealer with perfect attributes and persistant upgrades.</p></div>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<span class="input-group-addon">Dealer name</span>
<input type="text" class="form-control" ng-model="prestigeDealerName" placeholder=" enter a name">
</div>
</div>
<div class="col-xs-12 col-sm-4">
<button ng-click="randomPrestigeName()" class="btn btn-default btn-distribution" type="button">
Random Name
</button>
</div>
<div class="col-xs-6 pr-10 mt-20">
<button ng-click="prestigeDealerConfirm()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon icongreen glyphicon-user"></span> Okay
</button>
</div>
<div class="col-xs-6 pl-10 mt-20">
<button ng-click="prestigeDealerCancel()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon iconred glyphicon-user"></span> Cancel
</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="fireDealerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Fire {{dealerToFire.name.split(' ')[0]}}?</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 text-center pb-10"><i>"But I've got {{dealerToFire.kids}} kids to feed!"</i></div>
<div class="col-xs-6 pr-10">
<button ng-click="fireDealerConfirm()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon iconred glyphicon-user"></span> Fire
</button>
</div>
<div class="col-xs-6 pl-10">
<button ng-click="fireDealerCancel()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon icongreen glyphicon-user"></span> Keep
</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="upgradeDealerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Dealer equipment</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 strong mb-20">Current cash: {{gameModel.cash|money}}</div>
<div class="col-xs-12 strong mb-20" ng-show="upgradeDealer().type == 'Prestige'">Upgrades are more expensive for your captain dealers, but they will persist through game resets!</div>
<div class="col-xs-12 col-sm-4 mb-20 height-match dealer-upgrade-anim" ng-repeat="upgrade in availableDealerUpgrades|orderBy:'price'">
<p class="strong">{{upgrade.name}}</p>
<p>{{upgrade.tooltip}}</p>
<button ng-click="purchaseDealerUpgrade(upgrade)" class="btn btn-default btn-distribution" ng-disabled="gameModel.cash < upgrade.realPrice" type="button">
<span class="glyphicon icongreen glyphicon-shopping-cart"></span> Buy (<strong>{{upgrade.realPrice|money}}</strong>)
</button>
<progressbar animate="false" value="cashPercentage(upgrade.realPrice)" ng-class="gameModel.cash < upgrade.realPrice ? 'active progress-striped' : 'progress-bar-success'"></progressbar>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade distribution" id="hireDealerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Hire dealer</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 col-sm-4"><button class="btn btn-default btn-distribution new-dealer-btn" ng-click="refreshDealers()" ng-disabled="secondsToDealerRefresh > 0">New dealers <span ng-show="secondsToDealerRefresh > 0">({{secondsToDealerRefresh}})</span></button></div>
<p class="col-xs-12 col-sm-8 dealer-warning" ng-show="gameModel.dealers.length >= gameModel.territoryUpgrades + 1">You already have the maximum number of dealers working for you. Either fire a dealer or expand your territory to hire another.</p>
<div class="clearfix"></div>
<div class="col-xs-12 col-sm-4 dealer-hire-anim" ng-repeat="dealer in hireDealers track by $index" ng-animate="'list'">
<div style="min-height:180px;">
<p class="dealer-name"><span class="glyphicon glyphicon-tower" ng-show="dealer.type == 'Prestige'"></span> <span class="distribution strong">{{dealer.name}}</span> <span class="strong" ng-show="dealer.type == 'Prestige'">({{dealer.level}})</span></p>
<p class="strong">Volume: <span class="volume iconyellow" ng-bind-html="getStars(dealer.originalVolume,5)"></span></p>
<p class="strong">Margin: <span class="price iconyellow" ng-bind-html="getStars(dealer.originalPrice,5)"></span></p>
<p>Sells {{actualDealerVolume(dealer,dealer.drug)|weight}} per second</p>
<p>Sells 1g of {{dealer.drug}} for {{actualDealerPrice(dealer)|money}}</p>
</div>
<button class="btn btn-default btn-distribution" ng-click="hireDealer(dealer)" ng-disabled="gameModel.dealers.length >= gameModel.territoryUpgrades + 1 || dealerHired(dealer.seed)">{{dealerHired(dealer.seed) ? 'Hired' : 'Hire ' + dealer.name.split(' ')[0]}}</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="optionsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Options</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 col-sm-6">
<button onclick="if (confirm('This will reset all progress, are you sure?')) { resetGame(); }" class="btn btn-default"><span class="glyphicon iconred glyphicon-exclamation-sign"></span> Reset game</button>
</div>
<div class="col-xs-12 col-sm-6">
<button ng-click="toggleWorkMode()" class="btn btn-default"><span class="glyphicon glyphicon-filter iconred"></span> Toggle work mode</button>
</div>
<div class="col-xs-12 col-sm-6">
<button ng-click="toggleNightMode()" class="btn btn-default"><span class="glyphicon glyphicon-filter iconred"></span> Toggle night mode</button>
</div>
<div class="col-xs-12 col-sm-6" tooltip="Toggle automatic selling of drugs on the silk road">
<button ng-click="toggleAutoSilk()" class="btn btn-default"><span class="glyphicon glyphicon-cloud icongreen"></span> Auto silk road sell {{options.autoSilk ? '(on)' : '(off)'}}</button>
</div>
<div class="col-xs-12 col-sm-6" tooltip="Export or Import game save">
<button ng-click="exportGame()" class="btn btn-default"><span class="glyphicon glyphicon-floppy-disk icongreen"></span> Export/Import game save</button>
</div>
<div class="col-xs-12 col-sm-6" tooltip="Hide the title section">
<button ng-click="hideTop()" class="btn btn-default"><span class="glyphicon glyphicon-eye-close icongreen"></span> Hide/Show Title</button>
</div>
<div class="col-xs-12 col-sm-6" tooltip="Toggle automatic selling of drugs on the silk road">
<button onclick="kongregate.services.resizeGame(1600, 1080);" ng-click="kongregateLargeWindow()" class="btn btn-default"><span class="glyphicon glyphicon-zoom-in icongreen"></span> Larger window</button>
</div>
<div class="col-xs-12 col-sm-6" tooltip="Toggle automatic selling of drugs on the silk road">
<button onclick="kongregate.services.resizeGame(1199, 700);" ng-click="kongregateSmallWindow()" class="btn btn-default"><span class="glyphicon glyphicon-zoom-out icongreen"></span> Smaller window</button>
</div>
<div class="col-xs-12" ng-show="kingpins.length > 0" style="margin-top:25px;">
<p class="strong">The names of your Kingpins</p>
<span ng-repeat="kingpin in kingpins track by $index" class="kingpin-name"><span class="glyphicon glyphicon-tower iconyellow" style="margin-right:5px;"></span>{{kingpin}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Export / Import</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12">
<p class="strong">To export a save, copy the entire contents of the text box below</p>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8" ng-model="exportGameSave"></textarea>
</div>
<div class="col-xs-12 mt-20">
<p class="strong">To import a save, paste the data copied into the text box below and click import</p>
<p class="strong">This will overwrite your current progress!</p>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8" ng-model="importGameSave"></textarea>
</div>
<div class="col-xs-12 mt-5">
<button ng-click="importGame()" class="btn btn-default"><span class="glyphicon glyphicon-floppy-disk icongreen"></span> Import</button>
</div>
<div class="col-xs-12 mt-10" ng-show="importError">
<p class="strong">Error: {{importError}}</p>
<p class="strong">Import failed</p>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="kingpinModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Recruit a Kingpin</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 pb-10"><p>Turn your captain into a Kingpin</p><p class="strong">This will remove the captain from your available dealers but give you a permanent boost to drug and respect production.</p></div>
<div class="col-xs-6 pr-10 mt-20">
<button ng-click="confirmKingpin()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon icongreen glyphicon-user"></span> Okay
</button>
</div>
<div class="col-xs-6 pl-10 mt-20">
<button ng-click="cancelKingpin()" class="btn btn-default btn-distribution" type="button">
<span class="glyphicon iconred glyphicon-user"></span> Cancel
</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="offlineModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Business Report</h4>
</div>
<div class="modal-body row">
<div class="col-xs-12 pb-10">
<p>Boss, we've been taking care of business while you were away. Just like you asked.</p>
<p>You've earned <span class="strong">{{offlineCash|money}}</span></p>
<p>And <span class="strong">{{offlineRespect|respect}} Respect</span>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>