-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplemented Mimicry #2473
Reimplemented Mimicry #2473
Conversation
This should be redone to be included in the ABILITYEFFECT_ON_TERRAIN case |
Working on it. It works for the most part, but the game freezes after I've been looking at the code to see if I could figure out what's going on, but I can't really spot anything wrong per se 🤔 LOuroboros/pokeemerald@mimicry...LOuroboros:pokeemerald:mimicry_dev |
Mimicry is now a proud member of ABILITYEFFECT_ON_TERRAIN. Misc. changes: -Ditched the dependency on and usage of gBattlerAttacker for the effects inside ABILITYEFFECT_ON_WEATHER and ABILITYEFFECT_ON_TERRAIN. -Made Cmd_switchineffects activate ABILITYEFFECT_ON_TERRAIN to take into account overworld weather-induced field terrains. -Updated the text strings printed by the battle scripts inside the aforementioned AbilityBattleEffects caseIDs. -Removed constant label of unused VARIOUS_TRY_TO_APPLY_MIMICRY which I forgot about. -Updated ChangeTypeBasedOnTerrain, partly as a result of the aforementioned changes but also for optimization purposes. -There was never a reason to establish an empty scope, or to use GET_MOVE_TYPE and the variables that complemented it. -Removed case ABILITY_QUARK_DRIVE from AbilityBattleEffects' case ABILITYEFFECT_ON_SWITCHIN.
Alright, solved the issue and made some extra changes involving the new |
-Removed unnecessary special handling of terrain-inducing overworld weather states from ChangeTypeBasedOnTerrain. -Mimicry now activates normally for terrain-inducing overworld weather states. -Weather abilities now activate normally when switchineffects is called, and at the beginning of a battle. -Terrain abilities now activate normally at the beginning of a battle.
Ready for another review 👀 |
-Foolproofed the ability checks in ABILITYEFFECT_ON_WEATHER and ABILITYEFFECT_ON_TERRAIN -Made BattleScript_OverworldWeatherStarts and BattleScript_OverworldTerrain call the battle scripts that handle weather form changes, weather abilities, terrain seeds and terrain abilities. -Consequentially, I removed the activation for weather and terrain abilities that I added to TryDoEventsBeforeFirstTurn, and the activation of Protosynthesis in ABILITYEFFECT_ON_SWITCHIN. -Added a weatherAbilityDone to prevent abilities that lack self-checks like Protosynthesis from getting stuck in a loop. -Removed now pointless ABILITYEFFECT_WEATHER_FORM. I think Duke/Sneed69 added it to fix Castform's form change, but it no longer serves a purpose.
Ready for another review 👀 |
Description
About a year ago I implemented Mimicry, an ability that changes the user's type based on the active field terrain.
I can't say that I like some of the decisions I took, so I just removed it and reimplemented it.
As far as I tested, it's all working, but extra testing is always welcomed.
Closes #2472.
Discord contact info
Lunos#4026