Merge pull request #16915 from Qwertytoforty/Clinging-to-hope

Reworks changeling strained muscles
This commit is contained in:
variableundefined
2021-11-14 15:52:45 -06:00
committed by GitHub
3 changed files with 53 additions and 37 deletions
+4
View File
@@ -34,10 +34,14 @@
#define STATUS_EFFECT_BLOODDRUNK /datum/status_effect/blooddrunk //Stun immunity and greatly reduced damage taken
#define STATUS_EFFECT_SPEEDLEGS /datum/status_effect/speedlegs //Handles cling speed boost and chemical cost.
#define STATUS_EFFECT_BLOOD_SWELL /datum/status_effect/bloodswell //stun resistance and halved damage for gargantua vampires
#define STATUS_EFFECT_BLOOD_RUSH /datum/status_effect/blood_rush // speed boost for gargantua vampires
/////////////
// DEBUFFS //
/////////////
+39
View File
@@ -347,3 +347,42 @@
/datum/status_effect/regenerative_core/on_remove()
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id)
/datum/status_effect/speedlegs
duration = -1
status_type = STATUS_EFFECT_UNIQUE
tick_interval = 4 SECONDS
alert_type = null
var/stacks = 0
/datum/status_effect/speedlegs/on_apply()
ADD_TRAIT(owner, TRAIT_GOTTAGOFAST, "changeling")
return TRUE
/datum/status_effect/speedlegs/tick()
if(owner.stat || owner.staminaloss >= 90 || owner.mind.changeling.chem_charges <= (stacks + 1) * 3)
to_chat(owner, "<span class='danger'>Our muscles relax without the energy to strengthen them.</span>")
owner.Weaken(3)
owner.remove_status_effect(STATUS_EFFECT_SPEEDLEGS)
else
stacks++
owner.mind.changeling.chem_charges -= stacks * 3 //At first the changeling may regenerate chemicals fast enough to nullify fatigue, but it will stack
if(stacks == 7) //Warning message that the stacks are getting too high
to_chat(owner, "<span class='warning'>Our legs are really starting to hurt...</span>")
/datum/status_effect/speedlegs/before_remove()
if(stacks < 3 && !(owner.stat || owner.staminaloss >= 90 || owner.mind.changeling.chem_charges <= (stacks + 1) * 3)) //We don't want people to turn it on and off fast, however, we need it forced off if the 3 later conditions are met.
to_chat(owner, "<span class='notice'>Our muscles just tensed up, they will not relax so fast.</span>")
return FALSE
return TRUE
/datum/status_effect/speedlegs/on_remove()
REMOVE_TRAIT(owner, TRAIT_GOTTAGOFAST, "changeling")
if(!owner.weakened)
to_chat(owner, "<span class='notice'>Our muscles relax.</span>")
if(stacks >= 7)
to_chat(owner, "<span class='danger'>We collapse in exhaustion.</span>")
owner.Weaken(3)
owner.emote("gasp")
owner.mind.changeling.geneticdamage += stacks
@@ -1,52 +1,25 @@
//Strained Muscles: Temporary speed boost at the cost of rapid damage
//Strained Muscles: Temporary speed boost at the cost of chemicals
//Limited because of hardsuits and such; ideally, used for a quick getaway
/datum/action/changeling/strained_muscles
name = "Strained Muscles"
desc = "We evolve the ability to reduce the acid buildup in our muscles, allowing us to move much faster."
helptext = "The strain will make us tired, and we will rapidly become fatigued. Standard weight restrictions, like hardsuits, still apply. Cannot be used in lesser form."
helptext = "The strain will use up our chemicals faster over time, and is not sustainable. Causes slight genetic damage to our genome. Can not be used in lesser form."
button_icon_state = "strained_muscles"
chemical_cost = 0
dna_cost = 1
req_human = 1
var/stacks = 0 //Increments every 5 seconds; damage increases over time
var/enabled = 0 //Whether or not you are a hedgehog
max_genetic_damage = 0
/datum/action/changeling/strained_muscles/sting_action(mob/living/carbon/user)
enabled = !enabled
if(enabled)
to_chat(user, "<span class='notice'>Our muscles tense and strengthen.</span>")
if(!user.has_status_effect(STATUS_EFFECT_SPEEDLEGS))
if(user.dna.species.speed_mod < 0)
to_chat(user, "<span class='notice'>We are moving as fast as we can, we can not go faster.</span>")
else
to_chat(user, "<span class='notice'>Our muscles tense and strengthen.</span>")
user.apply_status_effect(STATUS_EFFECT_SPEEDLEGS)
else
REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling")
to_chat(user, "<span class='notice'>Our muscles relax.</span>")
if(stacks >= 10)
to_chat(user, "<span class='danger'>We collapse in exhaustion.</span>")
user.Weaken(3)
user.emote("gasp")
while(enabled)
ADD_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling")
if(user.stat || user.staminaloss >= 90)
enabled = 0 //Let's use something exact instead of !enabled where we can.
to_chat(user, "<span class='notice'>Our muscles relax without the energy to strengthen them.</span>")
REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling")
user.Weaken(2)
user.emote("gasp")
break
stacks++
//user.take_organ_damage(stacks * 0.03, 0)
user.staminaloss += stacks * 1.3 //At first the changeling may regenerate stamina fast enough to nullify fatigue, but it will stack
if(stacks == 11) //Warning message that the stacks are getting too high
to_chat(user, "<span class='warning'>Our legs are really starting to hurt...</span>")
sleep(40)
while(!enabled) //Damage stacks decrease fairly rapidly while not in sanic mode
if(stacks >= 1)
stacks--
sleep(20)
user.remove_status_effect(STATUS_EFFECT_SPEEDLEGS)
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
return 1