mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Now all calls for bruteloss are handled via procs now. Extensibility++
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2803 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -76,32 +76,17 @@
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
if(getToxLoss() > 0)
|
||||
adjustToxLoss(-10)
|
||||
|
||||
if(getOxyLoss() > 0)
|
||||
oxyloss = max(0, getOxyLoss()-10)
|
||||
|
||||
if(getBruteLoss() > 0)
|
||||
bruteloss = max(0, getBruteLoss()-10)
|
||||
|
||||
if(getFireLoss() > 0)
|
||||
adjustFireLoss(-10)
|
||||
|
||||
if(getCloneLoss() > 0)
|
||||
adjustCloneLoss(-10)
|
||||
adjustToxLoss(-10)
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
if(Victim)
|
||||
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
|
||||
if(Metroid.Victim == M && Metroid != src)
|
||||
Metroid.Feedstop()
|
||||
|
||||
if(getToxLoss()<0) adjustToxLoss(0)
|
||||
if(getOxyLoss()<0) adjustOxyLoss(0)
|
||||
if(getBruteLoss()<0) adjustBruteLoss(0)
|
||||
if(getFireLoss()<0) adjustFireLoss(0)
|
||||
if(getCloneLoss()<0) adjustCloneLoss(0)
|
||||
|
||||
nutrition += rand(10,25)
|
||||
if(nutrition >= lastnut + 50)
|
||||
if(prob(80))
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
var/shielded = 0
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming" && !( shielded )))
|
||||
adjustFireLoss(40)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
@@ -115,7 +115,7 @@
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 5)
|
||||
if (mutations & HULK) damage += 10
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
@@ -138,7 +138,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
|
||||
var/damage = rand(1, 5)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
@@ -194,7 +194,7 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
|
||||
return
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
@@ -268,7 +268,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
@@ -309,7 +309,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
@@ -544,7 +544,7 @@
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if(2.0)
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if(3.0)
|
||||
|
||||
@@ -111,25 +111,25 @@
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
|
||||
bruteloss = max(0, getBruteLoss()-brute)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
||||
bruteloss += brute
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
|
||||
bruteloss = max(0, getBruteLoss()-brute)
|
||||
adjustBruteLoss(-brute)
|
||||
adjustFireLoss(-burn)
|
||||
src.updatehealth()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(var/brute, var/burn)
|
||||
bruteloss += brute
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -266,7 +266,7 @@
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
@@ -302,7 +302,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.adjustOxyLoss(-1)
|
||||
src.oxyloss = 0
|
||||
return
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
@@ -91,8 +91,7 @@
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
src.oxyloss-=1
|
||||
src.oxyloss = 0
|
||||
src.adjustOxyLoss(-1)
|
||||
return
|
||||
else
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.adjustBruteLoss(60)
|
||||
src.updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -138,7 +138,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", src.flash)
|
||||
src.bruteloss += damage
|
||||
src.adjustBruteLoss(damage)
|
||||
src.updatehealth()
|
||||
else
|
||||
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -219,7 +219,7 @@
|
||||
M.show_message(text("\red [src] has been hit by [O]"), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
bruteloss += 30
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
@@ -319,8 +319,7 @@
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if (W:remove_fuel(0))
|
||||
bruteloss -= 30
|
||||
if(getBruteLoss() < 0) bruteloss = 0
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
@@ -332,7 +331,6 @@
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
adjustFireLoss(-30)
|
||||
if(getFireLoss() < 0) adjustFireLoss(0)
|
||||
updatehealth()
|
||||
coil.use(1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
@@ -496,7 +494,7 @@
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
@@ -544,7 +542,7 @@
|
||||
damage = rand(5, 35)
|
||||
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
@@ -574,7 +572,7 @@
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
bruteloss += M.powerlevel * rand(6,10)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj.nodamage) bruteloss += Proj.damage
|
||||
if(!Proj.nodamage) adjustBruteLoss(Proj.damage)
|
||||
Proj.on_hit(src,2)
|
||||
return 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user