From 593275684e0ce4b05bfdb099aa7852c9f5b90116 Mon Sep 17 00:00:00 2001 From: Blake Walsh <5808762+blake-sc@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:43:51 +0200 Subject: [PATCH 1/2] remove-stress also removes long-term stress, which also immediately removes stress and haggard statuses --- changelog.txt | 1 + remove-stress.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/changelog.txt b/changelog.txt index 7a74140c52..a37db487f5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -38,6 +38,7 @@ Template for new versions: - `starvingdead`: ensure undead decay does not happen faster than the declared decay rate when saving and loading the game ## Misc Improvements +- `remove-stress`: also applied to long-term stress, immediately removing stressed and haggard statuses ## Removed diff --git a/remove-stress.lua b/remove-stress.lua index 7cf0193645..40ce4946a3 100644 --- a/remove-stress.lua +++ b/remove-stress.lua @@ -1,6 +1,7 @@ -- Sets stress to negative one million --By Putnam; http://www.bay12forums.com/smf/index.php?topic=139553.msg5820486#msg5820486 --edited by Bumber +--edited by BlakeMW --@module = true local utils = require('utils') @@ -14,6 +15,9 @@ function removeStress(unit,value) if unit.status.current_soul.personality.stress > value then unit.status.current_soul.personality.stress = value end + if unit.status.current_soul.personality.longterm_stress > value then + unit.status.current_soul.personality.longterm_stress = value + end end end From 1cd36fbd431a76488f3e5f32781026818dce6ec5 Mon Sep 17 00:00:00 2001 From: Myk Date: Sat, 3 May 2025 10:49:41 -0700 Subject: [PATCH 2/2] Update remove-stress.lua --- remove-stress.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/remove-stress.lua b/remove-stress.lua index 40ce4946a3..251ab774ae 100644 --- a/remove-stress.lua +++ b/remove-stress.lua @@ -1,7 +1,6 @@ -- Sets stress to negative one million --By Putnam; http://www.bay12forums.com/smf/index.php?topic=139553.msg5820486#msg5820486 --edited by Bumber ---edited by BlakeMW --@module = true local utils = require('utils')