-
Notifications
You must be signed in to change notification settings - Fork 0
/
rcfile.lua
1175 lines (986 loc) · 32.3 KB
/
rcfile.lua
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
# TEAMNAME Future Player Ghosts
# TEAMMEMBERS benadryl Graveyardigan billy1time ryathie mollymolluskus
##
## magus_ShadowRider38_sobieck.rc
################################################################################################
##
## BEGIN
################################################################################################
: rc_msg("Initializing magus_ShadowRider38_sobieck.rc ...")
: crawl.enable_more(false)
## RC FILE FROM ShadowRider38 who learned a lot from Yermak
note_skill_levels = 1,3,6,9,12,15,18,21,24,27
note_chat_messages = true
dump_message_count = 50
dump_book_spells = false
travel_delay = -1
explore_delay = -1
rest_delay = -1
trapwalk_safe_hp = dart:20,needle:15,arrow:35,bolt:45,spear:40,axe:45,blade:95
### Macros
macros += K1 \{-1018} \{27}
macros += K2 \{-268} +
macros += K2 \{-267} \{32}
macros += K2 \{-266} +
macros += K2 \{-265} .
macros += K3 \{-1018} \{27}
#macros += K4 . ,
macros += M \{-265} iAw\{27}\{27}zA
macros += M \{-266} iAw\{27}\{27}zB
macros += M \{-267} iAw\{27}\{27}zC
macros += M \{-268} iAw\{27}\{27}zD
macros += M \{-269} iBw\{27}\{27}zE
macros += M \{-270} iBw\{27}\{27}zF
macros += M \{-271} iBw\{27}\{27}zG
macros += M \{-272} iBw\{27}\{27}zH
macros += M \{-273} iCw\{27}\{27}zI
macros += M \{-274} iCw\{27}\{27}zJ
macros += M \{-248} ===toggle_autothrow
macros += M \{-249} ===label_weapons_by_damage
macros += M \{-250} ===toggle_autorest
macros += M \{-255} ===toggle_more_mores
macros += M \{-246} ===toggle_zigmode
## Alert when unsafe when manually exploring
macros += M o ===explore
macros += M \{-1001} ===manual_1
macros += M \{-1002} ===manual_2
macros += M \{-1003} ===manual_3
macros += M \{-1004} ===manual_4
macros += M \{-1006} ===manual_6
macros += M \{-1007} ===manual_7
macros += M \{-1008} ===manual_8
macros += M \{-1009} ===manual_9
### EN0N's Mini-Map Color Scheme
tile_upstairs_col = green
tile_downstairs_col = red
tile_branchstairs_col = #ffa500
tile_door_col = #c27149
tile_wall_col = #5a524c
tile_explore_horizon_col = #aaaaaa
tile_floor_col = #1e1b1a
tile_item_col = #1e1b1a
tile_feature_col = #d4be21
tile_plant_col = #4b6d39
tile_water_col = #0b5d79
tile_deep_water_col = #1212b3
tile_trap_col = #f447ff
tile_transporter_col = #ff5656
tile_transporter_landing_col = #59ff89
tile_lava_col = #5f0a00
use_animations -= hp, player, pickup, branch_entry
view_delay = 35
default_show_all_skills = true
default_manual_training = true
confirm_butcher = never
skill_focus = true
show_travel_trail = true
travel_one_unsafe_move = true
easy_floor_use = true
action_panel_show = false
show_game_time = false
show_god_gift = yes
cloud_status = true
simple_targeting = false
force_spell_targeter = eringya's noxious bog
force_ability_targeter = sanctuary, word of chaos, recite, elemental force, oozemancy, disaster area, corrupt, foxfire swarm
tile_web_mouse_control = false
fire_order = launcher, boomerang, rock, poisoned dart, javelin, stone
runrest_ignore_message += blood rots? away
runrest_ignore_message += Your icy armour
runrest_ignore_message += Your skin is crawling a little less
runrest_ignore_message += infusion is running out
runrest_ignore_message += shroud begins to fray
runrest_ignore_message += You feel.*sick
runrest_ignore_message += You howl as the wereblood boils in your veins
runrest_ignore_message += Your primal bloodlust
interrupt_eat =
runrest_safe_poison = 100:100
#interrupt_armour_on -= hp_loss
#interrupt_armour_off -= hp_loss
interrupt_memorise -= hp_loss
interrupt_memorise -= monster
autofight_stop = 60
explore_auto_rest = true
explore_stop = items,stairs,shops,altars,portals,branches,runed_doors
explore_stop += greedy_pickup_smart,artefacts
tile_show_demon_tier = true
menu_colour += cyan:brand weapon
menu_colour += cyan:enchant weapon
menu_colour += cyan:enchant armour
menu_colour += cyan:recharging
menu_colour += cyan:magic mapping
menu_colour += green:potions? of might
menu_colour += green:potions? of agility
menu_colour += green:potions? of brilliance
menu_colour += green:potions? of haste
menu_colour += green:potions? of resistance
menu_colour += green:potions? of berserk
menu_colour += cyan:wand of para
menu_colour += cyan:wand of conf
menu_colour += cyan:wand of poly
menu_colour += cyan:wand of ensl
menu_colour += cyan:wand of disi
menu_colour += cyan:wand of char
menu_colour += cyan:wand of mind
autoinscribe ^= scroll of silence:!r
ae := autopickup_exceptions
# nullifying the effect of the most annoying 0.24 commit:
ae += >ring of (poi|resist cor|fli|see)
ae += >amulet of (the acr|fai|the gou|gua|har|mag|rag|ref|reg)
ae += <throwing net
ae += <dart
ae += <javelin
ae += <stone
ae += <boomerang
ae += <sling
ae += <large rock
ae += <a ring of magical power
ae += >scrolls? of (amn)
ae += >wand of rand
ae += >ring of (protection from (mag|fire|cold)|mag|ste|ice|fire|pos|wil|wiz)
ae += >ring of (dex|int|str)
ae ^= <potions? of (ambr|attr|lign|mut)
ae ^= <scrolls? of (immolation|vulnerability)
ae += <(lamp of fire|phial of floods|lightning rod|figurine|condenser vane)
ae ^= <tin of tremorstones
ae += <sack of spiders
ae += <phantom mirror
ae += <box of beasts
ae += <deck
ae += <assassin
ae += <god gift
ae += <artefact
ae += <magical staff
ae ^= >staff of
as ^= End Transfo: t
as ^= Evoke Invis: i
as ^= Turn Visibl: j
as ^= Evoke Fligh: l
as ^= Spit: q
as ^= Breath: q
as ^= Rolling: r
is := item_slot
is ^= ^stone:j
is ^= poisoned dart:k
is ^= (^|[0-9] )boomerang:t
is ^= silver boomerang:u
is ^= (^|[0-9] )javelin:v
is ^= large rock:w
is ^= silver javelin:x
is ^= curare:F
is ^= datura:G
is ^= atropa:J
is ^= dispersal:K
is ^= ring of protection from fire:f
is ^= ring of protection from cold:c
is ^= ring of protection from magic:m
is ^= a ring of willpower:m
is ^= ring of positive energy:n
is ^= ring of poison resistance:o
is ^= ring of see invisible:s
is ^= ring of slaying:y
is ^= of resist corrosion:g
is ^= amulet of regeneration:r
is ^= blowgun:q
is ^= throwing net:Z
is += scroll of noise:W
is ^= scroll of identify:R
is ^= scroll of teleportation:T
is ^= scroll of magic map:M
is ^= potion of flight:l
is ^= potion of curing:Q
is ^= potion of haste:H
is ^= wand of digg:D
is ^= wand of ensl:E
is ^= wand of char:E
is ^= wand of iceb:I
is ^= wand of clou:O
is ^= wand of para:P
is ^= wand of scat:S
is ^= wand of flam:V
is ^= mirror:K
is ^= vane:O
is ^= box:X
is ^= sack:N
is ^= phial:U
is ^= lamp:Y
is ^= tin of t:Y
force_more_message -= You finish merging with the rock
force_more_message += You have reached level
force_more_message += You fall through a shaft
force_more_message += You enter a teleport trap
force_more_message += You are suddenly yanked
force_more_message += interdimensional caravan
force_more_message += distant snort
force_more_message += Found a gateway leading out of the Abyss
force_more_message += Found a gateway leading deeper into the Abyss
force_more_message += Found .* abyssal rune of Zot
force_more_message += Careful!
force_more_message += You are starting to lose your buoyancy
force_more_message += You miscast Flight
#force_more_message += filled with .* inner flame
#force_more_message += grabs you
force_more_message += starts rolling
force_more_message += looks more exp
force_more_message += vile air hits you
force_more_message += engulfs you in water
force_more_message += breathes miasma
force_more_message += You feel your flesh start
force_more_message += Found * staircase leading down
force_more_message += You are engulfed in seething chaos
force_more_message += You are slowing down
force_more_message += You are confused
force_more_message += fire storm spell
force_more_message += Your guardian golem overheats
force_more_message += offers itself
force_more_message += volcano erupts
force_more_message += Uskayaw prepares the audience for your solo
force_more_message += Your blazeheart golem falls apart, revealing its core!
force_more_message += Something reaches out for you
force_more_message += You become entangled in the net
force_more_message += wield.* blowgun
force_more_message += (the weather|forecast)
force_more_message += you cannot.* because
force_more_message += pie hits you
force_more_message += goes berserk
force_more_message += venomous gases
#force_more_message += vanishes in a puff
force_more_message += weaves a glowing orb
force_more_message += Your transformation is almost over
force_more_message += The ironbrand convoker begins to recite a word of recall
force_more_message += Something unseen opens the door
force_more_message += Your unholy channel is weakening
runrest_stop_message += Your unholy channel is weakening
force_more_message += centaur.* comes? into view
force_more_message += hydra.* comes? into view
#force_more_message += killer bee.* comes? into view
force_more_message += electric eel.* comes? into view
force_more_message += floating eye.* comes? into view
force_more_message += carrying a wand
force_more_message += serpent.* comes? into view
force_more_message += demonologist.* comes? into view
force_more_message += fiend.* comes? into view
force_more_message += tzitzi.* comes? into view
force_more_message += pandemonium lord.* comes? into view
force_more_message += cacodemon.* comes? into view
force_more_message += neqoxec.* comes? into view
force_more_message += wretched star.* comes? into view
force_more_message += shining eye.* comes? into view
force_more_message += zyme.* comes? into view
force_more_message += hellion.* comes? into view
force_more_message += tormentor.* comes? into view
force_more_message += orb.* of fire.* comes? into view
#force_more_message += (?-i:[A-Z]).* comes? into view
force_more_message += Found a gate leading to another region of Pandemonium
force_more_message += You found a shaft
runrest_stop_message += You found a shaft
flash_screen_message += You are slowing down
flash_screen_message += Ashenzari invites you to partake
flash_screen_message += Ru believes you are ready to make a new sacrifice
flash_screen_message += Vehumet offers you knowledge
: if you.race() ~= "Gargoyle" and you.race() ~= "Ghoul" and you.race() ~= "Mummy" and you.race() ~= "Djinni" then
force_more_message += dream sheep.* comes? into view
:end
: if you.race() ~= "Gargoyle" then
force_more_message += plume of calc
:end
### Portals
force_more_message += ticking.*clock
force_more_message += dying ticks
force_more_message += distant snort
force_more_message += coins.*counted
force_more_message += tolling.*bell
force_more_message += roar of battle
force_more_message += creaking.*portcullis
force_more_message += portcullis is probably
force_more_message += wave of frost
force_more_message += crackling.*melting
force_more_message += hiss.*sand
force_more_message += sound.*rushing water
force_more_message += rusting.*drain
force_more_message += drain falling apart
force_more_message += heat about you
force_more_message += falling.*rocks
force_more_message += rumble.*avalanche of rocks
force_more_message += crackle.*arcane power
force_more_message += crackle.*magical portal
force_more_message += distant wind
force_more_message += whistling.*wind
force_more_message += rapidly growing quiet
confirm_action += Death's Door
### Messages
msc := message_colour
channel.monster_damage = plain
channel.god = plain
channel.monster_spell = plain
channel.monster_enchant = plain
channel.friend_spell = darkgrey
channel.friend_enchant = darkgrey
channel.monster_warning = yellow
channel.timed_portal = lightgreen
# Danger
msc ^= red: you shout at
msc ^= red: carrying a wand
msc ^= red: floating eye.* comes? into view
msc ^= red: You are slowing down
msc ^= red: you cannot.* because
msc ^= red: (the weather|forecast)
msc ^= red: you will pay
msc ^= red: flickers and vanishes
msc ^= magenta: cacodemon.* comes? into view
msc ^= magenta: neqoxec.* comes? into view
msc ^= magenta: wretched star.* comes? into view
msc ^= magenta: shining eye.* comes? into view
: if you.race() == "Mummy" then
msc ^= red: golden eye
: end
# Kills (is there a universal way to colour this?)
msc ^= brown: you kill
msc ^= brown: you destroy
msc ^= brown: dies
msc ^= brown: you blow up
msc ^= brown: is destroyed
msc ^= brown: is incinerated
msc ^= brown: drowns
# Misc
msc ^= green: more experienced
msc ^= green: you have finished your manual
msc ^= darkgrey: you are exhausted
msc ^= yellow: is nearby
msc ^= yellow: there are.* nearby
msc ^= darkgrey: You now have
# mute useless messages
# todo
msc ^= mute: begin reading
### Species, Job, God conditions
: if true and (you.race() == "Spriggan" or you.race() == "Gnoll") then
default_autopickup = false
: else
default_autopickup = true
: end
: if you.race() == "Ghoul" or you.race() == "Mummy" then
ae += <scrolls? of torment
:else
ae += >scrolls? of torment
: end
: if you.race() == "Tengu" or you.race() == "Merfolk" or you.race() == "Barachi" or you.race() == "Octopode" then
ae += >potions? of flight
: end
: if you.race() == "Vampire" or you.race() == "Mummy" or you.race() == "Ghoul" or you.race() == "Demonspawn" then
ae += >scrolls? of holy word
: end
: if you.god() == "Trog" then
ae += >potions? of brilliance
ae += >potions? of berserk
ae += >magical staff
: end
: if you.god() == "Zin" then
ae ^= <potions? of ambro
:else
ae += >potions? of ambro
: end
: if you.race() == "Barachi" then
force_more_message += comes? into view
: end
: if false then
ae += >potions? of brilliance
ae += >book
ae += >ring of int
skill_focus = true
: end
#force_more_message += comes? into view
#force_more_message += Found a stone staircase
#force_more_message += Found
#force_more_message += paralyse.*in retribution
show_more = false
#autofight_throw = true
{
local zigmode = false
function toggle_zigmode()
zigmode = not zigmode
if (zigmode) then
crawl.setopt("use_animations = 0")
crawl.setopt("show_more = false")
crawl.setopt("view_delay = 0")
crawl.setopt("travel_key_stop = false")
crawl.setopt("explore_stop = 0")
crawl.mpr("Zigmode is on.")
else
crawl.setopt("use_animations = beam, range, hp, monster_in_sight, pickup, monster, player")
crawl.setopt("show_more = true")
crawl.setopt("view_delay = 100")
crawl.setopt("travel_key_stop = true")
crawl.mpr("Zigmode is off.")
end
end
}
-- ### Magus
##
## Globals.rc
################################################################################################
# PAUSE variable for ForceMorePrompts.rc
$PAUSE_MORE := PAUSE
{
-- Pause for AnnounceDamage.lua
PAUSE_MORE = "PAUSE"
-- Standard Colors (ignoring black, not visible)
COLORS = {
["darkgrey"] = "darkgrey",
["lightgrey"] = "lightgrey",
["white"] = "white",
["blue"] = "blue",
["lightblue"] = "lightblue",
["green"] = "green",
["lightgreen"] = "lightgreen",
["cyan"] = "cyan",
["lightcyan"] = "lightcyan",
["red"] = "red",
["lightred"] = "lightred",
["magenta"] = "magenta",
["lightmagenta"] = "lightmagenta",
["yellow"] = "yellow",
["brown"] = "brown"}
}
##
## Utils.lua
################################################################################################
{
function withColor(color, str)
return string.format("<%s>%s</%s>", color, str, color)
end
function rc_out(symbol, color, msg)
crawl.mpr(string.format("%s <%s>%s</%s>", symbol, color, msg, color))
end
function rc_msg(msg)
rc_out("🤖", "blue", msg)
end
function rc_scs(msg)
rc_out("✅", "green", msg)
end
function rc_err(msg)
rc_out("❌", "lightred", msg)
end
function print_table(table)
for index, value in ipairs(table) do
rc_msg(tostring(value))
end
end
function table_has(table, match)
for index, value in ipairs(table) do
if value == match then
return true
end
end
return false
end
}
force_more_message += monster_warning:tormentor
force_more_message += monster_warning:fiend
force_more_message += monster_warning:tzitzimi
force_more_message += monster_warning:hell sentinel
force_more_message += monster_warning:lurking horror
force_more_message += monster_warning:shining eye
force_more_message += monster_warning:cacodemon
force_more_message += monster_warning:neqoxec
force_more_message += monster_warning:catoblepas
force_more_message += monster_warning:warmonger
force_more_message += monster_warning:Sigmund
force_more_message += monster_warning:Grinder
force_more_message += monster_warning:Roka
force_more_message += monster_warning:Tiamat
force_more_message += monster_warning:Jorgrun
force_more_message += monster_warning:Khufu
force_more_message += (?!.(Here|Aim):).wielding.of (distortion|chaos)
hp_warning = 70
{
function annotate_v5(message_buffer)
if message_buffer:find("Found a gate to the Vaults.") then
crawl.sendkeys("!V5\r! DO NOT GO UNLESS READY. BAD STUFF HAPPENS HERE\r")
end
end
function has_god()
return (not (you.god() == "No God")) or you.race() == "Demigod"
end
function god_stop(message_buffer)
if (message_buffer:find("Found a faded altar of an unknown god.") or message_buffer:find("Found a staircase to the Ecumenical Temple")) and has_god() == false then
if(not message_buffer:find("GET GOD")) then
crawl.mpr("GET GOD", "warning")
crawl.more()
end
end
end
function just_went_downwards(message_buffer)
return message_buffer:find("You fly downwards.") or message_buffer:find("You climb downwards.")
end
function not_in_top_3_levels()
return not (you.branch() == "D" and you.depth() < 4)
end
function any_un_ided_items(type)
for index, item in ipairs(items.inventory()) do
if item:class() == type then
if item.fully_identified == false then
return true
end
end
end
return false
end
function has_id_scrolls()
for index, item in ipairs(items.inventory()) do
local item_name = item:name()
if item_name:find("identify") then
return true
end
end
return false
end
function done_exploring(message_buffer)
return message_buffer:find("Done exploring.") or message_buffer:find("Partly explored") or message_buffer:find("Could not explore")
end
function read_id_scrolls(message_buffer)
if
(just_went_downwards(message_buffer) and not_in_top_3_levels() and has_god() == false and any_un_ided_items("Scrolls")) or
(done_exploring(message_buffer) and has_god() and any_un_ided_items("Scrolls")) or
(done_exploring(message_buffer) and any_un_ided_items("Potions") and has_id_scrolls())
then
crawl.sendkeys("r")
end
end
--debug
function test_function()
return has_id_scrolls()
end
-- end debug
local need_skills_opened = true
function ready()
if you.turns() == 0 and need_skills_opened then
need_skills_opened = false
manage_skills()
crawl.sendkeys("Qa") -- quiver spell
end
local message_buffer = crawl.messages(5)
god_stop(message_buffer)
annotate_v5(message_buffer)
read_id_scrolls(message_buffer)
fmore_early_threats()
update_safe()
end
-- Alert when unsafe when manually exploring
local safe = you.feel_safe()
exploring = false
-- https://tavern.dcss.io/t/function-ready-no-longer-works/704/8
function untrain_all_skills()
skill_list = {"Fighting","Short Blades","Long Blades","Axes","Maces & Flails",
"Polearms","Staves","Unarmed Combat",
"Throwing","Slings","Armour","Dodging","Shields","Spellcasting",
"Conjurations","Hexes","Charms","Summonings","Necromancy",
"Translocations","Transmutations","Fire Magic","Ice Magic",
"Air Magic","Earth Magic","Alchemy","Invocations",
"Evocations","Stealth"}
for i, sk in ipairs(skill_list) do
you.train_skill(sk, 0)
end
end
function train(skillname, amount)
you.set_training_target(skillname, amount)
you.train_skill(skillname, 1)
end
function focus(skillname, amount)
you.set_training_target(skillname, amount)
you.train_skill(skillname, 2)
end
function update_safe()
local old_safe = safe
safe = you.feel_safe()
if (not safe and old_safe) and (not exploring) then
crawl.mpr("Danger!", "warning")
crawl.more()
end
end
function explore()
exploring = true
crawl.sendkeys("o")
end
function manual_1()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("1")
end
function manual_2()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("2")
end
function manual_3()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("3")
end
function manual_4()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("4")
end
function manual_6()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("6")
end
function manual_7()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("7")
end
function manual_8()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("8")
end
function manual_9()
if(exploring == true) then
exploring = false
end
crawl.sendkeys("9")
end
local fmet = true
function fmore_early_threats()
if you.xl() > 13 and fmet then
crawl.setopt("force_more_message -= centaur.* comes? into view")
crawl.setopt("force_more_message -= hydra.* comes? into view")
crawl.setopt("force_more_message -= killer bee.* comes? into view")
crawl.setopt("force_more_message -= electric eel.* comes? into view")
fmet = false
end
end
local aft = false
function toggle_autothrow()
if aft then
crawl.setopt("use_animations += beam, monster")
crawl.setopt("autofight_throw = false")
crawl.mpr("Autofight_throw is off.")
else
crawl.setopt("use_animations -= beam, monster")
crawl.setopt("autofight_throw = true")
crawl.mpr("Autofight_throw is on.")
end
aft = not aft
end
local mmores = false
function toggle_more_mores()
if mmores then
crawl.setopt("force_more_message -= Found")
crawl.mpr("Less mores.")
else
crawl.setopt("force_more_message += Found")
crawl.mpr("More mores.")
end
mmores = not mmores
end
local portalmode = false
function toggle_portal_mode()
if portalmode then
crawl.setopt("show_game_time = false")
crawl.mpr("Portal mode is off.")
else
crawl.setopt("show_game_time = true")
crawl.mpr("Portal mode is on.")
end
portalmode = not portalmode
end
function label_weapons_by_damage()
-- for index, item in ipairs(items.inventory()) do
-- if item:class():find("Weapon") then
-- rc_msg(item:class())
-- end
-- end
for item in iter.invent_iterator:new(items.inventory()) do
if item:class():find("Weapon") then
-- rc_msg(item:class())
-- rc_msg(item.plus) -- additional damage
-- rc_msg(item.damage) -- base damage
end
--https://github.com/crawl/crawl/blob/904c1d6a4d5529cfa2839185b4aee08cf38cbe64/crawl-ref/source/describe.cc#L1399
end
rc_msg(crawl.messages(5))
end
local autorestmode = true
function toggle_autorest()
if autorestmode then
crawl.setopt("explore_auto_rest = false")
crawl.mpr("Autorest mode is off.")
else
crawl.setopt("explore_auto_rest = true")
crawl.mpr("Autorest mode is on.")
end
autorestmode = not autorestmode
end
local function autopickup(it, name)
local class = it.class(true)
local weap = items.equipped_at("Weapon")
local shie = items.equipped_at("Shield")
if it.is_useless then return false end
if class == "armour" then
local aux_slots = {cloak="Cloak", helmet="Helmet",
gloves="Gloves", boots="Boots", shield="Shield"}
st, _ = it.subtype()
if aux_slots[st] == "Shield" then
if (weap == nil or weap.hands == 1) and (shie == nil or it.branded) then
return true
end
elseif aux_slots[st] ~= nil and items.equipped_at(aux_slots[st]) == nil then
return true
elseif st ~= "body" and it.branded then
return true
end
end
return nil
end
add_autopickup_func(autopickup)
-- DEBUG.lua
-- rc_msg("DEBUG")
-- rc_msg(you.race())
-- rc_msg(tostring(not table_has({"Merfolk", "Octopode"}, you.race())))
-- if not table_has({"Merfolk", "Octopode"}, you.race()) then
-- rc_msg("1 Is NOT deep water walking race")
-- else
-- rc_msg("1 Is deep water walking race")
-- end
-- function colortest()
-- for i, color in pairs(COLORS) do
-- crawl.mpr(string.format("\n>> 🤖 colortest <%s>%s</%s>", color, color, color))
-- end
-- end
-- colortest()
-- rc_out("COLORS", COLORS.brown, COLORS.brown)
-- rc_msg(tostring(test_function()))
-- end debug
function MDEE_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Earth Elementalist" then
train("Spellcasting", 12)
train("Armour", 14)
focus("Earth Magic", 18)
end
end
function MDFe_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Fire Elementalist" then
train("Spellcasting", 6)
train("Conjurations", 6)
focus("Fire Magic", 10)
train("Fighting", 6)
train("Armour", 5)
end
end
function OnWp_set_skills()
if you.race() == "Oni" and you.class() == "Warper" then
train("Fighting", 14)
focus("Maces & Flails", 15)
train("Translocations", 10)
train("Spellcasting", 10)
end
end
function OnSh_set_skills()
if you.race() == "Oni" and you.class() == "Shapeshifter" then
train("Fighting", 12)
focus("Unarmed Combat", 12)
train("Shapeshifting", 11)
train("Dodging", 8)
end
end
function MDHu_set_stills()
if you.race() == "Mountain Dwarf" and you.class() == "Hunter" then
train("Fighting", 15)
focus("Ranged Weapons", 13)
train("Evocations", 5)
train("Dodging", 4)
end
end
function MDFi_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Fighter" then
train("Fighting", 10)
train("Axes", 12)
end
end
function MDSu_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Summoner" then
train("Spellcasting", 8)
focus("Summonings", 10)
end
end
function MDBe_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Berserker" then
focus("Axes", 14)
train("Fighting", 9)
train("Throwing", 2)
train("Armour", 7)
train("Dodging", 2)
train("Evocations", 5)
end
end
function MDMo_set_skills()
if you.race() == "Mountain Dwarf" and you.class() == "Monk" then
focus("Axes", 16)
train("Fighting", 11)
train("Armour", 4)
train("Evocations", 4)
end
end
function DgHu_set_skills()
if you.race() == "Demigod" and you.class() == "Hunter" then
focus("Ranged Weapons", 10)
end
end
function DgAr_set_skills()
if you.race() == "Demigod" and you.class() == "Artificer" then
focus("Ranged Weapons", 9)
train("Fighting", 8)
train("Dodging", 8)
train("Armour", 3)
train("Evocations", 3)
end
end
function DgBr_set_skills()
if you.race() == "Demigod" and you.class() == "Brigand" then
focus("Ranged Weapons", 14)
end
end
function MiFi_set_skills()
if you.race() == "Minotaur" and you.class() == "Fighter" then
train("Fighting", 9)
train("Axes", 12)