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

Optimized Bad Dreams' code #2434

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

LOuroboros
Copy link
Collaborator

@LOuroboros LOuroboros commented Nov 4, 2022

Description

Earlier today as I was looking into #2430, I realized by checking the code that composes Bad Dreams' effect, that the way in which we handle it is a bit more complex than it needs to be. It's similar to how I feel about the code for Intimidate's effect in the vanillla game.

Because of that, I took it upon myself to streamline the code that handles the effect of the ability a little bit.
Instead of having 2 or 3 different loops directly involved in the ability's effect, now there's only one and it's completely handled in the battle script of the ability's effect directly. This allowed me to free up Cmd_trygetbaddreamstarget which was never really needed.

As I tested the ability's behavior in the modern games, I noticed that the behavior of the Ability Pop Up wasn't accurate; the pop up needs to stay on screen until the ability is done performing its effect, so I updated that.
I also noticed that the text string used by Bad Dreams was different in ORAS so I updated that too.

badDreamsORAS.mp4

I'm submitting this as a Draft for now, since the changes to sText_BadDreamsDmg may need to be reverted depending on the result of this poll.

Discord contact info

Lunos#4026

Misc:
-Made the ability pop up stick around until the ability's effect ends just like in ORAS.
-Updated sText_BadDreamsDmg accordingly while I was at it.
@LOuroboros LOuroboros marked this pull request as ready for review November 8, 2022 10:12
@LOuroboros
Copy link
Collaborator Author

The results of the poll speak for themselves, no one disabled the ability pop up, as such, the PR is ready for review since I won't need to revert the change to sText_BadDreamsDmg 👀

@AsparagusEduardo AsparagusEduardo merged commit e6ae0bd into rh-hideout:upcoming Nov 8, 2022
@LOuroboros LOuroboros deleted the badDreams branch November 8, 2022 11:22
@AsparagusEduardo AsparagusEduardo mentioned this pull request Nov 10, 2022
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