Files
Aurora.3/code/game/verbs/suicide.dm
rockdtben 334f1e3059 -Removed setBruteLoss and setFireLoss since they served no purpose.
-Overrided the proc for get[Fire/Brute]Loss and adjust[Fire/Brute]Loss for humans to use the total damage proc.
-Removed redundant checks aka setBruteLoss(max(getBruteLoss(), 0) since the adjust brute proc already prevents it from going negative.
-Commented out the UpdateDamage() procs contents as it did nothing. If problems arise we might have to investigate. Soon I will remove the proc entierly.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2673 316c924e-a436-60f5-8080-3fe189b3f50e
2011-12-13 03:49:07 +00:00

176 lines
5.2 KiB
Plaintext

/mob/var/suiciding = 0
/mob/living/carbon/human/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (!ticker)
src << "You can't commit suicide before the game starts!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(alien_egg_flag)
src << "The alien inside you forces you to breathe, preventing you from suiciding."
return
if(confirm == "Yes")
suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
/mob/living/carbon/brain/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (!ticker)
src << "You can't commit suicide before the game starts!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
viewers(loc) << "\red <b>[src]'s brain is growing dull and lifeless. It looks like it's trying to commit suicide. Somehow.</b>"
oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
spawn(200)
suiciding = 0
/mob/living/carbon/monkey/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (!ticker)
src << "You can't commit suicide before the game starts!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
/mob/living/silicon/ai/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175
oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
/mob/living/silicon/robot/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175
oxyloss = max(475 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
/mob/living/silicon/pai/verb/suicide()
set category = "pAI Commands"
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
set name = "pAI Suicide"
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
if(answer == "Yes")
var/obj/item/device/paicard/card = loc
card.pai = null
var/turf/T = get_turf_or_move(card.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue [src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", 3, "\blue [src] bleeps electronically.", 2)
death(0)
else
src << "Aborting suicide attempt."
/mob/living/carbon/alien/humanoid/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
viewers(src) << "\red <b>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</b>"
//put em at -175
oxyloss = max(100 - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth()
/mob/living/carbon/metroid/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
suiciding = 1
setOxyLoss(100)
adjustBruteLoss(100 - getBruteLoss())
setToxLoss(100)
setCloneLoss(100)
updatehealth()