-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathWeaponSpeed.html
2079 lines (1963 loc) · 69.4 KB
/
WeaponSpeed.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
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0046)http://bbs.cupl.com.cn/upload/calc/calc003.htm -->
<HTML><HEAD>
<title>暗黑2(diablo2)武器攻击速度在线模拟计算器-Weapon Speed Calculator-暗黑3中文网anhei3.net</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8"><!--css-->
<STYLE type=text/css>P {
}
H1 {
FONT-SIZE: 13pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
H2 {
FONT-SIZE: 12pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
H3 {
FONT-SIZE: 11pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
H4 {
FONT-SIZE: 10pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
H5 {
FONT-SIZE: 10pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
H6 {
FONT-SIZE: 10pt; COLOR: #cbc1ab; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
A {
FONT-WEIGHT: bold; COLOR: #e6e6e6; TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
A:active {
TEXT-DECORATION: none
}
A:hover {
COLOR: #ffffff; TEXT-DECORATION: underline
}
BODY {
SCROLLBAR-FACE-COLOR: #302f2f; FONT-WEIGHT: normal; FONT-SIZE: 8pt; SCROLLBAR-HIGHLIGHT-COLOR: #6f6660; SCROLLBAR-SHADOW-COLOR: #201f1f; COLOR: #d0ccd0; SCROLLBAR-3DLIGHT-COLOR: #8f8880; LINE-HEIGHT: 12pt; SCROLLBAR-ARROW-COLOR: #cccccc; SCROLLBAR-TRACK-COLOR: #3f0000; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; SCROLLBAR-DARKSHADOW-COLOR: #222222
}
BLOCKQUOTE {
FONT-SIZE: 11px; COLOR: #cbc1ab; LINE-HEIGHT: 12pt; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
TD {
FONT-SIZE: 11px; COLOR: #d0ccd0; LINE-HEIGHT: 12pt; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
TH {
FONT-SIZE: 11px; COLOR: #d0ccd0; LINE-HEIGHT: 12pt; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif
}
LI {
LIST-STYLE-TYPE: square
}
.nav {
FONT-WEIGHT: normal; FONT-SIZE: 11px; LINE-HEIGHT: 11pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.small {
FONT-WEIGHT: normal; FONT-SIZE: 11px; LINE-HEIGHT: 11pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.big {
FONT-WEIGHT: normal; FONT-SIZE: 12pt; LINE-HEIGHT: 12pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
</STYLE>
<!--css-->
<SCRIPT src="" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript>
<!--
function swap_content( span ) {
displayType = ( document.getElementById( span ).style.display == 'none' ) ? 'block' : 'none';
document.getElementById( span ).style.display = displayType;
}
//-->
</SCRIPT>
<META content="MSHTML 6.00.2900.5626" name=GENERATOR></HEAD>
<BODY text=#cccccc vLink=#d0ccd0 aLink=#ffb818 link=#efefef bgColor=#000000
leftMargin=0 topMargin=0 marginwidth="0" marginheight="0"><TD width="100%"><!-- <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> --><!--content-bereich - anfang ---------------------------------------------------->
<STYLE type=text/css>TR.header {
BACKGROUND-COLOR: #45070e
}
TR.one {
BACKGROUND-COLOR: #2e2927
}
TR.two {
BACKGROUND-COLOR: #151515
}
INPUT.one {
BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: 0px solid; COLOR: #d0ccd0; BORDER-BOTTOM: 0px solid; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; BACKGROUND-COLOR: #2e2927
}
INPUT.two {
BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: 0px solid; COLOR: #d0ccd0; BORDER-BOTTOM: 0px solid; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; BACKGROUND-COLOR: #151515
}
INPUT.onered {
BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: 0px solid; COLOR: #ff0000; BORDER-BOTTOM: 0px solid; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; BACKGROUND-COLOR: #2e2927
}
INPUT.oneblue {
BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: 0px solid; COLOR: #0000ff; BORDER-BOTTOM: 0px solid; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; BACKGROUND-COLOR: #2e2927
}
INPUT.twoblue {
BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; FONT-SIZE: 10pt; BORDER-LEFT: 0px solid; COLOR: #0000ff; BORDER-BOTTOM: 0px solid; FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; BACKGROUND-COLOR: #151515
}
TD.blue {
COLOR: #5555ff
}
TH.header {
FONT-WEIGHT: bold; BACKGROUND-COLOR: #45070e
}
TD.header {
FONT-WEIGHT: bold; BACKGROUND-COLOR: #45070e
}
.nav {
FONT-WEIGHT: normal; FONT-SIZE: 8pt; LINE-HEIGHT: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.small {
FONT-WEIGHT: normal; FONT-SIZE: 8pt; LINE-HEIGHT: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.big {
FONT-WEIGHT: normal; FONT-SIZE: 12pt; LINE-HEIGHT: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
</STYLE>
<SCRIPT language=JavaScript type=text/javascript>
<!--
var LANG = "english";
var SKILL_STANDARD;
var SKILL_AMA_0;
var SKILL_AMA_1;
var SKILL_AMA_2;
var SKILL_AMA_3;
var SKILL_AMA_4;
var SKILL_BABA_0;
var SKILL_BABA_1;
var SKILL_BABA_2;
var SKILL_BABA_3;
var SKILL_BABA_4;
var SKILL_PALA_0;
var SKILL_PALA_1;
var SKILL_PALA_2;
var SKILL_SORC_0;
var SKILL_SORC_1;
var SKILL_DRU_0;
var SKILL_DRU_1;
var SKILL_DRU_2;
var SKILL_DRU_3;
var SKILL_ASSA_0;
var SKILL_ASSA_1;
var SKILL_ASSA_2;
var SKILL_ASSA_3;
var SKILL_ACT2_0;
var GUI_BABA_1H;
var GUI_BABA_2H;
var GUI_ASSA_1H;
var GUI_ASSA_2H;
var DYN_WEAPON_1;
var DYN_WEAPON_2;
var DYN_WEAPON_3;
var DYN_WEAPON_4;
var DYN_WEAPON_5;
var DYN_WEAPON_6;
var DYN_WEAPON_7;
var DYN_WEAPON_8;
var DYN_WEAPON_9;
var FPS_SUFFIX_1;
var FPS_SUFFIX_2;
var FPS_NOT_AVAIL;
var FPS_IAS_CAP;
var OD_SETTINGS;
var OD_FANA;
var OD_WW;
var OD_BURST;
var OD_FRENZY;
var OD_SKILL;
var OD_CHAR;
var OD_IAS;
var OD_CWIAS;
var OD_WIAS;
var OD_FPS;
var OD_WEAPON;
var OD_H2H_1;
var OD_H2H_2;
var OD_C2H_1;
var OD_C2H_2;
if (LANG == "english")
{
SKILL_STANDARD = "普通攻击(Standard)";
SKILL_AMA_0 = "普通攻击(Standard)";
SKILL_AMA_1 = "炮轰(Strafe)";
SKILL_AMA_2 = "戳刺(Jab)";
SKILL_AMA_3 = "刺爆(Impale) [*]";
SKILL_AMA_4 = "击退(Fend) [*]";
SKILL_BABA_0 = "普通攻击(Standard)";
SKILL_BABA_1 = "双手挥击(Double Swing)";
SKILL_BABA_2 = "双手投掷(Double Throw)";
SKILL_BABA_3 = "狂乱(Frenzy)";
SKILL_BABA_4 = "旋风(Whirlwind)";
SKILL_BABA_5 = "专心(Concentrate)";
SKILL_BABA_6 = "狂战士(Berserk)";
SKILL_BABA_7 = "重击(Bash)";
SKILL_BABA_8 = "击晕(Stun)";
SKILL_PALA_0 = "普通攻击(Standard)";
SKILL_PALA_1 = "热诚(Zeal)";
SKILL_PALA_2 = "重击(Smite)";
SKILL_SORC_0 = "普通攻击(Standard)";
SKILL_SORC_1 = "连锁闪电(Chain Lightning)";
SKILL_DRU_0 = "普通攻击(Standard)";
SKILL_DRU_1 = "变身狼人(Werewolf)";
SKILL_DRU_2 = "Werewolf - 狂怒(Fury)";
SKILL_DRU_3 = "Werewolf - 野性狂暴(Feral Rage)";
SKILL_DRU_4 = "Werewolf - Rabies";
SKILL_DRU_5 = "Werewolf - 焰爪(Fire Claws)";
SKILL_DRU_6 = "Werewolf - 饥饿(Hunger)";
SKILL_DRU_7 = "变身熊人(Werebear)";
SKILL_DRU_8 = "Werebear - 撞锤(Maul)";
SKILL_DRU_9 = "Werebear - 焰爪(Fire Claws)";
SKILL_DRU_10 = "Werebear - 饥饿(Hunger)";
SKILL_ASSA_0 = "普通攻击(Standard)";
SKILL_ASSA_1 = "虎击(Tiger Strike)";
SKILL_ASSA_2 = "蛇击(Cobra Strike)";
SKILL_ASSA_3 = "凤击(Phoenix Strike)";
SKILL_ASSA_4 = "火焰抓(Fists of Fire)";
SKILL_ASSA_5 = "雷击爪(Claws of Thunder)";
SKILL_ASSA_6 = "寒冰刃(Blades of Ice)";
SKILL_ASSA_7 = "双龙爪(Dragon Claw)";
SKILL_ASSA_8 = "神龙摆尾(Dragon Tail)";
SKILL_ASSA_9 = "安置陷阱(Trap placing)";
SKILL_ACT2_0 = "戳刺(Jab)";
GUI_BABA_1H = "单手(One)";
GUI_BABA_2H = "双手(Two)";
GUI_ASSA_NONE = "无(none)";
DYN_WEAPON_1 = "单手近战型武器(1Hand slashing weapon)";
DYN_WEAPON_2 = "单手刺入型武器(1Hand thrusting weapon)";
DYN_WEAPON_3 = "双手剑(2Hand sword)";
DYN_WEAPON_4 = "双手刺入型武器(2Hand thrusting weapon)";
DYN_WEAPON_5 = "普通双手武器(Normal 2Hand weapon)";
DYN_WEAPON_6 = "弓(Bow)";
DYN_WEAPON_7 = "十字弓(Crossbow)";
DYN_WEAPON_8 = "投掷型武器(Throwing weapon)";
DYN_WEAPON_9 = "爪类武器(Claw)";
FPS_SUFFIX_1 = " 祯每次攻击(Frames per attack)";
FPS_SUFFIX_2 = " 次攻击每秒(Attacks per second)";
FPS_NOT_AVAIL = "不可用数据(Not available)";
FPS_IAS_CAP = "已达攻速上限(Further IAS Useless)";
OD_SETTINGS = "Settings";
OD_FANA = "Fanaticism";
OD_WW = "Werewolf";
OD_BURST = "Burst of Speed";
OD_FRENZY = "Frenzy";
OD_SKILL = "Skill";
OD_CHAR = "Character";
OD_IAS = "IAS";
OD_LWIAS = "WIAS [left weapon]";
OD_RWIAS = "WIAS [right weapon]";
OD_LCLAW = "Left weapon";
OD_RCLAW = "Right weapon";
OD_WIAS = "WIAS";
OD_FPS = "Frames per attack";
OD_WEAPON = "Weapon";
OD_H2H_1 = "one-handed";
OD_H2H_2 = "two-handed";
OD_FREQ = "Attacks per second";
}
var capped = 0;
var lastSkill = 0;
var lastType = 0;
var lastC2H = 0;
var firstCall = true;
function round(val, digits)
{
str = String(val);
if (str.lastIndexOf(".") == -1)
{
return Number(str);
}
else
{
return Number(str.substr(0,str.lastIndexOf(".")+digits+1));
}
}
function engSort(a,b)
{
if (a[0] > b[0])
return 1;
if (a[0] < b[0])
return -1;
return 0;
}
function gerSort(a,b)
{
// if (a[4] > b[4])
// return 1;
// if (a[4] < b[4])
// return -1;
// return 0;
return a[4].localeCompare(b[4],"zh");
}
function setCharValues(form)
{
if (firstCall)
{
firstCall = false;
weaponlist.sort(engSort);
for (i=0; i < weaponlist.length; i++)
{
entry = new Option(weaponlist[i][0]);
form.weapon.options[form.weapon.length] = entry;
form.weapon.options[form.weapon.length-1].value = i;
weaponlist[i][6] = i;
}
weaponlist.sort(gerSort);
for (i=0; i < weaponlist.length; i++)
{
entry = new Option(weaponlist[i][4]);
form.waffe.options[form.waffe.length] = entry;
form.waffe.options[form.waffe.length-1].value = weaponlist[i][6];
}
weaponlist.sort(engSort);
form.weapon.selectedIndex = 0;
form.waffe.selectedIndex = 1;
}
var uchar = form.uchar.options[form.uchar.options.selectedIndex].value;
while (form.skill.length > 0)
{
form.skill.options[0] = null;
}
switch(String(uchar))
{
case "0":
entry = new Option(SKILL_AMA_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_AMA_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
entry = new Option(SKILL_AMA_2);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 2;
entry = new Option(SKILL_AMA_3);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 3;
entry = new Option(SKILL_AMA_4);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 4;
break;
case "1":
entry = new Option(SKILL_BABA_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_BABA_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
entry = new Option(SKILL_BABA_2);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 2;
entry = new Option(SKILL_BABA_3);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 3;
entry = new Option(SKILL_BABA_4);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 4;
entry = new Option(SKILL_BABA_5);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 5;
entry = new Option(SKILL_BABA_6);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 6;
entry = new Option(SKILL_BABA_7);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 7;
entry = new Option(SKILL_BABA_8);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 8;
break;
case "3":
entry = new Option(SKILL_PALA_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_PALA_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
entry = new Option(SKILL_PALA_2);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 2;
break;
case "4":
entry = new Option(SKILL_SORC_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_SORC_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
break;
case "5":
entry = new Option(SKILL_DRU_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_DRU_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
entry = new Option(SKILL_DRU_2);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 2;
entry = new Option(SKILL_DRU_3);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 3;
entry = new Option(SKILL_DRU_4);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 4;
entry = new Option(SKILL_DRU_5);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 5;
entry = new Option(SKILL_DRU_6);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 6;
entry = new Option(SKILL_DRU_7);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 7;
entry = new Option(SKILL_DRU_8);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 8;
entry = new Option(SKILL_DRU_9);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 9;
entry = new Option(SKILL_DRU_10);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 10;
break;
case "6":
entry = new Option(SKILL_ASSA_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
entry = new Option(SKILL_ASSA_1);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 1;
entry = new Option(SKILL_ASSA_2);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 2;
entry = new Option(SKILL_ASSA_3);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 3;
entry = new Option(SKILL_ASSA_4);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 4;
entry = new Option(SKILL_ASSA_5);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 5;
entry = new Option(SKILL_ASSA_6);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 6;
entry = new Option(SKILL_ASSA_7);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 7;
entry = new Option(SKILL_ASSA_8);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 8;
entry = new Option(SKILL_ASSA_9);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 9;
break;
case "7":
entry = new Option(SKILL_ACT2_0);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
break;
default:
entry = new Option(SKILL_STANDARD);
form.skill.options[form.skill.length] = entry;
form.skill.options[form.skill.length-1].value = 0;
break;
}
form.skill.selectedIndex = 0;
changeSkill(form, true);
changeWeapon(form);
}
function changeDeWeapon(form)
{
form.weapon.selectedIndex = form.waffe.options[document.theForm.waffe.selectedIndex].value;
changeWeapon(form);
}
function changeEnWeapon(form)
{
value = form.weapon.selectedIndex;
for (i=0; i<291; i++)
{
if (form.waffe.options[i].value == value)
{
form.waffe.options[i].selected = true;
break;
}
}
changeWeapon(form);
}
function changeLeftWeapon(form)
{
var uchar = parseInt(form.uchar.options[form.uchar.options.selectedIndex].value);
var weapon = form.weapon.options.selectedIndex;
var type = weaponlist[weapon][2];
if (((form.c2h.length > 1) && (form.c2h.selectedIndex == 0)) || (form.c2h.length < 2))
{
while (form.cwias.length > 0)
{
form.cwias.options[0] = null;
}
entry = new Option("-");
form.cwias.options[form.cwias.length] = entry;
form.cwias.options[form.cwias.length-1].value = 0;
}
else if ((form.c2h.length > 1) && (lastC2H == 0))
{
while (form.cwias.length > 0)
{
form.cwias.options[0] = null;
}
for(i = 0; i < 25; i++)
{
entry = new Option(String(i*5));
form.cwias.options[form.cwias.length] = entry;
form.cwias.options[form.cwias.length-1].value = String(i*5);
}
form.cwias.selectedIndex = 0;
}
lastC2H = form.c2h.selectedIndex;
}
function changeWeapon(form)
{
var uchar = parseInt(form.uchar.options[form.uchar.options.selectedIndex].value);
var weapon = form.weapon.options.selectedIndex;
var type = weaponlist[weapon][2];
if ((form.h2h.length > 1) && ((uchar != 1) || (type != 3)))
{
while (form.h2h.length > 0)
{
form.h2h.options[0] = null;
}
entry = new Option("-");
form.h2h.options[form.h2h.length] = entry;
form.h2h.options[form.h2h.length-1].value = 0;
}
else if ((uchar == 1) && (type == 3) && (form.h2h.length < 2))
{
while (form.h2h.length > 0)
{
form.h2h.options[0] = null;
}
entry = new Option(GUI_BABA_2H);
form.h2h.options[form.h2h.length] = entry;
form.h2h.options[form.h2h.length-1].value = 0;
entry = new Option(GUI_BABA_1H);
form.h2h.options[form.h2h.length] = entry;
form.h2h.options[form.h2h.length-1].value = 1;
form.h2h.selectedIndex = 0;
}
if (((uchar == 6) && (type == 9))
|| ((uchar == 1) && ((type == 1) || (type == 2) || (type == 8) ||
((type == 3) && ((form.h2h.length < 2) || (form.h2h.selectedIndex == 1))))))
{
while (form.c2h.length > 0)
{
form.c2h.options[0] = null;
}
if (uchar == 6)
{
entry = new Option("["+GUI_ASSA_NONE+"]");
form.c2h.options[form.c2h.length] = entry;
form.c2h.options[form.c2h.length-1].value = 0;
if (LANG == 'german')
weaponlist.sort(gerSort);
for (i=0; i < weaponlist.length; i++)
{
if (weaponlist[i][2] == 9)
{
if (LANG == 'german')
entry = new Option(weaponlist[i][4]);
else
entry = new Option(weaponlist[i][0]);
form.c2h.options[form.c2h.length] = entry;
form.c2h.options[form.c2h.length-1].value = weaponlist[i][6];
}
}
weaponlist.sort(engSort);
}
else
{
entry = new Option("["+GUI_ASSA_NONE+"]");
form.c2h.options[form.c2h.length] = entry;
form.c2h.options[form.c2h.length-1].value = 0;
if (LANG == 'german')
weaponlist.sort(gerSort);
for (i=0; i < weaponlist.length; i++)
{
if ((weaponlist[i][2] == 1) || (weaponlist[i][2] == 2)
|| (weaponlist[i][2] == 3) || (weaponlist[i][2] == 8))
{
if (LANG == 'german')
entry = new Option(weaponlist[i][4]);
else
entry = new Option(weaponlist[i][0]);
form.c2h.options[form.c2h.length] = entry;
form.c2h.options[form.c2h.length-1].value = weaponlist[i][6];
}
}
weaponlist.sort(engSort);
}
form.c2h.selectedIndex = 0;
}
else
{
while (form.c2h.length > 0)
{
form.c2h.options[0] = null;
}
entry = new Option("-");
form.c2h.options[form.c2h.length] = entry;
form.c2h.options[form.c2h.length-1].value = 0;
}
changeLeftWeapon(form);
changeSkill(form);
}
function changeSkill(form, newChar)
{
var uchar = form.uchar.options[form.uchar.options.selectedIndex].value;
var skill = parseInt(form.skill.options[form.skill.options.selectedIndex].value);
var weapon = form.weapon.options.selectedIndex;
var type = weaponlist[weapon][2];
// **************************************************************************
// IAS
if (!((uchar == 1) && (skill == 4))) // alle ausser ww-baba
{
if ((newChar) || ((uchar == 1) && (lastSkill == 4)))
{
while (form.ias.length > 0)
{
form.ias.options[0] = null;
}
for(i = 0; i < 61; i++)
{
entry = new Option(String(i*5));
form.ias.options[form.ias.length] = entry;
form.ias.options[form.ias.length-1].value = String(i*5);
}
form.ias.selectedIndex = 0;
}
}
else // ww-baba
{
while (form.ias.length > 0)
{
form.ias.options[0] = null;
}
entry = new Option("-");
form.ias.options[form.ias.length] = entry;
form.ias.options[form.ias.length-1].value = 0;
form.ias.selectedIndex = 0;
}
// **************************************************************************
// Weapon-IAS
if (((uchar == 5) && (skill != 0)) ||
((uchar == 1)) ||
((uchar == 6) && (type == 9)) ) // weredruid/baba/assa left claw
{
if ((newChar) ||
((uchar == 5) && (lastSkill == 0)) ||
((uchar == 1) && (lastSkill != 4)) ||
((uchar == 6) && (lastType != 9)) )
{
while (form.weaponias.length > 0)
{
form.weaponias.options[0] = null;
}
for(i = 0; i < 25; i++)
{
entry = new Option(String(i*5));
form.weaponias.options[form.weaponias.length] = entry;
form.weaponias.options[form.weaponias.length-1].value = String(i*5);
}
form.weaponias.selectedIndex = 0;
}
}
else // others
{
while (form.weaponias.length > 0)
{
form.weaponias.options[0] = null;
}
entry = new Option("-");
form.weaponias.options[form.weaponias.length] = entry;
form.weaponias.options[form.weaponias.length-1].value = 0;
form.weaponias.selectedIndex = 0;
}
// **************************************************************************
// Werewolf
if ((uchar == 5) && ((skill > 0) && (skill < 7)))
{
if ((newChar) || ((uchar == 5) && (lastSkill != 1) && (lastSkill != 3)))
{
while (form.ww.length > 0)
{
form.ww.options[0] = null;
}
for(i = 1; i < 31; i++)
{
entry = new Option(String(i));
form.ww.options[form.ww.length] = entry;
form.ww.options[form.ww.length-1].value = SD_werwolf[i-1];
}
form.ww.selectedIndex = 0;
}
}
else // other chars
{
while (form.ww.length > 0)
{
form.ww.options[0] = null;
}
entry = new Option("-");
form.ww.options[form.ww.length] = entry;
form.ww.options[form.ww.length-1].value = 0;
form.ww.selectedIndex = 0;
}
// **************************************************************************
// Burst Of Speed
if ((uchar == 6) && (newChar)) // assassin
{
while (form.burst.length > 0)
{
form.burst.options[0] = null;
}
for(i = 0; i < 31; i++)
{
entry = new Option(String(i));
form.burst.options[form.burst.length] = entry;
form.burst.options[form.burst.length-1].value = SD_burstofspeed[i];
}
form.burst.selectedIndex = 0;
}
else if (uchar != 6) // other chars
{
while (form.burst.length > 0)
{
form.burst.options[0] = null;
}
entry = new Option("-");
form.burst.options[form.burst.length] = entry;
form.burst.options[form.burst.length-1].value = 0;
form.burst.selectedIndex = 0;
}
// **************************************************************************
// Frenzy
if ((uchar == 1) && (newChar)) // barbarian
{
while (form.frenzy.length > 0)
{
form.frenzy.options[0] = null;
}
for(i = 0; i < 41; i++)
{
entry = new Option(String(i));
form.frenzy.options[form.frenzy.length] = entry;
form.frenzy.options[form.frenzy.length-1].value = SD_frenzy[i];
}
form.frenzy.selectedIndex = 0;
}
else if (uchar != 1) // other chars
{
while (form.frenzy.length > 0)
{
form.frenzy.options[0] = null;
}
entry = new Option("-");
form.frenzy.options[form.frenzy.length] = entry;
form.frenzy.options[form.frenzy.length-1].value = 0;
form.frenzy.selectedIndex = 0;
}
lastSkill = skill;
lastType = type;
compute (form);
}
function popup()
{
window.open("weaponspeed-tab.php?lang=english","Infoq","width=400,height=500,screenX=200,screenY=200,resizable=yes,dependent=yes,scrollbars=yes");
}
function cap(val, min, max)
{
if (val >= max)
{
capped = 1;
return max;
}
else if (val < min)
return min;
return val;
}
function ww_cap(val)
{
if (val < 12)
return 4;
if (val < 15)
return 6;
if (val < 18)
return 8;
if (val < 20)
return 10;
if (val < 23)
return 12;
if (val < 26)
return 14;
else
return 16;
}
function calculateFps(uchar, skill, r_weapon, l_weapon, item_ias, r_ias, l_ias, skill_ias, h2h, weaponlist)
{
var fps = Number.NaN;
// general initialization
var r_base = -weaponlist[r_weapon][1];
var l_base = r_base;
var effias = skill_ias + r_base + Math.floor(120*(item_ias+r_ias)/(120+item_ias+r_ias));
var type = weaponlist[r_weapon][2];
var l_type = type;
if (l_weapon >= 0)
{
l_base = -weaponlist[l_weapon][1];
l_type = weaponlist[l_weapon][2];
if ((weaponlist[l_weapon][5] >= 0) && (weaponlist[l_weapon][5] != uchar))
return Number.NaN;
}
if ((weaponlist[r_weapon][5] >= 0) && (weaponlist[r_weapon][5] != uchar))
return Number.NaN;
// Smite weapon check
if ((uchar == 3) && (skill == 2) && (type != 1) && (type != 2) && (type != 8))
return Number.NaN;
// set proper base frames
var baseframe = baseframes[type-1][uchar];
// skill specific attack baseframes
// Zeal
if ((uchar == 3) && (skill == 1)) baseframe = 6;
// Smite
if ((uchar == 3) && (skill == 2)) baseframe = 11;
// 2H Zeal
if ((uchar == 3) && (skill == 1) && ((type == 3) || (type == 4))) baseframe = 7;
if ((uchar == 3) && (skill == 1) && (type == 5)) baseframe = 8;
// Strafe + Bow
if ((uchar == 0) && (skill == 1) && (type == 6)) baseframe = 3;
// Strafe + XBow
if ((uchar == 0) && (skill == 1) && (type == 7)) baseframe = 5;
// Fend
if ((uchar == 0) && (skill == 4)) baseframe = 6;
// Paladin with 2H swords
if ((uchar == 3) && (skill == 0) && (type == 3))
{
effias = cap (effias, -100, 75);
var fps1 = Math.ceil(256*(baseframe+1)/Math.floor((100+effias)/100*256))-1;
var fps2 = Math.ceil(256*(baseframe+2)/Math.floor((100+effias)/100*256))-1;
fps = (fps1+fps2)/2;
}
//***************************************************************************
// Zeal
else if ((uchar == 3) && (skill == 1))
{
effias = cap (effias, -100, 75);
if ((type == 6)||(type == 7)||(type == 9))
{
fps = Number.NaN;
}
else
{
fps = Math.ceil(256*(baseframe+1)/Math.floor((100+effias)/100*256));
}
}
//***************************************************************************
// Strafe
else if ((uchar == 0) && (skill == 1))
{
effias = cap (effias, -100, 75);
if (type == 6)
{
fps = Math.ceil(baseframe/((100+effias)/100));
}
else if (type == 7)
{
fps = baseframe/((100+effias)/100);
if (fps > (parseInt(fps)+0.5)) fps = parseInt(fps) + 1;
else if (fps > parseInt(fps)) fps = parseInt(fps) + 0.5;
}
else if (baseframe > 5)
{
fps = Number.NaN;
}
}
//***************************************************************************
// Fend
else if ((uchar == 0) && (skill == 4))
{
if (type == 4) //spears
{
fps = 10;
for (i=0; i < SD_fend_spear.length; i++)
{
if (effias >= SD_fend_spear[i]) fps -= 1;
}
if (fps <= 5)
{
fps = 5;
capped = 1;
}
}
else if (type == 8) // javelins
{
fps = 10;
for (i=0; i < SD_fend_jav.length; i++)
{
if (effias >= SD_fend_jav[i]) fps -= 1;
}
if (fps <= 5)
{
fps = 5;
capped = 1;
}
}
else
{
fps = Number.NaN;
}
}
//***************************************************************************
// Jab with spears
else if ((uchar == 0) && (skill == 2) && (type != 8))
{
fps = 14;
for (i=0; i < SD_jab.length; i++)
{
if (effias >= SD_jab[i]) fps -= 0.5;
}
if (type != 4)
{
fps = Number.NaN;
}
else if (fps <= 4)
{
fps = 4;
capped = 1;
}
}
//***************************************************************************
// Aufspie遝n
else if ((uchar == 0) && (skill == 3))
{
if (effias > 104)