Files
Bubberstation/code/datums/mutations/void_magnet.dm
carlarctg 0119b95d2d Genetics Rebalance: Negative mutations add stability, standarized instability cost for mutations (#83439)
## About The Pull Request

PR has been reworked a bunch! Changes in bold. Some of the **HATE** is
now outdated.

**Negative mutations now allow you to have more positive mutations, via
reducing your instability!**

**All mutations have been overall standardized via defines on their
instability values. Many mediocre positive mutations have had their cost
reduced significantly!**

```
/// Negatives that are virtually harmless and mostly just funny (language)
// Set to 0 because munchkinning via miscommunication = bad
#define NEGATIVE_STABILITY_MINI 0
/// Negatives that are slightly annoying (unused)
#define NEGATIVE_STABILITY_MINOR -20
/// Negatives that present an uncommon or weak, consistent hindrance to gameplay (cough, paranoia)
#define NEGATIVE_STABILITY_MODERATE -30
/// Negatives that present a major consistent hindrance to gameplay (deaf, mute, acid flesh)
#define NEGATIVE_STABILITY_MAJOR -40

/// Positives that provide basically no benefit (glowy)
#define POSITIVE_INSTABILITY_MINI 5
/// Positives that are niche in application or useful in rare circumstances (parlor tricks, geladikinesis, autotomy)
#define POSITIVE_INSTABILITY_MINOR 10
/// Positives that provide a new ability that's roughly par with station equipment (insulated, cryokinesis)
#define POSITIVE_INSTABILITY_MODERATE 25
/// Positives that are unique, very powerful, and noticeably change combat/gameplay (hulk, tk)
#define POSITIVE_INSTABILITY_MAJOR 35

```

Added a new height mutation: Acromegaly! It's the opposite of Dwarfism
and makes you uncannily tall. It also makes you hit your head 8% or 4%
(with synch) of the time you pass through airlocks. Wear a helmet!

**Injectors and activators' duration is now dependent on the
in/stability (absolute value) of the mutations to be injected! With a
minimum of 5-10-15 seconds for each type of injector. Also changed up a
bit how part upgrade cooldowns work, by making each tier reduce
cooldowns by 25-15-10% for each injector type.**

## Why It's Good For The Game


**> Negative mutations now allow you to have more positive mutations,
via reducing your instability!**

Genetics has been long in dire need of a rework. This isn't really one,
but it IS intended to increase genetics depth a bit and stave off its
stagnation, making it slightly more interesting than 'free shit', by
making it so **you can now gain more positive mutations, but you need to
figure out what you're going to take as a downgrade in turn.**

Genetic powers are heavily themed around comic book superheroes, and you
know what those had a lot? Debilitating drawbacks to their powers. Let's
replicate that.

**I intend to make a sister PR for this that adds more interesting
positive mutations (for the first time in decades) to genetics, so
there's an actual element of pick-and-choose involved**

> Added a new height mutation: Acromegaly! It's the opposite of Dwarfism
and makes you uncannily tall. It also makes you hit your head 8% or 4%
(with synch) of the time you pass through airlocks. Wear a helmet!

We have Super Tall. Let's add it to the game somewhere! With a fun
downside, of course.

**Gigantism is now a recipe mutation, mix Acromegaly with Strength to
get it.**

> **Injectors and activators' duration is now dependent on the
in/stability (absolute value) of the mutations to be injected! With a
minimum of 5-10-15 seconds for each type of injector. Also changed up a
bit how part upgrade cooldowns work, by making each tier reduce
cooldowns by 25-15-10% for each injector type.**

**Made no sense that a Glowy injector cost the same as a Hulk injector.
Just annoying. The cooldown is based on the absolute value, so a -30
instability injector would take ~30 seconds. This mostly so that
geneticists can't make a million modded syringe gun supersyringes**
2024-06-18 04:39:04 +00:00

82 lines
2.8 KiB
Plaintext

/datum/mutation/human/void
name = "Void Magnet"
desc = "A rare genome that attracts odd forces not usually observed."
quality = MINOR_NEGATIVE //upsides and downsides
text_gain_indication = span_notice("You feel a heavy, dull force just beyond the walls watching you.")
instability = POSITIVE_INSTABILITY_MODERATE // useful, but has large drawbacks
power_path = /datum/action/cooldown/spell/void/cursed
energy_coeff = 1
synchronizer_coeff = 1
/datum/mutation/human/void/modify()
. = ..()
var/datum/action/cooldown/spell/void/cursed/to_modify = .
if(!istype(to_modify)) // null or invalid
return
to_modify.curse_probability_modifier = GET_MUTATION_SYNCHRONIZER(src)
return .
/// The base "void invocation" action. No side effects.
/datum/action/cooldown/spell/void
name = "Invoke Void"
desc = "Pulls you into a pocket of the void temporarily, making you invincible."
button_icon_state = "void_magnet"
school = SCHOOL_EVOCATION
cooldown_time = 1 MINUTES
invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!"
invocation_type = INVOCATION_SHOUT
spell_requirements = NONE
antimagic_flags = NONE
/datum/action/cooldown/spell/void/is_valid_target(atom/cast_on)
return isturf(cast_on.loc)
/datum/action/cooldown/spell/void/cast(atom/cast_on)
. = ..()
new /obj/effect/immortality_talisman/void(get_turf(cast_on), cast_on)
/// The cursed "void invocation" action, that has a chance of casting itself on its owner randomly on life ticks.
/datum/action/cooldown/spell/void/cursed
name = "Convoke Void" //magic the gathering joke here
desc = "A rare genome that attracts odd forces not usually observed. May sometimes pull you in randomly."
/// A multiplier applied to the probability of the curse appearing every life tick
var/curse_probability_modifier = 1
/datum/action/cooldown/spell/void/cursed/Grant(mob/grant_to)
. = ..()
if(!owner)
return
RegisterSignal(grant_to, COMSIG_LIVING_LIFE, PROC_REF(on_life))
/datum/action/cooldown/spell/void/cursed/Remove(mob/remove_from)
UnregisterSignal(remove_from, COMSIG_LIVING_LIFE)
return ..()
/// Signal proc for [COMSIG_LIVING_LIFE]. Has a chance of casting itself randomly.
/datum/action/cooldown/spell/void/cursed/proc/on_life(mob/living/source, seconds_per_tick, times_fired)
SIGNAL_HANDLER
if(!isliving(source) || HAS_TRAIT(source, TRAIT_STASIS) || source.stat == DEAD || HAS_TRAIT(source, TRAIT_NO_TRANSFORM))
return
if(!is_valid_target(source))
return
var/prob_of_curse = 0.25
var/mob/living/carbon/carbon_source = source
if(istype(carbon_source) && carbon_source.dna)
// If we have DNA, the probability of curse changes based on how stable we are
prob_of_curse += ((100 - carbon_source.dna.stability) / 40)
prob_of_curse *= curse_probability_modifier
if(!SPT_PROB(prob_of_curse, seconds_per_tick))
return
cast(source)