Files
Bubberstation/code/game/objects/structures/traps.dm
EnterTheJake d8c8b79c44 Rust Heretic rework: THE PUKENING. (#83006)
## About The Pull Request
Turf rusting is now based on knowledge instead of RNG; toxic damage on
spells has been replaced with disgust; rust walkers are a bit easier to
summon and show up early in the tree.

Rust ascension spread has been massively increased and immunities while
on Rust have been updated.
## Why It's Good For The Game

This is a massive list of changes, but the tl:dr is Rust heretic design
is pretty barebones and dated in its current state. I'm going to try my
best to explain why that is and why it needs to change.

###  RNG on rusting is bad

**Problem** : quite a lot of turfs cannot be rusted, and reinforced
turfs rusting is tied to RNG, the emergency shuttle floors are also
unrustable, making an ascended heretic not threatening at all to an
escaping crew.

**Solution**: Heretic rusting prowess is now tied to knowledge
progression; reinf wall rusting is no longer tied to RNG; the emergency
shuttle is now rustable if you have accrued enough knowledge.

**Explanation** : I've been adopting the code from a previous PR that
sadly didn't make the light of day.

Link: https://github.com/tgstation/tgstation/pull/65361

The goal is to have Heretic rusting be more consistent, so that if you
ascend the shuttle is no longer a safe refuge.

**Grasp Of Rust**: Basic floors and walls.
**Mark Of Rust**: Reinf floors and walls (takes 3 applications of rust
to fully destroy).
**Toxic Blade** Titanium and Plastitanium( still takes 3 applications of
rust to destroy).
**Ascension**: almost everything save for admin walls, glass, and
silver.

### A territorial antagonist with no tools to defend its turf

**Problem**: Rust heretic is forced into a territorial playstyle, but
it's heavily diminished by rusted turfs not having any negative effect
on the crew whatsoever, Toxic damage on plume and blade is also kind of
bad and has no synergy with the rest of the kit.

Lastly, while fitting to the theme of Rust; mark detonation destroying
clothes and items can end up being more harmful to the heretic, as
destroying a secoff's flashbang will result in you getting stunned and
killed.

**Solution**: Rusted floors are no longer safe for the crew; walking
over Rust will add a small buildup of disgust, silicons will receive
ticking damage, Toxic damage on Rust skills has been replaced with
disgust buildup and a chem purge effect to prevent the crew from
cheesing the debuff with sol dry.

**Explaination** "The goal behind this change is to prevent the crew to
just be able to walk willy nilly into an eldritchly decayed area without
repercussions, plus I feel like disgust is a fitting debuff for Rusties
for a number of reasons.

1) Lore wise, your goal is to turn the entire station into a garbage
dump.

2) It fits for fighting a territorial antagonist, it's not immediately
threatening on its own, but if you overstay your welcome, it has dire
consequences.

3) We don't really do much with disgust as a status effect, far as i
know, this'll be the first iteration of it being used for an antagonist
toolset.

4) It gives reason to the crew to act hostile towards the Heretic, as
you are essentially making their work area inhabitable.

I've also Slightly increased the healing on leeching walk and gave it
some minor temperature regulation (you won't be able to outtemp space
cold).

### Rust Walkers

**Problem**: Rust walkers might as well not exist in their current
state; they are one of the latest heretic unlocks, and the recipe for
summoning one is INSANE now that you cannot decapitate mobs anymore.

**Solution**: Rust walkers pop up a bit earlier in the tree; the ritual
to summon them has more reasonable reagents (wires, pools of vomit, iron
sheets) and they have increased health.

**Explanation**: : There is not a lot to add to this. without walkers,
Rust heretics are fairly slow at spreading rust, by making rust walkers
have reasonable summoning reagents, we ease that problem; lastly i've
slightly bumped their hp, as i felt 75 hp was a bit low.

### Underwhelming ascension

**Problem**: The spread rate from the ascension is downright ATROCIOUS
in its current state, i actually ran multiple tests on different maps,
on Metastation it can take up to 40 minutes for the rust to spread to
the entire station, considering an ascended heretic results in an
immediate shuttle call, it's unecceptable in its current form.

Solution: Rust spread is now a hybridization between old ascension and
Wizard tranformation ritual.

**Explanation**: The spread rate in its current form is painstakingly
slow and has a tendency to reach one corner of the map and compound on
itself, i've borrowed the code from the wizard final ritual
"transformation" and gave it my own spin so that given enough time it
will cover the station more or less evenly, it can now spread through
all z levels.

Video example: https://www.youtube.com/watch?v=jZ5zMrNM6Jw

I've also updated the immunities you gain on ascension to ignore
slowdown and stasis from Cryogelidia.

The whole point of rust ascension is to become immune to crowd control,
i've seen far too many ascended heretics die to a single bola or cryo
syringe, that's pretty lame so i fixed that.

Lastly, aggressive spread has had its radius reduced in exchange for the
spread being consistent now; cooldown is also halved when you ascend, to
better help the heretic go on the offensive.
2024-05-16 14:55:45 -04:00

248 lines
7.3 KiB
Plaintext

/obj/structure/trap
name = "IT'S A TRAP"
desc = "Stepping on me is a guaranteed bad day."
icon = 'icons/obj/service/hand_of_god_structures.dmi'
icon_state = "trap"
density = FALSE
anchored = TRUE
alpha = 30 //initially quite hidden when not "recharging"
var/flare_message = "<span class='warning'>the trap flares brightly!</span>"
var/last_trigger = 0
var/time_between_triggers = 1 MINUTES
var/charges = INFINITY
var/antimagic_flags = MAGIC_RESISTANCE
var/list/static/ignore_typecache
var/list/mob/immune_minds = list()
var/sparks = TRUE
var/datum/effect_system/spark_spread/spark_system
/obj/structure/trap/Initialize(mapload)
. = ..()
flare_message = "<span class='warning'>[src] flares brightly!</span>"
spark_system = new
spark_system.set_up(4,1,src)
spark_system.attach(src)
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered)
)
AddElement(/datum/element/connect_loc, loc_connections)
if(!ignore_typecache)
ignore_typecache = typecacheof(list(
/obj/effect,
/mob/dead,
))
/obj/structure/trap/Destroy()
qdel(spark_system)
spark_system = null
. = ..()
/obj/structure/trap/examine(mob/user)
. = ..()
if(!isliving(user))
return
if(user.mind && (user.mind in immune_minds))
return
if(get_dist(user, src) <= 1)
. += span_notice("You reveal [src]!")
flare()
/obj/structure/trap/proc/flare()
// Makes the trap visible, and starts the cooldown until it's
// able to be triggered again.
visible_message(flare_message)
if(sparks)
spark_system.start()
alpha = 200
last_trigger = world.time
charges--
if(charges <= 0)
animate(src, alpha = 0, time = 1 SECONDS)
QDEL_IN(src, 1 SECONDS)
else
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/trap/proc/on_entered(datum/source, atom/movable/victim)
SIGNAL_HANDLER
if(last_trigger + time_between_triggers > world.time)
return
// Don't want the traps triggered by sparks, ghosts or projectiles.
if(is_type_in_typecache(victim, ignore_typecache))
return
if(ismob(victim))
var/mob/mob_victim = victim
if(mob_victim.mind in immune_minds)
return
if(mob_victim.can_block_magic(antimagic_flags))
flare()
return
if(charges <= 0)
return
flare()
if(isliving(victim))
trap_effect(victim)
/obj/structure/trap/proc/trap_effect(mob/living/victim)
return
/obj/structure/trap/stun
name = "shock trap"
desc = "A trap that will shock and render you immobile. You'd better avoid it."
icon_state = "trap-shock"
var/stun_time = 10 SECONDS
/obj/structure/trap/stun/trap_effect(mob/living/victim)
victim.electrocute_act(30, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
victim.Paralyze(stun_time)
/obj/structure/trap/stun/hunter
name = "bounty trap"
desc = "A trap that only goes off when a fugitive steps on it, announcing the location and stunning the target. You'd better avoid it."
icon = 'icons/obj/restraints.dmi'
icon_state = "bounty_trap_on"
stun_time = 20 SECONDS
sparks = FALSE //the item version gives them off to prevent runtimes (see Destroy())
antimagic_flags = NONE
var/obj/item/bountytrap/stored_item
var/caught = FALSE
/obj/structure/trap/stun/hunter/Initialize(mapload)
. = ..()
time_between_triggers = 1 SECONDS
flare_message = "<span class='warning'>[src] snaps shut!</span>"
/obj/structure/trap/stun/hunter/Destroy()
if(!QDELETED(stored_item))
qdel(stored_item)
stored_item = null
return ..()
/obj/structure/trap/stun/hunter/on_entered(datum/source, atom/movable/victim)
if(isliving(victim))
var/mob/living/living_victim = victim
if(!living_victim.mind?.has_antag_datum(/datum/antagonist/fugitive))
return
caught = TRUE
. = ..()
/obj/structure/trap/stun/hunter/flare()
..()
var/turf/our_turf = get_turf(src)
if(!our_turf)
return
stored_item.forceMove(get_turf(src))
forceMove(stored_item)
if(caught)
stored_item.announce_fugitive()
caught = FALSE
/obj/item/bountytrap
name = "bounty trap"
desc = "A trap that only goes off when a fugitive steps on it, announcing the location and stunning the target. It's currently inactive."
icon = 'icons/obj/restraints.dmi'
icon_state = "bounty_trap_off"
var/obj/structure/trap/stun/hunter/stored_trap
var/obj/item/radio/radio
var/datum/effect_system/spark_spread/spark_system
/obj/item/bountytrap/Initialize(mapload)
. = ..()
radio = new(src)
radio.subspace_transmission = TRUE
radio.canhear_range = 0
radio.recalculateChannels()
spark_system = new
spark_system.set_up(4,1,src)
spark_system.attach(src)
name = "[name] #[rand(1, 999)]"
stored_trap = new(src)
stored_trap.name = name
stored_trap.stored_item = src
/obj/item/bountytrap/proc/announce_fugitive()
spark_system.start()
playsound(src, 'sound/machines/ding.ogg', 50, TRUE)
radio.talk_into(src, "Fugitive has triggered this trap in the [get_area_name(src)]!", RADIO_CHANNEL_COMMON)
/obj/item/bountytrap/attack_self(mob/living/user)
var/turf/target_turf = get_turf(src)
if(!user || !user.transferItemToLoc(src, target_turf))//visibly unequips
return
to_chat(user, span_notice("You set up [src]. Examine while close to disarm it."))
stored_trap.forceMove(target_turf)//moves trap to ground
forceMove(stored_trap)//moves item into trap
/obj/item/bountytrap/Destroy()
if(!QDELETED(stored_trap))
qdel(stored_trap)
stored_trap = null
QDEL_NULL(radio)
QDEL_NULL(spark_system)
. = ..()
/obj/structure/trap/fire
name = "flame trap"
desc = "A trap that will set you ablaze. You'd better avoid it."
icon_state = "trap-fire"
/obj/structure/trap/fire/trap_effect(mob/living/victim)
to_chat(victim, span_danger("<B>Spontaneous combustion!</B>"))
victim.Paralyze(2 SECONDS)
new /obj/effect/hotspot(get_turf(src))
/obj/structure/trap/chill
name = "frost trap"
desc = "A trap that will chill you to the bone. You'd better avoid it."
icon_state = "trap-frost"
/obj/structure/trap/chill/trap_effect(mob/living/victim)
if(HAS_TRAIT(victim, TRAIT_RESISTCOLD))
return
to_chat(victim, span_bolddanger("You're frozen solid!"))
victim.Paralyze(2 SECONDS)
victim.adjust_bodytemperature(-300)
victim.apply_status_effect(/datum/status_effect/freon)
/obj/structure/trap/damage
name = "earth trap"
desc = "A trap that will summon a small earthquake, just for you. You'd better avoid it."
icon_state = "trap-earth"
/obj/structure/trap/damage/trap_effect(mob/living/victim)
to_chat(victim, span_bolddanger("The ground quakes beneath your feet!"))
victim.Paralyze(10 SECONDS)
victim.adjustBruteLoss(35)
var/obj/structure/flora/rock/style_random/giant_rock = new(get_turf(src))
QDEL_IN(giant_rock, 20 SECONDS)
/obj/structure/trap/ward
name = "divine ward"
desc = "A divine barrier, It looks like you could destroy it with enough effort, or wait for it to dissipate..."
icon_state = "ward"
density = TRUE
time_between_triggers = 2 MINUTES
/obj/structure/trap/ward/Initialize(mapload)
. = ..()
QDEL_IN(src, time_between_triggers)
/obj/structure/trap/cult
name = "unholy trap"
desc = "A trap that rings with unholy energy. You think you hear... chittering?"
icon_state = "trap-cult"
/obj/structure/trap/cult/trap_effect(mob/living/victim)
to_chat(victim, span_bolddanger("With a crack, the hostile constructs come out of hiding, stunning you!"))
victim.electrocute_act(10, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
victim.Paralyze(2 SECONDS)
new /mob/living/basic/construct/proteon/hostile(loc)
new /mob/living/basic/construct/proteon/hostile(loc)
QDEL_IN(src, 3 SECONDS)