mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
TG: Now all calls for bruteloss are handled via procs now. Extensibility++ r2803
This commit is contained in:
@@ -71,37 +71,22 @@
|
||||
"A sharp, deep pain bathes every inch of your body!")]"
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
Victim.cloneloss += rand(1,10)
|
||||
Victim.adjustCloneLoss(rand(1,10))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
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))
|
||||
|
||||
@@ -134,7 +134,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()
|
||||
@@ -149,7 +149,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)
|
||||
@@ -172,7 +172,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))
|
||||
@@ -245,7 +245,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()
|
||||
react_to_attack(M)
|
||||
else
|
||||
@@ -328,7 +328,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()
|
||||
react_to_attack(M)
|
||||
else
|
||||
@@ -370,11 +370,20 @@
|
||||
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)
|
||||
react_to_attack(M)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
@@ -397,7 +406,7 @@
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
@@ -619,7 +628,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)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
src.oxyloss += src.health + 200
|
||||
src.adjustOxyLoss(src.health + 200)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(!src.nodamage)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss - src.halloss
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
@@ -142,25 +142,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()
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -328,7 +328,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()
|
||||
@@ -364,7 +364,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)
|
||||
@@ -382,6 +382,19 @@
|
||||
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
@@ -243,7 +243,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()
|
||||
@@ -354,7 +354,7 @@
|
||||
user << "There are no dents to fix here!"
|
||||
return
|
||||
else if (W:remove_fuel(0))
|
||||
bruteloss -= 30
|
||||
adjustBruteLoss(-30)
|
||||
if(getBruteLoss() < 0) bruteloss = 0
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
@@ -539,7 +539,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)
|
||||
@@ -587,7 +587,7 @@
|
||||
damage = rand(5, 35)
|
||||
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
@@ -617,13 +617,24 @@
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
bruteloss += M.powerlevel * rand(6,10)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -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