Pokecube-Development / Pokecube-Issues-and-Wiki

This is where all issues for the core pokecube mods should go, also this is where the main wiki should be maintained
MIT License
30 stars 24 forks source link

Pokemobs who evolve during combat temporarily forget their ability #778

Closed UnLuCkYcHaRrnS closed 3 years ago

UnLuCkYcHaRrnS commented 3 years ago

Pokemobs who evolve while they are involved in combat have their ability set to null. This appears to happen in the evolution handler and therefore affects all methods of evolution, including stones and mega evolutions which I tested specifically. This appears to revert reliably by recalling the pokemob and sending it out again, but in the case of mega evolutions it can mean that the mega evolved pokemob's ability is inactive until the battle is over. This is more likely to be problematic in a pvp situation and especially so if the pvp is nonconsensual.

I have not tested this with a level-up evolution because the circumstances of such an evolution during a single combat are atypical, irreversible, and hard to control.

What happens:

When an evolution stone is used on Eevee who knows Adaptability while Eevee is engaged in combat with a wild pokemob, the resulting Eeveelution has the ability Null instead of Eevee's Adaptability or the specific ability per Eeveelution.

When Limber Lopunny is mega evolved while engaged in combat with a wild pokemob, Mega Lopunny has the ability Null instead of Scrappy, and when reverted to normal Lopunny has the ability Null instead of Limber and can be paralyzed.

This does not happen while the pokemob is outside of combat!

What you expected to happen:

Pokemobs should check to remember their ability immediately after evolving without having to return to their pokecube, regardless of whether they are in combat or not.

Steps to reproduce:

  1. Acquire a pokemob that is capable and ready to evolve by evolution stone or mega evolution and experiences an ability change during this evolution, such as Eevee and a fire/water/thunder/leaf stone or Lopunny with Lopunnite, among others

  2. Find a wild pokemob to attack and approach closely enough that pressing the Pokemob Attack button (default: g) will immediately assign the wild pokemob as a target to our pokemob, displaying in the upper right corner of the on-screen pokecube UI

We don't need to take or receive damage, simply evolve while the pokemob is trying to fight, so as a test control we can throw our pokemob far enough away that it can evolve without having to battle and potentially faint or KO the wild pokemob, and thus ruin our test.

  1. Issue an attack order on the wild pokemob to our pokemob and immediately activate our evolution method of choice

  2. Once our pokemob completes its evolution sequence, view it in the Live PokeWatch screen for our pokemob by using the PokeWatch on it or with the shortcut: ctrl+z and observe that its ability is listed as Null

4.5 In certain situations visually confirm that our pokemob is not benefitting from its ability (Such as Limber Lopunny being paralyzed after reverting into Null Lopunny from Null Mega Lopunny. Limber prevents paralysis completely). This can also be viewed in the pokecube's tooltip after recalling our pokemob, until sent out again.

  1. Recall and then send out our pokemob again to observe that it has remembered the correct ability. If our pokemob can evolve again, such as with mega evolutions, this process is repeatable

    Affected Versions:

OptiFine 1.16.5 HD Pokecube AIO: 1.16.5-3.11.5 Thuttech 1.16.4-9.1.2 Minecraft: 1.16.5 Forge 36.2.0

Thutmose commented 3 years ago

So interestingly enough, this seems to be a client side bug.

I can confirm that the ability disappears in the watch, but when I have the server report what the ability for the pokemob is, it still displays it, so the ability should still be working fine, are you sure that limber works normally?

UnLuCkYcHaRrnS commented 3 years ago

After using Pikachu's Thunder Wave on Limber Lopunny 100 times, Lopunny was paralyzed 0 times

After using Pikachu's Thunder Wave on Scrappy Mega Lopunny 18 times, Lopunny was paralyzed 15 times

Limber seems to be working properly