mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Merge pull request #2608 from Screemonster/fixtheferalness
Xenochimera bugfixes and tweaks
This commit is contained in:
+16
-14
@@ -7,7 +7,7 @@
|
||||
|
||||
last_special = world.time + 50 //To prevent button spam.
|
||||
|
||||
var/confirm = alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to thirty minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", "Yes", "No")
|
||||
var/confirm = alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to twenty minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
var/mob/living/carbon/human/C = src
|
||||
var/nutrition_used = C.nutrition/2
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
if(C.stat == DEAD) //Uh oh, you died!
|
||||
if(C.hasnutriment()) //Let's hope you have nutriment in you.... If not
|
||||
var/time = (500+1/((nutrition_used/100+1)/1300))
|
||||
var/time = (240+960/(1 + nutrition_used/75))
|
||||
C.weakened = 10000 //Since it takes 1 tick to lose one weaken. Due to prior rounding errors, you'd sometimes unweaken before regenning. This fixes that.
|
||||
C.reviving = 1
|
||||
C.canmove = 0 //Make them unable to move. In case they somehow get up before the delay.
|
||||
@@ -44,7 +44,7 @@
|
||||
return
|
||||
|
||||
else if(C.stat != DEAD) //If they're alive at the time of reviving.
|
||||
var/time = (500+1/((nutrition_used/100+1)/1300))
|
||||
var/time = (240+960/(1 + nutrition_used/75))
|
||||
C.weakened = 10000 //Since it takes 1 tick to lose one weaken. Due to prior rounding errors, you'd sometimes unweaken before regenning. This fixes that.
|
||||
C.reviving = 1
|
||||
C.canmove = 0 //Make them unable to move. In case they somehow get up before the delay.
|
||||
@@ -87,7 +87,7 @@
|
||||
C.reviving = 1 // apply cooldown, this also locks out their main regen.
|
||||
C << "<span class='notice'>You start to purge your body of poisons and intruders...</span>"
|
||||
|
||||
var/grossness = min(20, toxloss)
|
||||
var/grossness = min(100, toxloss*5)
|
||||
|
||||
for(var/i = 0, i<10,i++) // tick some tox down. This'll clear 20 toxloss in total.
|
||||
if(C)
|
||||
@@ -97,23 +97,25 @@
|
||||
for(var/obj/item/organ/external/E in C.organs) //half the germ_level of everything. If they're anything short of outright necrotic they'll be fine.
|
||||
var/obj/item/organ/external/G = E
|
||||
if(G.germ_level)
|
||||
grossness += G.germ_level/100
|
||||
grossness += G.germ_level/10
|
||||
G.germ_level = min(0, (G.germ_level/2) - 100)
|
||||
|
||||
for(var/obj/item/organ/internal/I in C.internal_organs)
|
||||
var/obj/item/organ/internal/G = I
|
||||
if(G.germ_level)
|
||||
grossness += G.germ_level/100
|
||||
grossness += G.germ_level/5
|
||||
G.germ_level = min(0, (G.germ_level/2) - 100)
|
||||
|
||||
//and now comes the fun part because they're gross
|
||||
for (var/i = 0, i<10,i++)
|
||||
for (var/i = 0, i< grossness/10,i++)
|
||||
if (prob(min(100, grossness)))
|
||||
C << "<span class='warning'>You feel nauseous...</span>"
|
||||
spawn(30)
|
||||
sleep(30)
|
||||
if(prob(min(100, grossness/2))) // relatively small chance unless they really let themselves go to shit
|
||||
C << "<span class='warning'>You double over, gagging!</span>"
|
||||
C.Stun(3)
|
||||
C.vomit()
|
||||
sleep(50)
|
||||
grossness = (grossness/2)
|
||||
|
||||
C << "<span class='notice'>You have finished purging your body of impurities.</span>"
|
||||
|
||||
@@ -138,11 +140,11 @@
|
||||
|
||||
last_special = world.time + 50 //To prevent button spam.
|
||||
|
||||
var/confirm = alert(usr, "Are you sure you want to reconstruct your form this moment? This will happen immediately and alert an.", "Confirm Regeneration", "Yes", "No")
|
||||
var/confirm = alert(usr, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
var/mob/living/carbon/human/C = src
|
||||
if(C.stat == DEAD) //Uh oh, you died!
|
||||
if(C.reagents.has_reagent("nutriment")) //Let's hope you have nutriment in you.... If not
|
||||
if(C.hasnutriment()) //Let's hope you have nutriment in you.... If not
|
||||
if(C) //Runtime prevention.
|
||||
C.nutrition -= C.nutrition/2 //Cut their nutrition in half.
|
||||
var/old_nutrition = C.nutrition //Since the game is being annoying.
|
||||
@@ -154,6 +156,7 @@
|
||||
C.does_not_breathe = 0 //start breathing again
|
||||
C.revive() // I did have special snowflake code, but this is easier.
|
||||
C.weakened = 2 //Not going to let you get up immediately. 2 ticks before you get up. Overrides the above 10000 weaken.
|
||||
C.mutations.Remove(HUSK)
|
||||
C.nutrition = old_nutrition
|
||||
C.brainloss = (braindamage+10) //Gives them half their prior brain damage plus ten more.
|
||||
C.update_canmove()
|
||||
@@ -178,6 +181,7 @@
|
||||
var/braindamage = C.brainloss/2 //If you have 100 brainloss, it gives you 50.
|
||||
C.revive() // I did have special snowflake code, but this is easier.
|
||||
C.weakened = 2 //Not going to let you get up immediately. 2 ticks before you get up. Overrides the above 10000 weaken.
|
||||
C.mutations.Remove(HUSK)
|
||||
C.nutrition = old_nutrition
|
||||
C.brainloss = (braindamage) //Gives them half their prior brain damage plus ten more.
|
||||
C.update_canmove()
|
||||
@@ -204,10 +208,8 @@
|
||||
/mob/living/carbon/human/proc/handle_feral()
|
||||
if(handling_hal) return //avoid conflict with actual hallucinations
|
||||
handling_hal = 1
|
||||
var/light_amount = getlightlevel() //how much light there is in the place
|
||||
|
||||
while(client && feral > 10 && light_amount >= 0.5) // largely a copy of handle_hallucinations() without the fake attackers
|
||||
light_amount = getlightlevel()
|
||||
if(client && feral) // largely a copy of handle_hallucinations() without the fake attackers. Unlike hallucinations, only fires once - if they're still feral they'll get hit again anyway.
|
||||
sleep(rand(200,500)/(feral/10))
|
||||
var/halpick = rand(1,100)
|
||||
switch(halpick)
|
||||
|
||||
@@ -123,45 +123,45 @@
|
||||
|
||||
H.shock_stage = max(H.shock_stage-(H.feral/20), 0) //if they lose enough health to hit softcrit, handle_shock() will keep resetting this. Otherwise, pissed off critters will lose shock faster than they gain it.
|
||||
|
||||
for(var/mob/living/M in viewers(H))
|
||||
if(M != H) // someone in view
|
||||
if(prob(0.5)) // 1 in 200 chance of doing something so as not to interrupt scenes
|
||||
if(light_amount <= 0.5) // in the darkness
|
||||
if(H.nutrition <= 250 || H.jitteriness > 0) //tell them that person looks like food and is good to pounce.
|
||||
H << "<span class='info'> Secure in your hiding place, you still feel the urge to hunt, and [M] looks like an extremely tempting target...</span>"
|
||||
else // in lit area
|
||||
if(H.nutrition <= 250 || H.jitteriness > 0) //tell them that person looks like food. It CAN happen when you're not hungry enough to be feral, especially if coffee is involved.
|
||||
H << "<span class='danger'> Every movement, every flick, every sight and sound has your full attention, your hunting instincts on high alert... In fact, [M] looks extremely appetizing...</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
if(!H.handling_hal)
|
||||
spawn H.handle_feral()
|
||||
|
||||
else if(M == H) //nobody is in view.
|
||||
if(light_amount <= 0.5) // in the darkness
|
||||
if(prob(1)) //periodic nagmessages
|
||||
if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat.
|
||||
H << "<span class='info'> Secure in your hiding place, your hunger still gnaws at you. You need to track down some food...</span>"
|
||||
else if(H.jitteriness >= 100)
|
||||
H << "<span class='info'> sneakysneakyyesyesyescleverhidingfindthingsyessssss</span>"
|
||||
else //otherwise, just tell them to hide.
|
||||
H << "<span class='info'> ...safe...</span>"
|
||||
else // in light
|
||||
if(light_amount <= 0.5) // in the darkness. No need for custom scene-protection checks as it's just an occational infomessage.
|
||||
if(prob(2)) //periodic nagmessages just to remind 'em they're still feral
|
||||
if (H.traumatic_shock >=min(60, H.nutrition/10)) // if hurt, tell 'em to heal up
|
||||
H << "<span class='info'> This place seems safe, secure, hidden, a place to lick your wounds and recover...</span>"
|
||||
else if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat.
|
||||
H << "<span class='info'> Secure in your hiding place, your hunger still gnaws at you. You need to catch some food...</span>"
|
||||
else if(H.jitteriness >= 100)
|
||||
H << "<span class='info'> sneakysneakyyesyesyescleverhidingfindthingsyessssss</span>"
|
||||
else //otherwise, just tell them to keep hiding.
|
||||
H << "<span class='info'> ...safe...</span>"
|
||||
else // must be in a lit area
|
||||
var/list/nearby = oviewers(H)
|
||||
if (nearby.len) // someone's nearby
|
||||
if(prob(1)) // 1 in 100 chance of doing something so as not to interrupt scenes
|
||||
var/mob/M = pick(nearby)
|
||||
if (H.traumatic_shock >=min(60, H.nutrition/10)) //tell 'em to be wary of a random person
|
||||
H << "<span class='danger'> You're hurt, in danger, exposed, and [M] looks to be a little too close for comfort...</span>"
|
||||
else if(H.nutrition <= 250 || H.jitteriness > 0) //tell them a random person in view looks like food. It CAN happen when you're not hungry enough to be feral, especially if coffee is involved.
|
||||
H << "<span class='danger'> Every movement, every flick, every sight and sound has your full attention, your hunting instincts on high alert... In fact, [M] looks extremely appetizing...</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
if(!H.handling_hal)
|
||||
spawn H.handle_feral()
|
||||
if(prob(1)) //periodic nagmessages
|
||||
if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat.
|
||||
H << "<span class='danger'> Confusing sights and sounds and smells surround you - scary and disorienting it may be, but the drive to hunt, to feed, to survive, compels you.</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
else if(H.jitteriness >= 100)
|
||||
H << "<span class='danger'> yesyesyesyesyesyesgetthethingGETTHETHINGfindfoodsfindpreypounceyesyesyes</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
else //otherwise, just tell them to hide.
|
||||
H << "<span class='danger'> Confusing sights and sounds and smells surround you, this place is wrong, confusing, frightening. You need to hide, go to ground...</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
H.handle_feral()
|
||||
else // nobody around
|
||||
if(!H.handling_hal)
|
||||
H.handle_feral()
|
||||
if(prob(2)) //periodic nagmessages
|
||||
if(H.nutrition <= 100) //If hungry, nag them to go and find someone or something to eat.
|
||||
H << "<span class='danger'> Confusing sights and sounds and smells surround you - scary and disorienting it may be, but the drive to hunt, to feed, to survive, compels you.</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
else if(H.jitteriness >= 100)
|
||||
H << "<span class='danger'> yesyesyesyesyesyesgetthethingGETTHETHINGfindfoodsfindpreypounceyesyesyes</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
else //otherwise, just tell them to hide.
|
||||
H << "<span class='danger'> Confusing sights and sounds and smells surround you, this place is wrong, confusing, frightening. You need to hide, go to ground...</span>"
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.emote("twitch")
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user