Files
Bubberstation/code/datums/status_effects/gas.dm
Jacquerel 72174845f5 Basic Watchers & Basilisks (#77630)
## About The Pull Request

This one is a double feature because Watchers and Basilisks share the
same typepath. You might see a couple more of those.
As is tradition I decided to fuck with them rather than just port them.
Here's what's up.

**Basilisks**

![image](https://github.com/tgstation/tgstation/assets/7483112/9e4b0115-65dd-4df7-b62a-21c7be8549bf)

![image](https://github.com/tgstation/tgstation/assets/7483112/59162e68-7d73-4659-9531-5078ff751228)

- Have a new soulless sprite which looks less like a living blue hedge.
- Walk at you and shoot you while you are not in range (just like
before).
- Become supercharged if they become "heated" by lava, lasers, or
temperature weapons. This was a feature they also previously had but
they would never encounter lava, so now it also works if you use the
wrong gun on them.
- Lose their supercharge if you cool them down.
- Otherwise pretty normal mobs.

**Watchers**

https://www.youtube.com/watch?v=kOq_Bf78k5A
Here's a traditional video of me intentionally getting hit by mechanics
(trust me its definitely on purpose)

- They glow emmissively a little bit so you can see them from further
away.
- Their eyes light up about 0.5 seconds before they are able to shoot at
you.
- No longer melee attack, instead try to stay out of melee.
- Will occasionally put you into "Overwatch", meaning they will shoot
you rapidly if you move or act while they're staring at you for a brief
time period (after which you become immune for 12 seconds, and during
which other watchers will play fair and stop shooting at you).
- If they start taking damage they will also start using their "Gaze"
attack, look away or suffer some kind of negative effect!
- - Normal watcher gaze flashes and confuses you.
- - Magmawing watcher gaze obviously burns (and briefly stuns) you.
- - Icewing watcher gaze freezes you and throws you backwards.
- Magnetically attract and eat diamonds. They also used to do this, but
just if they happened to coincidentally walk past some.

**Other accompanying changes**

All basic mobs will now adopt the "stop gliding" trait if they get
slowed down too much.
I moved behaviour for "fire a projectile from this atom" into a helper
proc because I was using it in three places and I will probably use it
in more places. There are probably other places in the existing code
which could be using this.
I think I made the basic mob melee attack forecast default a little more
forgiving, they were fucking me up too much and I am the playtester.

## Why It's Good For The Game

Another one off the list.
New tricks for old dogs.
Framework for making mobs with ranged attacks "fairer" (you can see when
they are ready to shoot you).
More (hopefully) versatile AI behaviours which we will reuse later (I
hope I'm not duplicating one someone already made).
If our players "enjoy" them enough we can give more mobs "don't look at
me" mechanics.
Removes some soul sprites.

## Changelog

🆑
refactor: Basilisks and Watchers now use the basic mob framework. Please
bug report any unusual behaviour.
sprite: Basilisks have new sprites.
add: Basilisks will go into a frenzy if heated by energy weapons or
temperature beams as well as by lava.
add: Watcher eyes will be illuminated briefly when they are ready to
fire at you.
add: Watchers can now briefly put you into "Overwatch" and penalise you
for moving while they can see you.
add: Wounded watchers will occasionally punish players who look at them.
balance: Unusual watcher variants are more likely to appear.
/🆑
2023-08-16 13:04:41 -06:00

90 lines
3.1 KiB
Plaintext

/datum/status_effect/freon
id = "frozen"
duration = 100
status_type = STATUS_EFFECT_UNIQUE
alert_type = /atom/movable/screen/alert/status_effect/freon
var/icon/cube
var/can_melt = TRUE
/atom/movable/screen/alert/status_effect/freon
name = "Frozen Solid"
desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!"
icon_state = "frozen"
/datum/status_effect/freon/on_apply()
. = ..()
if(!.)
return
ADD_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id))
RegisterSignal(owner, COMSIG_LIVING_RESIST, PROC_REF(owner_resist))
if(!owner.stat)
to_chat(owner, span_userdanger("You become frozen in a cube!"))
cube = icon('icons/effects/freeze.dmi', "ice_cube")
owner.add_overlay(cube)
/datum/status_effect/freon/tick(seconds_between_ticks)
if(can_melt && owner.bodytemperature >= owner.get_body_temp_normal())
qdel(src)
/datum/status_effect/freon/proc/owner_resist()
SIGNAL_HANDLER
INVOKE_ASYNC(src, PROC_REF(do_resist))
/datum/status_effect/freon/proc/do_resist()
to_chat(owner, span_notice("You start breaking out of the ice cube..."))
if(do_after(owner, owner, 4 SECONDS))
if(!QDELETED(src))
to_chat(owner, span_notice("You break out of the ice cube!"))
owner.remove_status_effect(/datum/status_effect/freon)
/datum/status_effect/freon/on_remove()
if(!owner.stat)
to_chat(owner, span_notice("The cube melts!"))
owner.cut_overlay(cube)
owner.adjust_bodytemperature(100)
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id))
return ..()
/datum/status_effect/freon/watcher
duration = 8
can_melt = FALSE
/datum/status_effect/freon/watcher/extended
duration = 5 SECONDS
/datum/status_effect/freon/lasting
id = "lasting_frozen"
duration = -1
/datum/status_effect/hypernob_protection
id = "hypernob_protection"
duration = 10 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/hypernob_protection
/datum/status_effect/hypernob_protection/on_creation(mob/living/new_owner, duration = 10 SECONDS)
src.duration = duration
return ..()
/atom/movable/screen/alert/status_effect/hypernob_protection
name = "Hyper-Noblium Protection"
desc = "The Hyper-Noblium around your body is protecting it from self-combustion and fires, but you feel sluggish..."
icon_state = "hypernob_protection"
/datum/status_effect/hypernob_protection/on_apply()
if(!ishuman(owner))
CRASH("[type] status effect added to non-human owner: [owner ? owner.type : "null owner"]")
var/mob/living/carbon/human/human_owner = owner
human_owner.add_movespeed_modifier(/datum/movespeed_modifier/reagent/hypernoblium) //small slowdown as a tradeoff
ADD_TRAIT(human_owner, TRAIT_NOFIRE, type)
return TRUE
/datum/status_effect/hypernob_protection/on_remove()
if(!ishuman(owner))
stack_trace("[type] status effect being removed from non-human owner: [owner ? owner.type : "null owner"]")
var/mob/living/carbon/human/human_owner = owner
human_owner.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/hypernoblium)
REMOVE_TRAIT(human_owner, TRAIT_NOFIRE, type)