From b9fa759095802dbee6d69b05f08f445925572431 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 20 Dec 2024 18:53:55 -0500 Subject: [PATCH] The monster hunter blood vial is now just a status effect instead of a weird status effect + reagent combination (#4578) --- .../monster_hunters/events/wonderland.dm | 101 ------------------ .../monster_hunters/tools/blood_vial.dm | 92 ++++++++++++++++ tgstation.dme | 1 + 3 files changed, 93 insertions(+), 101 deletions(-) create mode 100644 monkestation/code/modules/antagonists/monster_hunters/tools/blood_vial.dm diff --git a/monkestation/code/modules/antagonists/monster_hunters/events/wonderland.dm b/monkestation/code/modules/antagonists/monster_hunters/events/wonderland.dm index 1e6d4b3a8b42..241a39663571 100644 --- a/monkestation/code/modules/antagonists/monster_hunters/events/wonderland.dm +++ b/monkestation/code/modules/antagonists/monster_hunters/events/wonderland.dm @@ -49,104 +49,3 @@ GLOBAL_LIST_EMPTY(wonderland_marks) desc = "What is this doing here?" icon = 'monkestation/icons/bloodsuckers/rabbit.dmi' icon_state = "red_queen" - -/obj/structure/blood_fountain - name = "blood fountain" - desc = "A huge resevoir of thick blood, perhaps drinking some of it would restore some vigor..." - icon = 'monkestation/icons/bloodsuckers/blood_fountain.dmi' - icon_state = "blood_fountain" - plane = ABOVE_GAME_PLANE - anchored = TRUE - density = TRUE - bound_width = 64 - bound_height = 64 - resistance_flags = INDESTRUCTIBLE - - -/obj/structure/blood_fountain/Initialize(mapload) - . = ..() - add_overlay("droplet") - - -/obj/structure/blood_fountain/attackby(obj/item/bottle, mob/living/user, params) - if(!istype(bottle, /obj/item/blood_vial)) - balloon_alert(user, "Needs a blood vial!") - return ..() - var/obj/item/blood_vial/vial = bottle - vial.fill_vial(user) - -/obj/item/blood_vial - name = "blood vial" - desc = "Used to collect samples of blood from the dead-still blood fountain." - icon = 'monkestation/icons/bloodsuckers/weapons.dmi' - icon_state = "blood_vial_empty" - inhand_icon_state = "beaker" - lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' - righthand_file = 'icons/mob/inhands/items_righthand.dmi' - w_class = WEIGHT_CLASS_TINY - item_flags = NOBLUDGEON - var/filled = FALSE ///does the bottle contain fluid - -/obj/item/blood_vial/proc/fill_vial(mob/living/user) - if(filled) - balloon_alert(user, "Vial already full!") - return - filled = TRUE - icon_state = "blood_vial" - update_appearance() - - -/obj/item/blood_vial/attack_self(mob/living/user) - if(!filled) - balloon_alert(user, "Empty!") - return - filled = FALSE - user.apply_status_effect(/datum/status_effect/cursed_blood) - icon_state = "blood_vial_empty" - update_appearance() - playsound(src, 'monkestation/sound/bloodsuckers/blood_vial_slurp.ogg',50) - -/datum/status_effect/cursed_blood - id = "Blood" - duration = 20 SECONDS - alert_type = /atom/movable/screen/alert/status_effect/cursed_blood - show_duration = TRUE - -/atom/movable/screen/alert/status_effect/cursed_blood - name = "Cursed Blood" - desc = "Something foreign is coursing through your veins." - -/datum/status_effect/cursed_blood/on_apply() - . = ..() - to_chat(owner, span_warning("You feel a great power surging through you!")) - owner.add_movespeed_modifier(/datum/movespeed_modifier/cursed_blood) - - if(iscarbon(owner)) - owner.reagents.add_reagent(/datum/reagent/medicine/blood_vial, 15) - - return TRUE - -/datum/status_effect/cursed_blood/on_remove() - . = ..() - owner.remove_movespeed_modifier(/datum/movespeed_modifier/cursed_blood) - - - -/datum/reagent/medicine/blood_vial - name = "Blood Vial" - metabolization_rate = 0.4 * REAGENTS_METABOLISM - -/datum/reagent/medicine/blood_vial/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) - if(affected_mob.health < 90 && affected_mob.health > 0) - affected_mob.adjustOxyLoss(-1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type) - affected_mob.adjustToxLoss(-1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype) - affected_mob.adjustBruteLoss(-2 * REM * seconds_per_tick, FALSE, required_bodytype = affected_bodytype) - affected_mob.adjustFireLoss(-2 * REM * seconds_per_tick, FALSE, required_bodytype = affected_bodytype) - - affected_mob.AdjustAllImmobility(-60 * REM * seconds_per_tick) - affected_mob.stamina.adjust(7 * REM * seconds_per_tick, TRUE) - ..() - . = TRUE - -/datum/movespeed_modifier/cursed_blood - multiplicative_slowdown = -0.6 diff --git a/monkestation/code/modules/antagonists/monster_hunters/tools/blood_vial.dm b/monkestation/code/modules/antagonists/monster_hunters/tools/blood_vial.dm new file mode 100644 index 000000000000..11afb8c8f5de --- /dev/null +++ b/monkestation/code/modules/antagonists/monster_hunters/tools/blood_vial.dm @@ -0,0 +1,92 @@ +/obj/structure/blood_fountain + name = "blood fountain" + desc = "A huge resevoir of thick blood, perhaps drinking some of it would restore some vigor..." + icon = 'monkestation/icons/bloodsuckers/blood_fountain.dmi' + icon_state = "blood_fountain" + plane = ABOVE_GAME_PLANE + anchored = TRUE + density = TRUE + bound_width = 64 + bound_height = 64 + resistance_flags = INDESTRUCTIBLE + +/obj/structure/blood_fountain/Initialize(mapload) + . = ..() + add_overlay("droplet") + +/obj/structure/blood_fountain/attackby(obj/item/bottle, mob/living/user, params) + if(!istype(bottle, /obj/item/blood_vial)) + balloon_alert(user, "need a blood vial!") + return ..() + var/obj/item/blood_vial/vial = bottle + vial.fill_vial(user) + +/obj/item/blood_vial + name = "blood vial" + desc = "Used to collect samples of blood from the dead-still blood fountain." + icon = 'monkestation/icons/bloodsuckers/weapons.dmi' + base_icon_state = "blood_vial" + icon_state = "blood_vial_empty" + inhand_icon_state = "beaker" + lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items_righthand.dmi' + w_class = WEIGHT_CLASS_TINY + item_flags = NOBLUDGEON + var/filled = FALSE ///does the bottle contain fluid + +/obj/item/blood_vial/proc/fill_vial(mob/living/user) + if(filled) + balloon_alert(user, "vial already full!") + return + filled = TRUE + update_appearance(UPDATE_ICON_STATE) + +/obj/item/blood_vial/attack_self(mob/living/user) + if(!filled) + balloon_alert(user, "empty!") + return + filled = FALSE + user.apply_status_effect(/datum/status_effect/cursed_blood) + update_appearance(UPDATE_ICON_STATE) + playsound(src, 'monkestation/sound/bloodsuckers/blood_vial_slurp.ogg', vol = 50) + +/obj/item/blood_vial/update_icon_state() + icon_state = filled ? base_icon_state : "[base_icon_state]_empty" + return ..() + +/datum/status_effect/cursed_blood + id = "cursed_blood" + duration = 20 SECONDS + tick_interval = 0.2 SECONDS + status_type = STATUS_EFFECT_REFRESH + alert_type = /atom/movable/screen/alert/status_effect/cursed_blood + show_duration = TRUE + processing_speed = STATUS_EFFECT_PRIORITY + +/atom/movable/screen/alert/status_effect/cursed_blood + name = "Cursed Blood" + desc = "Something foreign is coursing through your veins!" + icon_state = "blooddrunk" + +/datum/status_effect/cursed_blood/on_apply() + to_chat(owner, span_warning("You feel a great power surging through you!")) + owner.add_movespeed_modifier(/datum/movespeed_modifier/cursed_blood) + return TRUE + +/datum/status_effect/cursed_blood/on_remove() + owner.remove_movespeed_modifier(/datum/movespeed_modifier/cursed_blood) + +/datum/status_effect/cursed_blood/tick(seconds_per_tick, times_fired) + var/needs_update = FALSE + if(ISINRANGE(owner.health, 0, 90)) + needs_update += owner.adjustBruteLoss(-2 * seconds_per_tick, updating_health = FALSE) + needs_update += owner.adjustFireLoss(-2 * seconds_per_tick, updating_health = FALSE) + needs_update += owner.adjustToxLoss(-1 * seconds_per_tick, updating_health = FALSE, forced = TRUE) + needs_update += owner.adjustOxyLoss(-1 * seconds_per_tick, updating_health = FALSE) + owner.AdjustAllImmobility((-6 SECONDS) * seconds_per_tick) + owner.stamina.adjust(7 * seconds_per_tick, forced = TRUE) + if(needs_update) + owner.updatehealth() + +/datum/movespeed_modifier/cursed_blood + multiplicative_slowdown = -0.6 diff --git a/tgstation.dme b/tgstation.dme index c0a0370d4a52..12c9484b8077 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6409,6 +6409,7 @@ #include "monkestation\code\modules\antagonists\monster_hunters\monsters\monster_effects\killer_rabbit_effects.dm" #include "monkestation\code\modules\antagonists\monster_hunters\monsters\monster_effects\white_rabbit.dm" #include "monkestation\code\modules\antagonists\monster_hunters\monsters\monster_powers\killer_rabbit_powers.dm" +#include "monkestation\code\modules\antagonists\monster_hunters\tools\blood_vial.dm" #include "monkestation\code\modules\antagonists\monster_hunters\tools\bnuuy_mask.dm" #include "monkestation\code\modules\antagonists\monster_hunters\tools\jack_bomb.dm" #include "monkestation\code\modules\antagonists\monster_hunters\tools\rabbit_eye.dm"