-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
64 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
monkestation/code/modules/antagonists/slasher/abilities/_slasher_base.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
monkestation/code/modules/antagonists/slasher/abilities/recall_machette.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 79 additions & 44 deletions
123
monkestation/code/modules/antagonists/slasher/abilities/soul_steal.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters