Skip to content

Commit

Permalink
boop
Browse files Browse the repository at this point in the history
  • Loading branch information
Gboster-0 committed Nov 5, 2023
1 parent b1ff427 commit b97ca99
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 64 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/action/cooldown/slasher
name = "Slasher Possession"
desc = "You've been possessed by the Slasher"
desc = "You've been possessed by the Slasher... not actually, please report this to coders"
background_icon = 'goon/icons/mob/slasher.dmi'
background_icon_state = "slasher_background"
button_icon = 'goon/icons/mob/slasher.dmi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,34 @@

var/flipped = FALSE

/datum/action/cooldown/slasher/incorporealize/PreActivate(atom/target)
/datum/action/cooldown/slasher/incorporealize/Activate(atom/target)
. = ..()
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)

/**
* Here we start our checks
* We cant do it in PreActivate() since that for some reason does not work
*/

if(!slasherdatum)
return FALSE
to_chat(owner, span_warning("You should not have this ability or your slasher antagonist datum was deleted, please contact coders"))
return

if(slasherdatum.soul_punishment >= 2)
return FALSE
to_chat(owner, span_boldwarning("The souls you have stolen are preventing you from going incorporeal!"))
return

if(!flipped)
for(var/mob/living/watchers in view(9, target) - target)
target.balloon_alert(owner, "you can only vanish unseen.")
return FALSE
return

/**
* All good? then lets continue
*/

if(!do_after(target, 1.5 SECONDS, get_turf(target)))
break_corp()
return FALSE
return TRUE

/datum/action/cooldown/slasher/incorporealize/Activate(atom/target)
. = ..()
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(!slasherdatum)
return

flipped = !flipped
Expand All @@ -45,7 +52,7 @@
ADD_TRAIT(owner_mob, TRAIT_HANDS_BLOCKED, "slasher")
else
name = "Incorporealize"
desc = " Become incorporeal, capable of moving through walls and being completely invisible, but unable to interact with the world. Can only be used when corporeal and when not in view of any human being. "
desc = "Become incorporeal, capable of moving through walls and being completely invisible, but unable to interact with the world. Can only be used when corporeal and when not in view of any human being. "
button_icon_state = "incorporealize"
if(isliving(owner))
var/mob/living/owner_mob = owner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/action/cooldown/slasher/summon_machette
name = "Summon Machette"
desc = "Summon your machete to your active hand, or create one if it doesn't exist. This machete deals 15 BRUTE on hit, and stuns on throw."
desc = "Summon your machete to your active hand, or create one if it doesn't exist. This machete deals 15 BRUTE on hit increasing by 2.5 for every soul you own, and stuns on throw."

button_icon_state = "summon_machete"

Expand Down
123 changes: 79 additions & 44 deletions monkestation/code/modules/antagonists/slasher/abilities/soul_steal.dm
Original file line number Diff line number Diff line change
@@ -1,68 +1,103 @@
/mob/living/carbon/human
/// Has our soul been sucked, this makes us pale white.
var/soul_sucked = FALSE
///sucked precent
var/sucked_precent = 0

/datum/action/cooldown/slasher/soul_steal
name = "Soul Steal"
desc = " Use on a corpse who has a full soul to steal theirs. Stealing a soul gives your current machete an extra 2.5 BRUTE on hit, and on throw."
desc = "You can use this ability to suck souls. You can only do this ability if you are not incorporeal"

button_icon_state = "soul_steal"

click_to_activate = TRUE

cooldown_time = 15 SECONDS
cooldown_time = 20 SECONDS // maximum cooldown you can have for eating souls

var/per_soul_suck = 1 SECONDS
var/sucking_time = 4 SECONDS // how long should we suck for?

/datum/action/cooldown/slasher/soul_steal/PreActivate(atom/target)
. = ..()
var/quick_eater = FALSE // used in an activate() check to see if they recently ate a soul

/datum/action/cooldown/slasher/soul_steal/Activate(atom/target)

var/mob/living/carbon/human/human_target = target
var/mob/living/carbon/human/human_owner = owner
var/datum/antagonist/slasher/slasherdatum = human_owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(slasherdatum)
if(slasherdatum.last_soul_sucked + slasherdatum.soul_digestion > world.time)
to_chat(owner, span_boldwarning("You can feel your mind slipping, you feel as though bad things will happen if you absorb another soul so quickly!"))
per_soul_suck = 5 SECONDS

if(!ishuman(target))
to_chat(owner, span_warning("This is only usable on humans."))
/**
* Here we start our checks
* We cant do it in PreActivate() since that for some reason does not work
*/

if(!slasherdatum) // is this person even a slasher? mostly a safety check
to_chat(owner, span_warning("You should not have this ability or your slasher antagonist datum was deleted, please contact coders"))
return
var/mob/living/carbon/human/human_target = target
if(human_target.stat != DEAD)
to_chat(owner, span_notice("This target is not dead. You can't steal their soul."))

if(isopenturf(target) || isclosedturf(target)) // dont say anything, they probably mis-clicked
return

if(human_owner == human_target) // you cant suck yourself, no comment
return

if(slasherdatum.last_soul_sucked + slasherdatum.soul_digestion > world.time) // they are a speedrunner, mark them as such
quick_eater = TRUE

// After this point, give chat messages about failures

if(!slasherdatum.corporeal)
to_chat(owner, span_warning("You cannot suck souls whilst incorporeal!"))
return

if(!ishuman(target)) // are they trying to suck a corgi?
to_chat(owner, span_warning("You can only suck the souls of humans"))
return

if(human_target.stat != DEAD) // are they trying to suck the person in anasthesia?
to_chat(owner, span_notice("This human is not dead. You can't steal their soul."))
return
if(human_target.soul_sucked)

if(human_target.soul_sucked) // are they trying to suck the person being revived 5 times?
to_chat(owner, span_warning("Their soul has already been sucked."))
return
if(!human_target.mind)

if(!human_target.mind) // are they trying to suck a monkey?
to_chat(owner, span_warning("This target doesn't seem to have a soul to suck."))
return

/datum/action/cooldown/slasher/soul_steal/Activate(atom/target)
if(quick_eater) // you cant speedrun sucking, take it slow
to_chat(owner, span_boldwarning("You feel as if you should slow down with eating their soul..."))
sucking_time = 20 SECONDS // 5 times bigger

/**
* If all the checks succeed, we begin our actual work
*/

. = ..()
if(!ishuman(target))
return
var/mob/living/carbon/human/human_owner = owner
var/mob/living/carbon/human/human_target = target
while(do_after(owner, per_soul_suck, target) && !human_target.soul_sucked)
human_target.sucked_precent += 20
if(human_target.sucked_precent >= 100)
human_target.soul_sucked = TRUE
if(human_target.dna.species.use_skintones)
human_target.skin_tone = "albino"
human_target.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
else
human_target.dna.features["mcolor"] = "#FFFFFF"
human_target.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)

human_target.update_body(is_creating = TRUE)

var/datum/antagonist/slasher/slasherdatum = human_owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(!slasherdatum)
return
slasherdatum.linked_machette.force += 2.5
slasherdatum.linked_machette.throwforce += 2.5
slasherdatum.souls_sucked++
slasherdatum.check_soul_punishment()
slasherdatum.last_soul_sucked = world.time

to_chat(owner, span_boldwarning("You remember that you need to stand perfectly still to consume their soul..."))

if(!do_after(owner, sucking_time, target)) // you gotta stand perfectly still to consume da soul
to_chat(owner, span_boldwarning("You got distracted and was unable to consume your victims soul!"))
return FALSE

if(quick_eater)
to_chat(owner, span_boldwarning("You can feel your mind slipping, you feel as though bad things will happen if you absorb more souls so quickly!"))
else
to_chat(owner, span_boldwarning("You successfully consumed your victims soul!"))

human_target.soul_sucked = TRUE

if(human_target.dna.species.use_skintones) // make them deathly white, afterall they dont have a soul anymore
human_target.skin_tone = "albino"
human_target.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
else // we dont discriminate, even skeletons can be white... (arent they already white?)
human_target.dna.features["mcolor"] = "#FFFFFF"
human_target.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)

human_target.update_body(is_creating = TRUE)

slasherdatum.souls_sucked++
slasherdatum.check_soul_punishment()
slasherdatum.last_soul_sucked = world.time

// lets make their machette stronger
slasherdatum.linked_machette.force += 2.5
slasherdatum.linked_machette.throwforce += 2.5
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@

cooldown_time = 45 SECONDS

/datum/action/cooldown/slasher/terror/PreActivate(atom/target)

/datum/action/cooldown/slasher/terror/Activate(atom/target)
. = ..()
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(!slasherdatum || !slasherdatum.corporeal)
return FALSE

if(!slasherdatum)
to_chat(owner, span_warning("You should not have this ability or your slasher antagonist datum was deleted, please contact coders"))
return

if(!slasherdatum.corporeal) // if he is incorporeal, dont stun people
for(var/mob/living/carbon/human/human in view(7, owner))
if(human == owner)
continue
to_chat(human, span_warning("You hear a distant screech... this cant possibly be good"))
playsound(owner, 'monkestation/sound/voice/terror.ogg', 10, falloff_exponent = 0, use_reverb = FALSE)
human.Shake(duration = 1 SECONDS)
return

/datum/action/cooldown/slasher/terror/Activate(atom/target)
. = ..()
playsound(owner, 'monkestation/sound/voice/terror.ogg', 100, falloff_exponent = 0, use_reverb = FALSE)
for(var/mob/living/carbon/human/human in view(7, owner))
if(human == owner)
Expand Down
2 changes: 1 addition & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5682,7 +5682,7 @@
#include "monkestation\code\modules\antagonists\slasher\abilities\slasher_regenerate.dm"
#include "monkestation\code\modules\antagonists\slasher\abilities\soul_steal.dm"
#include "monkestation\code\modules\antagonists\slasher\abilities\stalk_target.dm"
#include "monkestation\code\modules\antagonists\slasher\abilities\terror.dm"
#include "monkestation\code\modules\antagonists\slasher\abilities\terror_screech.dm"
#include "monkestation\code\modules\antagonists\slasher\components\team_monitor.dm"
#include "monkestation\code\modules\antagonists\slasher\slasher_outfit\slasher_footwear.dm"
#include "monkestation\code\modules\antagonists\slasher\slasher_outfit\slasher_headgear.dm"
Expand Down

0 comments on commit b97ca99

Please sign in to comment.