Skip to content
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

Update winded #31911

Merged
merged 5 commits into from Jun 27, 2019
Merged

Update winded #31911

merged 5 commits into from Jun 27, 2019

Conversation

deadcutlass2
Copy link
Contributor

@deadcutlass2 deadcutlass2 commented Jun 27, 2019

SUMMARY: Balance "Edits the winded effect to make more sense and not permalock the player"

Purpose of change

Fixes #31889 Fixes #31907

Describe the solution

Rebalances the winded effect to not redundantly reduce hunger, thirst, and fatigue as is already done by the player activity level, caps the pain level to prevent locking a player down into more pain than any hulk or gun could hope to accomplish, and also increasing the movement penalty because of these.

also allows very slight stamina regen while winded to prevent being locked into winded at 0 stamina.

Additional context

Player reported pain from being gutpunched by a hulk is ~40, so i set the cap to about half of that. Being incapable of running does not decrease your hunger, fatigue, or thirst, those should already be decreased by the stamina draining activity.

@deadcutlass2 deadcutlass2 changed the title Update effects.json Update winded Jun 27, 2019
@Zireael07
Copy link
Contributor

Why close?

@deadcutlass2
Copy link
Contributor Author

I missed something important to actually fix the bugs, so i closed it while i went to find it

@deadcutlass2 deadcutlass2 reopened this Jun 27, 2019
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mechanics: Effects / Skills / Stats Effects / Skills / Stats labels Jun 27, 2019
@nexusmrsep
Copy link
Contributor

nexusmrsep commented Jun 27, 2019

I agree with this change. Winded effect should represent strain and limit activity that player may partake after burning all the stamina. It's an exclamation mark and a warning not to strain yourself any longer rather then a one shot penalty for crossing the line.

@Kibawan
Copy link

Kibawan commented Jun 27, 2019

one shot kill from winded was a bug.
Now, my opinions here the pain should cap on yellow, never push to red. The add move penalty is more than enough punishment for lack of attention to your stamina.

@@ -4627,7 +4627,7 @@ void player::update_stamina( int turns )
float stamina_recovery = 0.0f;
// Recover some stamina every turn.
// Mutated stamina works even when winded
float stamina_multiplier = ( !has_effect( effect_winded ) ? 1.0f : 0.0f ) +
float stamina_multiplier = ( !has_effect( effect_winded ) ? 1.0f : 0.1f ) +
Copy link
Member

Choose a reason for hiding this comment

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

This has a side effect of opening the player up to losing stamina when winded and encumbered, i.e.
stamina_multiplier - 0.1
base regen = 20
mouth encumbrance = 30
on line 4634, stamina_recovery += 0.1 * 20 - 3
stamina_recovery = -1

Can just remove if( stamina_multiplier > 0.0f ) {
and instead clamp stamina_recovery to 0+ after applying encumbrance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The if was redundant and removed, and the negative thing has the max check between 1 and ( base recovery - mouth encumbrance / 10 ) on it, meaning that it would solve out to a absolute minimum of 0.1 or 1.7 in your example.

Copy link
Member

Choose a reason for hiding this comment

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

You are correct, cool.

@kevingranade kevingranade merged commit aa96c09 into CleverRaven:master Jun 27, 2019
@micage
Copy link

micage commented Jun 28, 2019

Having fun while playing a game is more important than playing a "realistic" game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mechanics: Effects / Skills / Stats Effects / Skills / Stats
Projects
None yet
7 participants