mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Merge pull request #14388 from ChangelingRain/notsosimpleisit
Fixes simple animal damage type handling
This commit is contained in:
@@ -486,7 +486,7 @@
|
||||
return
|
||||
src << "<span class='info'>Attempting to repair damage to our body, stand by...</span>"
|
||||
if(do_mob(src, src, 100))
|
||||
adjustBruteLoss(-100)
|
||||
adjustHealth(-100)
|
||||
src << "<span class='info'>We successfully repaired ourselves.</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/ToggleLight()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
if(do_after(src, 30, target = L))
|
||||
visible_message("<span class='warning'>[src] swallows [target] whole!</span>")
|
||||
L.loc = src
|
||||
adjustBruteLoss(-50)
|
||||
adjustHealth(-50)
|
||||
return
|
||||
else if(istype(target,/obj/item)) // Eat items just to be annoying
|
||||
var/obj/item/I = target
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
/mob/living/simple_animal/revenant/narsie_act()
|
||||
return //most humans will now be either bones or harvesters, but we're still un-alive.
|
||||
|
||||
/mob/living/simple_animal/revenant/adjustBruteLoss(amount)
|
||||
/mob/living/simple_animal/revenant/adjustHealth(amount)
|
||||
if(!revealed)
|
||||
return
|
||||
essence = max(0, essence-amount)
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
step(I,direction)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/shade/howling_ghost/adjustBruteLoss()
|
||||
/mob/living/simple_animal/shade/howling_ghost/adjustHealth()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/shade/howling_ghost/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
@@ -272,7 +272,7 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/insane/AttackTarget()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/insane/adjustBruteLoss()
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/insane/adjustHealth()
|
||||
if(prob(5))
|
||||
playsound(loc, 'sound/spookoween/insane_low_laugh.ogg', 300, 1)
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@
|
||||
O.loc = src.loc
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustBruteLoss()
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustHealth()
|
||||
if(search_objects)
|
||||
SetOffenseBehavior()
|
||||
..()
|
||||
|
||||
@@ -163,12 +163,7 @@
|
||||
else
|
||||
user << "[src] is in pristine condition."
|
||||
|
||||
/mob/living/simple_animal/bot/adjustBruteLoss(amount)
|
||||
if(amount>0 && prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
return ..(amount)
|
||||
|
||||
/mob/living/simple_animal/bot/adjustFireLoss(amount)
|
||||
/mob/living/simple_animal/bot/adjustHealth(amount)
|
||||
if(amount>0 && prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
return ..(amount)
|
||||
@@ -710,12 +705,12 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
if(usr in users)
|
||||
users.Remove(usr)
|
||||
return 1
|
||||
|
||||
|
||||
if(topic_denied(usr))
|
||||
usr << "<span class='warning'>[src]'s interface is not responding!</span>"
|
||||
return 1
|
||||
add_fingerprint(usr)
|
||||
|
||||
|
||||
if((href_list["power"]) && (bot_core.allowed(usr) || !locked))
|
||||
if (on)
|
||||
turn_off()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/M)
|
||||
if(istype(M, /mob/living/simple_animal/hostile/construct/builder))
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-5)
|
||||
adjustHealth(-5)
|
||||
if(src != M)
|
||||
Beam(M,icon_state="sendbeam",icon='icons/effects/effects.dmi',time=4)
|
||||
M.visible_message("<span class='danger'>[M] repairs some of \the <b>[src]'s</b> dents.</span>", \
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
summoner << "<span class='danger'><B>Your [name] died somehow!</span></B>"
|
||||
summoner.death()
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/adjustBruteLoss(amount) //The spirit is invincible, but passes on damage to the summoner
|
||||
/mob/living/simple_animal/hostile/guardian/adjustHealth(amount) //The spirit is invincible, but passes on damage to the summoner
|
||||
var/damage = amount * damage_transfer
|
||||
if (summoner)
|
||||
if(loc == summoner)
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
/mob/living/simple_animal/hostile/proc/Goto(target, delay, minimum_distance)
|
||||
walk_to(src, target, minimum_distance, delay)
|
||||
|
||||
/mob/living/simple_animal/hostile/adjustBruteLoss(damage)
|
||||
/mob/living/simple_animal/hostile/adjustHealth(damage)
|
||||
..(damage)
|
||||
if(!ckey && !stat && search_objects < 3 && damage > 0)//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
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
visible_message("<b>[src]</b> starts to move!")
|
||||
attempt_open = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/adjustBruteLoss(damage)
|
||||
/mob/living/simple_animal/hostile/mimic/crate/adjustHealth(damage)
|
||||
trigger()
|
||||
..(damage)
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
visible_message("<span class='danger'>The [P.name] was repelled by [src.name]'s girth!</span>")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(damage)
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(damage)
|
||||
idle_vision_range = 9
|
||||
..()
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
pre_attack = 0
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/adjustBruteLoss(damage)
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/adjustHealth(damage)
|
||||
ranged_cooldown--
|
||||
handle_preattack()
|
||||
..()
|
||||
@@ -524,7 +524,7 @@
|
||||
Inflate()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/fugu/adjustBruteLoss(var/damage)
|
||||
/mob/living/simple_animal/hostile/asteroid/fugu/adjustHealth(var/damage)
|
||||
if(wumbo)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
deathmessage = "[src] fainted."
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/adjustBruteLoss(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)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
H.enemies |= enemies
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/adjustBruteLoss(damage)
|
||||
/mob/living/simple_animal/hostile/retaliate/adjustHealth(damage)
|
||||
..(damage)
|
||||
if(stat == CONSCIOUS)
|
||||
Retaliate()
|
||||
|
||||
@@ -276,25 +276,31 @@
|
||||
Proj.on_hit(src)
|
||||
return 0
|
||||
|
||||
/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])
|
||||
..(amount*damage_coeff[BRUTE])
|
||||
adjustHealth(amount*damage_coeff[BRUTE])
|
||||
|
||||
/mob/living/simple_animal/adjustFireLoss(amount)
|
||||
if(damage_coeff[BURN])
|
||||
adjustBruteLoss(amount*damage_coeff[BURN])
|
||||
adjustHealth(amount*damage_coeff[BURN])
|
||||
|
||||
/mob/living/simple_animal/adjustOxyLoss(amount)
|
||||
if(damage_coeff[OXY])
|
||||
adjustBruteLoss(amount*damage_coeff[OXY])
|
||||
adjustHealth(amount*damage_coeff[OXY])
|
||||
|
||||
/mob/living/simple_animal/adjustToxLoss(amount)
|
||||
if(damage_coeff[TOX])
|
||||
..(amount*damage_coeff[TOX])
|
||||
adjustHealth(amount*damage_coeff[TOX])
|
||||
|
||||
/mob/living/simple_animal/adjustCloneLoss(amount)
|
||||
if(damage_coeff[CLONE])
|
||||
..(amount*damage_coeff[CLONE])
|
||||
adjustHealth(amount*damage_coeff[CLONE])
|
||||
|
||||
/mob/living/simple_animal/adjustStaminaLoss(amount)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user