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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

moon smile effect durations fix #81794

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

ViktorKoL
Copy link
Contributor

@ViktorKoL ViktorKoL commented Mar 2, 2024

About The Pull Request

Moon smile's durations had some syntax issues, causing their durations to be much lower than intended, and sanity having very low impact on it. Also adds a use of SANITY_MAXIMUM define, so that the calculation will still work if this value is ever changed.

Why It's Good For The Game

The moon did not smile. It was frowning. Frowning because it was bugged :( But with this fix it can smile again :)

Changelog

馃啈
fix: fixed some issues when calculating the duration of moon smile's effects
/:cl:

@tgstation-server tgstation-server added the Fix Rewrites a bug so it appears in different circumstances label Mar 2, 2024
@Rex9001
Copy link
Contributor

Rex9001 commented Mar 2, 2024

Not that this needs this but Yeah this was the intent of the original pr

@@ -28,7 +28,8 @@
/datum/action/cooldown/spell/pointed/moon_smile/cast(mob/living/carbon/human/cast_on)
. = ..()
/// The duration of these effects are based on sanity, mainly for flavor but also to make it a weaker alpha strike
var/moon_smile_duration = (150 - cast_on.mob_mood.sanity) / 10
var/maximum_duration = 15 SECONDS
var/moon_smile_duration = ((SANITY_MAXIMUM - cast_on.mob_mood.sanity) / (SANITY_MAXIMUM - SANITY_INSANE)) * maximum_duration
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var/moon_smile_duration = ((SANITY_MAXIMUM - cast_on.mob_mood.sanity) / (SANITY_MAXIMUM - SANITY_INSANE)) * maximum_duration
var/moon_smile_duration = ((SANITY_MAXIMUM - cast_on.mob_mood.sanity) / SANITY_MAXIMUM) * maximum_duration

the SANITY_INSANE value is 0 anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know, but just in case it ever changes, I use the define so that the scaling stays accurate.

@Ghommie Ghommie merged commit 6d5a86b into tgstation:master Mar 4, 2024
21 of 22 checks passed
comfyorange added a commit that referenced this pull request Mar 4, 2024
github-actions bot added a commit that referenced this pull request Mar 4, 2024
@ViktorKoL ViktorKoL deleted the moon_smile_durations_fix branch April 4, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Rewrites a bug so it appears in different circumstances
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants