Simple Animal Damage Fix

This commit is contained in:
Fox-McCloud
2016-05-07 01:28:11 -04:00
parent cc7472ca67
commit b6ef174c07
13 changed files with 27 additions and 31 deletions
+1 -1
View File
@@ -811,7 +811,7 @@
O.forceMove(loc)
return
/mob/living/simple_animal/hostile/mining_drone/adjustBruteLoss()
/mob/living/simple_animal/hostile/mining_drone/adjustHealth()
if(search_objects)
SetOffenseBehavior()
..()
@@ -216,17 +216,10 @@
else
to_chat(user, "[src] is in pristine condition.")
/mob/living/simple_animal/bot/adjustBruteLoss(amount)
. = ..()
/mob/living/simple_animal/bot/adjustHealth(amount)
if(amount > 0 && prob(10))
new /obj/effect/decal/cleanable/blood/oil(loc)
/mob/living/simple_animal/bot/adjustFireLoss(amount)
. = ..()
if(amount > 0 && prob(5))
new /obj/effect/decal/cleanable/blood/oil(loc)
return ..(amount)
/mob/living/simple_animal/bot/updatehealth()
..()
@@ -346,9 +339,7 @@
return
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
adjustBruteLoss(-10)
adjustFireLoss(-10)
updatehealth()
adjustHealth(-10)
add_fingerprint(user)
user.visible_message("[user] repairs [src]!","<span class='notice'>You repair [src].</span>")
else
@@ -186,7 +186,7 @@
/mob/living/simple_animal/hostile/proc/Goto(var/target, var/delay, var/minimum_distance)
walk_to(src, target, minimum_distance, delay)
/mob/living/simple_animal/hostile/adjustBruteLoss(var/damage)
/mob/living/simple_animal/hostile/adjustHealth(damage)
..(damage)
if(!stat && search_objects < 3)//Not unconscious, and we don't ignore mobs
if(search_objects)//Turn off item searching and ignore whatever item we were looking at, we're more concerned with fight or flight
@@ -99,7 +99,7 @@
visible_message("<b>[src]</b> starts to move!")
attempt_open = 1
/mob/living/simple_animal/hostile/mimic/crate/adjustBruteLoss(var/damage)
/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(damage)
trigger()
..(damage)
@@ -204,7 +204,7 @@
Reward()
..()
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage)
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(damage)
idle_vision_range = 9
..()
@@ -403,7 +403,7 @@
pre_attack = 0
return
/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(var/damage)
/mob/living/simple_animal/hostile/asteroid/goliath/adjustHealth(damage)
ranged_cooldown--
handle_preattack()
..()
@@ -59,7 +59,7 @@
health = maxHealth
..()
/mob/living/simple_animal/hostile/mushroom/adjustBruteLoss(var/damage)//Possibility to flee from a fight just to make it more visually interesting
/mob/living/simple_animal/hostile/mushroom/adjustHealth(damage)//Possibility to flee from a fight just to make it more visually interesting
if(!retreat_distance && prob(33))
retreat_distance = 5
spawn(30)
@@ -61,7 +61,7 @@
H.enemies |= enemies
return 0
/mob/living/simple_animal/hostile/retaliate/adjustBruteLoss(var/damage)
/mob/living/simple_animal/hostile/retaliate/adjustHealth(damage)
..(damage)
Retaliate()
@@ -71,7 +71,7 @@
if(!Proj) return
if(prob(65))
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
src.health -= Proj.damage
adjustHealth(Proj.damage)
else
visible_message("\red <B>[src] blocks [Proj] with its shield!</B>")
return 0
@@ -492,25 +492,31 @@
if(3.0)
adjustBruteLoss(30)
/mob/living/simple_animal/proc/adjustHealth(amount)
if(status_flags & GODMODE)
return 0
bruteloss = Clamp(bruteloss + amount, 0, maxHealth)
handle_regular_status_updates()
/mob/living/simple_animal/adjustBruteLoss(amount)
if(damage_coeff[BRUTE])
return ..(amount * damage_coeff[BRUTE])
adjustHealth(amount * damage_coeff[BRUTE])
/mob/living/simple_animal/adjustFireLoss(amount)
if(damage_coeff[BURN])
return ..(amount * damage_coeff[BURN])
adjustHealth(amount * damage_coeff[BURN])
/mob/living/simple_animal/adjustOxyLoss(amount)
if(damage_coeff[OXY])
return ..(amount * damage_coeff[OXY])
adjustHealth(amount * damage_coeff[OXY])
/mob/living/simple_animal/adjustToxLoss(amount)
if(damage_coeff[TOX])
return ..(amount * damage_coeff[TOX])
adjustHealth(amount * damage_coeff[TOX])
/mob/living/simple_animal/adjustCloneLoss(amount)
if(damage_coeff[CLONE])
return ..(amount * damage_coeff[CLONE])
adjustHealth(amount * damage_coeff[CLONE])
/mob/living/simple_animal/adjustStaminaLoss(amount)
if(damage_coeff[STAMINA])