Files
Bubberstation/code/game/objects/effects/forcefields.dm
SkyratBot a7bb978a7f [MIRROR] Deathmatch Modifiers Tweaks and Additions (#26972)
* Deathmatch Modifiers Tweaks and Additions (#82113)

## About The Pull Request
After playing more than a few matches, I came to notice a couple
lingering issues with deathmatch modifiers, and also I came up with more
ideas.

For starters, the echolocation modifier doesn't work, and even if it
worked, I believe it'd be ass, so I'm removing it. The perma-flipping
also doesn't work quite well and gets interrupted by stuff like
knockdowns and the such, plus it's just fluff, so I'm removing it too.
Second, I've forgot to set the style of the deadmatch missiles, so they
look like normal pods right now.

About what's being added rather than removed: There're now a "No
Slowdown" modifier, a "Random Teleports" one that randomly teleports
everyone (and whatever they're buckled too) every 12 to 24 seconds,
"Snail Crawl" which works much like snailpeople's, "Forcefield Trail"
which also works pretty much like the cosmic heretic trail, albeit
lasting way shorter, and finally a "Manual Blinking/Breathing", if you
truly hate players to a misanthropistic level.

So yeah, 2 removed modifiers, and 5 new ones.

## Why It's Good For The Game
Fixing a couple of issues, and lading the feature with a few more
options.

## Changelog

🆑
del: Removed the (non-working) "Perma-Flipping" and "Echolocation"
deathmatch modifiers.
add: Added "No Slowdown", "Random Teleports", "Snail Crawl", "Forcefield
Trail" and "Manual Blinking/Breathing" modifiers.
fix: Fixed deathmatch cruise missiles looking like standard pods.
/🆑

* Deathmatch Modifiers Tweaks and Additions

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-23 16:47:14 -04:00

113 lines
3.3 KiB
Plaintext

/obj/effect/forcefield
name = "FORCEWALL"
desc = "A space wizard's magic wall."
icon_state = "m_shield"
anchored = TRUE
opacity = FALSE
density = TRUE
can_atmos_pass = ATMOS_PASS_DENSITY
/// If set, how long the force field lasts after it's created. Set to 0 to have infinite duration forcefields.
var/initial_duration = 30 SECONDS
/obj/effect/forcefield/Initialize(mapload)
. = ..()
if(initial_duration > 0 SECONDS)
QDEL_IN(src, initial_duration)
/obj/effect/forcefield/singularity_pull()
return
/// The wizard's forcefield, summoned by forcewall
/obj/effect/forcefield/wizard
/// Flags for what antimagic can just ignore our forcefields
var/antimagic_flags = MAGIC_RESISTANCE
/// A weakref to whoever casted our forcefield.
var/datum/weakref/caster_weakref
/obj/effect/forcefield/wizard/Initialize(mapload, mob/caster, flags = MAGIC_RESISTANCE)
. = ..()
if(caster)
caster_weakref = WEAKREF(caster)
antimagic_flags = flags
/obj/effect/forcefield/wizard/CanAllowThrough(atom/movable/mover, border_dir)
if(IS_WEAKREF_OF(mover, caster_weakref))
return TRUE
if(isliving(mover))
var/mob/living/living_mover = mover
if(living_mover.can_block_magic(antimagic_flags, charge_cost = 0))
return TRUE
return ..()
/// Cult forcefields
/obj/effect/forcefield/cult
name = "glowing wall"
desc = "An unholy shield that blocks all attacks."
icon = 'icons/effects/cult/effects.dmi'
icon_state = "cultshield"
can_atmos_pass = ATMOS_PASS_NO
initial_duration = 20 SECONDS
/// A form of the cult forcefield that lasts permanently.
/// Used on the Shuttle 667.
/obj/effect/forcefield/cult/permanent
initial_duration = 0
/// Mime forcefields (invisible walls)
/obj/effect/forcefield/mime
icon_state = "nothing"
name = "invisible wall"
desc = "You have a bad feeling about this."
alpha = 0
/obj/effect/forcefield/mime/advanced
name = "invisible blockade"
desc = "You're gonna be here awhile."
initial_duration = 1 MINUTES
/// Psyker forcefield
/obj/effect/forcefield/psychic
name = "psychic forcefield"
desc = "A wall of psychic energy powerful enough stop the motion of objects. Projectiles ricochet."
icon_state = "psychic"
can_atmos_pass = ATMOS_PASS_YES
flags_ricochet = RICOCHET_SHINY | RICOCHET_HARD
receive_ricochet_chance_mod = INFINITY //we do ricochet a lot!
initial_duration = 10 SECONDS
/// The cosmic heretics forcefield
/obj/effect/forcefield/cosmic_field
name = "Cosmic Field"
desc = "A field that cannot be passed by people marked with a cosmic star."
icon = 'icons/effects/eldritch.dmi'
icon_state = "cosmic_carpet"
anchored = TRUE
layer = LOW_SIGIL_LAYER
density = FALSE
can_atmos_pass = ATMOS_PASS_NO
initial_duration = 30 SECONDS
/// Flags for what antimagic can just ignore our forcefields
var/antimagic_flags = MAGIC_RESISTANCE
/obj/effect/forcefield/cosmic_field/Initialize(mapload, flags = MAGIC_RESISTANCE)
. = ..()
antimagic_flags = flags
/obj/effect/forcefield/cosmic_field/CanAllowThrough(atom/movable/mover, border_dir)
if(!isliving(mover))
return ..()
var/mob/living/living_mover = mover
if(living_mover.can_block_magic(antimagic_flags, charge_cost = 0))
return ..()
if(living_mover.has_status_effect(/datum/status_effect/star_mark))
return FALSE
return ..()
/obj/effect/forcefield/cosmic_field/fast
initial_duration = 5 SECONDS
/obj/effect/forcefield/cosmic_field/extrafast
initial_duration = 2.5 SECONDS