danenders / pokeclassic

PokeClassic is a romhack inspired by Pokemon Yellow, using the Pokemon Emerald Engine.
50 stars 12 forks source link

Bug: Mewtwo & Zapdos don't disappear after being caught #65

Closed ttdevmode93 closed 1 year ago

ttdevmode93 commented 1 year ago

It seems like in some cases, the legendary Pokémon don't vanish after they are caught by the player. This allows them to be caught again.

MrMazzone commented 1 year ago

This is a feature, not a bug! 🙂

MrMazzone commented 1 year ago

I just played through these parts and can confirm the same.

DaniRainbow commented 1 year ago

Articuno does not have this issue, so I pulled up the scripts.inc for the PowerPlant and SeafoamIslands_B4F. They are very similar but I did find two differences.

From SeafoamIslands_B4F/scripts.inc :

SeafoamIslands_B4F_OnTransition:: call_if_set FLAG_CAUGHT_ARTICUNO, SeafoamIslands_B4F_EventScript_HideArticuno call_if_unset FLAG_CAUGHT_ARTICUNO, SeafoamIslands_B4F_EventScript_TryShowArticuno call_if_unset FLAG_STOPPED_SEAFOAM_B4F_CURRENT, SeafoamIslands_B4F_EventScript_CheckStoppedCurrent call_if_set FLAG_STOPPED_SEAFOAM_B4F_CURRENT, SeafoamIslands_B4F_EventScript_SetNoCurrentLayout end

From PowerPlant/scripts.inc :

PowerPlant_OnTransition: setvar VAR_TEMP_1, 0 setvar VAR_TEMP_2, 0 call_if_unset FLAG_DEFEATED_POWER_PLANT_ELECTRODE_1, PowerPlant_EventScript_ShowElectrode1 call_if_unset FLAG_DEFEATED_POWER_PLANT_ELECTRODE_2, PowerPlant_EventScript_ShowElectrode2 call_if_set FLAG_CAUGHT_ZAPDOS, PowerPlant_EventScript_HideZapdos call_if_unset FLAG_CAUGHT_ZAPDOS, PowerPlant_EventScript_TryShowZapdos end

I do not have a save file where Articuno was not caught or defeated yet to test, but the issue may be solved by adding another ":" after "PowerPlant_OnTransition:" as that is a difference between the two. That being said, the Zapdos encounter is not completely broken so I also want to try removing the setvar for VAR_TEMP_1 and VAR_TEMP_2. They aren't mentioned anywhere else in the file, but may be needed for the Electrode encounters that happen with the fake items. Anyone willing to test these changes or provide me with a save where I can access Zapdos without much hassle?

DaniRainbow commented 1 year ago

In addition, I pulled up the scripts for Mewtwo's encounter and it also showed only one colon.

From CeruleanCave_B1F/scripts.inc

CeruleanCave_OnTransition: call_if_set FLAG_CAUGHT_MEWTWO, CeruleanCave_EventScript_HideMewtwo call_if_unset FLAG_CAUGHT_MEWTWO, CeruleanCave_EventScript_TryShowMewtwo end

DaniRainbow commented 1 year ago

Adding the : back didn't fix the Zapdos encounter. Still investigating

danenders commented 1 year ago

Issues with the MapScripts. Cerulean Cave had two sets of MapScripts being initialized, so I cleared one out, which should fix Mewtwo. Power Plant was attempting to fire both "OnTransition" and "OnResume" on RESUME, likely due to a copy+paste mistake. Should fix both Zapdos and Electrodes in the Power Plant.

DaniRainbow commented 1 year ago

Fixed! Bravo https://imgur.com/a/dtVZUzr