forked from Rotwood-Vale/Ratwood-Keep
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1062 from crix870/zombies
Deadite changes: gags, gear, and undead eyes
- Loading branch information
Showing
23 changed files
with
522 additions
and
256 deletions.
There are no files selected for viewing
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
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
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
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
42 changes: 42 additions & 0 deletions
42
code/modules/antagonists/roguetown/villain/werewolf/werewolf_wound_infection.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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/datum/wound | ||
/// Werewolf infection probability for bites on this wound | ||
var/werewolf_infection_probability = 15 | ||
/// Time taken until werewolf infection comes in | ||
var/werewolf_infection_time = 2 MINUTES | ||
/// Actual infection timer | ||
var/werewolf_infection_timer | ||
|
||
/datum/wound/proc/werewolf_infect_attempt() | ||
if(QDELETED(src) || QDELETED(owner) || QDELETED(bodypart_owner)) | ||
return FALSE | ||
if(werewolf_infection_timer || !ishuman(owner) || !prob(werewolf_infection_probability)) | ||
return | ||
var/mob/living/carbon/human/human_owner = owner | ||
if(!human_owner.can_werewolf()) | ||
return | ||
if(human_owner.stat >= DEAD) //forget it | ||
return | ||
to_chat(human_owner, span_danger("I feel horrible... REALLY horrible...")) | ||
human_owner.mob_timers["puke"] = world.time | ||
human_owner.vomit(1, blood = TRUE, stun = FALSE) | ||
werewolf_infection_timer = addtimer(CALLBACK(src, PROC_REF(wake_werewolf)), werewolf_infection_time, TIMER_STOPPABLE) | ||
severity = WOUND_SEVERITY_BIOHAZARD | ||
if(bodypart_owner) | ||
sortTim(bodypart_owner.wounds, GLOBAL_PROC_REF(cmp_wound_severity_dsc)) | ||
return TRUE | ||
|
||
/datum/wound/proc/wake_werewolf() | ||
if(QDELETED(src) || QDELETED(owner) || QDELETED(bodypart_owner)) | ||
return FALSE | ||
if(!ishuman(owner)) | ||
return FALSE | ||
var/mob/living/carbon/human/human_owner = owner | ||
var/datum/antagonist/werewolf/wolfy = human_owner.werewolf_check() | ||
if(!wolfy) | ||
return FALSE | ||
werewolf_infection_timer = null | ||
owner.flash_fullscreen("redflash3") | ||
to_chat(owner, span_danger("It hurts... Is this really the end for me?")) | ||
owner.emote("scream") // heres your warning to others bro | ||
owner.Knockdown(1) | ||
return wolfy |
69 changes: 69 additions & 0 deletions
69
code/modules/antagonists/roguetown/villain/zombie/remove_rot.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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/proc/remove_rot(mob/living/carbon/human/target, mob/living/user, method = "unknown", damage = 0, success_message = "The rot is removed.", fail_message = "The rot removal failed.") | ||
if (!istype(target, /mob/living/carbon/human) || QDELETED(target)) | ||
return FALSE | ||
|
||
// Check if the target has rot | ||
var/has_rot = FALSE | ||
var/datum/antagonist/zombie/was_zombie = target.mind?.has_antag_datum(/datum/antagonist/zombie) | ||
|
||
if (was_zombie) | ||
has_rot = TRUE | ||
else if (istype(target, /mob/living/carbon)) | ||
has_rot = check_bodyparts_for_rot(target) | ||
|
||
// Handle failure case | ||
if (!has_rot) | ||
to_chat(user, span_warning(fail_message)) | ||
return FALSE | ||
|
||
if (was_zombie) | ||
remove_zombie_antag(target, user, method) | ||
|
||
// Remove rot component | ||
remove_rot_component(target) | ||
|
||
// Clean body parts | ||
clean_body_parts(target) | ||
|
||
//Doing it out of this proc for now | ||
//to_chat(user, span_notice(success_message)) | ||
|
||
return TRUE | ||
|
||
/proc/check_bodyparts_for_rot(mob/living/carbon/target) | ||
for (var/obj/item/bodypart/bodypart in target.bodyparts) | ||
if (bodypart.rotted || bodypart.skeletonized) | ||
return TRUE | ||
return FALSE | ||
|
||
|
||
/proc/remove_zombie_antag(mob/living/carbon/target, mob/living/user, method) | ||
var/datum/antagonist/zombie/was_zombie = target.mind?.has_antag_datum(/datum/antagonist/zombie) | ||
if (!was_zombie) | ||
return | ||
|
||
was_zombie.become_rotman = FALSE | ||
target.mind.remove_antag_datum(/datum/antagonist/zombie) | ||
target.Unconscious(20 SECONDS) | ||
target.emote("breathgasp") | ||
target.Jitter(100) | ||
|
||
if (!HAS_TRAIT(target, TRAIT_IWASUNZOMBIFIED) && user?.ckey) | ||
adjust_playerquality(PQ_GAIN_UNZOMBIFY, user.ckey) | ||
ADD_TRAIT(target, TRAIT_IWASUNZOMBIFIED, "[method]") | ||
|
||
///Removes the rot amount from the target | ||
/proc/remove_rot_component(mob/living/carbon/target) | ||
var/datum/component/rot/rot = target.GetComponent(/datum/component/rot) | ||
if (rot) | ||
rot.amount = 0 | ||
|
||
///Cure bodyparts | ||
/proc/clean_body_parts(mob/living/carbon/target) | ||
for (var/obj/item/bodypart/bodypart in target.bodyparts) | ||
bodypart.rotted = FALSE | ||
bodypart.skeletonized = FALSE | ||
bodypart.update_limb() | ||
bodypart.update_disabled() | ||
|
||
target.update_body() |
Oops, something went wrong.