Battle Frontier data structures (Generation III): Difference between revisions

(add battle style)
Line 87: Line 87:


== Battle Style Moves ==
== Battle Style Moves ==
In determining a trainer's battle style, seven lists of moves are kept by the game, and from these, one of nine battle styles is determined.  The trainer's Pokémon's moves are matched up against these seven lists, and a list is considered "satisfied" if the trainer has enough moves from that list (this is three moves for the first four lists and two moves for the last three).  The game then determines the battle style based on how many of the lists are satisfied (either none, 1-2, or at least 3; the middle one of which will also state the last list that was satisfied, for a total of 9 styles).
In determining a trainer's battle style in the [[Battle Factory (Hoenn)|Battle Factory]], seven lists of moves are kept by the game, and from these, one of nine battle styles is determined.  The trainer's Pokémon's moves are matched up against these seven lists, and a list is considered "satisfied" if the trainer has enough moves from that list.  The number of moves that are needed for a list to be satisfied is stored in memory location 0x08611FC0 as a list of 7 unsigned 8-bit integers; by default this is three moves for the first three lasts and two for the last four.  The game then determines the battle style based on how many of the lists are satisfied (either none, 1-2, or at least 3; the middle one of which will also state the last list that was satisfied, for a total of 9 styles).


The master list of moves used in determining battle style is stored as an array of 7 pointers to lists of 16-bit unsigned integers, referring to the corresponding indices in the master move list (see [[List of moves]]).  All seven lists have no fixed length, and are terminated with 0x0000.
The master list of moves used in determining battle style is stored as an array of 7 pointers to lists of 16-bit unsigned integers, referring to the corresponding indices in the master move list (see [[List of moves]]).  All seven lists have no fixed length, and are terminated with 0x0000.
Line 109: Line 109:
|}
|}


The lists of moves appear immediately before the seven pointers themselves in the game ROM.
The lists of moves appear immediately before the seven pointers themselves in the game ROM.  The number of moves needed to satisfy each list appears immediately before the lists of moves.


[[Category:Structures]]
[[Category:Structures]]
222

edits