Tyrant tweaks (#19371)

Added some notifications of proximity to the plains tyrant.
Reduced health and auto-brute-healing of the plains tyrant.
Fixed traps pathing so that mobs should now pass in them.
Optimized SA_attackable proc.
Mechs are no longer opaque, this fixes the simplemobs not attacking them
(because the line of sight check fails as the turf they stand on is
opaque if they are opaque too) as well as avoid lighting recomputing on
every step.

---------

Signed-off-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
Fluffy
2024-06-09 17:08:04 +00:00
committed by GitHub
co-authored by Matt Atlas
parent c1a47cf20b
commit ec194f9988
5 changed files with 109 additions and 14 deletions
-1
View File
@@ -2,7 +2,6 @@
/mob/living/heavy_vehicle
name = "exosuit"
density = TRUE
opacity = TRUE
anchored = TRUE
status_flags = PASSEMOTES
a_intent = I_HURT
@@ -19,8 +19,8 @@
response_disarm = "shoves"
response_harm = "harmlessly punches"
blood_overlay_icon = null
maxHealth = 500
health = 500
maxHealth = 400
health = 400
harm_intent_damage = 0
melee_damage_lower = 40
melee_damage_upper = 40
@@ -49,7 +49,34 @@
/mob/living/simple_animal/hostile/biglizard/Life()
..()
adjustBruteLoss(-5)
//It's a predator, supposedly it shouldn't always alert his victims to be nearby
//(also saves some processing)
if(prob(30))
for(var/mob/living/poor_soul_approaching in get_hearers_in_range(world.view*1.8, src))
//No point in sending a message if there's no client
if(!poor_soul_approaching.client)
continue
var/message
var/poor_soul_distance_from_tyrant = get_dist(src, poor_soul_approaching)
//They can see us, no point
if(poor_soul_distance_from_tyrant <= world.view)
continue
//RUN FOR YOUR LIFE
else if(poor_soul_distance_from_tyrant <= world.view*1.4)
message = SPAN_HIGHDANGER(SPAN_BOLD("You hear loud stomping nearby!"))
//Fairly close, a normal warning should suffice
else
message = SPAN_DANGER("You hear a bone-chilling roar in the distance!")
poor_soul_approaching.notify_message(message, 10 SECONDS, key = "biglizard-[REF(src)]")
adjustBruteLoss(-1)
/mob/living/simple_animal/hostile/biglizard/verb/devour(mob/living/target as mob in oview())
set category = "Plains Tyrant"
@@ -741,21 +741,22 @@
apply_damage(damage, DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_EXPLODE)
/mob/living/simple_animal/proc/SA_attackable(target_mob)
if (isliving(target_mob))
if(isliving(target_mob))
var/mob/living/L = target_mob
if(!L.stat)
return (0)
if (istype(target_mob, /obj/machinery/bot))
return FALSE
else if(istype(target_mob, /obj/machinery/bot))
var/obj/machinery/bot/B = target_mob
if(B.health > 0)
return (0)
if(istype(target_mob, /obj/machinery/porta_turret/))
return FALSE
else if(istype(target_mob, /obj/machinery/porta_turret))
var/obj/machinery/porta_turret/T = target_mob
if(T.health > 0)
return (0)
if(istype(target_mob, /obj/effect/energy_field))
return (0)
return 1
return FALSE
else if(istype(target_mob, /obj/effect/energy_field))
return FALSE
return TRUE
/mob/living/simple_animal/proc/make_noise(var/make_sound = TRUE)
set name = "Make Sound"