This commit is contained in:
silicons
2020-09-21 18:35:42 -07:00
parent 5581e13ccd
commit ddc7f10de7
2 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
/// Maximum stamina buffer
/datum/config_entry/number/stamina_combat/buffer_max
config_entry_value = 75
config_entry_value = 45
/// Seconds until percent_regeneration_out_of_combat kicks in
/datum/config_entry/number/stamina_combat/out_of_combat_timer
@@ -18,8 +18,8 @@
/datum/config_entry/number/stamina_combat/combat_regeneration
config_entry_value = 5
/// After out_of_combat_timer elapses, additionally regenerate this percent of missing stamina per second. Unaffected by combat mode.
/datum/config_entry/number/stamina_combat/missing_percent_regeneration_out_of_combat
/// After out_of_combat_timer elapses, additionally regenerate this percent of total stamina per second. Unaffected by combat mode.
/datum/config_entry/number/stamina_combat/percent_regeneration_out_of_combat
config_entry_value = 30
/// Seconds after an action for which your regeneration is penalized

View File

@@ -33,13 +33,13 @@
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/out_of_combat_timer, out_of_combat_timer)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/base_regeneration, base_regeneration)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/combat_regeneration, combat_regeneration)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/missing_percent_regeneration_out_of_combat, missing_percent_regeneration_out_of_combat)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/percent_regeneration_out_of_combat, percent_regeneration_out_of_combat)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/post_action_penalty_delay, post_action_penalty_delay)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/post_action_penalty_factor, post_action_penalty_factor)
var/base_regen = (SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))? base_regeneration : combat_regeneration
var/time_since_last_action = world.time - last_action
var/action_penalty = (((time_since_last_action) < (post_action_penalty_delay * 10)) && post_action_penalty_factor) || 1
var/out_of_combat_bonus = (time_since_last_action < (out_of_combat_timer * 10))? ((buffer_max - stamina_buffer) * (missing_percent_regeneration_out_of_combat * 0.01)) : 0
var/out_of_combat_bonus = (time_since_last_action < (out_of_combat_timer * 10))? 0 : ((buffer_max * missing_percent_regeneration_out_of_combat * 0.01))
var/regen = ((base_regen * action_penalty) + out_of_combat_bonus) * time * 0.1 * stamina_buffer_regen_mod
stamina_buffer += min((buffer_max - stamina_buffer), regen)
if(updating_hud)