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

Battle effects screen #428

Open
wants to merge 60 commits into
base: dev
Choose a base branch
from
Open

Conversation

jtigues
Copy link
Collaborator

@jtigues jtigues commented Oct 24, 2023

  • Adds a new screen to the Tracker during trainer battles. Accessed by clicking on the pokeball icons when viewing an enemy mon
  • The screen can show Statuses of individual mons, as well as effects applied to either side of the battle, and the whole battle. User can switch between the different views by
  • The screen allows users to see passive Battle Effects which the game has notified them of, but cannot otherwise be reminded of once the next turn starts.
  • Some examples: Weather conditions, Leech Seed and which mon will receive the HP, Taunt, Encore, Confusion, Reflect/Light Screen, pending Future Sight attacks, or the number of times an enemy has successfully Protected consecutively.
    image

There is one known and incredibly minor bug I have not been able to sort out: I cannot for the life of me get the text & buttons to appear with shadows, and it seems it should work fine enough. But functionally, everything works fine across Games and Languages.
Another note: the plan is eventually to have the Last Move used by each pokemon displayed separately here. But that framework is not in place yet, so it just shows the Last Move used as recorded by the Last Damage framework
Also, I don't know where this expYield removal change came from, if I need to go in and manually re-add all of those that's fine.

Fixed Bide Turn counter, added Pay Day, added Leech Seed source, Water Sport bugfix, memory address fixes, text parsing
Removing hardcoded addresses, adding Knock Off
Button alignments, UI refactor
Syncing paging with other screens, organizing colors
Removing unused variables and redundant sets
Removing unnecessary draw
@jtigues
Copy link
Collaborator Author

jtigues commented Oct 24, 2023

Few small things I've noticed looking back over it:

  • "stale" flag is no longer used but still has references
  • BattleEffectsScreen Button is being drawn unnecessarily, the button is invisible
  • Left Arrow pixel image has an extra column of 0s, it's actually 10 by 9.

Fixed

gBattleTerrain already defined, removing new reference
Copy link
Collaborator

@UTDZac UTDZac left a comment

Choose a reason for hiding this comment

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

I quickly reviewed the files that weren't the large BattleEffectsScreen.lua file, I'll review that one later.

As a note for that file though, I noticed quite a few functions that were defined as global, such as function loadFieldEffects(). If this function is only meant to be used within this file, use local function loadFieldEffects(), otherwise, preface it with the filename: function BattleEffectsScreen.loadFieldEffects().

I also recommend making two changes to the `initialize() function:

  • Move this as far up to the top of the file as possible, its usually the first important thing that should be seen for any given screen file
  • Include any BattleEffectsScreen.variablename that have defined defaults that can change in this function. Quickloading does not reset those variables, so you must reset them in this function (called when the tracker starts up).
    • For example: The variable viewedMonIndex is one that I'd expect to change as I play the game. It needs to be set to its default value in initialize(), otherwise if I reset my game while its some other value, my new game will be using the old value.

ironmon_tracker/Constants.lua Outdated Show resolved Hide resolved
ironmon_tracker/Languages/English.lua Outdated Show resolved Hide resolved
ironmon_tracker/Utils.lua Outdated Show resolved Hide resolved
ironmon_tracker/Utils.lua Outdated Show resolved Hide resolved
ironmon_tracker/screens/TrackerScreen.lua Outdated Show resolved Hide resolved
Removing duplicate gBattleWeather, moving initialize(), moving more instantiailization to initialize, correcting naming of local functions
Triangle arrow fixing, minor syntax corrections
@jtigues
Copy link
Collaborator Author

jtigues commented Oct 24, 2023

expYield has been added back in, and the various concerns with the syntax/formatting have been resolved.

Also added the text strings to the non-English files, oops.

Shifting some things back out of initialize
Moving buttons back out of file declaration, boxColors throws errors
Removing unnecessary nil parameters
Fix bug where button is clickable when viewing allied mons
Copy link
Collaborator

@Fellshadow Fellshadow left a comment

Choose a reason for hiding this comment

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

Nothing major from me, just the little bits of cleanup stuff I mentioned in the discord
Will leave open since Zac is wanting to do some testing

Removed screen text entries that were duplicates of move names. Changes highlight color to Intermediate text. Changed Allied/Enemy Mon text to be highlight color.
Increase Team View Button size in 2-mon battles
Bugfix, Turn counter
Future Sight Bugfix, Last move reimplemented, turn counter added
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.

3 participants