|
234 | 234 | if(current_cable?.powernet)
|
235 | 235 | current_cable.powernet.haspulsedemon = FALSE
|
236 | 236 | . = ..()
|
237 |
| - |
| 237 | + |
238 | 238 | /mob/living/simple_animal/hostile/pulse_demon/proc/is_under_tile()
|
239 | 239 | var/turf/simulated/floor/F = get_turf(src)
|
240 | 240 | return istype(F,/turf/simulated/floor) && F.floor_tile
|
|
515 | 515 | var/amount_added = min(maxcharge-charge,amount_to_drain)
|
516 | 516 | charge += amount_added
|
517 | 517 | 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.")) |
518 | 524 | // Add to stats if any
|
519 | 525 | if(mind && mind.GetRole(PULSEDEMON))
|
520 | 526 | var/datum/role/pulse_demon/PD = mind.GetRole(PULSEDEMON)
|
|
531 | 537 | maxcharge += amount_to_drain * PULSEDEMON_APC_CHARGE_MULTIPLIER //multiplier to balance the pitiful powercells in APCs
|
532 | 538 | charge += amount_to_drain * PULSEDEMON_APC_CHARGE_MULTIPLIER
|
533 | 539 | 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.")) |
535 | 545 | // Add to stats if any
|
536 | 546 | if(mind && mind.GetRole(PULSEDEMON))
|
537 | 547 | var/datum/role/pulse_demon/PD = mind.GetRole(PULSEDEMON)
|
|
0 commit comments