diff --git a/modular_zapoc/modules/smites/code/crystal.dm b/modular_zapoc/modules/smites/code/crystal.dm new file mode 100644 index 000000000000..652bfbe299e3 --- /dev/null +++ b/modular_zapoc/modules/smites/code/crystal.dm @@ -0,0 +1,128 @@ +/obj/smite_crystal + name = "crystal" + 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." + icon = 'icons/effects/64x64.dmi' + icon_state = "curse" + pixel_x = -16 + pixel_y = -16 + color = "#ba52ba" + +/obj/smite_crystal/Initialize(mapload) + . = ..() + add_overlay(image(icon='modular_zapoc/modules/smites/icons/man_crystal.dmi',icon_state="crystal", pixel_x = 16, pixel_y = 16)) + +/// To be deployed after typos and blunders. +/datum/smite/crystal + name = "the crystal" + + var/charge + var/sentence_choice + var/jailtime // Timer + var/felt_time // What did it feel like? + var/sound_choice + var/quick_crystal + + +/datum/smite/crystal/configure(client/user) + quick_crystal = tgui_alert(user, "Skip setup?", "the crystal", list("Yes", "No", "Cancel")) + if(quick_crystal == "No") + charge = tgui_input_text(user, "What are they charged with?", "the crystal", "ADDED NOTHING") // Displayed to victim + 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")) + sound_choice = tgui_alert(user, "Play audio?", "the crystal", list("Target only", "Nearby", "No")) + else if(quick_crystal == "Yes") + charge = "ADDED NOTHING" + sentence_choice = "Just a second" + sound_choice = "Nearby" + else + return FALSE + + +/datum/smite/crystal/effect(client/user, mob/living/target) + var/obj/smite_crystal/crystal = new /obj/smite_crystal(get_turf(target)) + target.forceMove(crystal) + target.Stun(jailtime) + + to_chat(target, span_phobia(("YOUR CHARGE: [span_colossus("[charge]")]"))) + + switch(sentence_choice) + if("Just a second") + jailtime = 30 SECONDS + felt_time = span_notice("You spend three hours in the crystal, but only a second has passed back in reality.") + if("Only one week") + jailtime = 1 MINUTES + felt_time = span_notice("You spend a week in the crystal, but only a minute has passed back in reality.") + if("Like a century") // Teleports target to error room + jailtime = 30 SECONDS + 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?") + target.move_to_error_room() + + switch(sound_choice) + if("Target only") + target.playsound_local(get_turf(target), 'modular_zapoc/modules/smites/sound/crystal.ogg', 75) + 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.")) + + if("Nearby") + playsound(get_turf(target), 'modular_zapoc/modules/smites/sound/crystal.ogg', 75) + 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.")) + + if("No") + 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.")) + + crystal.freedom_timer(jailtime, felt_time) + var/msg = "[key_name(target)] was put in the crystal by [key_name(user)] for [LOWER_TEXT(sentence_choice)]. They are charged with: [charge]." + message_admins(msg) + log_admin(msg) + +/obj/smite_crystal/attack_hand(mob/living/user, list/modifiers) + if(!(user in contents)) + var/sacrifice_mob = tgui_alert(user, "Get in the crystal?", "the crystal", list("Yes", "No")) + + switch(sacrifice_mob) + if("Yes") + user.forceMove(src) + user.visible_message( + span_notice("[user] gets in [src]."), + span_notice("You get in [src].") + ) + if("No") + user.visible_message( + span_notice("[user] thinks better of getting in [src]."), + span_notice("You think better of getting in [src].") + ) + else + to_chat(user, span_notice("You bang on the walls of the crystal.")) + + +/obj/smite_crystal/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + var/sacrifice = tgui_alert(user, "Place [tool] to the crystal? You might not get it back!", list("the crystal", "Yes", "No")) + + switch(sacrifice) + if("Yes") + tool.forceMove(src) + user.visible_message( + span_notice("[user] places [tool] into [src]."), + span_notice("You place [tool] into [src].") + ) + if("No") + user.visible_message( + span_notice("[user] thinks better of placing [tool] into [src]."), + span_notice("You think better of placing [tool] into [src].") + ) + + return ITEM_INTERACT_BLOCKING + + +/obj/smite_crystal/proc/freedom_timer(duration, freedom_text) + addtimer(CALLBACK(src, PROC_REF(freedom), freedom_text), duration) + + +/obj/smite_crystal/proc/freedom(freedom_text) + var/free_turf = get_turf(src) + for(var/mob/guy in contents) + guy.forceMove(free_turf) + to_chat(guy, freedom_text) + for(var/obj/trapped_object in contents) + if(prob(25)) + trapped_object.forceMove(free_turf) + animate(src, alpha = 0, time = 1 SECONDS) + QDEL_IN(src, 1 SECONDS) diff --git a/modular_zapoc/modules/smites/icons/man_crystal.dmi b/modular_zapoc/modules/smites/icons/man_crystal.dmi new file mode 100644 index 000000000000..2f058dc22bc0 Binary files /dev/null and b/modular_zapoc/modules/smites/icons/man_crystal.dmi differ diff --git a/modular_zapoc/modules/smites/sound/crystal.ogg b/modular_zapoc/modules/smites/sound/crystal.ogg new file mode 100644 index 000000000000..caefea4cb54a Binary files /dev/null and b/modular_zapoc/modules/smites/sound/crystal.ogg differ diff --git a/modular_zapoc/modules/smites/sound/hammer_bonk.ogg b/modular_zapoc/modules/smites/sound/hammer_bonk.ogg new file mode 100644 index 000000000000..b6354b1b93e5 Binary files /dev/null and b/modular_zapoc/modules/smites/sound/hammer_bonk.ogg differ diff --git a/modular_zapoc/modules/smites/sound/hammers.ogg b/modular_zapoc/modules/smites/sound/hammers.ogg new file mode 100644 index 000000000000..2086efb27aeb Binary files /dev/null and b/modular_zapoc/modules/smites/sound/hammers.ogg differ diff --git a/tgstation.dme b/tgstation.dme index dadb532a4f08..ec084a67a6aa 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8039,4 +8039,5 @@ #include "modular_zapoc\modules\mapping\code\mapping_helper.dm" #include "modular_zapoc\modules\mapping\code\transfer_zones.dm" #include "modular_zapoc\modules\mobs\code\cockroach.dm" +#include "modular_zapoc\modules\smites\code\crystal.dm" // END_INCLUDE