Dionae changes (#8995)

PR is still work in progress.

    Increases nymph health to 50

    Changes Dionae health to 240(currently from 300)

    When a dionae splits their health is now divided amongst their nymphs. Nymphs will always have at least 20% of their health when split.
This commit is contained in:
Yonnimer
2020-07-05 13:02:08 +03:00
committed by GitHub
parent 74f471398e
commit 03431d5be5
5 changed files with 57 additions and 46 deletions
@@ -22,8 +22,8 @@
holder_type = /obj/item/holder/diona
meat_type = /obj/item/reagent_containers/food/snacks/meat/dionanymph
meat_amount = 2
maxHealth = 33.3
health = 33.3
maxHealth = 50
health = 50
pass_flags = PASSTABLE
// Decorative head flower.
@@ -112,11 +112,6 @@ var/list/diona_banned_languages = list(
adjustHalLoss(severity*DS.pain_factor, 1)
DS.stored_energy = 0 //We reset the energy back to zero after calculating the damage. dont want it to go negative
//If the diona in question is a gestalt, then all the nymphs inside it will suffer damage too
if (DS.dionatype == DIONA_WORKER)
for(var/mob/living/carbon/alien/diona/D in src)
D.adjustBruteLoss(severity*DS.trauma_factor*0.5)
/mob/living/carbon/proc/diona_handle_temperature(var/datum/dionastats/DS)
if (bodytemperature < TEMP_REGEN_STOP)
DS.healing_factor = 0
@@ -281,19 +276,6 @@ var/list/diona_banned_languages = list(
O.damage += value/-3
DS.stored_energy -= value
//We only regenerate nymphs if the gestalt has plenty of energy to spare.
//Survival of the collective is prioritised over individual members
//And healing nymphs can suck up a lot of energy, which the gestalt may need
if (DS.stored_energy > (0.75 * DS.max_energy))
for (var/mob/living/carbon/alien/diona/D in bad_internal_organs)
if (!D.stat != DEAD)
D.diona_handle_regeneration(DS)
//IF a nymph inside the gestalt is damaged, we trigger its own regeneration function
//but we pass in the gestalt's Dionastats, so its energy/rads will be used to heal them
//Last up, growing brand new limbs and organs to replace those lost or removed.
if ((life_tick % (LIFETICK_INTERVAL_LESS*8) == 0) || bypass )
//We will only replace ONE organ or limb each time this procs
@@ -386,15 +368,6 @@ var/list/diona_banned_languages = list(
if (DS.stored_energy < REGROW_ENERGY_REQ || nutrition < REGROW_FOOD_REQ)
return
for (var/mob/living/carbon/alien/diona/D in bad_internal_organs)
if (D.stat == DEAD || D.health <= 0)
D.health = 1
D.stat = CONSCIOUS
to_chat(src, "<span class='danger'>You feel a stirring within you as [D.name] returns to life!</span>")
updatehealth()
return
//Only one per proc
//If we have less than six nymphs, we add one each proc
if (topup_nymphs())
if (DS.stored_energy < REGROW_ENERGY_REQ)
@@ -301,11 +301,10 @@
else
nymph.key = key
/mob/living/carbon/human/proc/diona_split_into_nymphs(var/death_split = FALSE)
/mob/living/carbon/human/proc/diona_split_into_nymphs()
var/turf/T = get_turf(src)
var/mob/living/carbon/alien/diona/bestNymph = null
var/bestHealth = 0
var/gestalt_health = (300 - getFireLoss() - getBruteLoss() - getToxLoss()) / 6
var/nymphs_to_kill_off = 0
@@ -336,23 +335,17 @@
bestNymph = D
nymphos += D
D.forceMove(T)
if(death_split && D.health != 0 && D.stat != DEAD)
if(gestalt_health >= D.maxHealth * 0.20)
D.health = gestalt_health
else
D.health = D.maxHealth * 0.20
D.split_languages(src)
D.set_dir(pick(NORTH, SOUTH, EAST, WEST))
D.gestalt = null
if (D.stat != DEAD && D.health > (D.maxHealth*0.1))//If a nymph is alive and has enough health, it will emerge from the gestalt
total_nymph += 1
D.stat = CONSCIOUS
D.stunned = 0
D.update_verbs()
if ((!D.key) && D.health > bestHealth)
bestHealth = D.health
bestNymph = D
else //If a nymph is too heavily damaged, it cannot survive and will be born dead
D.visible_message("[D] is too damaged to survive outside a gestalt, and expires with a pitiful chirrup", "You are too damaged to survive outside of your gestalt!", "You hear a pitiful chirrup!")
D.stat = DEAD
total_nymph += 1
D.stat = CONSCIOUS
D.stunned = 0
D.update_verbs()
for(var/obj/item/W in src)
drop_from_inventory(W)
@@ -3,6 +3,7 @@
short_name = "dio"
name_plural = "Dionaea"
bodytype = "Diona"
total_health = 140
age_min = 1
age_max = 1000
default_genders = list(NEUTER)
@@ -170,7 +171,7 @@
/datum/species/diona/handle_death(var/mob/living/carbon/human/H, var/gibbed = 0)
if (!gibbed)
// This proc sleeps. Async it.
INVOKE_ASYNC(H, /mob/living/carbon/human/proc/diona_split_into_nymphs, TRUE)
INVOKE_ASYNC(H, /mob/living/carbon/human/proc/diona_split_into_nymphs)
/datum/species/diona/handle_speech_problems(mob/living/carbon/human/H, list/current_flags, message, message_verb, message_mode)
// Diona without head can live, but they cannot talk as loud anymore.