Fish electrogenesis now scales with size. (#86593)

## About The Pull Request
A little touch to fish electrogenesis. Now its power scales with the
size of the fish. The initial values for the zip zap and the jumpercable
have been edited so that their average output is more or less
unaffected.

This PR also adds a check to fish petting to ensure that the user is
shocked only if the fish actually has the electrogenesis trait and not
just the energy that'd be generated if the fish had the trait.

## Why It's Good For The Game
The size and weight of a fish are variables that influence a lot of
mechanics such as reagents, number of fillets, weight class, force,
slowdown when carried or dragged, other traits, cargo value.
Electrogenesis should be no different.

Also fixing a possible oversight (not in the changelog because so far
the only fish with over 15 MJ is the zip zap and it's about impossible
to remove their electrogenesis trait rn also because they don't
reproduce).

## Changelog

🆑
balance: Fish electrogenesis now scales with size.
/🆑
This commit is contained in:
Ghom
2024-09-12 15:55:16 -04:00
committed by GitHub
parent 823cd8b410
commit cdfbfe55ce
3 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -142,8 +142,8 @@
var/experisci_scannable = TRUE
/// cooldown on creating tesla zaps
COOLDOWN_DECLARE(electrogenesis_cooldown)
/// power of the tesla zap created by the fish in a bioelectric generator
var/electrogenesis_power = 10 MEGA JOULES
/// power of the tesla zap created by the fish in a bioelectric generator. Scales with size.
var/electrogenesis_power = 2 MEGA JOULES
/// The beauty this fish provides to the aquarium it's inserted in.
var/beauty = FISH_BEAUTY_GENERIC
@@ -234,6 +234,7 @@
if(size > FISH_SIZE_TWO_HANDS_REQUIRED)
qdel(GetComponent(/datum/component/two_handed))
size = new_size
electrogenesis_power = initial(electrogenesis_power) * size * 0.1
var/init_icon_state = initial(inhand_icon_state)
switch(size)
if(0 to FISH_SIZE_TINY_MAX)
@@ -863,7 +864,7 @@
if(recently_petted)
to_chat(user, span_warning("[src] runs away from your finger as you dip it into the water!"))
return
if(electrogenesis_power > 15 MEGA JOULES)
if(HAS_TRAIT(src, TRAIT_FISH_ELECTROGENESIS) && electrogenesis_power > 15 MEGA JOULES)
user.electrocute_act(5, src) //was it all worth it?
recently_petted = TRUE
SEND_SIGNAL(src, COMSIG_FISH_PETTED)
@@ -139,7 +139,7 @@
/datum/fish_trait/electrogenesis,
)
//anxiety naturally limits the amount of zipzaps per tank, so they are stronger alone
electrogenesis_power = 20 MEGA JOULES
electrogenesis_power = 6.7 MEGA JOULES
beauty = FISH_BEAUTY_GOOD
/obj/item/fish/tadpole
@@ -46,6 +46,7 @@
/datum/fish_trait/mixotroph,
/datum/fish_trait/electrogenesis,
)
electrogenesis_power = 0.9 MEGA JOULES
beauty = FISH_BEAUTY_UGLY
/obj/item/fish/chainsawfish