Skip to content

Commit 68e0ace

Browse files
Crystal Smite (#66)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request I love that northerlion guy. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game A suprisingly important part of our culture from the oldcode. <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Testing Photographs and Procedure <!-- Include any screenshots/videos/debugging steps of the modified code functioning successfully, ideally including edge cases. --> <!-- You can uncomment line 1 OR 2 @ _maps/_basemap.dm to boot up a test map that loads much faster. --> <details open> <summary>Screenshots & Videos</summary> Put screenshots and videos here with an empty line between the screenshots and the `<details>` tags. </details> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and its effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> :cl: add: Admin smite: Crystal /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
1 parent bc17212 commit 68e0ace

6 files changed

Lines changed: 129 additions & 0 deletions

File tree

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
/obj/smite_crystal
2+
name = "crystal"
3+
desc = "What the hell are you talkin' about? You've added nothing to the conversation- Get in the- Get in the crystal. Sorry, buddy, get in the crystal. HAH hahahahahahaha. We're going to put you in the crystal, you're gonna be in the crystal for a minute; It's gonna feel like one week. It's only one week, man! Some of the people are in the crystal for like, a century, okay? You're going in- the minute is gonna feel like a week so you have some time to think about what you've done. And then you're going to come out of the crystal."
4+
icon = 'icons/effects/64x64.dmi'
5+
icon_state = "curse"
6+
pixel_x = -16
7+
pixel_y = -16
8+
color = "#ba52ba"
9+
10+
/obj/smite_crystal/Initialize(mapload)
11+
. = ..()
12+
add_overlay(image(icon='modular_zapoc/modules/smites/icons/man_crystal.dmi',icon_state="crystal", pixel_x = 16, pixel_y = 16))
13+
14+
/// To be deployed after typos and blunders.
15+
/datum/smite/crystal
16+
name = "the crystal"
17+
18+
var/charge
19+
var/sentence_choice
20+
var/jailtime // Timer
21+
var/felt_time // What did it feel like?
22+
var/sound_choice
23+
var/quick_crystal
24+
25+
26+
/datum/smite/crystal/configure(client/user)
27+
quick_crystal = tgui_alert(user, "Skip setup?", "the crystal", list("Yes", "No", "Cancel"))
28+
if(quick_crystal == "No")
29+
charge = tgui_input_text(user, "What are they charged with?", "the crystal", "ADDED NOTHING") // Displayed to victim
30+
sentence_choice = tgui_alert(user, "How long will they spend in the crystal?", "the crystal", list("Just a second", "Only one week", "Like a century"))
31+
sound_choice = tgui_alert(user, "Play audio?", "the crystal", list("Target only", "Nearby", "No"))
32+
else if(quick_crystal == "Yes")
33+
charge = "ADDED NOTHING"
34+
sentence_choice = "Just a second"
35+
sound_choice = "Nearby"
36+
else
37+
return FALSE
38+
39+
40+
/datum/smite/crystal/effect(client/user, mob/living/target)
41+
var/obj/smite_crystal/crystal = new /obj/smite_crystal(get_turf(target))
42+
target.forceMove(crystal)
43+
target.Stun(jailtime)
44+
45+
to_chat(target, span_phobia(("YOUR CHARGE: [span_colossus("[charge]")]")))
46+
47+
switch(sentence_choice)
48+
if("Just a second")
49+
jailtime = 30 SECONDS
50+
felt_time = span_notice("You spend three hours in the crystal, but only a second has passed back in reality.")
51+
if("Only one week")
52+
jailtime = 1 MINUTES
53+
felt_time = span_notice("You spend a week in the crystal, but only a minute has passed back in reality.")
54+
if("Like a century") // Teleports target to error room
55+
jailtime = 30 SECONDS
56+
felt_time = span_notice("You spend a century in the crystal, but only two minutes have passed back in reality. Wait, what is this place?")
57+
target.move_to_error_room()
58+
59+
switch(sound_choice)
60+
if("Target only")
61+
target.playsound_local(get_turf(target), 'modular_zapoc/modules/smites/sound/crystal.ogg', 75)
62+
to_chat(target, span_purple("What the hell are you talkin' about? You've added nothing to the conversation- Get in the- Get in the crystal. Sorry, buddy, get in the crystal. HAH hahahahahahaha. We're going to put you in the crystal, you're gonna be in the crystal for a minute; It's gonna feel like one week. It's only one week, man! Some of the people are in the crystal for like, a century, okay? You're going in- the minute is gonna feel like a week so you have some time to think about what you've done. And then you're going to come out of the crystal."))
63+
64+
if("Nearby")
65+
playsound(get_turf(target), 'modular_zapoc/modules/smites/sound/crystal.ogg', 75)
66+
to_chat(target, span_purple("What the hell are you talkin' about? You've added nothing to the conversation- Get in the- Get in the crystal. Sorry, buddy, get in the crystal. HAH hahahahahahaha. We're going to put you in the crystal, you're gonna be in the crystal for a minute; It's gonna feel like one week. It's only one week, man! Some of the people are in the crystal for like, a century, okay? You're going in- the minute is gonna feel like a week so you have some time to think about what you've done. And then you're going to come out of the crystal."))
67+
68+
if("No")
69+
to_chat(target, span_purple("What the hell are you talkin' about? You've added nothing to the conversation- Get in the- Get in the crystal. Sorry, buddy, get in the crystal. HAH hahahahahahaha. We're going to put you in the crystal, you're gonna be in the crystal for a minute; It's gonna feel like one week. It's only one week, man! Some of the people are in the crystal for like, a century, okay? You're going in- the minute is gonna feel like a week so you have some time to think about what you've done. And then you're going to come out of the crystal."))
70+
71+
crystal.freedom_timer(jailtime, felt_time)
72+
var/msg = "[key_name(target)] was put in the crystal by [key_name(user)] for [LOWER_TEXT(sentence_choice)]. They are charged with: [charge]."
73+
message_admins(msg)
74+
log_admin(msg)
75+
76+
/obj/smite_crystal/attack_hand(mob/living/user, list/modifiers)
77+
if(!(user in contents))
78+
var/sacrifice_mob = tgui_alert(user, "Get in the crystal?", "the crystal", list("Yes", "No"))
79+
80+
switch(sacrifice_mob)
81+
if("Yes")
82+
user.forceMove(src)
83+
user.visible_message(
84+
span_notice("[user] gets in [src]."),
85+
span_notice("You get in [src].")
86+
)
87+
if("No")
88+
user.visible_message(
89+
span_notice("[user] thinks better of getting in [src]."),
90+
span_notice("You think better of getting in [src].")
91+
)
92+
else
93+
to_chat(user, span_notice("You bang on the walls of the crystal."))
94+
95+
96+
/obj/smite_crystal/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
97+
var/sacrifice = tgui_alert(user, "Place [tool] to the crystal? You might not get it back!", list("the crystal", "Yes", "No"))
98+
99+
switch(sacrifice)
100+
if("Yes")
101+
tool.forceMove(src)
102+
user.visible_message(
103+
span_notice("[user] places [tool] into [src]."),
104+
span_notice("You place [tool] into [src].")
105+
)
106+
if("No")
107+
user.visible_message(
108+
span_notice("[user] thinks better of placing [tool] into [src]."),
109+
span_notice("You think better of placing [tool] into [src].")
110+
)
111+
112+
return ITEM_INTERACT_BLOCKING
113+
114+
115+
/obj/smite_crystal/proc/freedom_timer(duration, freedom_text)
116+
addtimer(CALLBACK(src, PROC_REF(freedom), freedom_text), duration)
117+
118+
119+
/obj/smite_crystal/proc/freedom(freedom_text)
120+
var/free_turf = get_turf(src)
121+
for(var/mob/guy in contents)
122+
guy.forceMove(free_turf)
123+
to_chat(guy, freedom_text)
124+
for(var/obj/trapped_object in contents)
125+
if(prob(25))
126+
trapped_object.forceMove(free_turf)
127+
animate(src, alpha = 0, time = 1 SECONDS)
128+
QDEL_IN(src, 1 SECONDS)
511 Bytes
Binary file not shown.
348 KB
Binary file not shown.
7.65 KB
Binary file not shown.
45.7 KB
Binary file not shown.

tgstation.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8069,4 +8069,5 @@
80698069
#include "modular_zapoc\modules\mapping\code\mapping_helper.dm"
80708070
#include "modular_zapoc\modules\mapping\code\transfer_zones.dm"
80718071
#include "modular_zapoc\modules\mobs\code\cockroach.dm"
8072+
#include "modular_zapoc\modules\smites\code\crystal.dm"
80728073
// END_INCLUDE

0 commit comments

Comments
 (0)