Files
Bubberstation/code/datums/mutations/chameleon.dm
SkyratBot 234a19c927 [MIRROR] Rebalances and adds more ambush-style cling abilities, buffs chameleon skin and adds a new ability! "Darkness Adaptation" (#26727)
* Rebalances and adds more ambush-style cling abilities, buffs chameleon skin and adds a new ability! "Darkness Adaptation" (#81373)

## About The Pull Request
This PR adds a new ambush ability to changelings, "Darkness Adaptation"
and tweaks the balance of "Chameleon Skin".

The new cling ability, "Darkness Adaptation". makes your character
translucent and slightly dark while also giving the ability to see
slightly better into dark than normally (30% better). While this ability
is active, flash protection is lowered by one.

Buffs "Chameleon Skin" by reducing the DNA cost to 1 from 2, and sped up
the time it takes to go full invisible by 2.5x and zero instability cost

Below is the picture of the translucency through normal non-night-vision
vision: (note: this is using extremely dark armor already)

![gambar](https://github.com/tgstation/tgstation/assets/127663818/1f708705-abfc-48e8-a5a2-08a2cb985935)

Below is the picture of the translucency through the poor night-vision
that the ability gives you:

![gambar](https://github.com/tgstation/tgstation/assets/127663818/500169e3-7048-46aa-b33f-0b6d55373886)
## Why It's Good For The Game
This ability was added in #11148 back in 2015 and hasn't been touched
for 9 years. The original ability just gave you the _extremely_
situational "chameleon skin" mutation (one that is accessible to the
crew through genetics already). for a whopping **2 mutation points**
cost. The mutation makes you invisible after half a minute or so of
standing still and is immediately broken the second you move or get
pushed.

Compared to other similarly costed powers you get for 2 mutation points,
this is by far the worst bang for your buck by a large margin.

Needless to say, considering with how power-crept everything else in the
game is after all these years. this ability that hasn't been touched for
ages have fell into disuse to the point of uselessness, especially with
the heavy cost it that came with it.

This PR buffs that ability by making it cheaper, in line with the cost
of other less powerful abilities that clings have. and made it 2.5x
faster to turn invisible.

The PR also adds another ambush-oriented ability, "Darkness adaptation".
The ability allows your character to become translucent and slightly
dark while also giving the ability to see slightly better into dark than
normally (30% better); with the downside of your eyes being slightly
worse than before.

This ability follows the general spirit of clings, an stealth-generalist
oriented antag that you never know when they would strike (disguises
already have this effect, but them being far more able to jump you in
maint even more so.). and encourages more creative strategy than just
your average murderbone.

A Perfect force multiplier for maint combat and maint ambushes. Also
synergises well with augmented sight, and the blackish cling armor.

Don't worry if you think the new ability, combined with the faster cham
skin would make you invisible to the naked eye. The mutation cancels out
the translucency of the adaptation.
## Changelog
🆑
add: Adds a new changeling ability, "Darkness Adaptation". Making you
more translucent, especially in darkness and allowing you to see
slightly better in the dark
balance: The changeling power "Chameleon Skin" has been buffed, Reduces
the cost to 1 and sped up the time it takes to turn invisible
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Rebalances and adds more ambush-style cling abilities, buffs chameleon skin and adds a new ability! "Darkness Adaptation"

---------

Co-authored-by: Singul0 <127663818+Singul0@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2024-03-03 12:44:05 -05:00

86 lines
3.1 KiB
Plaintext

//Chameleon causes the owner to slowly become transparent when not moving.
/datum/mutation/human/chameleon
name = "Chameleon"
desc = "A genome that causes the holder's skin to become transparent over time."
quality = POSITIVE
difficulty = 16
text_gain_indication = "<span class='notice'>You feel one with your surroundings.</span>"
text_lose_indication = "<span class='notice'>You feel oddly exposed.</span>"
instability = 25
power_coeff = 1
/datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
/// SKYRAT EDIT BEGIN
if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN))
return
ADD_TRAIT(owner, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION)
/// SKYRAT EDIT END
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
RegisterSignal(owner, COMSIG_LIVING_UNARMED_ATTACK, PROC_REF(on_attack_hand))
/datum/mutation/human/chameleon/on_life(seconds_per_tick, times_fired)
/// SKYRAT EDIT BEGIN
if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN))
owner.alpha = max(owner.alpha - (12.5 * (GET_MUTATION_POWER(src)) * seconds_per_tick), 0)
/// SKYRAT EDIT END
//Upgraded mutation of the base variant, used for changelings. No instability and better power_coeff
/datum/mutation/human/chameleon/changeling
instability = 0
power_coeff = 2.5
locked = TRUE
/**
* Resets the alpha of the host to the chameleon default if they move.
*
* Arguments:
* - [source][/atom/movable]: The source of the signal. Presumably the host mob.
* - [old_loc][/atom]: The location the host mob used to be in.
* - move_dir: The direction the host mob moved in.
* - forced: Whether the movement was caused by a forceMove or moveToNullspace.
* - [old_locs][/list/atom]: The locations the host mob used to be in.
*/
/datum/mutation/human/chameleon/proc/on_move(atom/movable/source, atom/old_loc, move_dir, forced, list/atom/old_locs)
SIGNAL_HANDLER
/// SKYRAT EDIT BEGIN
if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN))
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
else
owner.alpha = 255
/// SKYRAT EDIT END
/**
* Resets the alpha of the host if they click on something nearby.
*
* Arguments:
* - [source][/mob/living/carbon/human]: The host mob that just clicked on something.
* - [target][/atom]: The thing the host mob clicked on.
* - proximity: Whether the host mob can physically reach the thing that they clicked on.
* - [modifiers][/list]: The set of click modifiers associated with this attack chain call.
*/
/datum/mutation/human/chameleon/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, list/modifiers)
SIGNAL_HANDLER
if(!proximity) //stops tk from breaking chameleon
return
/// SKYRAT EDIT BEGIN
if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN))
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
else
owner.alpha = 255
/// SKYRAT EDIT END
/datum/mutation/human/chameleon/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.alpha = 255
UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_UNARMED_ATTACK))
/// SKYRAT EDIT BEGIN
REMOVE_TRAIT(owner, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION)
/// SKYRAT EDIT END