gargoyle part one

This commit is contained in:
Seris02
2023-02-14 16:10:53 +08:00
parent df78c4b934
commit 1a6c7ae6bb

View File

@@ -0,0 +1,26 @@
/datum/component/gargoyle
var/energy = 100
var/transformed = FALSE
var/paused = FALSE
var/cooldown
var/paused_loc
var/mob/living/carbon/human/gargoyle //easy reference
/datum/component/gargoyle/Initialize()
if (!ishuman(parent))
return COMPONENT_INCOMPATIBLE
var/mob/living/carbon/human/gargoyle = parent
START_PROCESSING(SSprocessing, src)
/datum/component/gargoyle/process()
if (!gargoyle)
return
if (paused && gargoyle.loc != paused_loc)
paused = FALSE
energy -= 20
if (!transformed && !paused && energy > 0)
energy = max(0,energy-0.05)
if (transformed)
energy = min(energy+0.3, 100)
H.adjustBruteLoss(-0.5)
H.adjustFireLoss(-0.5)