Skip to content

Commit c085462

Browse files
Pulse Demons now regain 1hp for every 100W they consume (#37975)
* Update pulsedemon.dm * Update pulsedemon.dm * Now also gives a message * Update pulsedemon.dm
1 parent 6f5f209 commit c085462

File tree

1 file changed

+12
-2
lines changed
  • code/modules/mob/living/simple_animal/hostile/pulse_demon

1 file changed

+12
-2
lines changed

code/modules/mob/living/simple_animal/hostile/pulse_demon/pulsedemon.dm

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
if(current_cable?.powernet)
235235
current_cable.powernet.haspulsedemon = FALSE
236236
. = ..()
237-
237+
238238
/mob/living/simple_animal/hostile/pulse_demon/proc/is_under_tile()
239239
var/turf/simulated/floor/F = get_turf(src)
240240
return istype(F,/turf/simulated/floor) && F.floor_tile
@@ -515,6 +515,12 @@
515515
var/amount_added = min(maxcharge-charge,amount_to_drain)
516516
charge += amount_added
517517
current_battery.charge -= amount_added
518+
// Pulse demons will also regenerate health at a rate of 1 point for every 100 power absorbed.
519+
if((health < maxHealth) && (amount_added >= 100))
520+
var/previous_health = health
521+
health = min(maxHealth, health + round(amount_added/100, 1))
522+
if((health - previous_health) >= 1) //Don't spam this at full health
523+
to_chat(src, span_notice("You regenerate [health - previous_health] health."))
518524
// Add to stats if any
519525
if(mind && mind.GetRole(PULSEDEMON))
520526
var/datum/role/pulse_demon/PD = mind.GetRole(PULSEDEMON)
@@ -531,7 +537,11 @@
531537
maxcharge += amount_to_drain * PULSEDEMON_APC_CHARGE_MULTIPLIER //multiplier to balance the pitiful powercells in APCs
532538
charge += amount_to_drain * PULSEDEMON_APC_CHARGE_MULTIPLIER
533539
current_apc.cell.use(amount_to_drain)
534-
540+
if((health < maxHealth) && (amount_to_drain >= 100)) //Will typically provide 10 health points per APC
541+
var/previous_health = health
542+
health = min(maxHealth, health + round(amount_to_drain/100, 1))
543+
if((health - previous_health) >= 1)
544+
to_chat(src, span_notice("You regenerate [health - previous_health] health."))
535545
// Add to stats if any
536546
if(mind && mind.GetRole(PULSEDEMON))
537547
var/datum/role/pulse_demon/PD = mind.GetRole(PULSEDEMON)

0 commit comments

Comments
 (0)