오명준

Add new sim 'Yacht dice'(js)

Showing 1 changed file with 1102 additions and 0 deletions
1 +function calcP()
2 +{
3 + var d1 = document.getElementById("d1").valueAsNumber;
4 + var d2 = document.getElementById("d2").valueAsNumber;
5 + var d3 = document.getElementById("d3").valueAsNumber;
6 + var d4 = document.getElementById("d4").valueAsNumber;
7 + var d5 = document.getElementById("d5").valueAsNumber;
8 + var count = [0, 0, 0, 0, 0, 0, 0];
9 + var sum = d1 + d2 + d3 + d4 + d5;
10 + count[d1] += 1;
11 + count[d2] += 1;
12 + count[d3] += 1;
13 + count[d4] += 1;
14 + count[d5] += 1;
15 + rollNum = count[0];
16 + if (rollNum == 5)
17 + {
18 + document.getElementById("ace_1").innerHTML = "40.1878%";
19 + document.getElementById("ace_2").innerHTML = "16.0751%";
20 + document.getElementById("ace_3").innerHTML = "3.2150%";
21 + document.getElementById("ace_4").innerHTML = "0.3215%";
22 + document.getElementById("ace_5").innerHTML = "0.0129%";
23 +
24 + document.getElementById("duece_1").innerHTML = "40.1878%";
25 + document.getElementById("duece_2").innerHTML = "16.0751%";
26 + document.getElementById("duece_3").innerHTML = "3.2150%";
27 + document.getElementById("duece_4").innerHTML = "0.3215%";
28 + document.getElementById("duece_5").innerHTML = "0.0129%";
29 +
30 + document.getElementById("three_1").innerHTML = "40.1878%";
31 + document.getElementById("three_2").innerHTML = "16.0751%";
32 + document.getElementById("three_3").innerHTML = "3.2150%";
33 + document.getElementById("three_4").innerHTML = "0.3215%";
34 + document.getElementById("three_5").innerHTML = "0.0129%";
35 +
36 + document.getElementById("four_1").innerHTML = "40.1878%";
37 + document.getElementById("four_2").innerHTML = "16.0751%";
38 + document.getElementById("four_3").innerHTML = "3.2150%";
39 + document.getElementById("four_4").innerHTML = "0.3215%";
40 + document.getElementById("four_5").innerHTML = "0.0129%";
41 +
42 + document.getElementById("five_1").innerHTML = "40.1878%";
43 + document.getElementById("five_2").innerHTML = "16.0751%";
44 + document.getElementById("five_3").innerHTML = "3.2150%";
45 + document.getElementById("five_4").innerHTML = "0.3215%";
46 + document.getElementById("five_5").innerHTML = "0.0129%";
47 +
48 + document.getElementById("six_1").innerHTML = "40.1878%";
49 + document.getElementById("six_2").innerHTML = "16.0751%";
50 + document.getElementById("six_3").innerHTML = "3.2150%";
51 + document.getElementById("six_4").innerHTML = "0.3215%";
52 + document.getElementById("six_5").innerHTML = "0.0129%";
53 +
54 + document.getElementById("4kind").innerHTML = "2.0062%";
55 + document.getElementById("full").innerHTML = "3.9352%";
56 + document.getElementById("small").innerHTML = "15.4321%";
57 + document.getElementById("large").innerHTML = "3.0864%";
58 + document.getElementById("yacht").innerHTML = "0.0772%";
59 + document.getElementById("choice").innerHTML = "5 : 0.0129%<br>"
60 + +"6 : 0.0643%<br>"
61 + +"7 : 0.1929%<br>"
62 + +"8 : 0.4501%<br>"
63 + +"9 : 0.9002%<br>"
64 + +"10 : 1.6204%<br>"
65 + +"11 : 2.6363%<br>"
66 + +"12 : 3.9223%<br>"
67 + +"13 : 5.4012%<br>"
68 + +"14 : 6.9444%<br>"
69 + +"15 : 8.3719%<br>"
70 + +"16 : 9.4522%<br>"
71 + +"17 : 10.0309%<br>"
72 + +"18 : 10.0309%<br>"
73 + +"19 : 9.4522%<br>"
74 + +"20 : 8.3719%<br>"
75 + +"21 : 6.9444%<br>"
76 + +"22 : 5.4012%<br>"
77 + +"23 : 3.9223%<br>"
78 + +"24 : 2.6363%<br>"
79 + +"25 : 1.6204%<br>"
80 + +"26 : 0.9002%<br>"
81 + +"27 : 0.4501%<br>"
82 + +"28 : 0.1929%<br>"
83 + +"29 : 0.0643%<br>"
84 + +"30 : 0.0129%";
85 + }
86 + else if (rollNum == 4)
87 + {
88 + document.getElementById("ace_1").innerHTML = "38.5802%";
89 + document.getElementById("ace_2").innerHTML = "11.5741%";
90 + document.getElementById("ace_3").innerHTML = "1.5432%";
91 + document.getElementById("ace_4").innerHTML = "0.0772%";
92 + document.getElementById("ace_5").innerHTML = "0.0000%";
93 +
94 + document.getElementById("duece_1").innerHTML = "38.5802%";
95 + document.getElementById("duece_2").innerHTML = "11.5741%";
96 + document.getElementById("duece_3").innerHTML = "1.5432%";
97 + document.getElementById("duece_4").innerHTML = "0.0772%";
98 + document.getElementById("duece_5").innerHTML = "0.0000%";
99 +
100 + document.getElementById("three_1").innerHTML = "38.5802%";
101 + document.getElementById("three_2").innerHTML = "11.5741%";
102 + document.getElementById("three_3").innerHTML = "1.5432%";
103 + document.getElementById("three_4").innerHTML = "0.0772%";
104 + document.getElementById("three_5").innerHTML = "0.0000%";
105 +
106 + document.getElementById("four_1").innerHTML = "38.5802%";
107 + document.getElementById("four_2").innerHTML = "11.5741%";
108 + document.getElementById("four_3").innerHTML = "1.5432%";
109 + document.getElementById("four_4").innerHTML = "0.0772%";
110 + document.getElementById("four_5").innerHTML = "0.0000%";
111 +
112 + document.getElementById("five_1").innerHTML = "38.5802%";
113 + document.getElementById("five_2").innerHTML = "11.5741%";
114 + document.getElementById("five_3").innerHTML = "1.5432%";
115 + document.getElementById("five_4").innerHTML = "0.0772%";
116 + document.getElementById("five_5").innerHTML = "0.0000%";
117 +
118 + document.getElementById("six_1").innerHTML = "38.5802%";
119 + document.getElementById("six_2").innerHTML = "11.5741%";
120 + document.getElementById("six_3").innerHTML = "1.5432%";
121 + document.getElementById("six_4").innerHTML = "0.0772%";
122 + document.getElementById("six_5").innerHTML = "0.0000%";
123 +
124 + if (count[1] == 1 || count[6] == 1)
125 + {
126 + if (count[1] == 1)
127 + {
128 + document.getElementById("ace_1").innerHTML = "48.2253%";
129 + document.getElementById("ace_2").innerHTML = "38.5802%";
130 + document.getElementById("ace_3").innerHTML = "11.5741%";
131 + document.getElementById("ace_4").innerHTML = "1.5432%";
132 + document.getElementById("ace_5").innerHTML = "0.0772%";
133 + }
134 + else
135 + {
136 + document.getElementById("six_1").innerHTML = "48.2253%";
137 + document.getElementById("six_2").innerHTML = "38.5802%";
138 + document.getElementById("six_3").innerHTML = "11.5741%";
139 + document.getElementById("six_4").innerHTML = "1.5432%";
140 + document.getElementById("six_5").innerHTML = "0.0772%";
141 + }
142 + document.getElementById("4kind").innerHTML = "2.0062%";
143 + document.getElementById("full").innerHTML = "3.9352%";
144 + document.getElementById("small").innerHTML = "10.1852%";
145 + document.getElementById("large").innerHTML = "1.8519%";
146 + document.getElementById("yacht").innerHTML = "0.0772%";
147 + }
148 + else if (count[2] == 1 || count[5] == 1)
149 + {
150 + if (count[2] == 1)
151 + {
152 + document.getElementById("duece_1").innerHTML = "48.2253%";
153 + document.getElementById("duece_2").innerHTML = "38.5802%";
154 + document.getElementById("duece_3").innerHTML = "11.5741%";
155 + document.getElementById("duece_4").innerHTML = "1.5432%";
156 + document.getElementById("duece_5").innerHTML = "0.0772%";
157 + }
158 + else
159 + {
160 + document.getElementById("five_1").innerHTML = "48.2253%";
161 + document.getElementById("five_2").innerHTML = "38.5802%";
162 + document.getElementById("five_3").innerHTML = "11.5741%";
163 + document.getElementById("five_4").innerHTML = "1.5432%";
164 + document.getElementById("five_5").innerHTML = "0.0772%";
165 + }
166 + document.getElementById("4kind").innerHTML = "2.0062%";
167 + document.getElementById("full").innerHTML = "3.9352%";
168 + document.getElementById("small").innerHTML = "14.8148%";
169 + document.getElementById("large").innerHTML = "3.7037%";
170 + document.getElementById("yacht").innerHTML = "0.0772%";
171 + }
172 + else if (count[3] == 1 || count[4] == 1)
173 + {
174 + if (count[3] == 1)
175 + {
176 + document.getElementById("three_1").innerHTML = "48.2253%";
177 + document.getElementById("three_2").innerHTML = "38.5802%";
178 + document.getElementById("three_3").innerHTML = "11.5741%";
179 + document.getElementById("three_4").innerHTML = "1.5432%";
180 + document.getElementById("three_5").innerHTML = "0.0772%";
181 + }
182 + else
183 + {
184 + document.getElementById("four_1").innerHTML = "48.2253%";
185 + document.getElementById("four_2").innerHTML = "38.5802%";
186 + document.getElementById("four_3").innerHTML = "11.5741%";
187 + document.getElementById("four_4").innerHTML = "1.5432%";
188 + document.getElementById("four_5").innerHTML = "0.0772%";
189 + }
190 + document.getElementById("4kind").innerHTML = "2.0062%";
191 + document.getElementById("full").innerHTML = "3.9352%";
192 + document.getElementById("small").innerHTML = "21.2963%";
193 + document.getElementById("large").innerHTML = "3.7037%";
194 + document.getElementById("yacht").innerHTML = "0.0772%";
195 + }
196 + document.getElementById("choice").innerHTML = parseInt(sum + 4) + " : 0.0772%<br>"
197 + + parseInt(sum + 5) + " : 0.3086%<br>"
198 + + parseInt(sum + 6) + " : 0.7716%<br>"
199 + + parseInt(sum + 7) + " : 1.5432%<br>"
200 + + parseInt(sum + 8) + " : 2.7006%<br>"
201 + + parseInt(sum + 9) + " : 4.3210%<br>"
202 + + parseInt(sum + 10) + " : 6.1728%<br>"
203 + + parseInt(sum + 11) + " : 8.0247%<br>"
204 + + parseInt(sum + 12) + " : 9.6451%<br>"
205 + + parseInt(sum + 13) + " : 10.8025%<br>"
206 + + parseInt(sum + 14) + " : 11.2654%<br>"
207 + + parseInt(sum + 15) + " : 10.8025%<br>"
208 + + parseInt(sum + 16) + " : 9.6451%<br>"
209 + + parseInt(sum + 17) + " : 8.0247%<br>"
210 + + parseInt(sum + 18) + " : 6.1728%<br>"
211 + + parseInt(sum + 19) + " : 4.3210%<br>"
212 + + parseInt(sum + 20) + " : 2.7006%<br>"
213 + + parseInt(sum + 21) + " : 1.5432%<br>"
214 + + parseInt(sum + 22) + " : 0.7716%<br>"
215 + + parseInt(sum + 23) + " : 0.3086%<br>"
216 + + parseInt(sum + 24) + " : 0.0772%";
217 + }
218 + else if (rollNum == 3)
219 + {
220 + document.getElementById("ace_1").innerHTML = "34.7222%";
221 + document.getElementById("ace_2").innerHTML = "6.9444%";
222 + document.getElementById("ace_3").innerHTML = "0.4630%";
223 + document.getElementById("ace_4").innerHTML = "0.0000%";
224 + document.getElementById("ace_5").innerHTML = "0.0000%";
225 +
226 + document.getElementById("duece_1").innerHTML = "34.7222%";
227 + document.getElementById("duece_2").innerHTML = "6.9444%";
228 + document.getElementById("duece_3").innerHTML = "0.4630%";
229 + document.getElementById("duece_4").innerHTML = "0.0000%";
230 + document.getElementById("duece_5").innerHTML = "0.0000%";
231 +
232 + document.getElementById("three_1").innerHTML = "34.7222%";
233 + document.getElementById("three_2").innerHTML = "6.9444%";
234 + document.getElementById("three_3").innerHTML = "0.4630%";
235 + document.getElementById("three_4").innerHTML = "0.0000%";
236 + document.getElementById("three_5").innerHTML = "0.0000%";
237 +
238 + document.getElementById("four_1").innerHTML = "34.7222%";
239 + document.getElementById("four_2").innerHTML = "6.9444%";
240 + document.getElementById("four_3").innerHTML = "0.4630%";
241 + document.getElementById("four_4").innerHTML = "0.0000%";
242 + document.getElementById("four_5").innerHTML = "0.0000%";
243 +
244 + document.getElementById("five_1").innerHTML = "34.7222%";
245 + document.getElementById("five_2").innerHTML = "6.9444%";
246 + document.getElementById("five_3").innerHTML = "0.4630%";
247 + document.getElementById("five_4").innerHTML = "0.0000%";
248 + document.getElementById("five_5").innerHTML = "0.0000%";
249 +
250 + document.getElementById("six_1").innerHTML = "34.7222%";
251 + document.getElementById("six_2").innerHTML = "6.9444%";
252 + document.getElementById("six_3").innerHTML = "0.4630%";
253 + document.getElementById("six_4").innerHTML = "0.0000%";
254 + document.getElementById("six_5").innerHTML = "0.0000%";
255 +
256 + if (count[1] == 1)
257 + {
258 + document.getElementById("ace_1").innerHTML = "57.8704%";
259 + document.getElementById("ace_2").innerHTML = "34.7222%";
260 + document.getElementById("ace_3").innerHTML = "6.9444%";
261 + document.getElementById("ace_4").innerHTML = "0.4630%";
262 + document.getElementById("ace_5").innerHTML = "0.0000%";
263 + }
264 + if (count[2] == 1)
265 + {
266 + document.getElementById("duece_1").innerHTML = "57.8704%";
267 + document.getElementById("duece_2").innerHTML = "34.7222%";
268 + document.getElementById("duece_3").innerHTML = "6.9444%";
269 + document.getElementById("duece_4").innerHTML = "0.4630%";
270 + document.getElementById("duece_5").innerHTML = "0.0000%";
271 + }
272 + if (count[3] == 1)
273 + {
274 + document.getElementById("three_1").innerHTML = "57.8704%";
275 + document.getElementById("three_2").innerHTML = "34.7222%";
276 + document.getElementById("three_3").innerHTML = "6.9444%";
277 + document.getElementById("three_4").innerHTML = "0.4630%";
278 + document.getElementById("three_5").innerHTML = "0.0000%";
279 + }
280 + if (count[4] == 1)
281 + {
282 + document.getElementById("four_1").innerHTML = "57.8704%";
283 + document.getElementById("four_2").innerHTML = "34.7222%";
284 + document.getElementById("four_3").innerHTML = "6.9444%";
285 + document.getElementById("four_4").innerHTML = "0.4630%";
286 + document.getElementById("four_5").innerHTML = "0.0000%";
287 + }
288 + if (count[5] == 1)
289 + {
290 + document.getElementById("five_1").innerHTML = "57.8704%";
291 + document.getElementById("five_2").innerHTML = "34.7222%";
292 + document.getElementById("five_3").innerHTML = "6.9444%";
293 + document.getElementById("five_4").innerHTML = "0.4630%";
294 + document.getElementById("five_5").innerHTML = "0.0000%";
295 + }
296 + if (count[6] == 1)
297 + {
298 + document.getElementById("six_1").innerHTML = "57.8704%";
299 + document.getElementById("six_2").innerHTML = "34.7222%";
300 + document.getElementById("six_3").innerHTML = "6.9444%";
301 + document.getElementById("six_4").innerHTML = "0.4630%";
302 + document.getElementById("six_5").innerHTML = "0.0000%";
303 + }
304 +
305 + if (count[1] == 2 || count[6] == 2)
306 + {
307 + if (count[1] == 2)
308 + {
309 + document.getElementById("ace_1").innerHTML = "0.0000%";
310 + document.getElementById("ace_2").innerHTML = "57.8704%";
311 + document.getElementById("ace_3").innerHTML = "34.7222%";
312 + document.getElementById("ace_4").innerHTML = "6.9444%";
313 + document.getElementById("ace_5").innerHTML = "0.4630%";
314 + }
315 + else
316 + {
317 + document.getElementById("six_1").innerHTML = "0.0000%";
318 + document.getElementById("six_2").innerHTML = "57.8704%";
319 + document.getElementById("six_3").innerHTML = "34.7222%";
320 + document.getElementById("six_4").innerHTML = "6.9444%";
321 + document.getElementById("six_5").innerHTML = "0.4630%";
322 + }
323 + document.getElementById("4kind").innerHTML = "7.4074%";
324 + document.getElementById("full").innerHTML = "9.7222%";
325 + document.getElementById("small").innerHTML = "2.7778%";
326 + document.getElementById("large").innerHTML = "0.0000%";
327 + document.getElementById("yacht").innerHTML = "0.4630%";
328 + }
329 + else if (count[2] == 2 || count[5] == 2)
330 + {
331 + if (count[2] == 2)
332 + {
333 + document.getElementById("duece_1").innerHTML = "0.0000%";
334 + document.getElementById("duece_2").innerHTML = "57.8704%";
335 + document.getElementById("duece_3").innerHTML = "34.7222%";
336 + document.getElementById("duece_4").innerHTML = "6.9444%";
337 + document.getElementById("duece_5").innerHTML = "0.4630%";
338 + }
339 + else
340 + {
341 + document.getElementById("five_1").innerHTML = "0.0000%";
342 + document.getElementById("five_2").innerHTML = "57.8704%";
343 + document.getElementById("five_3").innerHTML = "34.7222%";
344 + document.getElementById("five_4").innerHTML = "6.9444%";
345 + document.getElementById("five_5").innerHTML = "0.4630%";
346 + }
347 + document.getElementById("4kind").innerHTML = "7.4074%";
348 + document.getElementById("full").innerHTML = "9.7222%";
349 + document.getElementById("small").innerHTML = "5.5556%";
350 + document.getElementById("large").innerHTML = "0.0000%";
351 + document.getElementById("yacht").innerHTML = "0.4630%";
352 + }
353 + else if (count[3] == 2 || count[4] == 2)
354 + {
355 + if (count[3] == 2)
356 + {
357 + document.getElementById("three_1").innerHTML = "0.0000%";
358 + document.getElementById("three_2").innerHTML = "57.8704%";
359 + document.getElementById("three_3").innerHTML = "34.7222%";
360 + document.getElementById("three_4").innerHTML = "6.9444%";
361 + document.getElementById("three_5").innerHTML = "0.4630%";
362 + }
363 + else
364 + {
365 + document.getElementById("four_1").innerHTML = "0.0000%";
366 + document.getElementById("four_2").innerHTML = "57.8704%";
367 + document.getElementById("four_3").innerHTML = "34.7222%";
368 + document.getElementById("four_4").innerHTML = "6.9444%";
369 + document.getElementById("four_5").innerHTML = "0.4630%";
370 + }
371 + document.getElementById("4kind").innerHTML = "7.4074%";
372 + document.getElementById("full").innerHTML = "9.7222%";
373 + document.getElementById("small").innerHTML = "8.3333%";
374 + document.getElementById("large").innerHTML = "0.0000%";
375 + document.getElementById("yacht").innerHTML = "0.4630%";
376 + }
377 + else if (count[1] == 1 && count[2] == 1 ||
378 + count[5] == 1 && count[6] == 1)
379 + {
380 + document.getElementById("4kind").innerHTML = "0.9259%";
381 + document.getElementById("full").innerHTML = "2.7778%";
382 + document.getElementById("small").innerHTML = "13.8889%";
383 + document.getElementById("large").innerHTML = "2.7778%";
384 + document.getElementById("yacht").innerHTML = "0.0000%";
385 + }
386 + else if (count[1] == 1 && count[3] == 1 ||
387 + count[1] == 1 && count[4] == 1 ||
388 + count[3] == 1 && count[6] == 1 ||
389 + count[4] == 1 && count[6] == 1)
390 + {
391 + document.getElementById("4kind").innerHTML = "0.9259%";
392 + document.getElementById("full").innerHTML = "2.7778%";
393 + document.getElementById("small").innerHTML = "16.6667%";
394 + document.getElementById("large").innerHTML = "2.7778%";
395 + document.getElementById("yacht").innerHTML = "0.0000%";
396 + }
397 + else if (count[1] == 1 && count[5] == 1 ||
398 + count[2] == 1 && count[6] == 1)
399 + {
400 + document.getElementById("4kind").innerHTML = "0.9259%";
401 + document.getElementById("full").innerHTML = "2.7778%";
402 + document.getElementById("small").innerHTML = "5.5556%";
403 + document.getElementById("large").innerHTML = "2.7778%";
404 + document.getElementById("yacht").innerHTML = "0.0000%";
405 + }
406 + else if (count[1] == 1 && count[6] == 1)
407 + {
408 + document.getElementById("4kind").innerHTML = "0.9259%";
409 + document.getElementById("full").innerHTML = "2.7778%";
410 + document.getElementById("small").innerHTML = "5.5556%";
411 + document.getElementById("large").innerHTML = "0.0000%";
412 + document.getElementById("yacht").innerHTML = "0.0000%";
413 + }
414 + else if (count[2] == 1 && count[3] == 1 ||
415 + count[2] == 1 && count[4] == 1 ||
416 + count[3] == 1 && count[5] == 1 ||
417 + count[4] == 1 && count[5] == 1)
418 + {
419 + document.getElementById("4kind").innerHTML = "0.9259%";
420 + document.getElementById("full").innerHTML = "2.7778%";
421 + document.getElementById("small").innerHTML = "25.0000%";
422 + document.getElementById("large").innerHTML = "5.5556%";
423 + document.getElementById("yacht").innerHTML = "0.0000%";
424 + }
425 + else if (count[2] == 1 && count[5] == 1)
426 + {
427 + document.getElementById("4kind").innerHTML = "0.9259%";
428 + document.getElementById("full").innerHTML = "2.7778%";
429 + document.getElementById("small").innerHTML = "13.8889%";
430 + document.getElementById("large").innerHTML = "5.5556%";
431 + document.getElementById("yacht").innerHTML = "0.0000%";
432 + }
433 + else if (count[3] == 1 && count[4] == 1)
434 + {
435 + document.getElementById("4kind").innerHTML = "0.9259%";
436 + document.getElementById("full").innerHTML = "2.7778%";
437 + document.getElementById("small").innerHTML = "36.1111%";
438 + document.getElementById("large").innerHTML = "5.5556%";
439 + document.getElementById("yacht").innerHTML = "0.0000%";
440 + }
441 + document.getElementById("choice").innerHTML = parseInt(sum + 3) + " : 0.4630%<br>"
442 + + parseInt(sum + 4) + " : 1.3889%<br>"
443 + + parseInt(sum + 5) + " : 2.7778%<br>"
444 + + parseInt(sum + 6) + " : 4.6296%<br>"
445 + + parseInt(sum + 7) + " : 6.9444%<br>"
446 + + parseInt(sum + 8) + " : 9.7222%<br>"
447 + + parseInt(sum + 9) + " : 11.5741%<br>"
448 + + parseInt(sum + 10) + " : 12.5000%<br>"
449 + + parseInt(sum + 11) + " : 12.5000%<br>"
450 + + parseInt(sum + 12) + " : 11.5741%<br>"
451 + + parseInt(sum + 13) + " : 9.7222%<br>"
452 + + parseInt(sum + 14) + " : 6.9444%<br>"
453 + + parseInt(sum + 15) + " : 4.6296%<br>"
454 + + parseInt(sum + 16) + " : 2.7778%<br>"
455 + + parseInt(sum + 17) + " : 1.3889%<br>"
456 + + parseInt(sum + 18) + " : 0.4630%";
457 + }
458 + else if (rollNum == 2)
459 + {
460 + document.getElementById("ace_1").innerHTML = "27.7778%";
461 + document.getElementById("ace_2").innerHTML = "2.7778%";
462 + document.getElementById("ace_3").innerHTML = "0.0000%";
463 + document.getElementById("ace_4").innerHTML = "0.0000%";
464 + document.getElementById("ace_5").innerHTML = "0.0000%";
465 +
466 + document.getElementById("duece_1").innerHTML = "27.7778%";
467 + document.getElementById("duece_2").innerHTML = "2.7778%";
468 + document.getElementById("duece_3").innerHTML = "0.0000%";
469 + document.getElementById("duece_4").innerHTML = "0.0000%";
470 + document.getElementById("duece_5").innerHTML = "0.0000%";
471 +
472 + document.getElementById("three_1").innerHTML = "27.7778%";
473 + document.getElementById("three_2").innerHTML = "2.7778%";
474 + document.getElementById("three_3").innerHTML = "0.0000%";
475 + document.getElementById("three_4").innerHTML = "0.0000%";
476 + document.getElementById("three_5").innerHTML = "0.0000%";
477 +
478 + document.getElementById("four_1").innerHTML = "27.7778%";
479 + document.getElementById("four_2").innerHTML = "2.7778%";
480 + document.getElementById("four_3").innerHTML = "0.0000%";
481 + document.getElementById("four_4").innerHTML = "0.0000%";
482 + document.getElementById("four_5").innerHTML = "0.0000%";
483 +
484 + document.getElementById("five_1").innerHTML = "27.7778%";
485 + document.getElementById("five_2").innerHTML = "2.7778%";
486 + document.getElementById("five_3").innerHTML = "0.0000%";
487 + document.getElementById("five_4").innerHTML = "0.0000%";
488 + document.getElementById("five_5").innerHTML = "0.0000%";
489 +
490 + document.getElementById("six_1").innerHTML = "27.7778%";
491 + document.getElementById("six_2").innerHTML = "2.7778%";
492 + document.getElementById("six_3").innerHTML = "0.0000%";
493 + document.getElementById("six_4").innerHTML = "0.0000%";
494 + document.getElementById("six_5").innerHTML = "0.0000%";
495 +
496 + if (count[1] == 3)
497 + {
498 + document.getElementById("ace_1").innerHTML = "0.0000%";
499 + document.getElementById("ace_2").innerHTML = "0.0000%";
500 + document.getElementById("ace_3").innerHTML = "69.4444%";
501 + document.getElementById("ace_4").innerHTML = "27.7778%";
502 + document.getElementById("ace_5").innerHTML = "2.7778%";
503 + }
504 + else if (count[1] == 2)
505 + {
506 + document.getElementById("ace_1").innerHTML = "0.0000%";
507 + document.getElementById("ace_2").innerHTML = "69.4444%";
508 + document.getElementById("ace_3").innerHTML = "27.7778%";
509 + document.getElementById("ace_4").innerHTML = "2.7778%";
510 + document.getElementById("ace_5").innerHTML = "0.0000%";
511 + }
512 + else if (count[1] == 1)
513 + {
514 + document.getElementById("ace_1").innerHTML = "69.4444%";
515 + document.getElementById("ace_2").innerHTML = "27.7778%";
516 + document.getElementById("ace_3").innerHTML = "2.7778%";
517 + document.getElementById("ace_4").innerHTML = "0.0000%";
518 + document.getElementById("ace_5").innerHTML = "0.0000%";
519 + }
520 + if (count[2] == 3)
521 + {
522 + document.getElementById("duece_1").innerHTML = "0.0000%";
523 + document.getElementById("duece_2").innerHTML = "0.0000%";
524 + document.getElementById("duece_3").innerHTML = "69.4444%";
525 + document.getElementById("duece_4").innerHTML = "27.7778%";
526 + document.getElementById("duece_5").innerHTML = "2.7778%";
527 + }
528 + else if (count[2] == 2)
529 + {
530 + document.getElementById("duece_1").innerHTML = "0.0000%";
531 + document.getElementById("duece_2").innerHTML = "69.4444%";
532 + document.getElementById("duece_3").innerHTML = "27.7778%";
533 + document.getElementById("duece_4").innerHTML = "2.7778%";
534 + document.getElementById("duece_5").innerHTML = "0.0000%";
535 + }
536 + else if (count[2] == 1)
537 + {
538 + document.getElementById("duece_1").innerHTML = "69.4444%";
539 + document.getElementById("duece_2").innerHTML = "27.7778%";
540 + document.getElementById("duece_3").innerHTML = "2.7778%";
541 + document.getElementById("duece_4").innerHTML = "0.0000%";
542 + document.getElementById("duece_5").innerHTML = "0.0000%";
543 + }
544 + if (count[3] == 3)
545 + {
546 + document.getElementById("three_1").innerHTML = "0.0000%";
547 + document.getElementById("three_2").innerHTML = "0.0000%";
548 + document.getElementById("three_3").innerHTML = "69.4444%";
549 + document.getElementById("three_4").innerHTML = "27.7778%";
550 + document.getElementById("three_5").innerHTML = "2.7778%";
551 + }
552 + else if (count[3] == 2)
553 + {
554 + document.getElementById("three_1").innerHTML = "0.0000%";
555 + document.getElementById("three_2").innerHTML = "69.4444%";
556 + document.getElementById("three_3").innerHTML = "27.7778%";
557 + document.getElementById("three_4").innerHTML = "2.7778%";
558 + document.getElementById("three_5").innerHTML = "0.0000%";
559 + }
560 + else if (count[3] == 1)
561 + {
562 + document.getElementById("three_1").innerHTML = "69.4444%";
563 + document.getElementById("three_2").innerHTML = "27.7778%";
564 + document.getElementById("three_3").innerHTML = "2.7778%";
565 + document.getElementById("three_4").innerHTML = "0.0000%";
566 + document.getElementById("three_5").innerHTML = "0.0000%";
567 + }
568 + if (count[4] == 3)
569 + {
570 + document.getElementById("four_1").innerHTML = "0.0000%";
571 + document.getElementById("four_2").innerHTML = "0.0000%";
572 + document.getElementById("four_3").innerHTML = "69.4444%";
573 + document.getElementById("four_4").innerHTML = "27.7778%";
574 + document.getElementById("four_5").innerHTML = "2.7778%";
575 + }
576 + else if (count[4] == 2)
577 + {
578 + document.getElementById("four_1").innerHTML = "0.0000%";
579 + document.getElementById("four_2").innerHTML = "69.4444%";
580 + document.getElementById("four_3").innerHTML = "27.7778%";
581 + document.getElementById("four_4").innerHTML = "2.7778%";
582 + document.getElementById("four_5").innerHTML = "0.0000%";
583 + }
584 + else if (count[4] == 1)
585 + {
586 + document.getElementById("four_1").innerHTML = "69.4444%";
587 + document.getElementById("four_2").innerHTML = "27.7778%";
588 + document.getElementById("four_3").innerHTML = "2.7778%";
589 + document.getElementById("four_4").innerHTML = "0.0000%";
590 + document.getElementById("four_5").innerHTML = "0.0000%";
591 + }
592 + if (count[5] == 3)
593 + {
594 + document.getElementById("five_1").innerHTML = "0.0000%";
595 + document.getElementById("five_2").innerHTML = "0.0000%";
596 + document.getElementById("five_3").innerHTML = "69.4444%";
597 + document.getElementById("five_4").innerHTML = "27.7778%";
598 + document.getElementById("five_5").innerHTML = "2.7778%";
599 + }
600 + else if (count[5] == 2)
601 + {
602 + document.getElementById("five_1").innerHTML = "0.0000%";
603 + document.getElementById("five_2").innerHTML = "69.4444%";
604 + document.getElementById("five_3").innerHTML = "27.7778%";
605 + document.getElementById("five_4").innerHTML = "2.7778%";
606 + document.getElementById("five_5").innerHTML = "0.0000%";
607 + }
608 + else if (count[5] == 1)
609 + {
610 + document.getElementById("five_1").innerHTML = "69.4444%";
611 + document.getElementById("five_2").innerHTML = "27.7778%";
612 + document.getElementById("five_3").innerHTML = "2.7778%";
613 + document.getElementById("five_4").innerHTML = "0.0000%";
614 + document.getElementById("five_5").innerHTML = "0.0000%";
615 + }
616 + if (count[6] == 3)
617 + {
618 + document.getElementById("six_1").innerHTML = "0.0000%";
619 + document.getElementById("six_2").innerHTML = "0.0000%";
620 + document.getElementById("six_3").innerHTML = "69.4444%";
621 + document.getElementById("six_4").innerHTML = "27.7778%";
622 + document.getElementById("six_5").innerHTML = "2.7778%";
623 + }
624 + else if (count[6] == 2)
625 + {
626 + document.getElementById("six_1").innerHTML = "0.0000%";
627 + document.getElementById("six_2").innerHTML = "69.4444%";
628 + document.getElementById("six_3").innerHTML = "27.7778%";
629 + document.getElementById("six_4").innerHTML = "2.7778%";
630 + document.getElementById("six_5").innerHTML = "0.0000%";
631 + }
632 + else if (count[6] == 1)
633 + {
634 + document.getElementById("six_1").innerHTML = "69.4444%";
635 + document.getElementById("six_2").innerHTML = "27.7778%";
636 + document.getElementById("six_3").innerHTML = "2.7778%";
637 + document.getElementById("six_4").innerHTML = "0.0000%";
638 + document.getElementById("six_5").innerHTML = "0.0000%";
639 + }
640 + if (count[1] == 3 || count[2] == 3 || count[3] == 3 || count[4] == 3 || count[5] == 3 || count[6] == 3)
641 + {
642 + document.getElementById("4kind").innerHTML = "30.5556%";
643 + document.getElementById("full").innerHTML = "16.6667%";
644 + document.getElementById("small").innerHTML = "0.0000%";
645 + document.getElementById("large").innerHTML = "0.0000%";
646 + document.getElementById("yacht").innerHTML = "2.7778%";
647 + }
648 + else if (count[1] == 2 && count[2] == 1 ||
649 + count[1] == 2 && count[3] == 1 ||
650 + count[1] == 2 && count[4] == 1 ||
651 + count[1] == 1 && count[2] == 2 ||
652 + count[1] == 1 && count[3] == 2 ||
653 + count[1] == 1 && count[4] == 2 ||
654 + count[2] == 2 && count[5] == 1 ||
655 + count[2] == 1 && count[5] == 2 ||
656 + count[3] == 2 && count[6] == 1 ||
657 + count[3] == 1 && count[6] == 2 ||
658 + count[4] == 2 && count[6] == 1 ||
659 + count[4] == 1 && count[6] == 2 ||
660 + count[5] == 2 && count[6] == 1 ||
661 + count[5] == 1 && count[6] == 2)
662 + {
663 + document.getElementById("4kind").innerHTML = "2.7778%";
664 + document.getElementById("full").innerHTML = "8.3333%";
665 + document.getElementById("small").innerHTML = "5.5556%";
666 + document.getElementById("large").innerHTML = "0.0000%";
667 + document.getElementById("yacht").innerHTML = "0.0000%";
668 + }
669 + else if (count[1] == 2 && count[5] == 1 ||
670 + count[1] == 2 && count[6] == 1 ||
671 + count[1] == 1 && count[5] == 2 ||
672 + count[1] == 1 && count[6] == 2 ||
673 + count[2] == 2 && count[6] == 1 ||
674 + count[2] == 1 && count[6] == 2)
675 + {
676 + document.getElementById("4kind").innerHTML = "2.7778%";
677 + document.getElementById("full").innerHTML = "8.3333%";
678 + document.getElementById("small").innerHTML = "0.0000%";
679 + document.getElementById("large").innerHTML = "0.0000%";
680 + document.getElementById("yacht").innerHTML = "0.0000%";
681 + }
682 + else if (count[1] == 1 && count[2] == 1 && count[3] == 1 ||
683 + count[1] == 1 && count[2] == 1 && count[4] == 1 ||
684 + count[3] == 1 && count[5] == 1 && count[6] == 1 ||
685 + count[4] == 1 && count[5] == 1 && count[6] == 1 )
686 + {
687 + document.getElementById("4kind").innerHTML = "0.0000%";
688 + document.getElementById("full").innerHTML = "0.0000%";
689 + document.getElementById("small").innerHTML = "30.5556%";
690 + document.getElementById("large").innerHTML = "5.5556%";
691 + document.getElementById("yacht").innerHTML = "0.0000%";
692 + }
693 + else if (count[1] == 1 && count[2] == 1 && count[5] == 1 ||
694 + count[2] == 1 && count[5] == 1 && count[6] == 1)
695 + {
696 + document.getElementById("4kind").innerHTML = "0.0000%";
697 + document.getElementById("full").innerHTML = "0.0000%";
698 + document.getElementById("small").innerHTML = "5.5556%";
699 + document.getElementById("large").innerHTML = "5.5556%";
700 + document.getElementById("yacht").innerHTML = "0.0000%";
701 + }
702 + else if (count[1] == 1 && count[2] == 1 && count[6] == 1 ||
703 + count[1] == 1 && count[5] == 1 && count[6] == 1)
704 + {
705 + document.getElementById("4kind").innerHTML = "0.0000%";
706 + document.getElementById("full").innerHTML = "0.0000%";
707 + document.getElementById("small").innerHTML = "5.5556%";
708 + document.getElementById("large").innerHTML = "0.0000%";
709 + document.getElementById("yacht").innerHTML = "0.0000%";
710 + }
711 + else if (count[1] == 1 && count[3] == 1 && count[4] == 1 ||
712 + count[3] == 1 && count[4] == 1 && count[6] == 1)
713 + {
714 + document.getElementById("4kind").innerHTML = "0.0000%";
715 + document.getElementById("full").innerHTML = "0.0000%";
716 + document.getElementById("small").innerHTML = "36.1111%";
717 + document.getElementById("large").innerHTML = "5.5556%";
718 + document.getElementById("yacht").innerHTML = "0.0000%";
719 + }
720 + else if (count[1] == 1 && count[3] == 1 && count[5] == 1 ||
721 + count[1] == 1 && count[4] == 1 && count[5] == 1 ||
722 + count[2] == 1 && count[3] == 1 && count[6] == 1 ||
723 + count[2] == 1 && count[4] == 1 && count[6] == 1 )
724 + {
725 + document.getElementById("4kind").innerHTML = "0.0000%";
726 + document.getElementById("full").innerHTML = "0.0000%";
727 + document.getElementById("small").innerHTML = "11.1111%";
728 + document.getElementById("large").innerHTML = "5.5556%";
729 + document.getElementById("yacht").innerHTML = "0.0000%";
730 + }
731 + else if (count[1] == 1 && count[3] == 1 && count[6] == 1 ||
732 + count[1] == 1 && count[4] == 1 && count[6] == 1)
733 + {
734 + document.getElementById("4kind").innerHTML = "0.0000%";
735 + document.getElementById("full").innerHTML = "0.0000%";
736 + document.getElementById("small").innerHTML = "11.1111%";
737 + document.getElementById("large").innerHTML = "0.0000%";
738 + document.getElementById("yacht").innerHTML = "0.0000%";
739 + }
740 + else if (count[2] == 2 && count[3] == 1 ||
741 + count[2] == 2 && count[4] == 1 ||
742 + count[2] == 1 && count[3] == 2 ||
743 + count[2] == 1 && count[4] == 2 ||
744 + count[3] == 2 && count[5] == 1 ||
745 + count[3] == 1 && count[5] == 2 ||
746 + count[4] == 2 && count[5] == 1 ||
747 + count[4] == 1 && count[5] == 2)
748 + {
749 + document.getElementById("4kind").innerHTML = "2.7778%";
750 + document.getElementById("full").innerHTML = "8.3333%";
751 + document.getElementById("small").innerHTML = "11.1111%";
752 + document.getElementById("large").innerHTML = "0.0000%";
753 + document.getElementById("yacht").innerHTML = "0.0000%";
754 + }
755 + else if (count[2] == 1 && count[3] == 1 && count[4] == 1 ||
756 + count[3] == 1 && count[4] == 1 && count[5] == 1)
757 + {
758 + document.getElementById("4kind").innerHTML = "0.0000%";
759 + document.getElementById("full").innerHTML = "0.0000%";
760 + document.getElementById("small").innerHTML = "55.5556%";
761 + document.getElementById("large").innerHTML = "11.1111%";
762 + document.getElementById("yacht").innerHTML = "0.0000%";
763 + }
764 + else if (count[2] == 1 && count[3] == 1 && count[5] == 1 ||
765 + count[2] == 1 && count[4] == 1 && count[5] == 1)
766 + {
767 + document.getElementById("4kind").innerHTML = "0.0000%";
768 + document.getElementById("full").innerHTML = "0.0000%";
769 + document.getElementById("small").innerHTML = "30.5556%";
770 + document.getElementById("large").innerHTML = "11.1111%";
771 + document.getElementById("yacht").innerHTML = "0.0000%";
772 + }
773 + else if (count[3] == 2 && count[4] == 1 ||
774 + count[3] == 1 && count[4] == 2)
775 + {
776 + document.getElementById("4kind").innerHTML = "2.7778%";
777 + document.getElementById("full").innerHTML = "8.3333%";
778 + document.getElementById("small").innerHTML = "16.6667%";
779 + document.getElementById("large").innerHTML = "0.0000%";
780 + document.getElementById("yacht").innerHTML = "0.0000%";
781 + }
782 + document.getElementById("choice").innerHTML = parseInt(sum + 2) + " : 2.7778%<br>"
783 + + parseInt(sum + 3) + " : 5.5556%<br>"
784 + + parseInt(sum + 4) + " : 8.3333%<br>"
785 + + parseInt(sum + 5) + " : 11.1111%<br>"
786 + + parseInt(sum + 6) + " : 13.8889%<br>"
787 + + parseInt(sum + 7) + " : 16.6667%<br>"
788 + + parseInt(sum + 8) + " : 13.8889%<br>"
789 + + parseInt(sum + 9) + " : 11.1111%<br>"
790 + + parseInt(sum + 10) + " : 8.3333%<br>"
791 + + parseInt(sum + 11) + " : 5.5556%<br>"
792 + + parseInt(sum + 12) + " : 2.7778%";
793 + }
794 + else if (rollNum == 1)
795 + {
796 + var aceToSix = [[0, 0, 0, 0, 0],
797 + [0, 0, 0, 0, 0],
798 + [0, 0, 0, 0, 0],
799 + [0, 0, 0, 0, 0],
800 + [0, 0, 0, 0, 0],
801 + [0, 0, 0, 0, 0]];
802 + var made = [0, 0, 0, 0, 0];
803 + for (var i = 1; i <= 6; i++)
804 + {
805 + count[i] += 1;
806 + if (count[1] == 1)
807 + aceToSix[0][0] += 1;
808 + else if (count[1] == 2)
809 + aceToSix[0][1] += 1;
810 + else if (count[1] == 3)
811 + aceToSix[0][2] += 1;
812 + else if (count[1] == 4)
813 + aceToSix[0][3] += 1;
814 + else if (count[1] == 5)
815 + aceToSix[0][4] += 1;
816 + if (count[2] == 1)
817 + aceToSix[1][0] += 1;
818 + else if (count[2] == 2)
819 + aceToSix[1][1] += 1;
820 + else if (count[2] == 3)
821 + aceToSix[1][2] += 1;
822 + else if (count[2] == 4)
823 + aceToSix[1][3] += 1;
824 + else if (count[2] == 5)
825 + aceToSix[1][4] += 1;
826 + if (count[3] == 1)
827 + aceToSix[2][0] += 1;
828 + else if (count[3] == 2)
829 + aceToSix[2][1] += 1;
830 + else if (count[3] == 3)
831 + aceToSix[2][2] += 1;
832 + else if (count[3] == 4)
833 + aceToSix[2][3] += 1;
834 + else if (count[3] == 5)
835 + aceToSix[2][4] += 1;
836 + if (count[4] == 1)
837 + aceToSix[3][0] += 1;
838 + else if (count[4] == 2)
839 + aceToSix[3][1] += 1;
840 + else if (count[4] == 3)
841 + aceToSix[3][2] += 1;
842 + else if (count[4] == 4)
843 + aceToSix[3][3] += 1;
844 + else if (count[4] == 5)
845 + aceToSix[3][4] += 1;
846 + if (count[5] == 1)
847 + aceToSix[4][0] += 1;
848 + else if (count[5] == 2)
849 + aceToSix[4][1] += 1;
850 + else if (count[5] == 3)
851 + aceToSix[4][2] += 1;
852 + else if (count[5] == 4)
853 + aceToSix[4][3] += 1;
854 + else if (count[5] == 5)
855 + aceToSix[4][4] += 1;
856 + if (count[6] == 1)
857 + aceToSix[5][0] += 1;
858 + else if (count[6] == 2)
859 + aceToSix[5][1] += 1;
860 + else if (count[6] == 3)
861 + aceToSix[5][2] += 1;
862 + else if (count[6] == 4)
863 + aceToSix[5][3] += 1;
864 + else if (count[6] == 5)
865 + aceToSix[5][4] += 1;
866 +
867 + if (count[1] == 5 || count[2] == 5 || count[3] == 5 || count[4] == 5 || count[5] == 5 || count[6] == 5)
868 + {
869 + made[4] += 1;
870 + }
871 + if (count[1] >= 4 || count[2] >= 4 || count[3] >= 4 || count[4] >= 4 || count[5] >= 4 || count[6] >= 4)
872 + {
873 + made[0] += 1;
874 + }
875 + for (var j = 1; j < 7; j++)
876 + {
877 + var loop_escape = false;
878 + if (count[j] == 5)
879 + {
880 + made[1] += 1;
881 + loop_escape = true;
882 + }
883 + else if (count[j] == 3)
884 + {
885 + for (var k = 1; k < 7; k++)
886 + if (count[k] == 2)
887 + {
888 + made[1] += 1;
889 + loop_escape = true;
890 + break;
891 + }
892 + }
893 + if (loop_escape) break;
894 + }
895 + if (count[1] == 1 && count[2] == 1 && count[3] == 1 && count[4] == 1 && count[5] == 1 ||
896 + count[2] == 1 && count[3] == 1 && count[4] == 1 && count[5] == 1 && count[6] == 1)
897 + made[3] += 1;
898 + if (count[1] != 0 && count[2] != 0 && count[3] != 0 && count[4] != 0 ||
899 + count[2] != 0 && count[3] != 0 && count[4] != 0 && count[5] != 0 ||
900 + count[3] != 0 && count[4] != 0 && count[5] != 0 && count[6] != 0)
901 + made[2] += 1;
902 + count[i] -= 1;
903 + }
904 + document.getElementById("ace_1").innerHTML = (aceToSix[0][0]*100 / 6).toFixed(4) + "%";
905 + document.getElementById("ace_2").innerHTML = (aceToSix[0][1]*100 / 6).toFixed(4) + "%";
906 + document.getElementById("ace_3").innerHTML = (aceToSix[0][2]*100 / 6).toFixed(4) + "%";
907 + document.getElementById("ace_4").innerHTML = (aceToSix[0][3]*100 / 6).toFixed(4) + "%";
908 + document.getElementById("ace_5").innerHTML = (aceToSix[0][4]*100 / 6).toFixed(4) + "%";
909 +
910 + document.getElementById("duece_1").innerHTML = (aceToSix[1][0]*100 / 6).toFixed(4) + "%";
911 + document.getElementById("duece_2").innerHTML = (aceToSix[1][1]*100 / 6).toFixed(4) + "%";
912 + document.getElementById("duece_3").innerHTML = (aceToSix[1][2]*100 / 6).toFixed(4) + "%";
913 + document.getElementById("duece_4").innerHTML = (aceToSix[1][3]*100 / 6).toFixed(4) + "%";
914 + document.getElementById("duece_5").innerHTML = (aceToSix[1][4]*100 / 6).toFixed(4) + "%";
915 +
916 + document.getElementById("three_1").innerHTML = (aceToSix[2][0]*100 / 6).toFixed(4) + "%";
917 + document.getElementById("three_2").innerHTML = (aceToSix[2][1]*100 / 6).toFixed(4) + "%";
918 + document.getElementById("three_3").innerHTML = (aceToSix[2][2]*100 / 6).toFixed(4) + "%";
919 + document.getElementById("three_4").innerHTML = (aceToSix[2][3]*100 / 6).toFixed(4) + "%";
920 + document.getElementById("three_5").innerHTML = (aceToSix[2][4]*100 / 6).toFixed(4) + "%";
921 +
922 + document.getElementById("four_1").innerHTML = (aceToSix[3][0]*100 / 6).toFixed(4) + "%";
923 + document.getElementById("four_2").innerHTML = (aceToSix[3][1]*100 / 6).toFixed(4) + "%";
924 + document.getElementById("four_3").innerHTML = (aceToSix[3][2]*100 / 6).toFixed(4) + "%";
925 + document.getElementById("four_4").innerHTML = (aceToSix[3][3]*100 / 6).toFixed(4) + "%";
926 + document.getElementById("four_5").innerHTML = (aceToSix[3][4]*100 / 6).toFixed(4) + "%";
927 +
928 + document.getElementById("five_1").innerHTML = (aceToSix[4][0]*100 / 6).toFixed(4) + "%";
929 + document.getElementById("five_2").innerHTML = (aceToSix[4][1]*100 / 6).toFixed(4) + "%";
930 + document.getElementById("five_3").innerHTML = (aceToSix[4][2]*100 / 6).toFixed(4) + "%";
931 + document.getElementById("five_4").innerHTML = (aceToSix[4][3]*100 / 6).toFixed(4) + "%";
932 + document.getElementById("five_5").innerHTML = (aceToSix[4][4]*100 / 6).toFixed(4) + "%";
933 +
934 + document.getElementById("six_1").innerHTML = (aceToSix[5][0]*100 / 6).toFixed(4) + "%";
935 + document.getElementById("six_2").innerHTML = (aceToSix[5][1]*100 / 6).toFixed(4) + "%";
936 + document.getElementById("six_3").innerHTML = (aceToSix[5][2]*100 / 6).toFixed(4) + "%";
937 + document.getElementById("six_4").innerHTML = (aceToSix[5][3]*100 / 6).toFixed(4) + "%";
938 + document.getElementById("six_5").innerHTML = (aceToSix[5][4]*100 / 6).toFixed(4) + "%";
939 +
940 + document.getElementById("4kind").innerHTML = (made[0]*100 / 6).toFixed(4) + "%";
941 + document.getElementById("full").innerHTML = (made[1]*100 / 6).toFixed(4) + "%";
942 + document.getElementById("small").innerHTML = (made[2]*100 / 6).toFixed(4) + "%";
943 + document.getElementById("large").innerHTML = (made[3]*100 / 6).toFixed(4) + "%";
944 + document.getElementById("yacht").innerHTML = (made[4]*100 / 6).toFixed(4) + "%";
945 +
946 + document.getElementById("choice").innerHTML =parseInt(sum + 1) + " : 16.6667%<br>"
947 + +parseInt(sum + 2) + " : 16.6667%<br>"
948 + +parseInt(sum + 3) + " : 16.6667%<br>"
949 + +parseInt(sum + 4) + " : 16.6667%<br>"
950 + +parseInt(sum + 5) + " : 16.6667%<br>"
951 + +parseInt(sum + 6) + " : 16.6667%<br>";
952 + }
953 + else if (rollNum == 0)
954 + {
955 + var aceToSix = [[0, 0, 0, 0, 0],
956 + [0, 0, 0, 0, 0],
957 + [0, 0, 0, 0, 0],
958 + [0, 0, 0, 0, 0],
959 + [0, 0, 0, 0, 0],
960 + [0, 0, 0, 0, 0]];
961 + var made = [0, 0, 0, 0, 0];
962 + if (count[1] == 1)
963 + aceToSix[0][0] += 1;
964 + else if (count[1] == 2)
965 + aceToSix[0][1] += 1;
966 + else if (count[1] == 3)
967 + aceToSix[0][2] += 1;
968 + else if (count[1] == 4)
969 + aceToSix[0][3] += 1;
970 + else if (count[1] == 5)
971 + aceToSix[0][4] += 1;
972 + if (count[2] == 1)
973 + aceToSix[1][0] += 1;
974 + else if (count[2] == 2)
975 + aceToSix[1][1] += 1;
976 + else if (count[2] == 3)
977 + aceToSix[1][2] += 1;
978 + else if (count[2] == 4)
979 + aceToSix[1][3] += 1;
980 + else if (count[2] == 5)
981 + aceToSix[1][4] += 1;
982 + if (count[3] == 1)
983 + aceToSix[2][0] += 1;
984 + else if (count[3] == 2)
985 + aceToSix[2][1] += 1;
986 + else if (count[3] == 3)
987 + aceToSix[2][2] += 1;
988 + else if (count[3] == 4)
989 + aceToSix[2][3] += 1;
990 + else if (count[3] == 5)
991 + aceToSix[2][4] += 1;
992 + if (count[4] == 1)
993 + aceToSix[3][0] += 1;
994 + else if (count[4] == 2)
995 + aceToSix[3][1] += 1;
996 + else if (count[4] == 3)
997 + aceToSix[3][2] += 1;
998 + else if (count[4] == 4)
999 + aceToSix[3][3] += 1;
1000 + else if (count[4] == 5)
1001 + aceToSix[3][4] += 1;
1002 + if (count[5] == 1)
1003 + aceToSix[4][0] += 1;
1004 + else if (count[5] == 2)
1005 + aceToSix[4][1] += 1;
1006 + else if (count[5] == 3)
1007 + aceToSix[4][2] += 1;
1008 + else if (count[5] == 4)
1009 + aceToSix[4][3] += 1;
1010 + else if (count[5] == 5)
1011 + aceToSix[4][4] += 1;
1012 + if (count[6] == 1)
1013 + aceToSix[5][0] += 1;
1014 + else if (count[6] == 2)
1015 + aceToSix[5][1] += 1;
1016 + else if (count[6] == 3)
1017 + aceToSix[5][2] += 1;
1018 + else if (count[6] == 4)
1019 + aceToSix[5][3] += 1;
1020 + else if (count[6] == 5)
1021 + aceToSix[5][4] += 1;
1022 +
1023 + if (count[1] == 5 || count[2] == 5 || count[3] == 5 || count[4] == 5 || count[5] == 5 || count[6] == 5)
1024 + {
1025 + made[4] += 1;
1026 + }
1027 + if (count[1] >= 4 || count[2] >= 4 || count[3] >= 4 || count[4] >= 4 || count[5] >= 4 || count[6] >= 4)
1028 + {
1029 + made[0] += 1;
1030 + }
1031 + for (var j = 1; j < 7; j++)
1032 + {
1033 + var loop_escape = false;
1034 + if (count[j] == 5)
1035 + {
1036 + made[1] += 1;
1037 + loop_escape = true;
1038 + }
1039 + else if (count[j] == 3)
1040 + {
1041 + for (var k = 1; k < 7; k++)
1042 + if (count[k] == 2)
1043 + {
1044 + made[1] += 1;
1045 + loop_escape = true;
1046 + break;
1047 + }
1048 + }
1049 + if (loop_escape) break;
1050 + }
1051 + if (count[1] == 1 && count[2] == 1 && count[3] == 1 && count[4] == 1 && count[5] == 1 ||
1052 + count[2] == 1 && count[3] == 1 && count[4] == 1 && count[5] == 1 && count[6] == 1)
1053 + made[3] += 1;
1054 + if (count[1] != 0 && count[2] != 0 && count[3] != 0 && count[4] != 0 ||
1055 + count[2] != 0 && count[3] != 0 && count[4] != 0 && count[5] != 0 ||
1056 + count[3] != 0 && count[4] != 0 && count[5] != 0 && count[6] != 0)
1057 + made[2] += 1;
1058 + document.getElementById("ace_1").innerHTML = (aceToSix[0][0]*100).toFixed(4) + "%";
1059 + document.getElementById("ace_2").innerHTML = (aceToSix[0][1]*100).toFixed(4) + "%";
1060 + document.getElementById("ace_3").innerHTML = (aceToSix[0][2]*100).toFixed(4) + "%";
1061 + document.getElementById("ace_4").innerHTML = (aceToSix[0][3]*100).toFixed(4) + "%";
1062 + document.getElementById("ace_5").innerHTML = (aceToSix[0][4]*100).toFixed(4) + "%";
1063 +
1064 + document.getElementById("duece_1").innerHTML = (aceToSix[1][0]*100).toFixed(4) + "%";
1065 + document.getElementById("duece_2").innerHTML = (aceToSix[1][1]*100).toFixed(4) + "%";
1066 + document.getElementById("duece_3").innerHTML = (aceToSix[1][2]*100).toFixed(4) + "%";
1067 + document.getElementById("duece_4").innerHTML = (aceToSix[1][3]*100).toFixed(4) + "%";
1068 + document.getElementById("duece_5").innerHTML = (aceToSix[1][4]*100).toFixed(4) + "%";
1069 +
1070 + document.getElementById("three_1").innerHTML = (aceToSix[2][0]*100).toFixed(4) + "%";
1071 + document.getElementById("three_2").innerHTML = (aceToSix[2][1]*100).toFixed(4) + "%";
1072 + document.getElementById("three_3").innerHTML = (aceToSix[2][2]*100).toFixed(4) + "%";
1073 + document.getElementById("three_4").innerHTML = (aceToSix[2][3]*100).toFixed(4) + "%";
1074 + document.getElementById("three_5").innerHTML = (aceToSix[2][4]*100).toFixed(4) + "%";
1075 +
1076 + document.getElementById("four_1").innerHTML = (aceToSix[3][0]*100).toFixed(4) + "%";
1077 + document.getElementById("four_2").innerHTML = (aceToSix[3][1]*100).toFixed(4) + "%";
1078 + document.getElementById("four_3").innerHTML = (aceToSix[3][2]*100).toFixed(4) + "%";
1079 + document.getElementById("four_4").innerHTML = (aceToSix[3][3]*100).toFixed(4) + "%";
1080 + document.getElementById("four_5").innerHTML = (aceToSix[3][4]*100).toFixed(4) + "%";
1081 +
1082 + document.getElementById("five_1").innerHTML = (aceToSix[4][0]*100).toFixed(4) + "%";
1083 + document.getElementById("five_2").innerHTML = (aceToSix[4][1]*100).toFixed(4) + "%";
1084 + document.getElementById("five_3").innerHTML = (aceToSix[4][2]*100).toFixed(4) + "%";
1085 + document.getElementById("five_4").innerHTML = (aceToSix[4][3]*100).toFixed(4) + "%";
1086 + document.getElementById("five_5").innerHTML = (aceToSix[4][4]*100).toFixed(4) + "%";
1087 +
1088 + document.getElementById("six_1").innerHTML = (aceToSix[5][0]*100).toFixed(4) + "%";
1089 + document.getElementById("six_2").innerHTML = (aceToSix[5][1]*100).toFixed(4) + "%";
1090 + document.getElementById("six_3").innerHTML = (aceToSix[5][2]*100).toFixed(4) + "%";
1091 + document.getElementById("six_4").innerHTML = (aceToSix[5][3]*100).toFixed(4) + "%";
1092 + document.getElementById("six_5").innerHTML = (aceToSix[5][4]*100).toFixed(4) + "%";
1093 +
1094 + document.getElementById("4kind").innerHTML = (made[0]*100).toFixed(4) + "%";
1095 + document.getElementById("full").innerHTML = (made[1]*100).toFixed(4) + "%";
1096 + document.getElementById("small").innerHTML = (made[2]*100).toFixed(4) + "%";
1097 + document.getElementById("large").innerHTML = (made[3]*100).toFixed(4) + "%";
1098 + document.getElementById("yacht").innerHTML = (made[4]*100).toFixed(4) + "%";
1099 +
1100 + document.getElementById("choice").innerHTML =sum + " : 16.6667%<br>";
1101 + }
1102 +}
...\ No newline at end of file ...\ No newline at end of file