Files
Bubberstation/code/game/objects/structures/spawner.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

161 lines
5.7 KiB
Plaintext

/obj/structure/spawner
name = "monster nest"
icon = 'icons/mob/simple/animal.dmi'
icon_state = "hole"
max_integrity = 100
move_resist = MOVE_FORCE_EXTREMELY_STRONG
anchored = TRUE
density = TRUE
var/max_mobs = 5
var/spawn_time = 30 SECONDS
var/mob_types = list(/mob/living/basic/carp)
var/spawn_text = "emerges from"
var/faction = list(FACTION_HOSTILE)
var/spawner_type = /datum/component/spawner
/obj/structure/spawner/Initialize(mapload)
. = ..()
AddComponent(spawner_type, mob_types, spawn_time, max_mobs, faction, spawn_text)
/obj/structure/spawner/attack_animal(mob/living/simple_animal/user, list/modifiers)
if(faction_check(faction, user.faction, FALSE) && !user.client)
return
return ..()
/obj/structure/spawner/syndicate
name = "warp beacon"
icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon"
spawn_text = "warps in from"
mob_types = list(/mob/living/basic/syndicate/ranged)
faction = list(ROLE_SYNDICATE)
/obj/structure/spawner/skeleton
name = "bone pit"
desc = "A pit full of bones, and some still seem to be moving..."
icon_state = "hole"
icon = 'icons/mob/simple/lavaland/nest.dmi'
max_integrity = 150
max_mobs = 15
spawn_time = 15 SECONDS
mob_types = list(/mob/living/simple_animal/hostile/skeleton)
spawn_text = "climbs out of"
faction = list(FACTION_SKELETON)
/obj/structure/spawner/clown
name = "Laughing Larry"
desc = "A laughing, jovial figure. Something seems stuck in his throat."
icon_state = "clownbeacon"
icon = 'icons/obj/device.dmi'
max_integrity = 200
max_mobs = 15
spawn_time = 15 SECONDS
mob_types = list(
/mob/living/simple_animal/hostile/retaliate/clown,
/mob/living/simple_animal/hostile/retaliate/clown/banana,
/mob/living/simple_animal/hostile/retaliate/clown/clownhulk,
/mob/living/simple_animal/hostile/retaliate/clown/clownhulk/chlown,
/mob/living/simple_animal/hostile/retaliate/clown/clownhulk/honcmunculus,
/mob/living/simple_animal/hostile/retaliate/clown/fleshclown,
/mob/living/simple_animal/hostile/retaliate/clown/mutant/glutton,
/mob/living/simple_animal/hostile/retaliate/clown/honkling,
/mob/living/simple_animal/hostile/retaliate/clown/longface,
/mob/living/simple_animal/hostile/retaliate/clown/lube,
)
spawn_text = "climbs out of"
faction = list(FACTION_CLOWN)
/obj/structure/spawner/mining
name = "monster den"
desc = "A hole dug into the ground, harboring all kinds of monsters found within most caves or mining asteroids."
icon_state = "hole"
max_integrity = 200
max_mobs = 3
icon = 'icons/mob/simple/lavaland/nest.dmi'
spawn_text = "crawls out of"
mob_types = list(
/mob/living/basic/mining/basilisk,
/mob/living/basic/mining/goliath/ancient,
/mob/living/basic/wumborian_fugu,
/mob/living/simple_animal/hostile/asteroid/goldgrub,
/mob/living/simple_animal/hostile/asteroid/hivelord,
)
faction = list(FACTION_MINING)
/obj/structure/spawner/mining/goldgrub
name = "goldgrub den"
desc = "A den housing a nest of goldgrubs, annoying but arguably much better than anything else you'll find in a nest."
mob_types = list(/mob/living/simple_animal/hostile/asteroid/goldgrub)
/obj/structure/spawner/mining/goliath
name = "goliath den"
desc = "A den housing a nest of goliaths, oh god why?"
mob_types = list(/mob/living/basic/mining/goliath/ancient)
/obj/structure/spawner/mining/hivelord
name = "hivelord den"
desc = "A den housing a nest of hivelords."
mob_types = list(/mob/living/simple_animal/hostile/asteroid/hivelord)
/obj/structure/spawner/mining/basilisk
name = "basilisk den"
desc = "A den housing a nest of basilisks, bring a coat."
mob_types = list(/mob/living/basic/mining/basilisk)
/obj/structure/spawner/mining/wumborian
name = "wumborian fugu den"
desc = "A den housing a nest of wumborian fugus, how do they all even fit in there?"
mob_types = list(/mob/living/basic/wumborian_fugu)
/obj/structure/spawner/nether
name = "netherworld link"
desc = null //see examine()
icon_state = "nether"
max_integrity = 50
spawn_time = 60 SECONDS
max_mobs = 15
icon = 'icons/mob/simple/lavaland/nest.dmi'
spawn_text = "crawls through"
mob_types = list(
/mob/living/basic/blankbody,
/mob/living/basic/creature,
/mob/living/basic/migo,
)
faction = list(FACTION_NETHER)
/obj/structure/spawner/nether/Initialize(mapload)
. = ..()
START_PROCESSING(SSprocessing, src)
/obj/structure/spawner/nether/examine(mob/user)
. = ..()
if(isskeleton(user) || iszombie(user))
. += "A direct link to another dimension full of creatures very happy to see you. [span_nicegreen("You can see your house from here!")]"
else
. += "A direct link to another dimension full of creatures not very happy to see you. [span_warning("Entering the link would be a very bad idea.")]"
/obj/structure/spawner/nether/attack_hand(mob/user, list/modifiers)
. = ..()
if(isskeleton(user) || iszombie(user))
to_chat(user, span_notice("You don't feel like going home yet..."))
else
user.visible_message(span_warning("[user] is violently pulled into the link!"), \
span_userdanger("Touching the portal, you are quickly pulled through into a world of unimaginable horror!"))
contents.Add(user)
/obj/structure/spawner/nether/process(seconds_per_tick)
for(var/mob/living/living_mob in contents)
if(living_mob)
playsound(src, 'sound/magic/demon_consume.ogg', 50, TRUE)
living_mob.adjustBruteLoss(60 * seconds_per_tick)
new /obj/effect/gibspawner/generic(get_turf(living_mob), living_mob)
if(living_mob.stat == DEAD)
var/mob/living/basic/blankbody/newmob = new(loc)
newmob.name = "[living_mob]"
newmob.desc = "It's [living_mob], but [living_mob.p_their()] flesh has an ashy texture, and [living_mob.p_their()] face is featureless save an eerie smile."
src.visible_message(span_warning("[living_mob] reemerges from the link!"))
qdel(living_mob)