-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
77 lines (70 loc) · 2.7 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
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Bootstrap styles -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<div class="container">
<h2>Marvel Heroes random hero box calculator <small>Should you random? Calculate your chances.</small></h2>
<p class="lead">Select heroes you already have in your roster: <a id="clear-button" href="#clear-all">(clear all)</a></p>
<div id="roster" class="row">
<script id="hero-pic-template" type="text/dot">
<div class="col-md-1 hero-pic" data-id="{{=it.id}}">
<label>
<img src="{{=it.hero.img}}"/>
<input class="invisible-friend" type="checkbox" data-id="{{=it.id}}" />
<span class="hero-name">{{=it.hero.name}}</span>
</label>
</div>
</script>
</div>
<div id="result" class="collapsed">
<p class="bg-success res-answer res-yes">
YES! Go get a random box!
</p>
<p class="bg-info res-answer res-probably">
PROBABLY. You have a fair chance of winning a new hero.
</p>
<p class="bg-danger res-answer res-no">
NO. Odds are against you, just go and buy a new hero with splinters.
</p>
<p class="bg-success res-answer res-full">
Congratulations! You have all the heroes!
</p>
<!--
chance to get a desired hero: 11%
<h2 id="suggestion">NO</h2>
Go buy Deadpool or Emma instead!
-->
<p class="new-hero">
Chance to get a new hero:
<strong><span class="value"></span></strong>
</p>
<p class="duplicate">
Chance to get a duplicate hero token:
<span class="value"></span>
</p>
<p class="expected-return">
Expected return:
<span class="value"></span>
</p>
</div>
<div id="disclaimer">
<p>According to Random Hero Box description, all heroes have equal chances.</p>
<p>While the math here is believed to be 100% correct, there is always a lot of luck involved: you can get 3 duplicate tokens in a row with 99% chance of new, or get your only missing hero with 2% chance of rolling.</p>
</div>
<div id="footer">
<p class="text-muted">
Marvel Heroes patch v1.56.
Developed by <a href="https://github.com/zlumer/">zlumer</a>.
Source code <a href="https://github.com/zlumer/mh-random">available</a> on GitHub
</p>
</div>
</div>
<!-- custom styles -->
<link rel="stylesheet" href="css/style.css">
<!-- libs -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dot/1.0.3/doT.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<!-- main app script -->
<script src="js/script.js"></script>