Files
JacquerelandRoxy c57341f771 Most fleshy mobs are vulnerable to stamina and stuns (#90675)
## About The Pull Request

This PR enables most mobs to take stamina damage, become slowed as a
result of taking stamina damage.
It also gives most mobs CANSTUN which not only allows them to enter
stamcrit from taking stamina damage but also makes them vulnerable to
mechanics like stun batons.

Mobs which already took stamina damage (Spiders and Space Dragons) still
work the same way.
Mechanical or artificial mobs, mining mobs, simple xenomorphs, ghosts,
and most kinds of mob closely associated with antagonists still don't
take stamina damage.

## Why It's Good For The Game

A new player armed with a disabler will probably try and use it on
aggressive animals and be disappointed, but I don't think there is any
_reason_ for them to be disappointed when it's already something they
are doing merely to delay being attacked rather than to kill the target.
It's not intuitive for these mechanics not to function against simple
mobs when they do against humans, _especially_ the kinds of mobs which
look like humans, and there isn't any technical reason why it _couldn't_
work against most mobs which it looks like they should work against.

While this reduces the threat level of some mobs against Security
players I think the greater interaction with the sandbox is beneficial.
I'm hopeful it doesn't have that much effect on many of the most common
places you encounter dangerous mobs like Space Ruins or Gateways as they
are also places where you can't reliably recharge your energy-based
stamina weapons as most that don't require energy do require getting
into melee and endangering yourself.

## Changelog

🆑
balance: Most biological mobs are now slowed by taking stamina damage,
and can be stunned. Mechanical mobs, mining mobs, and several other
special kinds (chiefly those invoked by antagonists) are unaffected. If
this seems to effect any mob it probably shouldn't, please report it as
a bug.
/🆑
2025-05-15 16:04:13 -04:00

105 lines
3.2 KiB
Plaintext

/// A nasty little robotic bug that dusts people on attack. Jeepers. This should be a very, very, very rare spawn.
/mob/living/basic/supermatter_spider
name = "supermatter spider"
desc= "A sliver of supermatter placed upon a robotically enhanced pedestal."
icon = 'icons/mob/simple/smspider.dmi'
icon_state = "smspider"
icon_living = "smspider"
icon_dead = "smspider_dead"
gender = NEUTER
status_flags = CANPUSH
mob_biotypes = MOB_BUG|MOB_ROBOTIC
speak_emote = list("vibrates")
attack_verb_continuous = "slices"
attack_verb_simple = "slice"
attack_sound = 'sound/effects/supermatter.ogg'
attack_vis_effect = ATTACK_EFFECT_CLAW
maxHealth = 10
health = 10
minimum_survivable_temperature = TCMB
maximum_survivable_temperature = T0C + 1250
habitable_atmos = null
death_message = "falls to the ground, its shard dulling to a miserable grey!"
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, STAMINA = 0, OXY = 1)
faction = list(FACTION_HOSTILE)
// Gold, supermatter tinted
lighting_cutoff_red = 30
lighting_cutoff_green = 30
lighting_cutoff_blue = 10
ai_controller = /datum/ai_controller/basic_controller/supermatter_spider
/// If we successfully dust something, should we die?
var/single_use = TRUE
/mob/living/basic/supermatter_spider/Initialize(mapload)
. = ..()
AddComponent(/datum/component/swarming)
AddElement(/datum/element/ai_retaliate)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW)
/// Proc that we call on attacking something to dust 'em.
/mob/living/basic/supermatter_spider/early_melee_attack(atom/target, list/modifiers, ignore_cooldown)
. = ..()
if(!.)
return FALSE
if(isliving(target))
var/mob/living/victim = target
victim.investigate_log("has been dusted by [src].", INVESTIGATE_DEATHS)
dust_feedback(target)
victim.dust()
if(single_use)
death()
return FALSE
if(!isturf(target))
dust_feedback(target)
qdel(target)
if(single_use)
death()
return FALSE
/// Simple proc that plays the supermatter dusting sound and sends a visible message.
/mob/living/basic/supermatter_spider/proc/dust_feedback(atom/target)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 10, TRUE)
visible_message(span_danger("[src] knocks into [target], turning [target.p_them()] to dust in a brilliant flash of light!"))
/mob/living/basic/supermatter_spider/overcharged
name = "overcharged supermatter spider"
desc = "A sliver of overcharged supermatter placed upon a robotically enhanced pedestal. This one seems especially dangerous."
icon_state = "smspideroc"
icon_living = "smspideroc"
maxHealth = 25
health = 25
single_use = FALSE
/datum/ai_controller/basic_controller/supermatter_spider
blackboard = list(
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
idle_behavior = /datum/idle_behavior/idle_random_walk
planning_subtrees = list(
/datum/ai_planning_subtree/target_retaliate,
/datum/ai_planning_subtree/simple_find_target,
/datum/ai_planning_subtree/attack_obstacle_in_path,
/datum/ai_planning_subtree/random_speech/supermatter_spider,
/datum/ai_planning_subtree/basic_melee_attack_subtree,
)
/datum/ai_planning_subtree/random_speech/supermatter_spider
speech_chance = 7
emote_hear = list("clinks", "clanks")
emote_see = list("vibrates")