forked from to-omer/newincrementalgame-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
804 lines (759 loc) · 41.2 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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
<!DOCTYPE html>
<!--suppress JSUnusedLocalSymbols -->
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simulate newincrementalgame</title>
<link type="text/css" rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-zTROYFVGOfTw7JV7KUu8udsvW2fx4lWOsCEDqhBreBwlHI4ioVRtmIvEThzJHGET" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="nig_sim.css" />
</head>
<body>
<div id="app" class="container">
<div id="controlButtons" class="btn-group flex-wrap" role="group" aria-label="control buttons">
<button @click="importSave()" class="btn btn-outline-dark" type="button">データ取り込み</button>
<input type="checkbox" class="btn-check" id="basicInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="basicInfoB" data-bs-toggle="collapse" data-bs-target="#basicInfo"
aria-expanded="false" aria-controls="basicInfo">基本</label>
<input autocomplete="off" class="btn-check" id="gaBoughtB" type="checkbox">
<label aria-controls="gaBought" aria-expanded="false" class="btn btn-outline-dark" data-bs-target="#gaBought"
data-bs-toggle="collapse" for="gaBoughtB">器</label>
<input autocomplete="off"class="btn-check" id="darkBoughtB" type="checkbox" >
<label aria-controls="darkBought" aria-expanded="false" class="btn btn-outline-dark" data-bs-target="#darkBought"
data-bs-toggle="collapse" for="darkBoughtB"
v-if="nig.player.money.gte('1e100') || nig.player.darkMoney.gt(0) || nig.player.darkGenerators.some(d => d.gt(0))">裏</label>
<input type="checkbox" class="btn-check" id="timeInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="timeInfoB" data-bs-toggle="collapse" data-bs-target="#timeInfo"
aria-controls="timeInfo" aria-expanded="false" v-if="nig.player.accelLevel>0">時</label>
<input type="checkbox" class="btn-check" id="levelInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="levelInfoB" data-bs-toggle="collapse" data-bs-target="#levelInfo"
aria-expanded="false" aria-controls="levelInfo"
v-if="nig.player.leveResetTime.gt(0) || nig.player.rankResetTime.gt(0) || nig.player.crownResetTime.gt(0)">段位</label>
<input type="checkbox" class="btn-check" id="rankInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="rankInfoB" data-bs-toggle="collapse" data-bs-target="#rankInfo"
aria-expanded="false" aria-controls="rankInfo"
v-if="nig.player.rankResetTime.gt(0) || nig.player.crownResetTime.gt(0)">階位</label>
<input type="checkbox" class="btn-check" id="crownInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="crownInfoB" data-bs-toggle="collapse" data-bs-target="#crownInfo"
aria-expanded="false" aria-controls="crownInfo"
v-if="nig.player.crownResetTime.gt(0)">冠位</label>
<input type="checkbox" class="btn-check" id="shineInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="shineInfoB" data-bs-toggle="collapse" data-bs-target="#shineInfo"
aria-controls="shineInfo" aria-expanded="false" v-if="nig.player.challengeCleared.length >= 64">輝き</label>
<input type="checkbox" class="btn-check" id="worldInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="worldInfoB" data-bs-toggle="collapse" data-bs-target="#worldInfo"
aria-controls="worldInfo" aria-expanded="false" v-if="nig.worldOpened.slice(1).some(b => b)">世界</label>
<input type="checkbox" class="btn-check" id="chipInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="chipInfoB" data-bs-toggle="collapse" data-bs-target="#chipInfo"
aria-controls="chipInfo" aria-expanded="false" v-if="nig.player.smallTrophies[5]">鋳片</label>
<input type="checkbox" class="btn-check" id="statueInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="statueInfoB" data-bs-toggle="collapse" data-bs-target="#statueInfo"
aria-expanded="false" aria-controls="statueInfo" v-if="nig.player.chip[0] >= 10000 || nig.player.statue[0] >= 1">像</label>
<input type="checkbox" class="btn-check" id="trophyInfoB" autocomplete="off">
<label class="btn btn-outline-dark" for="trophyInfoB" data-bs-toggle="collapse" data-bs-target="#trophyInfo"
aria-expanded="false" aria-controls="trophyInfo">実績</label>
<input type="checkbox" class="btn-check" id="challengeViewB" autocomplete="off">
<label class="btn btn-outline-dark" for="challengeViewB" data-bs-toggle="collapse" data-bs-target="#challengeView"
aria-expanded="false" aria-controls="challengeView">挑戦</label>
<input autocomplete="off" class="btn-check" id="simulatedCheckpointsB" type="checkbox">
<label aria-controls="simulatedCheckpoints" aria-expanded="false" class="btn btn-outline-dark"
data-bs-target="#simulatedCheckpoints" data-bs-toggle="collapse" for="simulatedCheckpointsB">到達</label>
<input type="checkbox" class="btn-check" id="simulatedDarkB" autocomplete="off">
<label aria-controls="simulatedDark" aria-expanded="false" class="btn btn-outline-dark" data-bs-target="#simulatedDark"
data-bs-toggle="collapse" for="simulatedDarkB"
v-if="nig.player.money.gte('1e100') || nig.player.darkMoney.gt(0) || nig.player.darkGenerators.some(d => d.gt(0))">裏到達</label>
<input autocomplete="off" class="btn-check" id="gaExpressionB" type="checkbox">
<label aria-controls="gaExpression" aria-expanded="false" class="btn btn-outline-dark" data-bs-target="#gaExpression"
data-bs-toggle="collapse" for="gaExpressionB">式</label>
<input type="checkbox" class="btn-check" id="helpMessageB" autocomplete="off">
<label class="btn btn-outline-dark" for="helpMessageB" data-bs-toggle="collapse" data-bs-target="#helpMessage"
aria-expanded="false" aria-controls="helpMessage">?</label>
</div>
<div class="collapse" id="basicInfo">
<div class="card card-body">
<div v-if="nig.worldOpened.slice(1).some(b => b)">世界: {{ nig.world+1 }}</div>
<div id="money">ポイント: {{ formatDecimal(nig.player.money, 6) }}</div>
<div
v-if="nig.player.leveResetTime.gt(0) || nig.player.rankResetTime.gt(0) || nig.player.crownResetTime.gt(0)">
段位: {{ formatDecimal(nig.player.level, 6) }} 段位リセット: {{ formatDecimal(nig.player.leveResetTime, 6) }}
</div>
<div v-if="nig.player.rankResetTime.gt(0) || nig.player.crownResetTime.gt(0)">
階位: {{ formatDecimal(nig.player.rank, 6) }} 階位リセット: {{ formatDecimal(nig.player.rankResetTime, 6) }}
</div>
<div v-if="nig.player.crownResetTime.gt(0)">
冠位: {{ formatDecimal(nig.player.crown, 6) }} 冠位リセット: {{ formatDecimal(nig.player.crownResetTime, 6) }}
</div>
<div
v-if="nig.player.leveResetTime.gt(0) || nig.player.rankResetTime.gt(0) || nig.player.crownResetTime.gt(0)">
最大取得段位: {{ formatDecimal(nig.player.maxLevelGained, 6) }}
</div>
<div v-if="nig.player.challengeCleared.length>0">挑戦達成: {{ nig.player.challengeCleared.length }}</div>
<div v-if="nig.player.rankChallengeCleared.length>0">階位挑戦達成: {{ nig.player.rankChallengeCleared.length }}</div>
<div v-if="nig.worldOpened[1] || nig.worldOpened[2]">記憶: {{ nig.memory }}</div>
<div>里程: {{ nig.smallMemory }}</div>
<div v-if="nig.worldOpened[1] || nig.worldOpened[2]">合計思い出: {{ nig.countRemembers() }}</div>
<div v-if="nig.smallMemory>=75">世界管所持数: {{ Math.floor((nig.smallMemory - 72) / 3) }}</div>
</div>
</div>
<div class="collapse" id="gaBought">
<table class="table table-bordered table-sm text-center" style="margin-bottom: 0;">
<thead>
<tr>
<td class="align-middle" rowspan="2"></td>
<td class="align-middle" colspan="4">発生器</td>
<td class="align-middle" colspan="3">時間加速器</td>
</tr>
<tr>
<td class="align-middle">所持数</td>
<td class="align-middle">購入コスト</td>
<td class="align-middle">購入数</td>
<td class="d-grid">
<button type="button" class="btn btn-outline-dark btn-sm" @click="resetGeneratorMode()"
:disabled="!nig.isGeneratorModeChangeable() || nig.player.generatorsMode.every((m, i) => m == i)">
モード
</button>
</td>
<td class="align-middle">所持数</td>
<td class="align-middle">購入コスト</td>
<td class="align-middle">購入数</td>
</tr>
</thead>
<tbody>
<tr v-for="i in 8" :key="i">
<td class="align-middle">{{ i }}</td>
<td class="align-middle">{{ nig.player.generators[i-1].toExponential(3) }}</td>
<td class="d-grid">
<button type="button" class="btn btn-outline-dark btn-sm" @click="buyGenerator(i-1)"
:disabled="!nig.isGeneratorBuyable(i-1)">
{{ nig.player.generatorsCost[i-1].toExponential(3) }}
</button>
</td>
<td class="align-middle">{{ nig.player.generatorsBought[i-1].toNumber() }}</td>
<td class="d-grid">
<button type="button" class="btn btn-outline-dark btn-sm" @click="changeMode(i-1)"
:disabled="!nig.isGeneratorModeChangeable()">
{{ nig.player.generatorsMode[i-1] }}
</button>
</td>
<td class="align-middle" v-if="nig.isAcceleratorOpened(i-1)">
{{ nig.player.accelerators[i-1].toExponential(3) }}
</td>
<td v-else></td>
<td class="d-grid" v-if="nig.isAcceleratorOpened(i-1)">
<button type="button" class="btn btn-outline-dark btn-sm" @click="buyAccelerator(i-1)"
:disabled="!nig.isAcceleratorBuyable(i-1)">
{{ nig.player.acceleratorsCost[i-1].toExponential(3) }}
</button>
</td>
<td v-else></td>
<td class="align-middle" v-if="nig.isAcceleratorOpened(i-1)">
{{ nig.player.acceleratorsBought[i-1].toNumber() }}
</td>
<td v-else></td>
</tr>
</tbody>
</table>
</div>
<div class="collapse" id="darkBought">
<table class="table table-bordered table-sm text-center" style="margin-bottom: 0;">
<thead>
<tr>
<td class="align-middle" colspan="2">裏ポイント</td>
<td class="align-middle" colspan="2">{{ formatDecimal(nig.player.darkMoney, 6) }}</td>
<template v-if="isLightBought">
<td class="align-middle" colspan="2">天上ポイント</td>
<td class="align-middle" colspan="2">{{ formatDecimal(nig.player.lightMoney, 6) }}</td>
</template>
</tr>
<tr>
<td class="align-middle" colspan="2">裏段位</td>
<td class="align-middle" colspan="2">{{ formatDecimal(nig.player.darkLevel, 6) }}</td>
</tr>
<tr>
<td class="align-middle" rowspan="2"></td>
<td class="align-middle" colspan="3">裏発生器</td>
<template v-if="isLightBought">
<td class="align-middle" rowspan="2"></td>
<td class="align-middle" colspan="3">天上発生器</td>
</template>
</tr>
<tr>
<td class="align-middle">所持数</td>
<td class="align-middle">購入コスト</td>
<td class="align-middle">購入数</td>
<template v-if="isLightBought">
<td class="align-middle">所持数</td>
<td class="align-middle">購入コスト</td>
<td class="align-middle">購入数</td>
</template>
</tr>
</thead>
<tbody>
<tr v-for="i in 8" :key="i">
<td class="align-middle">{{ i }}</td>
<td class="align-middle">{{ nig.player.darkGenerators[i - 1].toExponential(3) }}</td>
<td class="d-grid">
<button type="button" class="btn btn-outline-dark btn-sm" @click="buyDarkGenerator(i-1)"
:disabled="!nig.isDarkGeneratorBuyable(i-1)">
{{ nig.player.darkGeneratorsCost[i - 1].toExponential(3) }}
</button>
</td>
<td class="align-middle">{{ nig.player.darkGeneratorsBought[i - 1].toNumber() }}</td>
<template v-if="isLightBought">
<td class="align-middle">{{ i }}</td>
<td class="align-middle">{{ nig.player.lightGenerators[i - 1].toExponential(3) }}</td>
<td class="d-grid">
<button type="button" class="btn btn-outline-dark btn-sm" @click="buyLightGenerator(i-1)"
:disabled="!nig.isLightGeneratorBuyable(i-1)">
{{ nig.player.lightGeneratorsCost[i - 1].toExponential(1) }}
</button>
</td>
<td class="align-middle">{{ nig.player.lightGeneratorsBought[i - 1].toNumber() }}</td>
</template>
</tr>
</tbody>
</table>
</div>
<div class="collapse" id="timeInfo">
<div class="card card-body">
<div>時間回帰力: {{ nig.player.accelLevel }}</div>
<div>
起動時間回帰力: {{ nig.player.accelLevelUsed }}
<button :disabled="nig.player.accelLevelUsed<=0" @click="workTime(nig.player.accelLevelUsed-1)" class="btn btn-outline-dark btn-sm"
type="button">-</button>
<button :disabled="nig.player.accelLevelUsed>=nig.player.accelLevel" @click="workTime(nig.player.accelLevelUsed+1)" class="btn btn-outline-dark btn-sm"
type="button">+</button>
</div>
<div>
時の結晶
<span :key="i" v-for="i in 8">
  結晶{{ i }}: {{ nig.player.timeCrystal[i-1] }}
</span>
</div>
</div>
</div>
<div class="collapse" id="levelInfo">
<div class="card card-body">
<div class="d-flex align-items-center flex-wrap">
<div>挑戦</div>
<div :key="i" class="tooltip-cell" v-for="i in 8">
<button type="button" class="btn" @click="nig.configChallenge(i-1)"
:class="buttonSelectedClass(nig.player.challenges[i-1])" :disabled="nig.player.onChallenge">
{{ i }}
</button>
<span class="up-tooltip">{{ itemData.challengeText[i - 1] }}</span>
</div>
<div class="tooltip-cell">
<button type="button" class="btn btn-outline-dark" @click="toggleChallenge"
:disabled="nig.calcChallengeId()==0">
{{ nig.player.onChallenge ? '挑戦放棄' : '挑戦開始' }}
</button>
<span class="up-tooltip" v-html="startChallengeMessage" v-if="nig.calcChallengeId()!=0"></span>
</div>
</div>
<div>勲章: {{ nig.player.token }}</div>
<div class="d-flex align-items-center flex-wrap">
<div>効力</div>
<div :key="i" class="tooltip-cell" v-for="i in 15">
<button type="button" class="btn" @click="toggleReward(i-1)"
:class="buttonSelectedClass(nig.player.challengeBonuses[i-1])" :disabled="!nig.isRewardToggleable(i-1)">
{{ i }}
</button>
<span class="up-tooltip">
コスト: {{ itemData.rewardCost[i - 1] }} <br /> {{ itemData.rewardText[i - 1] }}
</span>
</div>
</div>
<div v-if="nig.player.rankChallengeCleared.length>0">大勲章: {{ nig.player.rankToken }}</div>
<div class="d-flex align-items-center flex-wrap" v-if="nig.player.rankChallengeCleared.length>0">
<div>上位効力</div>
<div :key="i" class="tooltip-cell" v-for="i in 15">
<button type="button" class="btn" @click="toggleRankReward(i-1)"
:class="buttonSelectedClass(nig.player.rankChallengeBonuses[i-1])"
:disabled="!nig.isRankRewardToggleable(i-1)">
{{ i }}
</button>
<span class="up-tooltip">
コスト: {{ itemData.rewardCost[i - 1] }} <br /> {{ itemData.rankRewardText[i - 1] }}
</span>
</div>
</div>
</div>
</div>
<div class="collapse" id="rankInfo">
<div class="card card-body">
<div v-for="i in 5" :key="i">
<span>段位効力{{ i }}{{ ' ' }}</span>
<span class="tooltip-cell">
<button @click="buyLevelItems(i-1)" class="btn btn-outline-dark btn-sm" type="button"
:disabled="!nig.isLevelItemBuyable(i-1)">
購入コスト: {{ nig.calcLevelItemCost(i - 1).toExponential(1) }}
</button>
<span class="up-tooltip">
{{ itemData.levelItemText[i - 1] }}
</span>
</span>
<span> 所持数: {{ nig.player.levelItems[i - 1] }}</span>
</div>
<div>累計購入回数: {{ nig.player.levelItemBought }}</div>
</div>
</div>
<div class="collapse" id="crownInfo">
<div class="card card-body">
<div class="form-check">
<input class="form-check-input" id="doPC_reset" type="checkbox" v-model="isPerfectChallengeReset">
<label class="form-check-label" for="doPC_reset">挑戦開始時に状態をリセットする</label>
</div>
<div class="d-flex align-items-center flex-wrap">
<div>完全挑戦</div>
<div :key="i" class="tooltip-cell" v-for="i in 10">
<button type="button" class="btn" @click="nig.configPerfectChallenge(i-1)"
:class="buttonSelectedClass(nig.player.pChallenges[i-1])" :disabled="nig.player.onPChallenge">
{{ i }}
</button>
<span class="up-tooltip">{{ itemData.perfectChallengetext[i - 1] }}</span>
</div>
<div class="tooltip-cell">
<button type="button" class="btn btn-outline-dark" @click="togglePerfectChallenge"
:disabled="!(nig.isStartPerfectChallenge() || nig.player.onPChallenge)">
{{ nig.player.onPChallenge ? '挑戦終了' : '挑戦開始' }}
</button>
<span class="up-tooltip" v-html="startPerfectChallengeMessage"></span>
</div>
</div>
<div>完全挑戦段階: {{ nig.pChallengeStage }}</div>
</div>
</div>
<div class="collapse" id="shineInfo">
<div class="card card-body">
<div>
輝き所持数: {{ nig.player.shine }}
<span v-for="(length, i) in shineChallengeLength">
<button class="btn btn-outline-dark" type="button" v-if="nig.player.challengeCleared.length >= length"
@click="spendShine(Math.pow(10, i))" :disabled="nig.player.shine<Math.pow(10, i)">
輝き消費: {{ Math.pow(10, i) }}
</button>
</span>
<span>
<button :disabled="nig.player.shine<1000000" @click="spendShine(1000000)" class="btn btn-outline-dark"
type="button" v-if="nig.pChallengeStage >= 10">
輝き消費: 1000000
</button>
</span>
</div>
<div v-if="nig.player.rankChallengeCleared.length>=32">
煌き所持数: {{ nig.player.brightness }}
<span v-for="(length, i) in brightnessRankChallengeLength">
<button class="btn btn-outline-dark" type="button" v-if="nig.player.rankChallengeCleared.length >= length"
@click="spendBrightness(Math.pow(10, i))" :disabled="nig.player.brightness<Math.pow(10, i)">
煌き消費: {{ Math.pow(10, i) }}
</button>
</span>
</div>
<div v-if="nig.pChallengeStage>=1">
瞬き所持数: {{ nig.player.flicker }}
<span v-for="(length, i) in flickerPChallengeStage">
<button :disabled="nig.player.flicker<Math.pow(10, i)" @click="spendFlicker(Math.pow(10, i))" class="btn btn-outline-dark"
type="button" v-if="nig.pChallengeStage >= length">
瞬き消費: {{ Math.pow(10, i) }}
</button>
</span>
</div>
<div v-if="nig.pChallengeStage>=10">
残滓: {{ nig.player.residue }}
</div>
</div>
</div>
<div class="collapse" id="worldInfo">
<table class="table table-bordered table-sm text-center" style="margin-bottom: 0;">
<thead>
<tr>
<td class="align-middle"></td>
<td class="align-middle">記憶</td>
<td class="align-middle">思い出</td>
<td class="align-middle">里程</td>
<td class="align-middle">世界管</td>
<td :key="j" class="align-middle" v-for="j in 10" v-show="nig.worldOpened[j-1]">{{ j }}</td>
</tr>
</thead>
<tbody>
<tr v-for="i in 10" :key="i">
<td class="d-grid">
<button :class="buttonSelectedClass(nig.world == i-1)" :disabled="!nig.worldOpened[i-1]" class="btn btn-sm"
type="button" v-if="nig.worldOpened[i-1]"
@click="selectWorld(i - 1)">世界{{ i }}</button>
</td>
<td class="align-middle">{{ nig.players[i-1].trophies.reduce((x, y) => x + (y ? 1 : 0), 0) }}</td>
<td class="align-middle">{{ nig.players[i-1].remember }}</td>
<td class="align-middle">{{ nig.smallMemories[i - 1] }}</td>
<td class="align-middle">{{ Math.max(0, Math.floor((nig.smallMemories[i - 1] - 72) / 3)) }}</td>
<td :key="j" class="align-middle" v-for="j in 10" v-show="nig.worldOpened[j-1]"
:style="{ 'background-color': i==j ? 'lightgray' : 'transparent' }">
{{ nig.players[i - 1].worldPipe[j - 1] ? nig.players[i - 1].worldPipe[j - 1] : '' }}
</td>
</tr>
</tbody>
</table>
</div>
<div class="collapse" id="chipInfo">
<div class="card card-body">
<div>
所持鋳片
<span v-for="i in SET_CHIP_KIND" :key="i">
<span v-show="nig.player.chip[i-1]>0">
{{ ' ' }} {{ itemData.chipName[i - 1] + '片' }}: {{ nig.player.chip[i - 1] }}
</span>
</span>
</div>
<div>
コスト
<span v-for="i in SET_CHIP_KIND" :key="i">
<span v-show="nig.player.chip[i-1]>0">
{{ ' ' }} {{ itemData.chipName[i - 1] + '片' }}: {{ nig.chipUsed[i - 1] + 1 }}
</span>
</span>
</div>
<div class="d-flex align-items-center flex-wrap">
鋳片効力
<div :key="i" class="tooltip-cell" v-for="i in 52">
<span v-if="i<=32||nig.countRemembers()>=16">
<button :disabled="nig.player.disabledChip[i-1]" :style="chipColoredButtonClass(nig.player.setChip[i-1])" @click="toggleChip(i-1)"
class="btn btn-outline-dark"
type="button">{{ i }} {{ nig.player.setChip[i - 1] == 0 ? ' ' :
itemData.chipName[nig.player.setChip[i - 1] - 1] }}</button>
<span class="up-tooltip">{{ itemData.chipBonusName[i - 1] }}</span>
</span>
</div>
</div>
</div>
</div>
<div class="collapse" id="statueInfo">
<div class="card card-body">
<div v-for="i in SET_CHIP_KIND" :key="i">
<div v-show="nig.player.chip[i-1] > 0 || nig.chipUsed[i-1] > 0">
<span>{{itemData.chipName[i - 1] + "像 "}}</span>
<span class="tooltip-cell">
<button type="button" class="btn btn-outline-dark btn-sm" @click="buildStatue(i-1)"
:disabled="!nig.isStatueBuildable(i-1)">
設像コスト: {{ nig.calcStatueCost(i-1) }}
</button>
</span>
<span> 所持数: {{ nig.player.statue[i-1] }}</span>
</div>
</div>
</div>
</div>
<div class="collapse" id="trophyInfo">
<div class="card card-body">
<div>
実績
<table class="table-bordered table-sm">
<tbody>
<tr>
<td v-for="i in TROPHY_NUM" :key="i">
<span>{{ nig.player.trophies[i - 1] ? itemData.trophyText[i - 1] : '???' }}</span>
</td>
</tr>
</tbody>
</table>
</div>
<div>
里程: {{ nig.smallMemory }}
<table class="table-bordered table-sm">
<tbody>
<tr v-for="i in 10" :key="i">
<td :key="j" class="tooltip-cell" v-for="j in 10">
<span>{{ nig.player.smallTrophies[i * 10 + j - 11] ? (i - 1) * 10 + j : ' ' }}</span>
<span class="up-tooltip" v-if="spoiler">
{{ itemData.smallTrophyText[i * 10 + j - 11] }}
</span>
</td>
</tr>
<tr :key="i" v-for="i in 6" v-if="nig.player.crownResetTime.gt(0)">
<td :key="j" class="tooltip-cell" v-for="j in 10">
<span>{{ nig.player.smallTrophies2nd[i * 10 + j - 11] ? 100 + (i - 1) * 10 + j : ' ' }}</span>
<span class="up-tooltip" v-if="spoiler">
{{ itemData.smallTrophyText[100 + i * 10 + j - 11] }}
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="collapse card card-body" id="challengeView">
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="hideClearedChallenge" type="checkbox" v-model="hideClearedChallenge">
<label class="form-check-label" for="hideClearedChallenge">クリア済を非表示</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="hideChallengeColor" type="checkbox" v-model="hideChallengeColor">
<label class="form-check-label" for="hideChallengeColor">クリア時間を非表示</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="showTickMinimum" type="checkbox" v-model="showTickMinimum">
<label class="form-check-label" for="showTickMinimum">最小tickを表示(デフォルト:最小時間)</label>
</div>
</div>
<div>
<div class="form-check form-check-inline" v-if="nig.player.challengeCleared.length>0">
<input type="checkbox" class="form-check-input" id="searchChallengeBonuses"
v-model="challengeConfig.searchChallengeBonuses">
<label class="form-check-label" for="searchChallengeBonuses">効力探索</label>
</div>
<div class="form-check form-check-inline" v-if="nig.player.rankChallengeCleared.length>0">
<input type="checkbox" class="form-check-input" id="searchRankChallengeBonuses"
v-model="challengeConfig.searchRankChallengeBonuses">
<label class="form-check-label" for="searchRankChallengeBonuses">上位効力探索</label>
</div>
<div class="form-check form-check-inline" v-if="nig.player.challengeCleared.length>0">
<input type="checkbox" class="form-check-input" id="toggleBonuses" v-model="challengeConfig.toggleBonuses">
<label class="form-check-label" for="toggleBonuses">リセット時効力切り替え</label>
</div>
<div class="form-check form-check-inline" v-if="nig.player.accelLevel>0">
<input type="checkbox" class="form-check-input" id="searchAccelLevel"
v-model="challengeConfig.searchAccelLevel">
<label class="form-check-label" for="searchAccelLevel">回帰力探索</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="searchClearChallenge" type="checkbox" v-model="searchClearChallenge">
<label class="form-check-label" for="searchClearChallenge">達成済みも探索</label>
</div>
</div>
<nav>
<div class="nav nav-tabs" id="challengeTab" role="tablist">
<a class="nav-link active" id="challengePanelTab" data-bs-toggle="tab" href="#challengePanel" role="tab"
aria-controls="challengePanel" aria-selected="true">挑戦</a>
<a aria-controls="rankChallengePanel" aria-selected="true" class="nav-link" data-bs-toggle="tab" href="#rankChallengePanel"
id="rankChallengePanelTab" role="tab"
v-if="nig.player.challengeCleared.length>=128">階位挑戦</a>
</div>
</nav>
<div class="tab-content" id="challengeTabContent"
:class="{ 'show-cleared-challenge': !hideClearedChallenge, 'hide-challenge-color': hideChallengeColor }">
<div class="tab-pane fade show active" id="challengePanel" role="tabpanel" aria-labelledby="challengePanelTab">
<div>
<button @click="simulateChallengesAll(false)" class="btn btn-outline-dark" type="button">シミュレート</button>
⚠重いので注意 クリックで1マスずつシミュレート
</div>
<table class="challenge-table">
<thead>
<tr v-for="i in 4" :key="i">
<th colspan="4" rowspan="4" v-if="i==1">
<div class="challenge-cell">挑戦達成: {{ nig.player.challengeCleared.length }}</div>
</th>
<th v-for="j in 16" :key="j">
<div class="challenge-cell d-flex align-items-center justify-content-center">
{{ (j - 1) % (1 << i)>= (1 << i - 1) ? i : '' }}</div>
</th>
</tr>
</thead>
<tbody>
<tr v-for="i in 16" :key="i">
<th v-for="j in 4" :key="j">
<div class="challenge-cell d-flex align-items-center justify-content-center">
{{ (i - 1) % (1 << j)>= (1 << j - 1) ? j + 4 : '' }}</div>
</th>
<td v-for="j in 16" :key="j">
<div :class="challengeCell(i-1,j-1)" @click="simulateChallengeOne(i-1,j-1,false)" class="challenge-cell">
<div :style="challengesColor(i-1,j-1)" class="challenge-color"></div>
<span class="challenge-tooltip" v-html="challengeMessage(i-1,j-1)" v-if="i>1||j>1"></span>
</div>
</td>
</tr>
</tbody>
</table>
<div class="challenge-colorbar" v-if="showTickMinimum">
<span :key="i" :style="scaleSampleTime(sampleTick[i-1])" v-for="i in 10">{{ sampleTickLabel[i-1] }}</span>
</div>
<div class="challenge-colorbar" v-if="!showTickMinimum">
<span :key="i" :style="scaleSampleTime(sampleTime[i-1])" v-for="i in 7">{{ sampleTimeLabel[i-1] }}</span>
</div>
</div>
<div aria-labelledby="rankChallengePanelTab" class="tab-pane fade" id="rankChallengePanel" role="tabpanel">
<div>
<button @click="simulateChallengesAll(true)" class="btn btn-outline-dark" type="button">シミュレート</button>
⚠重いので注意 クリックで1マスずつシミュレート
</div>
<table class="challenge-table">
<thead>
<tr v-for="i in 4" :key="i">
<th colspan="4" rowspan="4" v-if="i==1">
<div class="challenge-cell">階位挑戦達成: {{ nig.player.rankChallengeCleared.length }}</div>
</th>
<th v-for="j in 16" :key="j">
<div class="challenge-cell d-flex align-items-center justify-content-center">
{{ (j - 1) % (1 << i)>= (1 << i - 1) ? i : '' }}</div>
</th>
</tr>
</thead>
<tbody>
<tr v-for="i in 16" :key="i">
<th v-for="j in 4" :key="j">
<div class="challenge-cell d-flex align-items-center justify-content-center">
{{ (i - 1) % (1 << j)>= (1 << j - 1) ? j + 4 : '' }}</div>
</th>
<td v-for="j in 16" :key="j">
<div :class="challengeCell(i-1,j-1,true)" @click="simulateChallengeOne(i-1,j-1,true)"
class="challenge-cell">
<div :style="challengesColor(i-1,j-1,true)" class="challenge-color"></div>
<span class="challenge-tooltip" v-html="challengeMessage(i-1,j-1,true)" v-if="i>1||j>1"></span>
</div>
</td>
</tr>
</tbody>
</table>
<div class="challenge-colorbar" v-if="showTickMinimum">
<span :key="i" :style="scaleSampleTime(sampleTick[i-1])" v-for="i in 10">{{ sampleTickLabel[i-1] }}</span>
</div>
<div class="challenge-colorbar" v-if="!showTickMinimum">
<span :key="i" :style="scaleSampleTime(sampleTime[i-1])" v-for="i in 7">{{ sampleTimeLabel[i-1] }}</span>
</div>
</div>
</div>
</div>
<div class="collapse card" id="simulatedCheckpoints">
<div class="card-body">
<div>
<button @click="simulateCheckpoints" class="btn btn-outline-dark" type="button">シミュレート</button>
<button :class="buttonSelectedClass(autoSimulateCheckpoints)" @click="autoSimulateCheckpoints = !autoSimulateCheckpoints;" class="btn"
type="button">自動</button>
</div>
<div class="input-group">
<select aria-label="checkpoint target" class="form-select" v-model="checkpointTarget">
<option value="point" selected>ポイント</option>
<option value="levelReset">段位リセット</option>
<option value="rankReset">階位リセット</option>
<option value="crownReset">冠位リセット</option>
</select>
<span class="input-group-text"
v-if="checkpointTarget=='levelReset' || checkpointTarget=='rankReset' || checkpointTarget=='crownReset'">で</span>
<input @keydown="(event)=>{if(event.key==='Enter')addCheckpoint()}" aria-label="Text input" class="form-control" placeholder="start[:stop[:[*]step]]"
type="text" v-model="checkpointValue">
<span class="input-group-text"
v-if="checkpointTarget=='levelReset' || checkpointTarget=='rankReset' || checkpointTarget=='crownReset'">
{{ {levelReset: '段位', rankReset: '階位', crownReset: '冠位'}[checkpointTarget] }}獲得する
</span>
<span class="input-group-text">{{ targetMoneysDesc }} </span>
<button @click="addCheckpoint" class="btn btn-outline-dark" type="button">追加</button>
</div>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item" v-for="(_, i) in checkpoints">
<span>{{ checkpointMessages[i] }}</span>
<button @click="removeCheckpoint(i)" class="btn-close float-end" type="button"></button>
</li>
</ul>
</div>
<div class="collapse card" id="simulatedDark">
<div class="card-body">
<div>
<button type="button" class="btn btn-outline-dark" @click="simulateDarkCheckpoints">シミュレート</button>
<button :class="buttonSelectedClass(autoSimulateDarkCheckpoints)" @click="autoSimulateDarkCheckpoints = !autoSimulateDarkCheckpoints;" class="btn"
type="button">自動</button>
</div>
<div class="input-group">
<select aria-label="checkpoint target" class="form-select" v-model="darkCheckpointTarget">
<option value="point" selected>ポイント</option>
<option value="darkLevelReset">裏段位リセット</option>
</select>
<span class="input-group-text"
v-if="darkCheckpointTarget==='darkLevelReset'">で</span>
<input class="form-control" placeholder="start[:stop[:[*]step]]" type="text" v-model="darkCheckpointValue"
aria-label="Text input" @keydown="(event)=>{if(event.key==='Enter')addDarkCheckpoint()}">
<span class="input-group-text"
v-if="darkCheckpointTarget==='darkLevelReset'">
{{ {darkLevelReset: '裏段位'}[darkCheckpointTarget] }}獲得する
</span>
<span class="input-group-text">{{ targetDarkMoneysDesc }} </span>
<button class="btn btn-outline-dark" type="button" @click="addDarkCheckpoint">追加</button>
</div>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item" v-for="(_, i) in darkCheckpoints">
<span>{{ darkCheckpointMessages[i] }}</span>
<button type="button" class="btn-close float-end" @click="removeDarkCheckpoint(i)"></button>
</li>
</ul>
</div>
<div class="collapse card" id="gaExpression">
<ul class="list-group list-group-flush">
<li class="list-group-item">\(N\)tick 後の数</li>
<li class="list-group-item" v-for="i in 9">{{ expression(i-1,0) }}</li>
<li class="list-group-item" v-for="i in 8">{{ expression(i-1,1) }}</li>
</ul>
</div>
<div class="collapse card" id="helpMessage">
<div class="card-body">
<h5 class="card-title">シミュレーション</h5>
<p class="card-text">
発生器と時間加速器を購入しながらシミュレーションを行っている。
購入順は、金額の小さい順、同じなら発生器を優先、同じなら番号の大きい方を優先する。
それ以外の条件(モード、効力、挑戦、段位効力)については、基本的に固定。
</p>
</div>
<div class="card-body">
<h5 class="card-title">挑戦シミュレーション</h5>
<p class="card-text">
リセット時効力切り替えが有効なら、挑戦開始時に効力5,2,1、上位効力2,1の順に買えるだけ買う。
効力探索が有効なら、効力5と併用して使用する効力の候補として効力3,4,7,8,11,12,14の極大集合を全探索する。
上位効力探索が有効なら、使用する上位効力の候補として上位効力4,5,7,8,10?,11,12,14の極大集合を全探索する。
段位効力2を購入しているなら、より良い効力の組み合わせが存在することがある。
時間回帰力探索が有効なら、0から最大値まで全探索する。
モードは発生器iならi-1固定。
</p>
</div>
<div class="card-body">
<h5 class="card-title">誤差</h5>
<p class="card-text">
内部では浮動小数点数を使用しているため、誤差が発生する。
所要ticksは(バグがなければ)ほとんどの場合、正確に求められる。
一方、所要時間の計算は所要ticksが大きい場合に時間がかかるので近似している。
上位効力10が有効な場合は所要ticks、所要時間ともに近似値となる。
</p>
<div class="input-group">
<span class="input-group-text">1tickあたりの遅延時間</span>
<input aria-label="procMsPerTick" class="form-control" placeholder="0" type="text"
v-model.number="procMsPerTick">
<span class="input-group-text">ms</span>
</div>
</div>
<div class="card-body">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="verbose" v-model="verbose">
<label class="form-check-label" for="verbose">表示増加</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="spoiler" v-model="spoiler">
<label class="form-check-label" for="spoiler">ネタバレ</label>
</div>
<div>
<button @click="scaleChallengeTable(0.9)" class="btn btn-outline-dark btn-sm" type="button">-</button>
<button @click="scaleChallengeTable(1.1)" class="btn btn-outline-dark btn-sm" type="button">+</button>
<span>挑戦表サイズ</span>
</div>
</div>
</div>
</div>
<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/break_infinity.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-GxNFqL3r9uRJQhR+47eDxuPoNE7yLftQM8LcxzgS4HT73tp970WS/wV5p8UzCOmb"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
<script src="https://unpkg.com/[email protected]/tinyqueue.min.js"></script>
<script src="https://unpkg.com/deepmerge/dist/umd.js"></script>
<script>window.exports = {}</script>
<script src="https://unpkg.com/is-plain-object/dist/is-plain-object.js"></script>
<script src="nig_sim.js"></script>
</body>
</html>