Implemented more getters/setters for damage system. 2

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2556 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rockdtben
2011-11-26 13:33:18 +00:00
parent 9aecc4286b
commit 1de1be054d
18 changed files with 48 additions and 48 deletions

View File

@@ -234,7 +234,7 @@
if (M.health > 0) if (M.health > 0)
if (M.getOxyLoss() >= 10) if (M.getOxyLoss() >= 10)
var/amount = max(0.15, 1) var/amount = max(0.15, 1)
M.oxyloss -= amount M.adjustOxyLoss(-amount)
else else
M.oxyloss = 0 M.oxyloss = 0
M.updatehealth() M.updatehealth()

View File

@@ -122,10 +122,10 @@
src.active = 1 src.active = 1
src.overlays += image('computer.dmi', "ai-fixer-on") src.overlays += image('computer.dmi', "ai-fixer-on")
while (src.occupant.health < 100) while (src.occupant.health < 100)
src.occupant.oxyloss = max (src.occupant.getOxyLoss()-1, 0) src.occupant.adjustOxyLoss(-1)
src.occupant.adjustFireLoss(-1) src.occupant.adjustFireLoss(-1)
src.occupant.adjustToxLoss(-1) src.occupant.adjustToxLoss(-1)
src.occupant.bruteloss = max (src.occupant.getBruteLoss()-1, 0) src.occupant.adjustBruteLoss(-1)
src.occupant.updatehealth() src.occupant.updatehealth()
if (src.occupant.health >= 0 && src.occupant.stat == 2) if (src.occupant.health >= 0 && src.occupant.stat == 2)
src.occupant.stat = 0 src.occupant.stat = 0

View File

@@ -600,7 +600,7 @@ About the new airlock wires panel:
if (ishuman(user) && prob(40) && src.density) if (ishuman(user) && prob(40) && src.density)
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(H.brainloss >= 60) if(H.getBrainLoss() >= 60)
playsound(src.loc, 'bang.ogg', 25, 1) playsound(src.loc, 'bang.ogg', 25, 1)
if(!istype(H.head, /obj/item/clothing/head/helmet)) if(!istype(H.head, /obj/item/clothing/head/helmet))
for(var/mob/M in viewers(src, null)) for(var/mob/M in viewers(src, null))

View File

@@ -18,7 +18,7 @@
return ..(user) return ..(user)
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(H.brainloss >= 60) if(H.getBrainLoss() >= 60)
return return
var/t1 = text("<B>Access control</B><br>\n") var/t1 = text("<B>Access control</B><br>\n")

View File

@@ -458,11 +458,11 @@
/* for(var/mob/M as mob in src.loc) //does not work for some reason. /* for(var/mob/M as mob in src.loc) //does not work for some reason.
if(istype(M,/mob/living/carbon)) if(istype(M,/mob/living/carbon))
M.bruteloss += 100 M.adjustBruteLoss(100)
M.updatehealth() M.updatehealth()
M << "\red <B>You feel as the very atoms of your body divide!</B>" M << "\red <B>You feel as the very atoms of your body divide!</B>"
else else
M.bruteloss += 50 M.adjustBruteLoss(50)
M.updatehealth() M.updatehealth()
M << "\red <B>Strong energy field detected. Damage from field dampened.</B>" M << "\red <B>Strong energy field detected. Damage from field dampened.</B>"
*/ */

View File

@@ -141,7 +141,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle) || user.ear_deaf) if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle) || user.ear_deaf)
user << "You need to be able to both speak and hear to use runes." user << "You need to be able to both speak and hear to use runes."
return return
if(!word1 || !word2 || !word3 || prob(usr.brainloss)) if(!word1 || !word2 || !word3 || prob(usr.getBrainLoss()))
return fizzle() return fizzle()
// if(!src.visibility) // if(!src.visibility)
// src.visibility=1 // src.visibility=1

View File

@@ -129,7 +129,7 @@
if(istype(target, /mob)) if(istype(target, /mob))
var/mob/M = target var/mob/M = target
M.make_dizzy(3) M.make_dizzy(3)
M.bruteloss += 1 M.adjustBruteLoss(1)
M.updatehealth() M.updatehealth()
for (var/mob/V in viewers(src)) for (var/mob/V in viewers(src))
V.show_message("[src.name] shakes [M] like a rag doll.") V.show_message("[src.name] shakes [M] like a rag doll.")

View File

@@ -50,7 +50,7 @@
if(M.stat>1) return if(M.stat>1) return
if(chassis.occupant.a_intent == "hurt") if(chassis.occupant.a_intent == "hurt")
M.take_overall_damage(dam_force) M.take_overall_damage(dam_force)
M.oxyloss += round(dam_force/2) M.adjustOxyLoss(round(dam_force/2))
M.updatehealth() M.updatehealth()
chassis.occupant_message("\red You squeese [target] with [src.name]. Something cracks.") chassis.occupant_message("\red You squeese [target] with [src.name]. Something cracks.")
chassis.visible_message("\red [chassis] squeeses [target].") chassis.visible_message("\red [chassis] squeeses [target].")

View File

@@ -103,7 +103,7 @@
A.suiciding = 1 A.suiciding = 1
A << "Your core files are being wiped!" A << "Your core files are being wiped!"
while (A.stat != 2) while (A.stat != 2)
A.oxyloss += 2 A.adjustOxyLoss(2)
A.updatehealth() A.updatehealth()
sleep(10) sleep(10)
flush = 0 flush = 0

View File

@@ -31,7 +31,7 @@
/obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob) /obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user) src.add_fingerprint(user)
if(src.on && user.zone_sel.selecting == "eyes") if(src.on && user.zone_sel.selecting == "eyes")
if ((user.mutations & CLUMSY || user.brainloss >= 60) && prob(50))//too dumb to use flashlight properly if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly
return ..()//just hit them in the head return ..()//just hit them in the head
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity

View File

@@ -180,7 +180,7 @@ MASS SPECTROMETER
origin_tech = "magnets=1;biotech=1" origin_tech = "magnets=1;biotech=1"
/obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob) /obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob)
if ((user.mutations & CLUMSY || user.brainloss >= 60) && prob(50)) if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
user << text("\red You try to analyze the floor's vitals!") user << text("\red You try to analyze the floor's vitals!")
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1)
@@ -208,18 +208,18 @@ MASS SPECTROMETER
user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
else else
user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
if (M.cloneloss) if (M.getCloneLoss())
user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1)
for(var/datum/disease/D in M.viruses) for(var/datum/disease/D in M.viruses)
if(!D.hidden[SCANNER]) if(!D.hidden[SCANNER])
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1)
if (M.brainloss >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)
user.show_message(text("\red Subject is brain dead."), 1) user.show_message(text("\red Subject is brain dead."), 1)
else if (M.brainloss >= 60) else if (M.getBrainLoss() >= 60)
user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1) user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1)
else if (M.brainloss >= 10) else if (M.getBrainLoss() >= 10)
user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1) user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1)
src.add_fingerprint(user) src.add_fingerprint(user)
return return

View File

@@ -22,7 +22,7 @@
if (M.stuttering) if (M.stuttering)
src.storedinfo += "[M.name] stammers, \"[msg]\"" src.storedinfo += "[M.name] stammers, \"[msg]\""
return return
if (M.brainloss >= 60) if (M.getBrainLoss() >= 60)
src.storedinfo += "[M.name] gibbers, \"[msg]\"" src.storedinfo += "[M.name] gibbers, \"[msg]\""
return return
if (ending == "?") if (ending == "?")

View File

@@ -307,7 +307,7 @@ steam.start() -- spawns the effect
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS)) if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
else else
M.drop_item() M.drop_item()
M.oxyloss += 1 M.adjustOxyLoss(1)
if (M.coughedtime != 1) if (M.coughedtime != 1)
M.coughedtime = 1 M.coughedtime = 1
M.emote("cough") M.emote("cough")
@@ -331,7 +331,7 @@ steam.start() -- spawns the effect
return return
else else
M.drop_item() M.drop_item()
M.oxyloss += 1 M.adjustOxyLoss(1)
if (M.coughedtime != 1) if (M.coughedtime != 1)
M.coughedtime = 1 M.coughedtime = 1
M.emote("cough") M.emote("cough")

View File

@@ -315,7 +315,7 @@
switch(src.damtype) switch(src.damtype)
if("brute") if("brute")
if(istype(src, /mob/living/carbon/metroid)) if(istype(src, /mob/living/carbon/metroid))
M.bruteloss += power M.adjustBrainLoss(power)
else else
@@ -372,7 +372,7 @@
M << "\red You stab yourself in the eye." M << "\red You stab yourself in the eye."
M.sdisabilities |= 1 M.sdisabilities |= 1
M.weakened += 4 M.weakened += 4
M.bruteloss += 10 M.adjustBruteLoss(10)
*/ */
if(M != user) if(M != user)
for(var/mob/O in (viewers(M) - user - M)) for(var/mob/O in (viewers(M) - user - M))

View File

@@ -57,7 +57,7 @@
playsound(src.loc, "punch", 25, 1, -1) playsound(src.loc, "punch", 25, 1, -1)
else else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet)) if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.brainloss += 10 M.adjustBrainLoss(10)
M << "\red You feel dumber." M << "\red You feel dumber."
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] beats [] over the head with []!</B>", user, M, src), 1) O.show_message(text("\red <B>[] beats [] over the head with []!</B>", user, M, src), 1)

View File

@@ -144,7 +144,7 @@
armed = 0 armed = 0
/* /*
else if (ismouse(target)) else if (ismouse(target))
target.bruteloss = 100 target.adjustBruteLoss(100)
*/ */
/obj/item/weapon/mousetrap/attack_self(mob/user as mob) /obj/item/weapon/mousetrap/attack_self(mob/user as mob)
@@ -153,7 +153,7 @@
user << "\blue You arm the mousetrap." user << "\blue You arm the mousetrap."
else else
icon_state = "mousetrap" icon_state = "mousetrap"
if((user.brainloss >= 60 || user.mutations & CLUMSY) && prob(50)) if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50))
var/which_hand = "l_hand" var/which_hand = "l_hand"
if(!user.hand) if(!user.hand)
which_hand = "r_hand" which_hand = "r_hand"
@@ -170,7 +170,7 @@
/obj/item/weapon/mousetrap/attack_hand(mob/user as mob) /obj/item/weapon/mousetrap/attack_hand(mob/user as mob)
if(armed) if(armed)
if((user.brainloss >= 60 || user.mutations & CLUMSY) && prob(50)) if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50))
var/which_hand = "l_hand" var/which_hand = "l_hand"
if(!user.hand) if(!user.hand)
which_hand = "r_hand" which_hand = "r_hand"

View File

@@ -351,7 +351,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:adjustToxLoss(3) M:adjustToxLoss(3)
M:oxyloss += 3 M:adjustOxyLoss(3)
M:sleeping += 1 M:sleeping += 1
..() ..()
return return
@@ -1121,7 +1121,7 @@ datum
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(prob(33)) if(prob(33))
M.take_organ_damage(1, 0) M.take_organ_damage(1, 0)
M:oxyloss += 3 M:adjustOxyLoss(3)
if(prob(20)) M:emote("gasp") if(prob(20)) M:emote("gasp")
..() ..()
return return
@@ -1167,7 +1167,7 @@ datum
if(M.stat == 2.0) if(M.stat == 2.0)
return //See above, down and around. --Agouri return //See above, down and around. --Agouri
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:oxyloss = max(M:getOxyLoss()-2, 0) M:adjustOxyLoss(-2)
if(holder.has_reagent("lexorin")) if(holder.has_reagent("lexorin"))
holder.remove_reagent("lexorin", 2) holder.remove_reagent("lexorin", 2)
..() ..()
@@ -1201,7 +1201,7 @@ datum
if(M.stat == 2.0) if(M.stat == 2.0)
return return
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(40)) M:oxyloss-- if(M:getOxyLoss() && prob(40)) M:adjustOxyLoss(-1)
if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0) if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0)
if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1) if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1)
if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1) if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1)
@@ -1221,7 +1221,7 @@ datum
M:oxyloss = 0 M:oxyloss = 0
M:radiation = 0 M:radiation = 0
M:heal_organ_damage(5,5) M:heal_organ_damage(5,5)
if(M:getToxLoss()) M:adjustToxLoss(-5) M:adjustToxLoss(-5)
if(holder.has_reagent("toxin")) if(holder.has_reagent("toxin"))
holder.remove_reagent("toxin", 5) holder.remove_reagent("toxin", 5)
if(holder.has_reagent("stoxin")) if(holder.has_reagent("stoxin"))
@@ -1297,7 +1297,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:jitteriness = max(M:jitteriness-5,0) M:jitteriness = max(M:jitteriness-5,0)
if(prob(80)) M:brainloss++ if(prob(80)) M:adjustBrainLoss(1)
if(prob(50)) M:drowsyness = max(M:drowsyness, 3) if(prob(50)) M:drowsyness = max(M:drowsyness, 3)
if(prob(10)) M:emote("drool") if(prob(10)) M:emote("drool")
..() ..()
@@ -1328,7 +1328,7 @@ datum
return //See above, down and around. --Agouri return //See above, down and around. --Agouri
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:radiation = max(M:radiation-7,0) M:radiation = max(M:radiation-7,0)
if(M:getToxLoss()) M:adjustToxLoss(-1) M:adjustToxLoss(-1)
if(prob(15)) if(prob(15))
M.take_organ_damage(1, 0) M.take_organ_damage(1, 0)
..() ..()
@@ -1343,7 +1343,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:brainloss = max(M:brainloss-3 , 0) M:adjustBrainLoss(-3)
..() ..()
return return
@@ -1402,10 +1402,10 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M.bodytemperature < 170) if(M.bodytemperature < 170)
if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-1) M:adjustCloneLoss(-1)
if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3) M:adjustOxyLoss(-3)
M:heal_organ_damage(3,3) M:heal_organ_damage(3,3)
if(M:getToxLoss()) M:adjustToxLoss(-3) M:adjustToxLoss(-3)
..() ..()
return return
@@ -1419,10 +1419,10 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M.bodytemperature < 170) if(M.bodytemperature < 170)
if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-3) M:adjustCloneLoss(-3)
if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3) M:adjustOxyLoss(-3)
M:heal_organ_damage(3,3) M:heal_organ_damage(3,3)
if(M:getToxLoss()) M:adjustToxLoss(-3) M:adjustToxLoss(-3)
..() ..()
return return
@@ -1459,7 +1459,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:oxyloss += 0.5 M:adjustOxyLoss(0.5)
M:adjustToxLoss(0.5) M:adjustToxLoss(0.5)
M:weakened = max(M:weakened, 10) M:weakened = max(M:weakened, 10)
M:silent = max(M:silent, 10) M:silent = max(M:silent, 10)
@@ -1930,7 +1930,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor M:nutrition += nutriment_factor
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(30)) M:oxyloss-- if(M:getOxyLoss() && prob(30)) M:adjustOxyLoss(-1)
M:nutrition++ M:nutrition++
..() ..()
return return
@@ -3032,7 +3032,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(50)) M:oxyloss -= 2 if(M:getOxyLoss() && prob(50)) M:adjustOxyLoss(-2)
if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0) if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0)
if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2) if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2)
if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2) if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2)
@@ -3605,7 +3605,7 @@ datum
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature+5) M.bodytemperature = min(310, M.bodytemperature+5)
M.make_jittery(5) M.make_jittery(5)
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0) if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0)
M:nutrition++ M:nutrition++
..() ..()
return return
@@ -3625,7 +3625,7 @@ datum
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature+5) M.bodytemperature = min(310, M.bodytemperature+5)
M.make_jittery(5) M.make_jittery(5)
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0) if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0)
M:nutrition++ M:nutrition++
..() ..()
return return
@@ -3678,8 +3678,8 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
M:oxyloss += 0.5 M:adjustOxyLoss(0.5)
M:getToxLoss() += 0.5 M:adjustOxyLoss(0.5)
M:weakened = max(M:weakened, 15) M:weakened = max(M:weakened, 15)
M:silent = max(M:silent, 15) M:silent = max(M:silent, 15)
if(!data) data = 1 if(!data) data = 1

View File

@@ -162,7 +162,7 @@
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee")) H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
else else
target:bruteloss += damage target:adjustBruteLoss(damage)
if(attack_sound) if(attack_sound)
playsound(loc, attack_sound, 50, 1, -1) playsound(loc, attack_sound, 50, 1, -1)