-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
124 lines (103 loc) · 5.28 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
<!DOCTYPE html>
<head>
<meta charset="utf8">
<!-- CSS and favicon -->
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" type="image/x-icon" href="assets/favicon.ico">
<!-- Basic metadata -->
<title>Genshin Impact Pity Calculator</title>
<meta name="title" content="Genshin Impact Pity Calculator">
<meta name="description" content="Helping you navigate Genshin Impact's gacha system and plan your wishes to build amazing teams.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://forkpoweroutlet.github.io/genshin-pity-calculator/">
<meta property="og:title" content="Genshin Impact Pity Calculator">
<meta property="og:description" content="Helping you navigate Genshin Impact's gacha system and plan your wishes to build amazing teams.">
<meta property="og:image" content="https://forkpoweroutlet.github.io/genshin-pity-calculator/assets/bg.png">
</head>
<body>
<!-- Keep it at the top -->
<div id="heading">
<h1>Genshin Impact Pity Calculator (in development)</h1>
<p>Under the banner for which you want to calculate pity, select History and find your last 5-star. Then Ctrl+A Ctrl+C and paste everything here.
<br>If you can't find it because it's been over 6 months, you'll have to wait until you pull another 5-star.
</p>
</div>
<!-- Input field -->
<div id="field">
<textarea id="input" rows="4" cols="50"></textarea>
<br><br>
<div>
<!-- Numbers correspond to offset in seconds from UTC -->
<select id="region">
<option value="-18000">America</option>
<option value="3600">Europe</option>
<option value="28800">Asia/SAR</option>
</select>
<button id="submit">▶</button>
</div>
</div>
<!-- Disclaimer -->
<small><p>Images and font: © All rights reserved by miHoYo.
This <a href="https://github.com/forkpoweroutlet/genshin-pity-calculator" target="_blank">open-source</a>
fan project is not affiliated with or endorsed by miHoYo Co., Ltd.<br>
</p></small>
<!-- Default to permanent banner -->
<h2 id="banner">Banner: <a href="https://genshin-impact.fandom.com/wiki/Wanderlust_Invocation" target="_blank">Permanent Wish</a></h2>
<!-- Hide if successful -->
<p id="error">
<br><br><br>
Error: Double-check that you copied and pasted correctly and
<a href="https://git.io/JYe5b" target="_blank">let me know</a> if you still think something's wrong.</p>
<br>
<!-- Show if successful -->
<div id="results">
<!-- Pity info and base rate -->
<div id="left">
<h2>Your pity count is <span id="pity">0</span>.</span></h2>
<!-- Tell of hard pity but why it isn't really important -->
<p>That means you're <span id="tohardpity">0</span> pulls away from your
<span id="hardpity" class="dontbold">90</span>
th pull: a guaranteed 5-star because of hard pity.
<br>It probably won't take you that many pulls, though, because:</p>
<!-- Soft pity -->
<h2>Your chances will massively improve after <span id="tosoftpity">76</span> pulls.</h2>
<p>This is known as "soft pity" and it starts on one's <span id="softpity" class="dontbold">76</span>th pull.</p>
<br>
<!-- Rate of next single pull + bar to visualize -->
<h2>Your next single pull has a <span id="baserate">0.6%</span> chance to be a 5-star, shown in green:</h2>
<div id="bar"><div></div></div>
<p>The base rate is usually 0.6% during pulls 1-75, 32.4% during pulls 76-89, and 100% at pull 90.</p>
</div>
<!-- Pie chart and clarification -->
<div id="right">
<h2 id="guarantee">Who or what will your next five-star be when you get it? Hover for details.</h2>
<div id="pie-chart" style="width: 30%;">
<canvas width="30%" height="30%"></canvas>
<!-- Chart.js tooltip -->
<div id="pie-hover">
<table></table>
</div>
</div>
<!-- Promotional banners are temporary -->
<p id="promonotice">Assuming that you will pull your next 5-star during this banner.<br>If you're planning for future banners, imagine the promotional character in <span>Promotional Character</span>'s place.</p>
</div>
</div>
<!--
1 pull = 160 primogems
1 day of commissions = 60 primogems
1 day of commissions + welkin moon = 150 primogems -->
<div id="status">
<br>
<h2>You'll need <span id="primogems">12,160</span> primogems to hit <a href="javascript:;" id="pitytype">soft</a> pity.</h2>
<p>That's
<span id="commissions">203</span>
days of daily commissions, or
<span id="welkinmoon">82</span>
days if you also buy
<a href="https://genshin-impact.fandom.com/wiki/Blessing_of_the_Welkin_Moon" target="_blank">Blessing of the Welkin Moon</a>
(not including crystal bonus).</p>
</div>
<!-- Autodetect region with JavaScript + bind submit button -->
<script src="build/main.js"></script>
</body>
</html>