-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathnecropolis_chests.dm
2146 lines (1903 loc) · 80.5 KB
/
necropolis_chests.dm
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
//The chests dropped by mob spawner tendrils. Also contains associated loot.
GLOBAL_LIST_EMPTY(aide_list)
#define HIEROPHANT_CLUB_CARDINAL_DAMAGE 30
/obj/structure/closet/crate/necropolis
name = "necropolis chest"
desc = "It's watching you closely."
icon_state = "necrocrate"
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/structure/closet/crate/necropolis/tendril
desc = "It's watching you suspiciously."
/obj/structure/closet/crate/necropolis/tendril/icemoon
name = "icy chest"
desc = "A mysterious chest that seems to be watching you.. It's cool to the touch."
icon_state = "necrocrateice"
/obj/structure/closet/crate/necropolis/tendril/PopulateContents()
var/loot = rand(1,23)
switch(loot)
if(1)
new /obj/item/shared_storage/red(src)
if(2)
new /obj/item/clothing/under/costume/drip(src)
new /obj/item/clothing/shoes/drip(src)
if(3)
new /obj/item/bodypart/r_arm/robot/seismic(src)
if(4)
new /obj/item/reagent_containers/glass/bottle/potion/flight(src)
if(5)
new /obj/item/stack/sheet/mineral/mythril(src)
if(6)
new /obj/item/rod_of_asclepius(src)
if(7)
new /obj/item/organ/heart/cursed/wizard(src)
if(8)
new /obj/item/ship_in_a_bottle(src)
if(9)
new /obj/item/clothing/gloves/gauntlets(src)
if(10)
new /obj/item/jacobs_ladder(src)
if(11)//select and spawn a random nullrod that a chaplain could choose from
var/found = FALSE
while(!found)
var/path = pick(subtypesof(/obj/item/nullrod))
var/obj/item/nullrod/rod = new path(src)
if(rod.chaplain_spawnable)
found = TRUE
else
qdel(rod)
if(12)
new /obj/item/warp_cube/red(src)
if(13)
new /obj/item/organ/heart/gland/heals(src)
if(14)
new /obj/item/eflowers(src)
if(15)
new /obj/item/voodoo(src)
if(16)
new /obj/item/clothing/suit/space/hardsuit/powerarmor_advanced(src)
if(17)
new /obj/item/dopmirror(src)
if(18)
new /obj/item/borg/upgrade/modkit/lifesteal(src)
new /obj/item/bedsheet/cult(src)
if(19)
new /obj/item/clothing/neck/necklace/memento_mori(src)
if(20)
new /obj/item/rune_scimmy(src)
if(21)
new /obj/item/dnainjector/dwarf(src)
new /obj/item/grenade/plastic/miningcharge/mega(src)
new /obj/item/grenade/plastic/miningcharge/mega(src)
new /obj/item/grenade/plastic/miningcharge/mega(src)
if(22)
new /obj/item/clothing/gloves/gauntlets(src)
if(23)
new /obj/item/gun/ballistic/bow/ashen(src)
new /obj/item/storage/belt/quiver/returning/bone(src)
//KA modkit design discs
/obj/item/disk/design_disk/modkit_disc
name = "KA Mod Disk"
desc = "A design disc containing the design for a unique kinetic accelerator modkit. It's compatible with a research console."
icon_state = "datadisk1"
var/modkit_design = /datum/design/unique_modkit
/obj/item/disk/design_disk/modkit_disc/Initialize(mapload)
. = ..()
blueprints[1] = new modkit_design
/datum/design/unique_modkit
category = list("Mining Designs", "Cyborg Upgrade Modules") //can't be normally obtained
build_type = PROTOLATHE | MECHFAB
departmental_flags = DEPARTMENTAL_FLAG_CARGO
//Spooky special loot
//Rod of Asclepius
/obj/item/rod_of_asclepius
name = "\improper Rod of Asclepius"
desc = "A wooden rod about the size of your forearm with a snake carved around it, winding its way up the sides of the rod. Something about it seems to inspire in you the responsibilty and duty to help others."
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
icon_state = "asclepius_dormant"
var/activated = FALSE
var/usedHand
var/list/advanced_surgeries = list()
var/efficiency = 1
/obj/item/rod_of_asclepius/attack_self(mob/user)
if(activated)
return
if(!iscarbon(user))
to_chat(user, span_warning("The snake carving seems to come alive, if only for a moment, before returning to its dormant state, almost as if it finds you incapable of holding its oath."))
return
var/mob/living/carbon/itemUser = user
usedHand = itemUser.get_held_index_of_item(src)
if(itemUser.has_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH))
to_chat(user, span_warning("You can't possibly handle the responsibility of more than one rod!"))
return
var/failText = span_warning("The snake seems unsatisfied with your incomplete oath and returns to its previous place on the rod, returning to its dormant, wooden state. You must stand still while completing your oath!")
to_chat(itemUser, span_notice("The wooden snake that was carved into the rod seems to suddenly come alive and begins to slither down your arm! The compulsion to help others grows abnormally strong..."))
if(do_after(itemUser, 4 SECONDS, itemUser))
itemUser.say("I swear to fulfill, to the best of my ability and judgment, this covenant:", forced = "hippocratic oath")
else
to_chat(itemUser, failText)
return
if(do_after(itemUser, 2 SECONDS, itemUser))
itemUser.say("I will apply, for the benefit of the sick, all measures that are required, avoiding those twin traps of overtreatment and therapeutic nihilism.", forced = "hippocratic oath")
else
to_chat(itemUser, failText)
return
if(do_after(itemUser, 3 SECONDS, itemUser))
itemUser.say("I will remember that I remain a member of society, with special obligations to all my fellow human beings, those sound of mind and body as well as the infirm.", forced = "hippocratic oath")
else
to_chat(itemUser, failText)
return
if(do_after(itemUser, 3 SECONDS, itemUser))
itemUser.say("If I do not violate this oath, may I enjoy life and art, respected while I live and remembered with affection thereafter. May I always act so as to preserve the finest traditions of my calling and may I long experience the joy of healing those who seek my help.", forced = "hippocratic oath")
else
to_chat(itemUser, failText)
return
to_chat(itemUser, span_notice("The snake, satisfied with your oath, attaches itself and the rod to your forearm with an inseparable grip. Your thoughts seem to only revolve around the core idea of helping others, and harm is nothing more than a distant, wicked memory..."))
var/datum/status_effect/hippocratic_oath/effect = itemUser.apply_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH, efficiency, type)
effect.hand = usedHand
activated()
/obj/item/rod_of_asclepius/proc/activated()
item_flags = DROPDEL
ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT(type))
desc = "A short wooden rod with a mystical snake inseparably gripping itself and the rod to your forearm. It flows with a healing energy that disperses amongst yourself and those around you. The snake can learn surgeries from disks or operating consoles by hitting them with it."
icon_state = "asclepius_active"
activated = TRUE
/obj/item/rod_of_asclepius/afterattack(obj/item/O, mob/user, proximity)
. = ..()
if(!proximity)
return
if(!activated)
return
if(istype(O, /obj/item/disk/surgery))
to_chat(user, span_notice("Your snake bites into [O], and seems to have learned the surgery procedures stored in the disk."))
var/obj/item/disk/surgery/D = O
if(do_after(user, 1 SECONDS, O))
advanced_surgeries |= D.surgeries
return TRUE
if(istype(O, /obj/machinery/computer/operating))
to_chat(user, span_notice("You move your snake in view of [O], allowing it to memorize the surgery procedures from the console."))
var/obj/machinery/computer/operating/OC = O
if(do_after(user, 1 SECONDS, O))
advanced_surgeries |= OC.advanced_surgeries
return TRUE
return
//Memento Mori
/obj/item/clothing/neck/necklace/memento_mori
name = "Memento Mori"
desc = "A mysterious pendant. An inscription on it says: \"Certain death tomorrow means certain life today.\""
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "memento_mori"
actions_types = list(/datum/action/item_action/hands_free/memento_mori)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/human/active_owner
/obj/item/clothing/neck/necklace/memento_mori/item_action_slot_check(slot)
return slot == ITEM_SLOT_NECK
/obj/item/clothing/neck/necklace/memento_mori/attack_hand(mob/user)
if(active_owner && user == active_owner)
var/safety = alert(user, "Doing this will instantly kill you, reducing you to nothing but dust.", "Take off [src]?", "Abort", "Proceed")
if(safety != "Proceed")
return
. = ..()
/obj/item/clothing/neck/necklace/memento_mori/dropped(mob/user)
..()
if(active_owner)
mori()
//Just in case
/obj/item/clothing/neck/necklace/memento_mori/Destroy()
if(active_owner)
mori()
return ..()
/obj/item/clothing/neck/necklace/memento_mori/proc/memento(mob/living/carbon/human/user)
var/list/hasholos = user.hasparasites()
if(hasholos.len)
to_chat(user, span_warning("The pendant refuses to work with a guardian spirit..."))
return
if(IS_BLOODSUCKER(user))
to_chat(user, span_warning("The Memento notices your undead soul, and refuses to react.."))
return
to_chat(user, span_warning("You feel your life being drained by the pendant..."))
if(do_after(user, 4 SECONDS, user))
to_chat(user, span_notice("Your lifeforce is now linked to the pendant! You feel like removing it would kill you, and yet you instinctively know that until then, you won't die."))
ADD_TRAIT(user, TRAIT_NODEATH, "memento_mori")
ADD_TRAIT(user, TRAIT_NOHARDCRIT, "memento_mori")
ADD_TRAIT(user, TRAIT_NOCRITDAMAGE, "memento_mori")
icon_state = "memento_mori_active"
active_owner = user
RegisterSignal(src, COMSIG_ITEM_PRESTRIP, PROC_REF(moriwarn))
/obj/item/clothing/neck/necklace/memento_mori/proc/moriwarn()
active_owner.visible_message(span_userdanger("The [src] writhes and shudders as it starts to tear away [active_owner]'s lifeforce!"))
/obj/item/clothing/neck/necklace/memento_mori/proc/mori()
icon_state = "memento_mori"
if(!active_owner)
return
UnregisterSignal(src, COMSIG_ITEM_PRESTRIP)
var/mob/living/carbon/human/H = active_owner //to avoid infinite looping when dust unequips the pendant
active_owner = null
to_chat(H, span_userdanger("You feel your life rapidly slipping away from you!"))
H.dust(TRUE, TRUE)
/datum/action/item_action/hands_free/memento_mori
check_flags = NONE
name = "Memento Mori"
desc = "Bind your life to the pendant."
/datum/action/item_action/hands_free/memento_mori/Trigger()
var/obj/item/clothing/neck/necklace/memento_mori/MM = target
if(!MM.active_owner)
if(ishuman(owner))
MM.memento(owner)
else
to_chat(owner, span_warning("You try to free your lifeforce from the pendant..."))
if(do_after(owner, 4 SECONDS, owner))
MM.mori()
//Wisp Lantern
/obj/item/wisp_lantern
name = "spooky lantern"
desc = "This lantern gives off no light, but is home to a friendly wisp."
icon = 'icons/obj/lighting.dmi'
icon_state = "lantern-blue"
item_state = "lantern"
lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi'
var/obj/effect/wisp/wisp
/obj/item/wisp_lantern/attack_self(mob/user)
if(!wisp)
to_chat(user, span_warning("The wisp has gone missing!"))
icon_state = "lantern"
return
if(wisp.loc == src)
to_chat(user, span_notice("You release the wisp. It begins to bob around your head."))
icon_state = "lantern"
wisp.orbit(user, 20)
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Freed")
else
to_chat(user, span_notice("You return the wisp to the lantern."))
icon_state = "lantern-blue"
wisp.forceMove(src)
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned")
/obj/item/wisp_lantern/Initialize(mapload)
. = ..()
wisp = new(src)
/obj/item/wisp_lantern/Destroy()
if(wisp)
if(wisp.loc == src)
qdel(wisp)
else
wisp.visible_message(span_notice("[wisp] has a sad feeling for a moment, then it passes."))
return ..()
/obj/effect/wisp
name = "friendly wisp"
desc = "Happy to light your way."
icon = 'icons/obj/lighting.dmi'
icon_state = "orb"
light_system = MOVABLE_LIGHT
light_range = 7
light_flags = LIGHT_ATTACHED
layer = ABOVE_ALL_MOB_LAYER
var/sight_flags = SEE_MOBS
var/list/color_cutoffs = list(10, 25, 25)
/obj/effect/wisp/orbit(atom/thing, radius, clockwise, rotation_speed, rotation_segments, pre_rotation, lockinorbit)
. = ..()
if(ismob(thing))
RegisterSignal(thing, COMSIG_MOB_UPDATE_SIGHT, PROC_REF(update_user_sight))
var/mob/being = thing
being.update_sight()
to_chat(thing, span_notice("The wisp enhances your vision."))
/obj/effect/wisp/stop_orbit(datum/component/orbiter/orbits)
. = ..()
if(ismob(orbits.parent))
UnregisterSignal(orbits.parent, COMSIG_MOB_UPDATE_SIGHT)
to_chat(orbits.parent, span_notice("Your vision returns to normal."))
/obj/effect/wisp/proc/update_user_sight(mob/user)
SIGNAL_HANDLER
user.add_sight(sight_flags)
if(!isnull(color_cutoffs))
user.lighting_color_cutoffs = blend_cutoff_colors(user.lighting_color_cutoffs, color_cutoffs)
//Red/Blue Cubes
/obj/item/warp_cube
name = "blue cube"
desc = "A mysterious blue cube."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "blue_cube"
var/teleport_color = "#3FBAFD"
var/obj/item/warp_cube/linked
var/teleporting = FALSE
/obj/item/warp_cube/Destroy()
if(!QDELETED(linked))
qdel(linked)
linked = null
return ..()
/obj/item/warp_cube/attack_self(mob/user)
var/turf/current_location = get_turf(user)//yogs added a current location check that was totally ripped from the hand tele code honk
var/area/current_area = current_location.loc //yogs more location check stuff
if(!linked || (current_area.area_flags & NOTELEPORT)) //yogs added noteleport
to_chat(user, "[src] fizzles uselessly.")
return
if(teleporting)
return
if(!is_mining_level(current_location.z))
user.visible_message(span_danger("[user] starts fiddling with [src]!"))
if(!do_after(user, 3 SECONDS, user))
return
teleporting = TRUE
linked.teleporting = TRUE
var/turf/T = get_turf(src)
new /obj/effect/temp_visual/warp_cube(T, user, teleport_color, TRUE)
SSblackbox.record_feedback("tally", "warp_cube", 1, type)
new /obj/effect/temp_visual/warp_cube(get_turf(linked), user, linked.teleport_color, FALSE)
var/obj/effect/warp_cube/link_holder = new /obj/effect/warp_cube(T)
user.forceMove(link_holder) //mess around with loc so the user can't wander around
sleep(0.25 SECONDS)
if(QDELETED(user))
qdel(link_holder)
return
if(QDELETED(linked))
user.forceMove(get_turf(link_holder))
qdel(link_holder)
return
link_holder.forceMove(get_turf(linked))
sleep(0.25 SECONDS)
if(QDELETED(user))
qdel(link_holder)
return
teleporting = FALSE
if(!QDELETED(linked))
linked.teleporting = FALSE
user.forceMove(get_turf(link_holder))
qdel(link_holder)
/obj/item/warp_cube/red
name = "red cube"
desc = "A mysterious red cube."
icon_state = "red_cube"
teleport_color = "#FD3F48"
/obj/item/warp_cube/red/Initialize(mapload)
. = ..()
if(!linked)
var/obj/item/warp_cube/blue = new(src.loc)
linked = blue
blue.linked = src
/obj/effect/warp_cube
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = TRUE
/obj/effect/warp_cube/ex_act(severity, target)
return
//Meat Hook
/obj/item/gun/magic/hook
name = "meat hook"
desc = "Mid or feed."
ammo_type = /obj/item/ammo_casing/magic/hook
icon_state = "hook"
item_state = "chain"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
fire_sound = 'sound/weapons/batonextend.ogg'
max_charges = 1
item_flags = NEEDS_PERMIT | NOBLUDGEON
force = 18
/obj/item/ammo_casing/magic/hook
name = "hook"
desc = "A hook."
projectile_type = /obj/projectile/hook
caliber = CALIBER_HOOK
icon_state = "hook"
/obj/projectile/hook
name = "hook"
icon_state = "hook"
icon = 'icons/obj/lavaland/artefacts.dmi'
pass_flags = PASSTABLE
damage = 25
armour_penetration = 100
damage_type = BRUTE
hitsound = 'sound/effects/splat.ogg'
knockdown = 30
var/chain
/obj/projectile/hook/fire(setAngle)
if(firer)
chain = firer.Beam(src, icon_state = "chain", time = INFINITY, maxdistance = INFINITY)
..()
//TODO: root the firer until the chain returns
/obj/projectile/hook/on_hit(atom/target, blocked)
. = ..()
if(ismovable(target) && blocked != 100)
var/atom/movable/A = target
if(A.anchored)
return
A.visible_message(span_danger("[A] is snagged by [firer]'s hook!"))
new /datum/forced_movement(A, get_turf(firer), 5, TRUE)
//TODO: keep the chain beamed to A
//TODO: needs a callback to delete the chain
/obj/projectile/hook/Destroy()
qdel(chain)
return ..()
//Immortality Talisman
/obj/item/immortality_talisman
name = "\improper Immortality Talisman"
desc = "A dread talisman that can render you completely invulnerable."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "talisman"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
actions_types = list(/datum/action/item_action/immortality)
var/cooldown_time = 1 MINUTES
COOLDOWN_DECLARE(void_cd_index)
/obj/item/immortality_talisman/Initialize(mapload)
. = ..()
AddComponent(/datum/component/anti_magic, ALL)
/datum/action/item_action/immortality
name = "Immortality"
/obj/item/immortality_talisman/attack_self(mob/user)
if(isliving(user))
var/mob/living/L = user
if(COOLDOWN_FINISHED(src, void_cd_index))
SSblackbox.record_feedback("amount", "immortality_talisman_uses", 1)
COOLDOWN_START(src, void_cd_index, cooldown_time)
L.apply_status_effect(STATUS_EFFECT_VOIDED)
else
to_chat(L, span_warning("[src] is not ready yet!"))
else
to_chat(user, span_warning("Only the living can attain this power!"))
/obj/effect/immortality_talisman
name = "hole in reality"
desc = "It's shaped an awful lot like a person."
icon_state = "blank"
icon = 'icons/effects/effects.dmi'
var/vanish_description = "vanishes from reality"
var/can_destroy = TRUE
/obj/effect/immortality_talisman/Initialize(mapload, mob/new_user)
. = ..()
if(new_user)
vanish(new_user)
/obj/effect/immortality_talisman/proc/vanish(mob/user)
user.visible_message(span_danger("[user] [vanish_description], leaving a hole in [user.p_their()] place!"))
desc = "It's shaped an awful lot like [user.name]."
setDir(user.dir)
user.forceMove(src)
user.notransform = TRUE
user.status_flags |= GODMODE
can_destroy = FALSE
/obj/effect/immortality_talisman/proc/unvanish(mob/user)
user.status_flags &= ~GODMODE
user.notransform = FALSE
user.forceMove(get_turf(user))
user.visible_message(span_danger("[user] pops back into reality!"))
can_destroy = TRUE
qdel(src)
/obj/effect/immortality_talisman/attackby()
return
/obj/effect/immortality_talisman/ex_act()
return
/obj/effect/immortality_talisman/singularity_pull()
return
/obj/effect/immortality_talisman/Destroy(force)
if(!can_destroy && !force)
return QDEL_HINT_LETMELIVE
return ..()
/obj/effect/immortality_talisman/void
vanish_description = "is dragged into the void"
//Shared Bag
/obj/item/shared_storage
name = "paradox bag"
desc = "Somehow, it's in two places at once."
icon = 'icons/obj/storage.dmi'
icon_state = "cultpack"
slot_flags = ITEM_SLOT_BACK
resistance_flags = INDESTRUCTIBLE
/obj/item/shared_storage/red
name = "paradox bag"
desc = "Somehow, it's in two places at once."
/obj/item/shared_storage/red/Initialize(mapload)
. = ..()
var/datum/component/storage/STR = AddComponent(/datum/component/storage/concrete)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 60
STR.max_items = 21
new /obj/item/shared_storage/blue(drop_location(), STR)
/obj/item/shared_storage/blue/Initialize(mapload, datum/component/storage/concrete/master)
. = ..()
if(!istype(master))
return INITIALIZE_HINT_QDEL
var/datum/component/storage/STR = AddComponent(/datum/component/storage, master)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 60
STR.max_items = 21
//Book of Babel
/obj/item/book_of_babel
name = "Book of Babel"
desc = "An ancient tome written in countless tongues."
icon = 'icons/obj/library.dmi'
icon_state = "book1"
w_class = 2
/obj/item/book_of_babel/attack_self(mob/user)
if(!user.can_read(src))
return FALSE
to_chat(user, span_notice("You flip through the pages of the book, quickly and conveniently learning every language in existence. Somewhat less conveniently, the aging book crumbles to dust in the process. Whoops."))
user.grant_all_languages()
new /obj/effect/decal/cleanable/ash(get_turf(user))
qdel(src)
//Runite Scimitar
/obj/item/rune_scimmy
name = "rune scimitar"
desc = "A curved sword smelted from an unknown metal. Looking at it gives you the otherworldly urge to pawn it off for '30k', whatever that means."
lefthand_file = 'yogstation/icons/mob/inhands/weapons/scimmy_lefthand.dmi'
righthand_file = 'yogstation/icons/mob/inhands/weapons/scimmy_righthand.dmi'
icon = 'icons/obj/weapons/longsword.dmi'
icon_state = "rune_scimmy"
force = 20
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
damtype = BRUTE
sharpness = SHARP_EDGED
hitsound = 'yogstation/sound/weapons/rs_slash.ogg'
attack_verb = list("slashed","pk'd","atk'd")
var/mobs_grinded = 0
var/max_grind = 20
/obj/item/rune_scimmy/examine(mob/living/user)
. = ..()
. += span_notice("This blade fills you with a need to 'grind'. Slay hostile fauna to increase the Scimmy's power and earn loot.")
. += span_notice("The blade has grinded [mobs_grinded] out of [max_grind] fauna to reach maximum power, and will deal [mobs_grinded * 5] bonus damage to fauna.")
/obj/item/rune_scimmy/afterattack(atom/target, mob/user, proximity, click_parameters)
. = ..()
if(!proximity)
return
if(isliving(target))
var/mob/living/L = target
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid) || istype(L,/mob/living/simple_animal/hostile/asteroid/yog_jungle)) //no loot allowed from the little skulls
if(!istype(L, /mob/living/simple_animal/hostile/asteroid/hivelordbrood))
RegisterSignal(target, COMSIG_LIVING_DEATH, PROC_REF(roll_loot), TRUE)
//after quite a bit of grinding, you'll be doing a total of 120 damage to fauna per hit. A lot, but i feel like the grind justifies the payoff. also this doesn't effect crew. so. go nuts.
L.apply_damage(mobs_grinded*5,BRUTE)
///This proc handles rolling the loot on the loot table and "drops" the loot where the hostile fauna died
/obj/item/rune_scimmy/proc/roll_loot(mob/living/target)
UnregisterSignal(target, COMSIG_LIVING_DEATH)
if(mobs_grinded<max_grind)
mobs_grinded++
var/spot = get_turf(target)
var/loot = rand(1,100)
switch(loot)
if(1 to 20)//20% chance at 3 gold coins, the most basic rs drop
for(var/i in 1 to 3)
new /obj/item/coin/gold(spot)
if(21 to 30)//10% chance for 5 gold coins
for(var/i in 1 to 5)
new /obj/item/coin/gold(spot)
if(31 to 40)//10% chance for 2 GOLD (banana) DOUBLOONS
for(var/i in 1 to 2)
new /obj/item/coin/bananium(spot)
if(41 to 50) //10% chance to spawn 10 gold, diamond, or bluespace crystal ores, because runescape ore drops and gem drops
for(var/i in 1 to 5)
switch(rand(1,5))
if(1 to 2)
new /obj/item/stack/ore/gold(spot)
if(3 to 4)
new /obj/item/stack/ore/diamond(spot)
if(5)
new /obj/item/stack/sheet/bluespace_crystal(spot)
if(51 to 60)//10% for bow and bronze tipped arrows, bronze are supposed to be the worst in runescape but they kinda slap in here, hopefully limited by the 5 arrows
new /obj/item/gun/ballistic/bow(spot)
for(var/i in 1 to 5)
new /obj/item/ammo_casing/reusable/arrow/bronze(spot)
if(61 to 70)//10% chance at a seed drop, runescape drops seeds somewhat frequently for players to plant and harvest later
switch(rand(1,5))
if(1)
new /obj/item/seeds/lavaland/cactus(spot)
if(2)
new /obj/item/seeds/lavaland/ember(spot)
if(3)
new /obj/item/seeds/lavaland/inocybe(spot)
if(4)
new /obj/item/seeds/lavaland/polypore(spot)
if(5)
new /obj/item/seeds/lavaland/porcini(spot)
if(prob(25)) //25% chance to get strange seeds, should they feel like cooperating with botanists. this would also be interesting to see ash walkers get lmao
new /obj/item/seeds/random(spot)
if(71 to 80) //magmite is cool and somewhat rare i think?
new /obj/item/magmite(spot)
if(81 to 90) //i could make it drop foods for healing items like rs dropping fish, but i think the rewards should be a bit more immediate
new /obj/item/reagent_containers/autoinjector/medipen/survival(spot)
if(91 to 95) //5% PET DROP LET'S GO
new /mob/living/simple_animal/hostile/mining_drone(spot)
if(96 to 99) //4% DHIDE ARMOR
new /obj/item/stack/sheet/animalhide/ashdrake(spot)
if(100)
new /obj/structure/closet/crate/necropolis/tendril(spot)
//Potion of Flight
/obj/item/reagent_containers/glass/bottle/potion
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "potionflask"
/obj/item/reagent_containers/glass/bottle/potion/flight/syndicate
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "syndi_potionflask"
desc = "An ornate red bottle, with an \"S\" embossed into the underside. Filled with an experimental flight potion. Mileage may vary."
/obj/item/reagent_containers/glass/bottle/potion/flight
name = "strange elixir"
desc = "A flask with an almost-holy aura emitting from it. The label on the bottle says: 'erqo'hyy tvi'rf lbh jv'atf'."
list_reagents = list(/datum/reagent/flightpotion = 5)
/obj/item/reagent_containers/glass/bottle/potion/update_desc(updates=ALL)
. = ..()
if(reagents.total_volume)
desc = initial(desc)
else
desc = "An ornate red bottle, with an \"S\" embossed into the underside."
/obj/item/reagent_containers/glass/bottle/potion/update_icon_state()
. = ..()
if(reagents.total_volume)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]_empty"
/datum/reagent/flightpotion
name = "Flight Potion"
description = "Strange mutagenic compound of unknown origins."
reagent_state = LIQUID
compatible_biotypes = ALL_BIOTYPES
color = "#FFEBEB"
/datum/reagent/flightpotion/reaction_mob(mob/living/M, methods = TOUCH, reac_volume, show_message = TRUE, permeability = 1)
if(iscarbon(M) && M.stat != DEAD)
var/mob/living/carbon/C = M
var/valid_species = (ishumanbasic(C) || islizard(C) || ismoth(C) || isskeleton(C) || ispreternis(C) || isipc(C) || ispodperson(C) || isethereal(C))
if(valid_species && (reac_volume < 5)) //humans, lizards, skeletons, and preterni can get wings
to_chat(C, span_notice("<i>You feel something stir in you, but it quickly fades away.</i>"))
return ..()
if(!valid_species)
if((methods & INGEST) && show_message)
to_chat(C, span_notice("<i>You feel nothing but a terrible aftertaste.</i>"))
return ..()
to_chat(C, span_userdanger("A terrible pain travels down your back as wings burst out!"))
C.dna.species.GiveSpeciesFlight(C)
if(ishumanbasic(C))
to_chat(C, span_notice("You feel blessed!"))
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
if(islizard(C))
to_chat(C, span_notice("You feel blessed... by... something?"))
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
if(ismoth(C))
to_chat(C, span_notice("Your wings feel.... stronger?"))
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
if(isskeleton(C))
to_chat(C, span_notice("Your ribcage feels... bigger?"))
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
if(ispreternis(C) || isipc(C))
to_chat(C, span_notice("The servos in your back feel... different?"))
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
playsound(C.loc, 'sound/items/poster_ripped.ogg', 50, TRUE, -1)
C.adjustBruteLoss(20)
C.emote("scream")
..()
/obj/item/jacobs_ladder
name = "jacob's ladder"
desc = "A celestial ladder that violates the laws of physics."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder00"
/obj/item/jacobs_ladder/attack_self(mob/user)
var/turf/T = get_turf(src)
var/ladder_x = T.x
var/ladder_y = T.y
to_chat(user, span_notice("You unfold the ladder. It extends much farther than you were expecting."))
var/last_ladder = null
for(var/i in 1 to world.maxz)
if(is_centcom_level(i) || is_reserved_level(i) || is_reebe(i) || is_away_level(i))
continue
var/turf/T2 = locate(ladder_x, ladder_y, i)
last_ladder = new /obj/structure/ladder/unbreakable/jacob(T2, null, last_ladder)
qdel(src)
// Inherit from unbreakable but don't set ID, to suppress the default Z linkage
/obj/structure/ladder/unbreakable/jacob
name = "jacob's ladder"
desc = "An indestructible celestial ladder that violates the laws of physics."
#define COOLDOWN_SUMMON 1 MINUTES
/obj/item/eflowers
name ="enchanted flowers"
desc ="A charming bunch of flowers, most animals seem to find the bearer amicable after momentary contact with it. Squeeze the bouquet to summon tamed creatures. Megafauna cannot be summoned. <b>Megafauna need to be exposed 35 times to become friendly.</b>"
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "eflower"
var/next_summon = 0
var/list/summons = list()
attack_verb = list("thumped", "brushed", "bumped")
/obj/item/eflowers/attack_self(mob/user)
var/turf/T = get_turf(user)
var/area/A = get_area(user)
if(next_summon > world.time)
to_chat(user, span_warning("You can't do that yet!"))
return
if(is_station_level(T.z) && !A.outdoors)
to_chat(user, span_warning("You feel like calling a bunch of animals indoors is a bad idea."))
return
user.visible_message(span_warning("[user] holds the bouquet out, summoning their allies!"))
for(var/mob/m in summons)
m.forceMove(T)
playsound(T, 'sound/effects/splat.ogg', 80, 5, -1)
next_summon = world.time + COOLDOWN_SUMMON
/obj/item/eflowers/afterattack(mob/living/simple_animal/M, mob/user, proximity)
var/datum/status_effect/taming/G = M.has_status_effect(STATUS_EFFECT_TAMING)
. = ..()
if(!proximity)
return
if(M.client)
to_chat(user, span_warning("[M] is too intelligent to tame!"))
return
if(M.stat)
to_chat(user, span_warning("[M] is dead!"))
return
if(M.faction == user.faction)
to_chat(user, span_warning("[M] is already on your side!"))
return
if(!M.magic_tameable)
to_chat(user, span_warning("[M] cannot be tamed!"))
return
if(M.sentience_type == SENTIENCE_BOSS)
if(!G)
M.apply_status_effect(STATUS_EFFECT_TAMING, user)
else
G.add_tame(G.tame_buildup)
if(ISMULTIPLE(G.tame_crit-G.tame_amount, 5))
to_chat(user, span_notice("[M] has to be exposed [G.tame_crit-G.tame_amount] more times to accept your gift!"))
return
if(M.sentience_type != SENTIENCE_ORGANIC)
to_chat(user, span_warning("[M] cannot be tamed!"))
return
if(!do_after(user, 1.5 SECONDS, M))
return
M.visible_message(span_notice("[M] seems happy with you after exposure to the bouquet!"))
M.add_atom_colour("#11c42f", FIXED_COLOUR_PRIORITY)
M.drop_loot()
M.faction = user.faction
summons |= M
///Bosses
//Miniboss Miner
/obj/item/melee/transforming/cleaving_saw
name = "cleaving saw"
desc = "This saw, effective at drawing the blood of beasts, transforms into a long cleaver that makes use of centrifugal force."
force = 12
force_on = 20 //force when active
throwforce = 20
throwforce_on = 20
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
icon_state = "cleaving_saw"
icon_state_on = "cleaving_saw_open"
slot_flags = ITEM_SLOT_BELT
attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut")
attack_verb_on = list("cleaved", "swiped", "slashed", "chopped")
hitsound = 'sound/weapons/bladeslice.ogg'
hitsound_on = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_NORMAL
w_class_on = WEIGHT_CLASS_BULKY
sharpness = SHARP_EDGED
faction_bonus_force = 30
nemesis_factions = list("mining", "boss")
var/transform_cooldown
var/swiping = FALSE
/obj/item/melee/transforming/cleaving_saw/examine(mob/user)
. = ..()
. += "<span class='notice'>It is [active ? "open, will cleave enemies in a wide arc and deal additional damage to fauna, while getting you blood-drunk":"closed, and can be used for rapid consecutive attacks that cause fauna to bleed, dealing passive damage"].\n"+\
"Both modes will build up existing bleed effects, doing a burst of high damage and healing you if the bleed is built up high enough.\n"+\
"Transforming it immediately after an attack causes the next attack to come out faster.</span>"
/obj/item/melee/transforming/cleaving_saw/suicide_act(mob/user)
user.visible_message(span_suicide("[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!"))
transform_cooldown = 0
transform_weapon(user, TRUE)
return BRUTELOSS
/obj/item/melee/transforming/cleaving_saw/transform_weapon(mob/living/user, supress_message_text)
if(transform_cooldown > world.time)
return FALSE
. = ..()
if(.)
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.changeNext_move(CLICK_CD_MELEE * 0.25)
/obj/item/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text)
if(!supress_message_text)
if(active)
to_chat(user, span_notice("You open [src]. It will now cleave enemies in a wide arc and deal additional damage to fauna, getting you drunk on blood."))
else
to_chat(user, span_notice("You close [src]. It will now attack rapidly and cause fauna to bleed, letting you drink their blood to heal."))
playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
/obj/item/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, span_warning("You accidentally cut yourself with [src], like a doofus!"))
user.take_bodypart_damage(10)
/obj/item/melee/transforming/cleaving_saw/melee_attack_chain(mob/living/user, atom/target, params)
..()
if(!active)
user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
else
if(iscarbon(target) && prob(25)) //RNG wound application regardless of armor.
var/mob/living/carbon/carbon_target = target
var/obj/item/bodypart/bodypart = pick(carbon_target.bodyparts)
var/datum/wound/slash/moderate/crit_wound = new
user.visible_message(span_boldwarning("[user] cleaves [target], delivering a vicious wound!"))
crit_wound.apply_wound(bodypart)
/obj/item/melee/transforming/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target)
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(!B)
if(!active) //This isn't in the above if-check so that the else doesn't care about active
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
if(active && prob(33)) //This isn't in an else check above so that it doesn't care if they're not bleeding.
user.apply_status_effect(STATUS_EFFECT_BLOODDRUNK)
B.add_bleed(B.bleed_buildup)
if(B.needs_to_bleed)
to_chat(user, span_notice("You drink the blood spilled from [target], healing your wounds!"))
user.adjustBruteLoss(-10)
user.adjustFireLoss(-10)
user.adjustToxLoss(-10)
user.blood_volume += 10
/obj/item/melee/transforming/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user)
if(!active || swiping || !target.density || get_turf(target) == get_turf(user))
if(!active)
faction_bonus_force = 0
..()
if(!active)
faction_bonus_force = initial(faction_bonus_force)
else
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(target))
swiping = TRUE
var/static/list/cleaving_saw_cleave_angles = list(0, -45, 45) //so that the animation animates towards the target clicked and not towards a side target
for(var/i in cleaving_saw_cleave_angles)
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
for(var/mob/living/L in T)
if(user.Adjacent(L) && L.density)
melee_attack_chain(user, L)
swiping = FALSE
//Dragon
/obj/structure/closet/crate/necropolis/dragon
name = "dragon chest"
/obj/structure/closet/crate/necropolis/dragon/PopulateContents()
new /obj/item/gem/amber(src)
var/loot = rand(1,4)
switch(loot)
if(1)
new /obj/item/melee/ghost_sword(src)
if(2)
new /obj/item/lava_staff(src)
new /obj/item/book/granter/action/spell/sacredflame(src)
if(3)
new /obj/item/dragon_egg(src)
if(4)
if(prob(25)) //Still same chance but now you know if you're turning into a lizard (ew)
new /obj/item/dragons_blood/refined(src)
else
new /obj/item/dragons_blood(src)
/obj/structure/closet/crate/necropolis/dragon/crusher
name = "firey dragon chest"
/obj/structure/closet/crate/necropolis/dragon/crusher/PopulateContents()
..()
new /obj/item/crusher_trophy/tail_spike(src)
new /obj/item/gem/amber(src)
/obj/item/melee/ghost_sword
name = "\improper spectral blade"
desc = "A rusted and dulled blade. It doesn't look like it'd do much damage. It glows weakly."
icon = 'icons/obj/weapons/longsword.dmi'
icon_state = "spectral"
item_state = "spectral"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
flags_1 = CONDUCT_1
sharpness = SHARP_EDGED
w_class = WEIGHT_CLASS_BULKY
force = 1
throwforce = 1
hitsound = 'sound/effects/ghost2.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "rended")
var/summon_cooldown = 0
var/list/mob/dead/observer/spirits
/obj/item/melee/ghost_sword/Initialize(mapload)
. = ..()
spirits = list()
START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
AddComponent(/datum/component/butchering, 150, 90)