besteon/Ironmon-Tracker

Add full support for tracking and View Cycling in Double Battles

jtigues opened this issue · 6 comments

Currently, tracking is only for the currently viewed pokemon, and tracking for the 'other' pokemon in doubles is done by forcing the viewed pokemon to change when they attack.

Ideally, during a double battle, the tracker should have eyes on all 4 pokemon, and the user should be able to freely toggle between all 4 pokemon.

Initial thoughts:

  • We have a bool currently which tracks whether we are looking at our Pokemon or the enemy's. We would need another variable that similarly tracks whether we are looking at the left or right pokemon.
  • Move effectiveness is displayed relative to the 'otherView'. Not sure at this time if there's a good way to somehow see the effectiveness between any 2 Pokemon. Might just need to leave it as only looking at AllyLeft and EnemyLeft for enemies and allies respectively
  • Not sure if we should do anything with last damage tracking; could set things up to show for each allied pokemon the last damage taken, or set it up to where each enemy pokemon shows the last damage dealt. But in either case it would not be clear from whom or to whom the damage would have been dealt.
  • depending on how much of an overhaul this actually ends up being, might take the chance to port over the skill swap changes. Two large features of that change were tracking abilities based solely on the attacker/battler flags, and a means of reading the used moves and abilities for all 4 pokemon in the battle

Toggling working, couple edge cases to hammer out

DoubleBattleViewToggle.mp4

Restructuring done, toggling is now fully working.

Remaining TODO:

  • When a pokemon faints and the opponent's don't have a replacement, the pokemon remains as part of the toggle cycle
  • Ability tracking needs to be reworked so that it determines the index of the mon whose ability should be tracked. Will combine this with the skill swap changes which will further open the door to move tracking
  • Move tracking similarly should be determining the attacker and whether the move was successful, instead of logging based on PP reduction

Ability and move tracking overhaul is completed and tested. Leaving the ability to view pokemon at 0 HP since we already do this at the end of single battles.

Notably, we couldn't come to a good solution with the current setup to allow users to change the target pokemon that the move effectiveness is using for its calculations, while clearly indicating that Pokemon in a non-obstructive way. So that will remain defaulted to the 'Left' Pokemon on either team.

Leaving open until it goes live, currently just in staging

Ok, now it's live with 6.4.0