forked from brycole/gemstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalcredux.lic
More file actions
1299 lines (1272 loc) · 44 KB
/
calcredux.lic
File metadata and controls
1299 lines (1272 loc) · 44 KB
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
#!/usr/bin/env ruby
# This monstrosity of a script monitors all game data, and calculates your redux everytime it sees you take a hit from a weapon it has in its database. This includes virtually every OHE (aliases included), and also all standard brawling/2H/pole/blunt base weapons (switchable weapons, such as bastard swords and katanas, have been excluded because it's either impossible to figure out which it is, or so hard I just don't want to bother). All crit messages I could find damage values for are included -- however, this unfortunately doesn't include neck crits... still, about 75-95% of hits you take are able to be calculated. It automatically saves your history, so that over time, the value it provides for your redux is about as close as you can possibly get without knowing the formula.
setpriority(-5)
# Infomonitor occasionally isn't getting enough time to load the player's level when Lich starts up, so...
script_dir = $script_dir.dup
type_ahead_wait = false # Another make-shift flag, just stores whether the user already heard "sorry, we caused a type ahead error..."
history = { "count" => 0, "sum" => 0.00 } # This is called a hash, and it simply initializes the hash itself. The values get read below
history_level = "0" # Just initializes the variable so we don't have to juggle it between methods
history_string = String.new
# Since Lich tracks char name/level now (w/ infomonitor.lic), no need to interact with the game unless we don't have the info for some reason... check for that.
char_name = Char.name
level = Stats.level
# Now if either of those are still unknown, interact w/ the game to collect the necessary info...
if char_name.nil? or level.nil?
# Scan Lich's cached history and pick up the user's name/level from there, if possible. Since 'regetall' turns the string into a regular expression, we can't give it a regular expression... but the standard syntax will work just fine (hence the funky chars in the string).
if regetall("Name:.+Race:.+Profession:.+")
char_name = matchfindword('Name: ?')
clear
regetall("Gender:.+Age:.+Expr:.+Level:")
level = matchfindword('Level: ?').to_i
clear
else
# Lich doesn't have any cached game lines with the info we need, so send 'info' to the game and read it in.
put("info")
char_name = matchfindword('Name: ?')
level = matchfindword('Level: ?').to_i
end
end
if level == 0
sleep 1
level = Stats.level
end
# This handles opening/reading char data from files...
begin
File.open("#{script_dir}calcredux-history-#{char_name}.txt") { |file|
data = file.readlines
history_level = data.last.to_s.split(':')[0].to_i
history["count"] = data.last.to_s.split(':')[1].to_i
history["sum"] = data.last.to_s.split(':')[2].to_f
}
if history_level != level
echo("Happy birthday! Congrats on training; your history's been reset to make sure your average stays accurate.") unless history_level.nil?
File.open("#{script_dir}calcredux-history-#{char_name}.txt", "w") { |file|
history_string = level.to_s + ':' + '0' + ':' + '0.00'
file.print("# DO NOT edit by hand unless it's necessary -- just delete the file to reset these values.\r\n#{history_string}")
} unless history_level.nil?
history["count"] = 0
history["sum"] = 0.00
end
rescue SystemCallError
sleep 0.2
echo("Did not find your character's history file! A fresh one was created for you.")
history["count"] = 0 ; history["sum"] = 0.00
File.open("#{script_dir}calcredux-history-#{char_name}.txt", "w") { |file|
history_string = level.to_s + ':' + history["count"].to_s + ':' + history["sum"].to_s
file.print("# DO NOT edit by hand unless it's necessary -- just delete the file to reset these values.\r\n#{history_string}")
}
history["count"] = 0 ; history["sum"] = 0.00
rescue
echo("Unknown error during history file interaction! Continuing w/o taking any action...")
end
# This chunk checks for any armor settings, and autoscans if none are found, etc.
begin
armor_array = File.open("#{script_dir}calcredux-armor-#{char_name}.txt") { |file| file.readlines }
armor_array.delete_if { |line| line =~ /^\#/ }
until armor_array[0].nil?
if armor_array[0].downcase =~ /skin|leather|scale|chain|plate/i
armor = $~.to_s
echo("Armor type '#{armor}' has been loaded from your settings file.")
end
armor_array.shift
end
rescue SystemCallError
sleep 0.2
echo("Did not find your character's armor setting file! A blank one was created for you.")
armor_file = File.open("#{script_dir}calcredux-armor-#{char_name}.txt", "w") { |file|
file.print("# Just put your armor type on the next line to avoid calcredux.lic trying to detect it every run (skin/leather/scale/chain/plate)\r\n")
}
rescue
echo("unknown error during armor file interaction! Continuing w/o taking any action...")
#ensure
# armor_file.close unless (armor_file.nil? or armor_file.closed?)
end
# Process the game data received from sending 'inventory' (this is the autoscan part)
if armor.nil? then put("inventory armor") end
while armor.nil?
inventory = get
if inventory =~ /^You are wearing/i
case inventory
when /sonic barrier/i
if regetall('\[Creating a swirling sonic barrier around you equivalent of ASG')
armor_temp = get
armor_temp_num = armor_temp.sub(/\.\]/, '').split.last.to_i
if armor_temp_num < 5 and armor_temp_num > 0
armor = "skin"
elsif armor_temp_num < 9
armor = "leather"
elsif armor_temp_num < 13
armor = "scale"
elsif armor_temp_num < 17
armor = "chain"
elsif armor_temp_num > 16 and armor_temp_num < 21
armor = "plate"
end
else
echo("inventory scan has detected sonic armor; you can either PREP 1014 and SING your armor type again for a renewal cost of 6 mana, set your most frequently used armor type in your settings file 'calcredux-armor-#{char_name}' in the Lich scripts directory, or use the Lich command ';send' and send the string 'armor_to <type>', where type is your desired armor group.")
while armor.nil?
sonic = get
if sonic =~ /\[Creating a swirling sonic barrier around you equivalent of ASG |^armor_to /
armor_temp = $'.chomp
if armor_temp =~ /skin|leather|scale|chain|plate/
armor_temp_num = 21
else
armor_temp_num = armor_temp.sub(/\.\]/, '').to_i
end
if armor_temp_num < 5 and armor_temp_num > 0
armor = "skin"
elsif armor_temp_num < 9
armor = "leather"
elsif armor_temp_num < 13
armor = "scale"
elsif armor_temp_num < 17
armor = "chain"
elsif armor_temp_num > 16 and armor_temp_num < 21
armor = "plate"
elsif armor_temp =~ /skin/
armor = "skin"
elsif armor_temp =~ /leather/
armor = "leather"
elsif armor_temp =~ /scale/
armor = "scale"
elsif armor_temp =~ /chain/
armor = "chain"
elsif armor_temp =~ /plate/
armor = "plate"
else
echo("was not able to detect your armor type! Please repeat.")
end
end
end
end
echo("sonic barrier identified as #{armor} class protection.")
when /brigandine/i
armor = "scale"
when /robes/i
armor = "skin"
when /leather breastplate/i
armor = "scale"
when /plate/i
armor = "plate"
when /chain/i
armor = "chain"
when /leather/i
armor = "leather"
when /no armor at this time/i
armor = "skin"
else
echo("Your armor class was not successfully determined, and without this information, it is impossible to determine your redux. Please either edit the file 'calcredux-armor-#{char_name}' in your Lich scripts directory and restart the script, or send the armor type manually. Defaulting to chain for now.")
armor = "chain"
end
elsif inventory =~ /Sorry, you may only type ahead/
echo("command rejected due to your type ahead limit! Please send 'i' to the game at your convenience so your inventory can be autoscanned for your armor type (or you can edit the file 'calcredux-armor-#{char_name}.txt' in your Lich scripts directory).")
end
end
# Quick check to make sure that somehow (shouldn't be possible, but it doesn't hurt) the user's armor wasn't identified as an impossible value
if armor !~ /skin|leather|scale|chain|plate/i
echo("Error... somehow your armor value is not one of the 5 possible types! This shouldn't be possible; if you haven't been tinkering with this file, please send me email with any info you have so I can fix this bug (including an exact cut/paste of the armor value that follows): #{armor.to_s.dump}")
exit
end
$avg_redux = (history["sum"].to_f / history["count"].to_f)
# This is an array that's used to minimize some of the processing necessary to check if a weapon's known or not (faster to scan what's already an array than to isolate the hash keys of a given armor group, then scan it exactly the same way)
weapons = [ "dagger" , "main gauche" , "rapier" , "whip-blade" , "estoc" , "scimitar" , "short sword" , "handaxe" , "broadsword" , "falchion" ,
"longsword" , "backsword" , "mace" , "dhara" , "staff" , "military pick" , "flail" , "flamberge" , "war mattock" , "two-handed sword" ,
"twohanded sword" , "battle axe" , "whip" , "crowbill" , "cudgel" , "ball & chain" , "war hammer" , "morning star" , "pilum" , "javelin" ,
"halberd" , "naginata" , "jeddart-axe" , "hammer of kai" , "awl-pike" , "lance" , "closed fist" , "paingrip" , "cestus" , "knuckle-duster" ,
"hook-knife" , "tiger-claw" , "knuckle-blade" , "yierka-spur" , "blackjack" , "jackblade" , "troll-claw" , "fist-scythe" , "katar" , "flyssa",
"goliah" , "katzbalger" , "machera" , "palache" , "schiavona" , "seax" , "spadroon" , "spatha" , "talon sword" , "xiphos" , "badelaire" ,
"craquemarte" , "khopesh" , "machete" , "takouba" , "balta" , "broad axe" , "crescent axe" , "francisca" , "hatchet" , "meat cleaver" ,
"moon axe" , "sparte" , "taper" , "toporok" , "kaskara" , "bilbo" , "colichemarde" , "epee" , "fleuret" , "foil" , "schlager" , "tuck" ,
"tock" , "tocke" , "verdun" , "cutlass" , "kilij" , "palache" , "sabre" , "sapara" , "yataghan" , "kama" , "antler sword" , "braquemar" ,
"baselard" , "chereb" , "gladius" , "kris" , "sica" , "wakizashi" , "bodkin" , "butcher knife" , "cinquedea" , "dirk" , "misericord" ,
"parazonium" , "pavade" , "poignard" , "pugio" , "scramasax" , "sgian achlais" , "sgian dubh" , "stiletto" , "tanto" , "kozuka" ,
"mining pick" , "two handed sword", "greatsword", "claidhmore"]
# Tons & tons of DF's... section for each armor group to again keep the number of processes necessary to a reasonable few
df_skin = { "dagger" => 0.250,
"bodkin" => 0.250,
"butcher knife" => 0.250,
"cinquedea" => 0.250,
"dirk" => 0.250,
"misericord" => 0.250,
"parazonium" => 0.250,
"pavade" => 0.250,
"poignard" => 0.250,
"pugio" => 0.250,
"scramasax" => 0.250,
"sgian achlais" => 0.250,
"sgian dubh" => 0.250,
"stiletto" => 0.250,
"tanto" => 0.250,
"kozuka" => 0.250,
"main gauche" => 0.275,
"rapier" => 0.325,
"bilbo" => 0.325,
"colichemarde" => 0.325,
"epee" => 0.325,
"fleuret" => 0.325,
"foil" => 0.325,
"schlager" => 0.325,
"tuck" => 0.325,
"tocke" => 0.325,
"tock" => 0.325,
"verdun" => 0.325,
"whip-blade" => 0.333,
"estoc" => 0.425,
"scimitar" => 0.375,
"cutlass" => 0.375,
"kilij" => 0.375,
"palache" => 0.375,
"sabre" => 0.375,
"sapara" => 0.375,
"yataghan" => 0.375,
"kama" => 0.375,
"short sword" => 0.350,
"antler sword" => 0.350,
"braquemar" => 0.350,
"baselard" => 0.350,
"chereb" => 0.350,
"gladius" => 0.350,
"kris" => 0.350,
"sica" => 0.350,
"wakizashi" => 0.350,
"handaxe" => 0.420,
"mining pick" => 0.420,
"balta" => 0.420,
"broad axe" => 0.420,
"crescent axe" => 0.420,
"francisca" => 0.420,
"hatchet" => 0.420,
"meat cleaver" => 0.420,
"moon axe" => 0.420,
"sparte" => 0.420,
"taper" => 0.420,
"toporok" => 0.420,
"broadsword" => 0.450,
"flyssa" => 0.450,
"goliah" => 0.450,
"katzbalger" => 0.450,
"machera" => 0.450,
"palache" => 0.450,
"schiavona" => 0.450,
"seax" => 0.450,
"spadroon" => 0.450,
"spatha" => 0.450,
"talon sword" => 0.450,
"xiphos" => 0.450,
"falchion" => 0.450,
"badelaire" => 0.450,
"craquemarte" => 0.450,
"khopesh" => 0.450,
"machete" => 0.450,
"takouba" => 0.450,
"longsword" => 0.425,
"kaskara" => 0.425,
"backsword" => 0.440,
#
"mace" => 0.400,
"dhara" => 0.400,
"whip" => 0.275,
"crowbill" => 0.300,
"cudgel" => 0.300,
"ball & chain" => 0.400,
"war hammer" => 0.410,
"morning star" => 0.425,
#
"staff" => 0.350,
"military pick" => 0.500,
"flail" => 0.575,
"flamberge" => 0.600,
"war mattock" => 0.525,
"two-handed sword" => 0.625,
"twohanded sword" => 0.625,
"two handed sword" => 0.625,
"claidhmore" => 0.625,
"battle axe" => 0.650,
#
"pilum" => 0.300,
"javelin" => 0.350,
"halberd" => 0.550,
"naginata" => 0.550,
"jeddart-axe" => 0.550,
"hammer of kai" => 0.550,
"awl-pike" => 0.600,
"lance" => 0.725,
#
"closed fist" => 0.100,
"razorpaw" => 0.150,
"paingrip" => 0.150,
"cestus" => 0.150,
"knuckle-duster" => 0.175,
"hook-knife" => 0.250,
"tiger-claw" => 0.250,
"knuckle-blade" => 0.200,
"yierka-spur" => 0.175,
"blackjack" => 0.250,
"jackblade" => 0.250,
"troll-claw" => 0.325,
"fist-scythe" => 0.325,
"katar" => 0.325,
}
df_leather = { "dagger" => 0.200,
"bodkin" => 0.200,
"butcher knife" => 0.200,
"cinquedea" => 0.200,
"dirk" => 0.200,
"misericord" => 0.200,
"parazonium" => 0.200,
"pavade" => 0.200,
"poignard" => 0.200,
"pugio" => 0.200,
"scramasax" => 0.200,
"sgian achlais" => 0.200,
"sgian dubh" => 0.200,
"stiletto" => 0.200,
"tanto" => 0.200,
"kozuka" => 0.200,
"main gauche" => 0.210,
"rapier" => 0.225,
"bilbo" => 0.225,
"colichemarde" => 0.225,
"epee" => 0.225,
"fleuret" => 0.225,
"foil" => 0.225,
"schlager" => 0.225,
"tuck" => 0.225,
"tocke" => 0.225,
"tock" => 0.225,
"verdun" => 0.225,
"whip-blade" => 0.225,
"estoc" => 0.300,
"scimitar" => 0.260,
"cutlass" => 0.260,
"kilij" => 0.260,
"palache" => 0.260,
"sabre" => 0.260,
"sapara" => 0.260,
"yataghan" => 0.260,
"kama" => 0.260,
"short sword" => 0.240,
"antler sword" => 0.240,
"braquemar" => 0.240,
"baselard" => 0.240,
"chereb" => 0.240,
"gladius" => 0.240,
"kris" => 0.240,
"sica" => 0.240,
"wakizashi" => 0.240,
"handaxe" => 0.300,
"mining pick" => 0.300,
"balta" => 0.300,
"broad axe" => 0.300,
"crescent axe" => 0.300,
"francisca" => 0.300,
"hatchet" => 0.300,
"meat cleaver" => 0.300,
"moon axe" => 0.300,
"sparte" => 0.300,
"taper" => 0.300,
"toporok" => 0.300,
"broadsword" => 0.300,
"flyssa" => 0.300,
"goliah" => 0.300,
"katzbalger" => 0.300,
"machera" => 0.300,
"palache" => 0.300,
"schiavona" => 0.300,
"seax" => 0.300,
"spadroon" => 0.300,
"spatha" => 0.300,
"talon sword" => 0.300,
"xiphos" => 0.300,
"falchion" => 0.325,
"badelaire" => 0.325,
"craquemarte" => 0.325,
"khopesh" => 0.325,
"machete" => 0.325,
"takouba" => 0.325,
"longsword" => 0.275,
"kaskara" => 0.275,
"backsword" => 0.310,
#
"mace" => 0.300,
"dhara" => 0.300,
"whip" => 0.150,
"crowbill" => 0.220,
"cudgel" => 0.250,
"ball & chain" => 0.300,
"war hammer" => 0.290,
"morning star" => 0.325,
#
"staff" => 0.275,
"military pick" => 0.375,
"flail" => 0.425,
"flamberge" => 0.450,
"war mattock" => 0.425,
"two-handed sword" => 0.500,
"two handed sword" => 0.500,
"twohanded sword" => 0.500,
"claidhmore" => 0.475,
"battle axe" => 0.450,
#
"pilum" => 0.200,
"javelin" => 0.250,
"halberd" => 0.400,
"naginata" => 0.400,
"jeddart-axe" => 0.425,
"hammer of kai" => 0.425,
"awl-pike" => 0.550,
"lance" => 0.525,
#
"closed fist" => 0.075,
"razorpaw" => 0.100,
"paingrip" => 0.100,
"cestus" => 0.100,
"knuckle-duster" => 0.125,
"hook-knife" => 0.120,
"tiger-claw" => 0.150,
"knuckle-blade" => 0.150,
"yierka-spur" => 0.150,
"blackjack" => 0.140,
"jackblade" => 0.175,
"troll-claw" => 0.175,
"fist-scythe" => 0.225,
"katar" => 0.250,
}
df_scale = { "dagger" => 0.100,
"bodkin" => 0.100,
"butcher knife" => 0.100,
"cinquedea" => 0.100,
"dirk" => 0.100,
"misericord" => 0.100,
"parazonium" => 0.100,
"pavade" => 0.100,
"poignard" => 0.100,
"pugio" => 0.100,
"scramasax" => 0.100,
"sgian achlais" => 0.100,
"sgian dubh" => 0.100,
"stiletto" => 0.100,
"tanto" => 0.100,
"kozuka" => 0.100,
"main gauche" => 0.110,
"rapier" => 0.125,
"bilbo" => 0.125,
"colichemarde" => 0.125,
"epee" => 0.125,
"fleuret" => 0.125,
"foil" => 0.125,
"schlager" => 0.125,
"tuck" => 0.125,
"tocke" => 0.125,
"tock" => 0.125,
"verdun" => 0.125,
"whip-blade" => 0.125,
"estoc" => 0.200,
"scimitar" => 0.210,
"cutlass" => 0.210,
"kilij" => 0.210,
"palache" => 0.210,
"sabre" => 0.210,
"sapara" => 0.210,
"yataghan" => 0.210,
"kama" => 0.210,
"short sword" => 0.200,
"antler sword" => 0.200,
"braquemar" => 0.200,
"baselard" => 0.200,
"chereb" => 0.200,
"gladius" => 0.200,
"kris" => 0.200,
"sica" => 0.200,
"wakizashi" => 0.200,
"handaxe" => 0.270,
"mining pick" => 0.270,
"balta" => 0.270,
"broad axe" => 0.270,
"crescent axe" => 0.270,
"francisca" => 0.270,
"hatchet" => 0.270,
"meat cleaver" => 0.270,
"moon axe" => 0.270,
"sparte" => 0.270,
"taper" => 0.270,
"toporok" => 0.270,
"broadsword" => 0.250,
"flyssa" => 0.250,
"goliah" => 0.250,
"katzbalger" => 0.250,
"machera" => 0.250,
"palache" => 0.250,
"schiavona" => 0.250,
"seax" => 0.250,
"spadroon" => 0.250,
"spatha" => 0.250,
"talon sword" => 0.250,
"xiphos" => 0.250,
"falchion" => 0.250,
"badelaire" => 0.250,
"craquemarte" => 0.250,
"khopesh" => 0.250,
"machete" => 0.250,
"takouba" => 0.250,
"longsword" => 0.225,
"kaskara" => 0.225,
"backsword" => 0.225,
#
"mace" => 0.225,
"dhara" => 0.225,
"whip" => 0.087,
"crowbill" => 0.200,
"cudgel" => 0.200,
"ball & chain" => 0.230,
"war hammer" => 0.250,
"morning star" => 0.275,
#
"staff" => 0.225,
"military pick" => 0.425,
"flail" => 0.400,
"flamberge" => 0.475,
"war mattock" => 0.425,
"two-handed sword" => 0.500,
"twohanded sword" => 0.500,
"two handed sword" => 0.500,
"claidhmore" => 0.500,
"battle axe" => 0.500,
#
"pilum" => 0.225,
"javelin" => 0.275,
"halberd" => 0.400,
"naginata" => 0.400,
"jeddart-axe" => 0.425,
"hammer of kai" => 0.450,
"awl-pike" => 0.575,
"lance" => 0.550,
#
"closed fist" => 0.040,
"razorpaw" => 0.050,
"paingrip" => 0.050,
"cestus" => 0.050,
"knuckle-duster" => 0.085,
"hook-knife" => 0.070,
"tiger-claw" => 0.075,
"knuckle-blade" => 0.100,
"yierka-spur" => 0.125,
"blackjack" => 0.090,
"jackblade" => 0.150,
"troll-claw" => 0.140,
"fist-scythe" => 0.200,
"katar" => 0.225,
}
df_chain = { "dagger" => 0.125,
"bodkin" => 0.125,
"butcher knife" => 0.125,
"cinquedea" => 0.125,
"dirk" => 0.125,
"misericord" => 0.125,
"parazonium" => 0.125,
"pavade" => 0.125,
"poignard" => 0.125,
"pugio" => 0.125,
"scramasax" => 0.125,
"sgian achlais" => 0.125,
"sgian dubh" => 0.125,
"stiletto" => 0.125,
"tanto" => 0.125,
"kozuka" => 0.125,
"main gauche" => 0.125,
"rapier" => 0.125,
"bilbo" => 0.125,
"colichemarde" => 0.125,
"epee" => 0.125,
"fleuret" => 0.125,
"foil" => 0.125,
"schlager" => 0.125,
"tuck" => 0.125,
"tocke" => 0.125,
"tock" => 0.125,
"verdun" => 0.125,
"whip-blade" => 0.115,
"estoc" => 0.200,
"scimitar" => 0.200,
"cutlass" => 0.200,
"kilij" => 0.200,
"palache" => 0.200,
"sabre" => 0.200,
"sapara" => 0.200,
"yataghan" => 0.200,
"kama" => 0.200,
"short sword" => 0.150,
"antler sword" => 0.150,
"braquemar" => 0.150,
"baselard" => 0.150,
"chereb" => 0.150,
"gladius" => 0.150,
"kris" => 0.150,
"sica" => 0.150,
"wakizashi" => 0.150,
"handaxe" => 0.240,
"mining pick" => 0.240,
"balta" => 0.240,
"broad axe" => 0.240,
"crescent axe" => 0.240,
"francisca" => 0.240,
"hatchet" => 0.240,
"meat cleaver" => 0.240,
"moon axe" => 0.240,
"sparte" => 0.240,
"taper" => 0.240,
"toporok" => 0.240,
"broadsword" => 0.225,
"flyssa" => 0.225,
"goliah" => 0.225,
"katzbalger" => 0.225,
"machera" => 0.225,
"palache" => 0.225,
"schiavona" => 0.225,
"seax" => 0.225,
"spadroon" => 0.225,
"spatha" => 0.225,
"talon sword" => 0.225,
"xiphos" => 0.225,
"falchion" => 0.250,
"badelaire" => 0.250,
"craquemarte" => 0.250,
"khopesh" => 0.250,
"machete" => 0.250,
"takouba" => 0.250,
"longsword" => 0.200,
"kaskara" => 0.200,
"backsword" => 0.240,
#
"mace" => 0.250,
"dhara" => 0.250,
"whip" => 0.100,
"crowbill" => 0.150,
"cudgel" => 0.225,
"ball & chain" => 0.260,
"war hammer" => 0.275,
"morning star" => 0.300,
#
"staff" => 0.175,
"military pick" => 0.375,
"flail" => 0.350,
"flamberge" => 0.325,
"war mattock" => 0.375,
"two-handed sword" => 0.350,
"twohanded sword" => 0.350,
"two handed sword" => 0.350,
"claidhmore" => 0.350,
"battle axe" => 0.375,
#
"pilum" => 0.175,
"javelin" => 0.225,
"halberd" => 0.300,
"naginata" => 0.300,
"jeddart-axe" => 0.325,
"hammer of kai" => 0.350,
"awl-pike" => 0.450,
"lance" => 0.475,
#
"closed fist" => 0.035,
"razorpaw" => 0.050,
"paingrip" => 0.075,
"cestus" => 0.075,
"knuckle-duster" => 0.100,
"hook-knife" => 0.070,
"tiger-claw" => 0.050,
"knuckle-blade" => 0.075,
"yierka-spur" => 0.125,
"blackjack" => 0.110,
"jackblade" => 0.150,
"troll-claw" => 0.120,
"fist-scythe" => 0.200,
"katar" => 0.200,
}
df_plate = { "dagger" => 0.075,
"bodkin" => 0.075,
"butcher knife" => 0.075,
"cinquedea" => 0.075,
"dirk" => 0.075,
"misericord" => 0.075,
"parazonium" => 0.075,
"pavade" => 0.075,
"poignard" => 0.075,
"pugio" => 0.075,
"scramasax" => 0.075,
"sgian achlais" => 0.075,
"sgian dubh" => 0.075,
"stiletto" => 0.075,
"tanto" => 0.075,
"kozuka" => 0.075,
"main gauche" => 0.075,
"rapier" => 0.075,
"bilbo" => 0.075,
"colichemarde" => 0.075,
"epee" => 0.075,
"fleuret" => 0.075,
"foil" => 0.075,
"schlager" => 0.075,
"tuck" => 0.075,
"tocke" => 0.075,
"tock" => 0.075,
"verdun" => 0.075,
"whip-blade" => 0.065,
"estoc" => 0.150,
"scimitar" => 0.165,
"cutlass" => 0.165,
"kilij" => 0.165,
"palache" => 0.165,
"sabre" => 0.165,
"sapara" => 0.165,
"yataghan" => 0.165,
"kama" => 0.165,
"short sword" => 0.125,
"antler sword" => 0.125,
"braquemar" => 0.125,
"baselard" => 0.125,
"chereb" => 0.125,
"gladius" => 0.125,
"kris" => 0.125,
"sica" => 0.125,
"wakizashi" => 0.125,
"handaxe" => 0.210,
"mining pick" => 0.210,
"balta" => 0.210,
"broad axe" => 0.210,
"crescent axe" => 0.210,
"francisca" => 0.210,
"hatchet" => 0.210,
"meat cleaver" => 0.210,
"moon axe" => 0.210,
"sparte" => 0.210,
"taper" => 0.210,
"toporok" => 0.210,
"broadsword" => 0.200,
"flyssa" => 0.200,
"goliah" => 0.200,
"katzbalger" => 0.200,
"machera" => 0.200,
"palache" => 0.200,
"schiavona" => 0.200,
"seax" => 0.200,
"spadroon" => 0.200,
"spatha" => 0.200,
"talon sword" => 0.200,
"xiphos" => 0.200,
"falchion" => 0.175,
"badelaire" => 0.175,
"craquemarte" => 0.175,
"khopesh" => 0.175,
"machete" => 0.175,
"takouba" => 0.175,
"longsword" => 0.175,
"kaskara" => 0.175,
"backsword" => 0.150,
#
"mace" => 0.175,
"dhara" => 0.175,
"whip" => 0.087,
"crowbill" => 0.125,
"cudgel" => 0.150,
"ball & chain" => 0.175,
"war hammer" => 0.200,
"morning star" => 0.225,
#
"staff" => 0.100,
"military pick" => 0.275,
"flail" => 0.225,
"flamberge" => 0.200,
"war mattock" => 0.275,
"two-handed sword" => 0.275,
"twohanded sword" => 0.275,
"two handed sword" => 0.275,
"claidhmore" => 0.225,
"battle axe" => 0.245,
#
"pilum" => 0.060,
"javelin" => 0.100,
"halberd" => 0.200,
"naginata" => 0.200,
"jeddart-axe" => 0.225,
"hammer of kai" => 0.250,
"awl-pike" => 0.350,
"lance" => 0.350,
#
"closed fist" => 0.035,
"razorpaw" => 0.030,
"paingrip" => 0.030,
"cestus" => 0.035,
"knuckle-duster" => 0.040,
"hook-knife" => 0.035,
"tiger-claw" => 0.035,
"knuckle-blade" => 0.075,
"yierka-spur" => 0.075,
"blackjack" => 0.075,
"jackblade" => 0.110,
"troll-claw" => 0.090,
"fist-scythe" => 0.100,
"katar" => 0.175,
}
# These are the crit messages calcredux tracks, and their corresponding damage adders. I can't find a list of neck crits, but if you have one or know of one, please let me know somehow (email GS4Lich@yahoo.com, psinet mail Shaelun, whatever)
crits = { "Hit glances off your hip" => 0,
"Stomach shot lands with a hollow" => 5,
"Grazing blow to the stomach" => 10,
"Internal organs bruised." => 15,
"Stomach ripped open by mighty blow!" => 20,
"Knocked back several feet by blow to abdomen." => 25,
"Blow ruptures the stomach!" => 30,
"Blow to stomach rearranges some organs!" => 50,
"Incredible smash to what used to be a stomach!" => 60,
"A mighty hit turns your insides to outsides!" => 75,
#
"Blow glances off your shoulder." => 0,
"Jarring blow to your back." => 3,
"Blow to back cracks several vertebrae." => 10,
"Respectable shot to the back." => 15,
"Flesh ripped from back, muscles exposed." => 20,
"Knocked sideways several feet by blow to back." => 25,
"Spinal cord damaged by smash to the back." => 30,
"Crushing blow to the spine!" => 50,
"Body pulped to a gooey mass." => 60,
"A mighty blow cleaves a swath through" => 75,
#
"Thumped your chest." => 0,
"Blow leaves an imprint on your chest!" => 5,
"Mighty blow cracks several ribs." => 10,
"Blow to chest causes your heart to skip a beat." => 15,
# "Whoosh! Several ribs driven into lungs." 20 and 25 both, another random element -- omitted to maximize accuracy
"Awesome shot collapses a lung!" => 45,
"Blow cracks a rib and punctures a lung." => 60,
"Massive blow punches a hole through your chest!" => 65,
"Massive blow smashes through ribs and drives" => 70,
#
"A nice bruise on your neck!" => 0, # I'm getting confused... I think this is the right crit (blunt head), but the dmg is right either way
"Love tap upside your head!" => 0,
# "Whiplash!" => 5, # Appears inaccurate. I can't find a list of neck crits & their damage, so.......
"You hear a buzzing in your ears from that blow!" => 5,
"Hearty smack to the head." => 10,
"nose!" => 15,
"Skull cracks in several places." => 20,
"Solid strike caves your skull in, resulting in instant death!" => 25,
"Mighty swing separates head from shoulers." => 30,
"Tremendous blow crushes skull like a ripe melon." => 35,
"Brain driven into neck by mammoth downswing!" => 40,
"Incredible blast shatters head into a red spray." => 50,
#
"A feeble blow to your" => 0,
"Blow raises a welt on your" => 3,
"Bones in right arm" => 7,
"Bones in left arm" => 7,
"Large gash to the" => 8,
"elbow smashed into a thousand pieces." => 10,
"arm mangled horribly." => 15,
"Hard hit shatters" => 20,
"arm ripped from socket at the blow!" => 25,
"Lucky shot rips through bone and muscle sending left arm flying" => 35,
"Lucky shot rips through bone and muscle sending right arm flying" => 35,
"arm removed at the shoulder!" => 40,
#
"Blow nicks your" => 0,
"Broken finger on your" => 1,
"Flattened your" => 3,
"Finger ripped away from" => 5,
"hand mangled horribly." => 5,
"hand smashed into a pulpy mass." => 7,
"Blast to hand reduces it to pulp!" => 10,
"Blast to hand sends fingers flying in several different directions." => 15,
"Lucky shot severs" => 25,
"hand severed at the wrist!" => 30,
#
"Swing at your eye catches an eyebrow instead!" => 0,
"Cut over your" => 1,
"Strike to the eye clips" => 3,
"Smack to the eye bursts blood vessels" => 5,
"head swells eye shut" => 10,
"Eye crushed by a hard blow to the face" => 15,
"Crushing blow to head closes that eye for good" => 20,
"Blow to eye impacts the brain" => 40,
"eye ripped from head, along with most of brain" => 45,
"Smash to cheek driving bone through the eye and into" => 50,
#
"Glancing blow to your left leg" => 0,
"Glancing blow to your right leg" => 0,
"Torn muscle in your left leg" => 7,
"Torn muscle in your right leg" => 7,
"Smash to the kneecap" => 10,
"ripped a chunk out of your left leg with that one" => 15,
"ripped a chunk out of your right leg with that one" => 15,
"kneecap smashed into pulp" => 17,
"leg mangled horribly" => 20,
"Hard blow breaks the femur" => 25,
"leg ripped from socket at the knee" => 30,
"Lucky shot rips through bone and muscle sending left leg flying" => 40,
"Lucky shot rips through bone and muscle sending right leg flying" => 40,
"hip pulped, severing the leg" => 45,
#
"Light slash to your abdomen" => 0,
"Awkward slash to your stomach" => 5,
"Smooth slash to your hip!" => 10,
"Hard slash to belly severs a few nerve endings" => 15,
"Diagonal slash leaves a bloody trail across" => 20,
"backed up by a strong slash to your abdomen" => 25,
"backed up by a strong slash to abdomen" => 25,
"Deep slash to your right side!" => 30,
"Amazing slash to your belly!" => 50,
"Amazing slash to belly!" => 50,
"Bloody slash to your side!" => 60,
"Bloody slash to side!" => 60,
"Terrible slash to your side!" => 75,
"Terrible slash to side!" => 75,
#
"Glancing blow to your back." => 0,
"Weak slash to your lower back!" => 3,
"Feint to the left goes astray as" => 10,
"Slash along your lower back." => 15,
"Slash along lower back." => 15,
"Slash to your lower back!" => 20,
"Slash to lower back!" => 20,
"Feint left spins" => 25,
"You twist away but are caught with a hard slash!" => 30,
"Deft slash!" => 50,
"Slash to your lower back!" => 60,
"Masterful slash to your lower back!" => 75,
"Masterful slash to lower back!" => 75,
#
"Weak slash across chest!" => 0,
"Deft slash across chest draws blood!" => 1,
"Slash to your chest!" => 10,
"Slash to your chest." => 15,
"Slashing blow to chest knocks you back a few paces!" => 20,
"Crossing slash to the chest catches your attention!" => 25,
"Crossing slash to chest catches your attention!" => 25,
"Hard slash to your side opens spleen!" => 45,
"Hard slash to side opens your spleen!" => 45,
"Quick, powerful slash!" => 60,
"Slash to your ribs opens a sucking chest wound!" => 65,
"Wicked slash slices open" => 70,
#
"Flashy swing!" => 0,
"Quick slash catches your cheek!" => 5,
"Blade slashes across your face!" => 10,
"Blade slashes across face!" => 10,
"Blow to head!" => 15,
"Quick flick of the wrist!" => 20,
"Hard blow to your ear!" => 25,
"Hard blow to ear!" => 25,
"Gruesome slash opens your forehead!" => 30,
"Gruesome slash opens forehead!" => 30,
"Wild upward slash removes" => 35,
"Horrible slash to your head!" => 40,
"Horrible slash to head!" => 40,
"Gruesome, slashing blow to the side of" => 50,
#
"Hard blow, but deflected." => 0,
"Quick slash to your upper" => 3,
"Slash to your shield arm!" => 7,
"Glancing slash to your shield arm!" => 8,
"Powerful slash just cracks your shield arm!" => 10,
"Powerful slash just cracks your weapon arm!" => 10,
"Deep slash to your left forearm!" => 15,
"Deep slash to your right forearm!" => 15,
"Off-balance slash to your left arm shatters" => 20,
"Hard slash to your side!" => 25,
"Spectacular slash!" => 35,
"Awesome slash severs your left arm!" => 40,
"Awesome slash severs your right arm!" => 40,
#
"Weak slash to your right arm." => 0,
"Hesitant slash to your upper!" => 7,
"Slash to your right arm!" => 8,