Skip to content

Commit

Permalink
LC13 Bleed Statues effect (#2679)
Browse files Browse the repository at this point in the history
* adding icons

* Adding Bleed Code
  • Loading branch information
EnderMage99 authored Jan 14, 2025
1 parent 58c81e8 commit 32c404a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
Binary file modified ModularTegustation/Teguicons/status_sprites.dmi
Binary file not shown.
70 changes: 70 additions & 0 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,76 @@
else
B.add_stacks(stacks)

#define STATUS_EFFECT_LCBLEED /datum/status_effect/stacking/lc_bleed // Deals true damage every 5 sec, can't be applied to godmode (contained abos)
/datum/status_effect/stacking/lc_bleed
id = "lc_bleed"
alert_type = /atom/movable/screen/alert/status_effect/lc_bleed
max_stacks = 50
tick_interval = 5 SECONDS
consumed_on_threshold = FALSE
var/new_stack = FALSE
var/burn_res = 0
var/safety = TRUE

/atom/movable/screen/alert/status_effect/lc_bleed
name = "Bleeding"
desc = "You're currently bleeding!!"
icon = 'ModularTegustation/Teguicons/status_sprites.dmi'
icon_state = "lc_bleed"

//Bleed Damage Stuff
/datum/status_effect/stacking/lc_bleed/on_apply()
. = ..()
RegisterSignal(owner, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(Moved))

//Deals true damage
/datum/status_effect/stacking/lc_bleed/proc/Moved(mob/user, atom/new_location)
SIGNAL_HANDLER
if(!can_have_status())
qdel(src)
to_chat(owner, "<span class='warning'>Your organs bleed due to your movement!!</span>")
owner.playsound_local(owner, 'sound/effects/wounds/crackandbleed.ogg', 25, TRUE)
if(stacks >= 10)
var/obj/effect/decal/cleanable/blood/B = locate() in get_turf(owner)
if(!B)
B = new /obj/effect/decal/cleanable/blood(get_turf(owner))
B.bloodiness = 100
if(ishuman(owner))
owner.adjustBruteLoss(max(0, stacks))
else
owner.adjustBruteLoss(stacks*4) // x4 on non humans
stacks = round(stacks/2)
if(stacks == 0)
qdel(src)


/datum/status_effect/stacking/lc_bleed/on_remove()
UnregisterSignal(owner, COMSIG_MOVABLE_PRE_MOVE)
return ..()

/datum/status_effect/stacking/lc_bleed/can_have_status()
return (owner.stat != DEAD || !(owner.status_flags & GODMODE))

/datum/status_effect/stacking/lc_bleed/add_stacks(stacks_added)
..()
new_stack = TRUE

// The Stack Decaying
/datum/status_effect/stacking/lc_bleed/tick()
if(safety)
if(new_stack)
new_stack = FALSE
else
qdel(src)

//Mob Proc
/mob/living/proc/apply_lc_bleed(stacks)
var/datum/status_effect/stacking/lc_bleed/B = src.has_status_effect(/datum/status_effect/stacking/lc_bleed)
if(!B)
src.apply_status_effect(/datum/status_effect/stacking/lc_bleed, stacks)
else
B.add_stacks(stacks)

/datum/status_effect/display/dyscrasone_withdrawl
id = "dyscrasone_withdrawl"
status_type = STATUS_EFFECT_UNIQUE
Expand Down

0 comments on commit 32c404a

Please sign in to comment.