Skip to content

Rkz Stamina fixes - #1575

Open
Tsar-Salat wants to merge 4 commits into
DaedalusDock:masterfrom
Tsar-Salat:stamina-fixes
Open

Tsar-Salat wants to merge 4 commits into
DaedalusDock:masterfrom
Tsar-Salat:stamina-fixes

Conversation

@Tsar-Salat

Copy link
Copy Markdown

About The Pull Request

This is me upstreaming the relevant fixes of:

Atleast in the places where kapu and I have a similiar idea of how the system should work

The only real unwanted balance change you might not like is the armor one

Why It's Good For The Game

At 49 stamina remaining there was a 608% chance to stun a carbon, and at 0 stamina remaining that chance went to 20%.

I love algebra

Changelog

🆑 rkz/tsar-salat
fix: fixed stamina stun calculation. Carbons will no longer be more likely to be stunned with higher stamina.
code: stamcrit is now a status effect, should handle better
fix: fixed instances of stam damage healing stamina
fix: clamped armor values, fixing damaging enough bullets healing stamina
fix: fixed current stamina sometimes going above max stamina (it broke stuff)
/:cl:

* * paralyze : duration to paralyze src
* * overstam : If TRUE, stamina_amount will be able to deal stamina damage over the waekened threshold, allowing it to also stamina stun.
* * stack_status : Should the given status value(s) stack ontop of existing status values?
* * protection : Armor value (0-100) that reduces stamina_amount

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Armor was handled a bit odd here, so this should make more sense.

But I may not have a good idea of what you were going for with it, so lmk if you want it to be handled differently

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can just remove the placeholder, if/when we get a protection mechanic it'll be handled inside the proc itself.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I guess then, would you prefer your previous logic of var/stamina = P.disorient_damage * ((100-armor_check)/100) or just.. no armor proctection at all?

Kapu1178

This comment was marked as duplicate.

Comment on lines +2161 to +2162
/mob/living/proc/takes_stamina_damage()
return pre_stamina_change(-1) != 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not really a fan of how this works. Would rather a trait or similar.

* * paralyze : duration to paralyze src
* * overstam : If TRUE, stamina_amount will be able to deal stamina damage over the waekened threshold, allowing it to also stamina stun.
* * stack_status : Should the given status value(s) stack ontop of existing status values?
* * protection : Armor value (0-100) that reduces stamina_amount

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can just remove the placeholder, if/when we get a protection mechanic it'll be handled inside the proc itself.

Comment on lines +14 to +20
RegisterSignal(owner, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(on_heal))
if(owner.stat == DEAD)
return FALSE
if(!(owner.status_flags & CANKNOCKDOWN) || HAS_TRAIT(owner, TRAIT_STUNIMMUNE))
return FALSE
if(owner.absorb_stun(1))
return FALSE

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you want to move this to a status effect (Not a bad idea), these checks should be handled by stamina_stun() like other incapacitating status effects, since otherwise every second, stun-immune mobs would be churning status effect datums. Lots of wasted overhead.

@github-actions

Copy link
Copy Markdown

This pull request conflicts with the merge target.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants