-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerative slime extract rework (#2275)
* Regenerative slime extract rework * It all works! * Updated effect descriptions to reflect new effects. * Documentation! * Don't allow rainbow regen spamming * apply review stuff * Document `cmp_wound_severity_dsc` * Overly verbose extract descriptions. * regen purple adjustments * Adjustments to stabilized rainbow to ensure they work to their fullest extent * Fix stabilized rainbows * no curing antag traumas * weh
- Loading branch information
Showing
12 changed files
with
306 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
monkestation/code/modules/slimecore/crossbreeding/regenerative/colors.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/datum/status_effect/regenerative_extract/purple | ||
base_healing_amt = 10 | ||
diminishing_multiplier = 0.5 | ||
diminish_time = 1.5 MINUTES | ||
extra_traits = list(TRAIT_NOCRITOVERLAY, TRAIT_NOSOFTCRIT) | ||
|
||
/datum/status_effect/regenerative_extract/purple/on_remove() | ||
. = ..() | ||
if(owner.has_dna()?.species?.reagent_tag & PROCESS_ORGANIC) // won't work during cooldown, and won't waste effort injecting into IPCs | ||
var/inject_amt = round(10 * multiplier) | ||
if(inject_amt >= 1) | ||
owner.reagents?.add_reagent(/datum/reagent/medicine/regen_jelly, inject_amt) | ||
|
||
|
||
/datum/status_effect/regenerative_extract/silver | ||
base_healing_amt = 4 | ||
nutrition_heal_cap = NUTRITION_LEVEL_WELL_FED + 50 | ||
diminishing_multiplier = 0.8 | ||
diminish_time = 30 SECONDS | ||
extra_traits = list(TRAIT_NOFAT) | ||
|
||
/datum/status_effect/regenerative_extract/yellow | ||
extra_traits = list(TRAIT_SHOCKIMMUNE, TRAIT_TESLA_SHOCKIMMUNE, TRAIT_AIRLOCK_SHOCKIMMUNE) | ||
|
||
/datum/status_effect/regenerative_extract/adamantine | ||
extra_traits = list(TRAIT_FEARLESS, TRAIT_HARDLY_WOUNDED) | ||
|
||
// rainbow extracts are similar to old regen extract effects, albeit it won't replace your organs, and won't heal limbs (unless you're an oozeling) | ||
#define RAINBOW_HEAL_FLAGS ~(HEAL_ADMIN | HEAL_RESTRAINTS | HEAL_LIMBS | HEAL_REFRESH_ORGANS) | ||
|
||
/datum/status_effect/regenerative_extract/rainbow | ||
alert_type = null | ||
diminishing_multiplier = 0 // you can't use other extracts at all during this time | ||
tick_interval = -1 | ||
|
||
/datum/status_effect/regenerative_extract/rainbow/on_apply() | ||
var/heal_flags = RAINBOW_HEAL_FLAGS | ||
if(isoozeling(owner)) // have some mercy on oozelings | ||
heal_flags |= HEAL_LIMBS | ||
owner.revive(heal_flags) | ||
return FALSE // return false so we immediately clear the effect and start the cooldown | ||
|
||
|
||
#undef RAINBOW_HEAL_FLAGS |
26 changes: 26 additions & 0 deletions
26
monkestation/code/modules/slimecore/crossbreeding/regenerative/cooldown.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/datum/status_effect/slime_regen_cooldown | ||
id = "slime_regen_cooldown" | ||
status_type = STATUS_EFFECT_MULTIPLE | ||
tick_interval = -1 | ||
alert_type = null | ||
remove_on_fullheal = TRUE | ||
heal_flag_necessary = HEAL_ADMIN | ||
/// The multiplier applied to the effect of a regen extract while this cooldown is active. | ||
/// As multiple cooldowns can be active at the same time, these multipliers stack, resulting in exponentially diminishing returns. | ||
var/multiplier = 1 | ||
|
||
/datum/status_effect/slime_regen_cooldown/on_creation(mob/living/new_owner, multiplier = 1, duration = 45 SECONDS) | ||
src.multiplier = multiplier | ||
src.duration = duration | ||
return ..() | ||
|
||
/datum/status_effect/slime_regen_cooldown/on_apply() | ||
RegisterSignal(owner, COMSIG_SLIME_REGEN_CALC, PROC_REF(apply_multiplier)) | ||
return TRUE | ||
|
||
/datum/status_effect/slime_regen_cooldown/on_remove() | ||
UnregisterSignal(owner, COMSIG_SLIME_REGEN_CALC) | ||
|
||
/datum/status_effect/slime_regen_cooldown/proc/apply_multiplier(datum/source, multiplier_ptr) | ||
SIGNAL_HANDLER | ||
*multiplier_ptr *= multiplier |
Oops, something went wrong.