pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Rockruff dusk form not evolving

Open j-diefenbach opened this issue 9 months ago • 1 comments

This PR addresses an issue raised where rockruff with own tempo is unable to evolve into dusk form. During dusk it does not evolve, during day or night it evolves instead into the midday/midnight forms. Replaced inappropriate 'getSpeciesFormIndex' (which is not able to check rockruff's species since it doesn't have access to the pokemon's information, only scene info. It defaults to zero so rockruffs form index will always be zero) with 'hasAbility' for own tempo. In order to prevent an own tempo rockruff from evolving otherwise I've added a check for own tempo. Plus relevant import from enum abilities. Screenshots of bug (#681) image note that getSpeciesFormIndex might be worth updating in future for more complex forms however this approach seems to be suitable and avoids messing with getSpeciesFormIndex unnecessarily

j-diefenbach avatar May 10 '24 01:05 j-diefenbach

Since the getSpeciesFormIndex doesn't work for rockruff, formIndex will accurately track whether it was originally an owntempo rockruff or not (otherwise we would be creating additional functions or modifying getFormIndex which was intended for wild pokemon gen). If it fuses to any other pokemon it still keeps its formIndex the same since it takes the first pokemon's form. So far rockruff still evolves correctly, an OT rockruff fused w any pokemon still evolves into dusk form, a regular rockruff fused with an OT rockruff (or any other pokemon that overwrites the ability as own tempo) will turn into day/night forms still.

Regular rockruff fused with own tempo rockruff evolves into day form correctly: image OT rockruff fused with another pokemon (replacing OT) still evolves into dusk form: image @Xavion3. should be fine with fusions

j-diefenbach avatar May 12 '24 02:05 j-diefenbach