Files
Yogstation/code/modules/mob/living/carbon/alien/larva/life.dm
Grandmother of 50 872817b70b Mood Code Improvements [Merge-Ready?] (#39075)
fix: having higher sanity is no longer punished by making you enter crit faster
balance: you can have 100 mood instead of 99 before it starts slowly decreasing


Remember higher sanity is BETTER

You want crit_modifier (now crit_threshold) to be LOW so you can stay in fights more (you go into crit at 5hp vs 0hp).

Why: Proc overhead, puts the load on mood, proper abstraction of mood component, values > defines, etc.
2018-07-20 00:32:44 +01:00

34 lines
771 B
Plaintext

/mob/living/carbon/alien/larva/Life()
set invisibility = 0
if (notransform)
return
if(..()) //not dead
// GROW!
if(amount_grown < max_grown)
amount_grown++
update_icons()
/mob/living/carbon/alien/larva/update_stat()
if(status_flags & GODMODE)
return
if(stat != DEAD)
if(health<= -maxHealth || !getorgan(/obj/item/organ/brain))
death()
return
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (has_trait(TRAIT_FAKEDEATH)) || health <= crit_threshold)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
update_canmove()
else
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
resting = 0
adjust_blindness(-1)
update_canmove()
update_damage_hud()
update_health_hud()