Skip to content

Commit

Permalink
The monster hunter blood vial is now just a status effect instead of …
Browse files Browse the repository at this point in the history
…a weird status effect + reagent combination
  • Loading branch information
Absolucy committed Dec 15, 2024
1 parent e3f8b3e commit b141cb1
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/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', vol = 50)

/datum/status_effect/cursed_blood
id = "cursed_blood"
duration = 20 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
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6399,6 +6399,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"
Expand Down

0 comments on commit b141cb1

Please sign in to comment.