Skip to content

remove-stress also removes long-term stress, which also immediately removes stressed and haggard statuses #1444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions remove-stress.lua
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more of these attribution lines, please. That's what the git history is for.

--@module = true

local utils = require('utils')
Expand All @@ -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

Expand Down