mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Ghoul Moodlet + Max HP fix (#6497)
* Ghoul Moodlet + Max HP fix (#59682) Adds ghoul moodlet. Fixes a undocumented issue with ghouls dying and being revived with 25/50 max health. * Ghoul Moodlet + Max HP fix Co-authored-by: eeSPee <robotdevilinside@gmail.com>
This commit is contained in:
@@ -968,3 +968,16 @@
|
||||
/datum/status_effect/cloudstruck/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(mob_overlay)
|
||||
|
||||
|
||||
/datum/status_effect/ghoul
|
||||
id = "ghoul"
|
||||
status_type = STATUS_EFFECT_UNIQUE
|
||||
duration = -1
|
||||
alert_type = /atom/movable/screen/alert/status_effect/ghoul
|
||||
|
||||
/atom/movable/screen/alert/status_effect/ghoul
|
||||
name = "Flesh Servant"
|
||||
desc = "You are a Ghoul! A eldritch monster reanimated to serve its master."
|
||||
icon_state = "mind_control"
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define GHOUL_MAX_HEALTH 25
|
||||
#define MUTE_MAX_HEALTH 50
|
||||
|
||||
/datum/eldritch_knowledge/base_flesh
|
||||
name = "Principle of Hunger"
|
||||
desc = "Opens up the Path of Flesh to you. Allows you to transmute a pool of blood with a kitchen knife, or its derivatives, into a Flesh Blade."
|
||||
@@ -54,10 +57,11 @@
|
||||
ADD_TRAIT(humie, TRAIT_MUTE, MAGIC_TRAIT)
|
||||
log_game("[key_name_admin(humie)] has become a voiceless dead, their master is [user.real_name]")
|
||||
humie.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
humie.setMaxHealth(50)
|
||||
humie.health = 50 // Voiceless dead are much tougher than ghouls
|
||||
humie.setMaxHealth(MUTE_MAX_HEALTH)
|
||||
humie.health = MUTE_MAX_HEALTH // Voiceless dead are much tougher than ghouls
|
||||
humie.become_husk()
|
||||
humie.faction |= "heretics"
|
||||
humie.apply_status_effect(/datum/status_effect/ghoul)
|
||||
|
||||
var/datum/antagonist/heretic_monster/heretic_monster = humie.mind.add_antag_datum(/datum/antagonist/heretic_monster)
|
||||
var/datum/antagonist/heretic/master = user.mind.has_antag_datum(/datum/antagonist/heretic)
|
||||
@@ -70,6 +74,8 @@
|
||||
SIGNAL_HANDLER
|
||||
var/mob/living/carbon/human/humie = source
|
||||
ghouls -= humie
|
||||
humie.setMaxHealth(initial(humie.maxHealth))
|
||||
humie.remove_status_effect(/datum/status_effect/ghoul)
|
||||
humie.mind.remove_antag_datum(/datum/antagonist/heretic_monster)
|
||||
UnregisterSignal(source,COMSIG_LIVING_DEATH)
|
||||
|
||||
@@ -106,9 +112,10 @@
|
||||
. = TRUE
|
||||
RegisterSignal(human_target,COMSIG_LIVING_DEATH,.proc/remove_ghoul)
|
||||
human_target.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
human_target.setMaxHealth(25)
|
||||
human_target.health = 25
|
||||
human_target.setMaxHealth(GHOUL_MAX_HEALTH)
|
||||
human_target.health = GHOUL_MAX_HEALTH
|
||||
human_target.become_husk()
|
||||
human_target.apply_status_effect(/datum/status_effect/ghoul)
|
||||
human_target.faction |= "heretics"
|
||||
var/datum/antagonist/heretic_monster/heretic_monster = human_target.mind.add_antag_datum(/datum/antagonist/heretic_monster)
|
||||
var/datum/antagonist/heretic/master = user.mind.has_antag_datum(/datum/antagonist/heretic)
|
||||
@@ -131,6 +138,8 @@
|
||||
/datum/eldritch_knowledge/flesh_grasp/proc/remove_ghoul(datum/source)
|
||||
var/mob/living/carbon/human/humie = source
|
||||
spooky_scaries -= humie
|
||||
humie.setMaxHealth(initial(humie.maxHealth))
|
||||
humie.remove_status_effect(/datum/status_effect/ghoul)
|
||||
humie.mind.remove_antag_datum(/datum/antagonist/heretic_monster)
|
||||
UnregisterSignal(source, COMSIG_LIVING_DEATH)
|
||||
|
||||
@@ -244,3 +253,6 @@
|
||||
grasp_ghoul.ghoul_amt *= 3
|
||||
var/datum/eldritch_knowledge/flesh_ghoul/better_ghoul = heretic_datum.get_knowledge(/datum/eldritch_knowledge/flesh_ghoul)
|
||||
better_ghoul.max_amt *= 3
|
||||
|
||||
#undef GHOUL_MAX_HEALTH
|
||||
#undef MUTE_MAX_HEALTH
|
||||
|
||||
Reference in New Issue
Block a user